feat: Added Inventory proto definitions for VM Manager Inventory. PiperOrigin-RevId: 341842584pull/628/head
parent
b1e1e0b13b
commit
4b0ad15b0f
6 changed files with 470 additions and 128 deletions
@ -0,0 +1,258 @@ |
||||
// Copyright 2020 Google LLC |
||||
// |
||||
// Licensed under the Apache License, Version 2.0 (the "License"); |
||||
// you may not use this file except in compliance with the License. |
||||
// You may obtain a copy of the License at |
||||
// |
||||
// http://www.apache.org/licenses/LICENSE-2.0 |
||||
// |
||||
// Unless required by applicable law or agreed to in writing, software |
||||
// distributed under the License is distributed on an "AS IS" BASIS, |
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
// See the License for the specific language governing permissions and |
||||
// limitations under the License. |
||||
|
||||
syntax = "proto3"; |
||||
|
||||
package google.cloud.osconfig.v1; |
||||
|
||||
import "google/protobuf/timestamp.proto"; |
||||
|
||||
option csharp_namespace = "Google.Cloud.OsConfig.V1"; |
||||
option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1;osconfig"; |
||||
option java_multiple_files = true; |
||||
option java_outer_classname = "Inventories"; |
||||
option java_package = "com.google.cloud.osconfig.v1"; |
||||
option php_namespace = "Google\\Cloud\\OsConfig\\V1"; |
||||
option ruby_package = "Google::Cloud::OsConfig::V1"; |
||||
|
||||
// OS Config Inventory is a service for collecting and reporting operating |
||||
// system and package information on VM instances. |
||||
|
||||
// The inventory details of a VM. |
||||
message Inventory { |
||||
// Operating system information for the VM. |
||||
message OsInfo { |
||||
// The VM hostname. |
||||
string hostname = 9; |
||||
|
||||
// The operating system long name. |
||||
// For example 'Debian GNU/Linux 9' or 'Microsoft Window Server 2019 |
||||
// Datacenter'. |
||||
string long_name = 2; |
||||
|
||||
// The operating system short name. |
||||
// For example, 'windows' or 'debian'. |
||||
string short_name = 3; |
||||
|
||||
// The version of the operating system. |
||||
string version = 4; |
||||
|
||||
// The system architecture of the operating system. |
||||
string architecture = 5; |
||||
|
||||
// The kernel version of the operating system. |
||||
string kernel_version = 6; |
||||
|
||||
// The kernel release of the operating system. |
||||
string kernel_release = 7; |
||||
|
||||
// The current version of the OS Config agent running on the VM. |
||||
string osconfig_agent_version = 8; |
||||
} |
||||
|
||||
// A single piece of inventory on a VM. |
||||
message Item { |
||||
// The origin of a specific inventory item. |
||||
enum OriginType { |
||||
// Invalid. An origin type must be specified. |
||||
ORIGIN_TYPE_UNSPECIFIED = 0; |
||||
|
||||
// This inventory item was discovered as the result of the agent |
||||
// reporting inventory via the reporting API. |
||||
INVENTORY_REPORT = 1; |
||||
} |
||||
|
||||
// The different types of inventory that are tracked on a VM. |
||||
enum Type { |
||||
// Invalid. An type must be specified. |
||||
TYPE_UNSPECIFIED = 0; |
||||
|
||||
// This represents a package that is installed on the VM. |
||||
INSTALLED_PACKAGE = 1; |
||||
|
||||
// This represents an update that is available for a package. |
||||
AVAILABLE_PACKAGE = 2; |
||||
} |
||||
|
||||
// Identifier for this item, unique across items for this VM. |
||||
string id = 1; |
||||
|
||||
// The origin of this inventory item. |
||||
OriginType origin_type = 2; |
||||
|
||||
// When this inventory item was first detected. |
||||
google.protobuf.Timestamp create_time = 8; |
||||
|
||||
// When this inventory item was last modified. |
||||
google.protobuf.Timestamp update_time = 9; |
||||
|
||||
// The specific type of inventory, correlating to its specific details. |
||||
Type type = 5; |
||||
|
||||
// Specific details of this inventory item based on its type. |
||||
oneof details { |
||||
// Software package present on the VM instance. |
||||
SoftwarePackage installed_package = 6; |
||||
|
||||
// Software package available to be installed on the VM instance. |
||||
SoftwarePackage available_package = 7; |
||||
} |
||||
} |
||||
|
||||
// Software package information of the operating system. |
||||
message SoftwarePackage { |
||||
// Information about the different types of software packages. |
||||
oneof details { |
||||
// Yum package info. |
||||
// For details about the yum package manager, see |
||||
// https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/ch-yum. |
||||
VersionedPackage yum_package = 1; |
||||
|
||||
// Details of an APT package. |
||||
// For details about the apt package manager, see |
||||
// https://wiki.debian.org/Apt. |
||||
VersionedPackage apt_package = 2; |
||||
|
||||
// Details of a Zypper package. |
||||
// For details about the Zypper package manager, see |
||||
// https://en.opensuse.org/SDB:Zypper_manual. |
||||
VersionedPackage zypper_package = 3; |
||||
|
||||
// Details of a Googet package. |
||||
// For details about the googet package manager, see |
||||
// https://github.com/google/googet. |
||||
VersionedPackage googet_package = 4; |
||||
|
||||
// Details of a Zypper patch. |
||||
// For details about the Zypper package manager, see |
||||
// https://en.opensuse.org/SDB:Zypper_manual. |
||||
ZypperPatch zypper_patch = 5; |
||||
|
||||
// Details of a Windows Update package. |
||||
// See https://docs.microsoft.com/en-us/windows/win32/api/_wua/ for |
||||
// information about Windows Update. |
||||
WindowsUpdatePackage wua_package = 6; |
||||
|
||||
// Details of a Windows Quick Fix engineering package. |
||||
// See |
||||
// https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-quickfixengineering |
||||
// for info in Windows Quick Fix Engineering. |
||||
WindowsQuickFixEngineeringPackage qfe_package = 7; |
||||
|
||||
// Details of a COS package. |
||||
VersionedPackage cos_package = 8; |
||||
} |
||||
} |
||||
|
||||
// Information related to the a standard versioned package. This includes |
||||
// package info for APT, Yum, Zypper, and Googet package managers. |
||||
message VersionedPackage { |
||||
// The name of the package. |
||||
string package_name = 4; |
||||
|
||||
// The system architecture this package is intended for. |
||||
string architecture = 2; |
||||
|
||||
// The version of the package. |
||||
string version = 3; |
||||
} |
||||
|
||||
// Details related to a Windows Update package. |
||||
// Field data and names are taken from Windows Update API IUpdate Interface: |
||||
// https://docs.microsoft.com/en-us/windows/win32/api/_wua/ |
||||
// Descriptive fields like title, and description are localized based on |
||||
// the locale of the VM being updated. |
||||
message WindowsUpdatePackage { |
||||
// Categories specified by the Windows Update. |
||||
message WindowsUpdateCategory { |
||||
// The identifier of the windows update category. |
||||
string id = 1; |
||||
|
||||
// The name of the windows update category. |
||||
string name = 2; |
||||
} |
||||
|
||||
// The localized title of the update package. |
||||
string title = 1; |
||||
|
||||
// The localized description of the update package. |
||||
string description = 2; |
||||
|
||||
// The categories that are associated with this update package. |
||||
repeated WindowsUpdateCategory categories = 3; |
||||
|
||||
// A collection of Microsoft Knowledge Base article IDs that are associated |
||||
// with the update package. |
||||
repeated string kb_article_ids = 4; |
||||
|
||||
// A hyperlink to the language-specific support information for the update. |
||||
string support_url = 11; |
||||
|
||||
// A collection of URLs that provide more information about the update |
||||
// package. |
||||
repeated string more_info_urls = 5; |
||||
|
||||
// Gets the identifier of an update package. Stays the same across |
||||
// revisions. |
||||
string update_id = 6; |
||||
|
||||
// The revision number of this update package. |
||||
int32 revision_number = 7; |
||||
|
||||
// The last published date of the update, in (UTC) date and time. |
||||
google.protobuf.Timestamp last_deployment_change_time = 10; |
||||
} |
||||
|
||||
// Details related to a Zypper Patch. |
||||
message ZypperPatch { |
||||
// The name of the patch. |
||||
string patch_name = 5; |
||||
|
||||
// The category of the patch. |
||||
string category = 2; |
||||
|
||||
// The severity specified for this patch |
||||
string severity = 3; |
||||
|
||||
// Any summary information provided about this patch. |
||||
string summary = 4; |
||||
} |
||||
|
||||
// Information related to a Quick Fix Engineering package. |
||||
// Fields are taken from Windows QuickFixEngineering Interface and match |
||||
// the source names: |
||||
// https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-quickfixengineering |
||||
message WindowsQuickFixEngineeringPackage { |
||||
// A short textual description of the QFE update. |
||||
string caption = 1; |
||||
|
||||
// A textual description of the QFE update. |
||||
string description = 2; |
||||
|
||||
// Unique identifier associated with a particular QFE update. |
||||
string hot_fix_id = 3; |
||||
|
||||
// Date that the QFE update was installed. Mapped from installed_on field. |
||||
google.protobuf.Timestamp install_time = 5; |
||||
} |
||||
|
||||
// Base level operating system information for the VM. |
||||
OsInfo os_info = 1; |
||||
|
||||
// Inventory items related to the VM keyed by an opaque unique identifier for |
||||
// each inventory item. The identifier is unique to each distinct and |
||||
// addressable inventory item and will change, when there is a new package |
||||
// version. |
||||
map<string, Item> items = 2; |
||||
} |
@ -0,0 +1,38 @@ |
||||
// Copyright 2020 Google LLC |
||||
// |
||||
// Licensed under the Apache License, Version 2.0 (the "License"); |
||||
// you may not use this file except in compliance with the License. |
||||
// You may obtain a copy of the License at |
||||
// |
||||
// http://www.apache.org/licenses/LICENSE-2.0 |
||||
// |
||||
// Unless required by applicable law or agreed to in writing, software |
||||
// distributed under the License is distributed on an "AS IS" BASIS, |
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
// See the License for the specific language governing permissions and |
||||
// limitations under the License. |
||||
|
||||
syntax = "proto3"; |
||||
|
||||
package google.cloud.osconfig.v1; |
||||
|
||||
option csharp_namespace = "Google.Cloud.OsConfig.V1"; |
||||
option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1;osconfig"; |
||||
option java_outer_classname = "Common"; |
||||
option java_package = "com.google.cloud.osconfig.v1"; |
||||
option php_namespace = "Google\\Cloud\\OsConfig\\V1"; |
||||
option ruby_package = "Google::Cloud::OsConfig::V1"; |
||||
|
||||
// Message encapsulating a value that can be either absolute ("fixed") or |
||||
// relative ("percent") to a value. |
||||
message FixedOrPercent { |
||||
// Type of the value. |
||||
oneof mode { |
||||
// Specifies a fixed value. |
||||
int32 fixed = 1; |
||||
|
||||
// Specifies the relative value defined as a percentage, which will be |
||||
// multiplied by a reference value. |
||||
int32 percent = 2; |
||||
} |
||||
} |
Loading…
Reference in new issue