Skip to content

Commit

Permalink
feat: added support OSInventory in Assets (#436)
Browse files Browse the repository at this point in the history
* feat: added support OSInventory in Assets. docs: updated existing docs.

Clients receive detailed OSInventory in Assets.

PiperOrigin-RevId: 342689216

Source-Author: Google APIs <[email protected]>
Source-Date: Mon Nov 16 12:04:29 2020 -0800
Source-Repo: googleapis/googleapis
Source-Sha: 1f8a5144b52f7677dc43c55b21ccaf9e1b425ceb
Source-Link: googleapis/googleapis@1f8a514

* fix: better fallback feature detection, jsdoc update

Use gapic-generator-typescript v1.2.2.

PiperOrigin-RevId: 342778480

Source-Author: Google APIs <[email protected]>
Source-Date: Mon Nov 16 20:22:00 2020 -0800
Source-Repo: googleapis/googleapis
Source-Sha: c6b1c72942991b1c605fe56a6041e06a86a9443e
Source-Link: googleapis/googleapis@c6b1c72

* fix: linting, updated jsdoc blocks

Use gapic-generator-typescript v1.2.3.

PiperOrigin-RevId: 342976840

Source-Author: Google APIs <[email protected]>
Source-Date: Tue Nov 17 17:04:11 2020 -0800
Source-Repo: googleapis/googleapis
Source-Sha: c979fbeb80d1b940790a69183629d799e4c05b4c
Source-Link: googleapis/googleapis@c979fbe

* fix: use optional chaining for window.fetch feature detection

Use gapic-generator-typescript v1.2.4.
Committer: @alexander-fenster
PiperOrigin-RevId: 343136730

Source-Author: Google APIs <[email protected]>
Source-Date: Wed Nov 18 12:49:25 2020 -0800
Source-Repo: googleapis/googleapis
Source-Sha: 2cda8d285b66c14da57363201b7e4efbca47d034
Source-Link: googleapis/googleapis@2cda8d2

* fix: mark window as global for linter

Use gapic-generator-typescript v1.2.5.
Committer: @alexander-fenster
PiperOrigin-RevId: 343187793

Source-Author: Google APIs <[email protected]>
Source-Date: Wed Nov 18 17:10:02 2020 -0800
Source-Repo: googleapis/googleapis
Source-Sha: 5587028631d4d743fd906c4eb4e4e4649a7ee5ce
Source-Link: googleapis/googleapis@5587028

* build: use gapic-generator-typescript v1.2.6

Committer: @alexander-fenster
PiperOrigin-RevId: 343202295

Source-Author: Google APIs <[email protected]>
Source-Date: Wed Nov 18 18:55:28 2020 -0800
Source-Repo: googleapis/googleapis
Source-Sha: 2f019bf70bfe06f1e2af1b04011b0a2405190e43
Source-Link: googleapis/googleapis@2f019bf

* build: include osconfig v1 protos into asset v1 Node.js package.

PiperOrigin-RevId: 344904496

Source-Author: Google APIs <[email protected]>
Source-Date: Mon Nov 30 15:48:16 2020 -0800
Source-Repo: googleapis/googleapis
Source-Sha: a578b42319ca0e3c7b6fec600a4ee9ec57443598
Source-Link: googleapis/googleapis@a578b42
  • Loading branch information
yoshi-automation authored Dec 1, 2020
1 parent f9a7eb0 commit 1f59afa
Show file tree
Hide file tree
Showing 17 changed files with 5,934 additions and 154 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1046,4 +1046,7 @@ enum ContentType {

// The Cloud Access context manager Policy set on an asset.
ACCESS_POLICY = 5;

// The runtime OS Inventory information.
OS_INVENTORY = 6;
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import "google/cloud/orgpolicy/v1/orgpolicy.proto";
import "google/iam/v1/policy.proto";
import "google/identity/accesscontextmanager/v1/access_level.proto";
import "google/identity/accesscontextmanager/v1/access_policy.proto";
import "google/cloud/osconfig/v1/inventory.proto";
import "google/identity/accesscontextmanager/v1/service_perimeter.proto";
import "google/protobuf/any.proto";
import "google/protobuf/struct.proto";
Expand Down Expand Up @@ -153,6 +154,11 @@ message Asset {
google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9;
}

// A representation of runtime OS Inventory information. See [this
// topic](https://cloud.google.com/compute/docs/instances/os-inventory-management)
// for more information.
google.cloud.osconfig.v1.Inventory os_inventory = 12;

// The ancestry path of an asset in Google Cloud [resource
// hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
// represented as a list of relative resource names. An ancestry path starts
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
}
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 1f59afa

Please sign in to comment.