From 4d61084846ae9583140b04a4c68da070479d79b9 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 28 Nov 2022 10:24:34 -0500 Subject: [PATCH] feat: add a FastSocket API (#318) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add a FastSocket API PiperOrigin-RevId: 491259489 Source-Link: https://github.com/googleapis/googleapis/commit/39bcdf411c9c099412ddf6b4247f50352d83e5ad Source-Link: https://github.com/googleapis/googleapis-gen/commit/ee2470d9e7906d0764adb562f4d4cc41f0d6c96f Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWUyNDcwZDllNzkwNmQwNzY0YWRiNTYyZjRkNGNjNDFmMGQ2Yzk2ZiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- google/cloud/container/__init__.py | 2 + google/cloud/container_v1/__init__.py | 2 + google/cloud/container_v1/types/__init__.py | 2 + .../container_v1/types/cluster_service.py | 40 +++++++++++++++++-- scripts/fixup_container_v1_keywords.py | 2 +- 5 files changed, 44 insertions(+), 4 deletions(-) diff --git a/google/cloud/container/__init__.py b/google/cloud/container/__init__.py index 58863d9f..b594ebd7 100644 --- a/google/cloud/container/__init__.py +++ b/google/cloud/container/__init__.py @@ -55,6 +55,7 @@ DeleteNodePoolRequest, DnsCacheConfig, DNSConfig, + FastSocket, GatewayAPIConfig, GcePersistentDiskCsiDriverConfig, GcfsConfig, @@ -200,6 +201,7 @@ "DeleteNodePoolRequest", "DnsCacheConfig", "DNSConfig", + "FastSocket", "GatewayAPIConfig", "GcePersistentDiskCsiDriverConfig", "GcfsConfig", diff --git a/google/cloud/container_v1/__init__.py b/google/cloud/container_v1/__init__.py index b3bf6ace..817f9c31 100644 --- a/google/cloud/container_v1/__init__.py +++ b/google/cloud/container_v1/__init__.py @@ -50,6 +50,7 @@ DeleteNodePoolRequest, DnsCacheConfig, DNSConfig, + FastSocket, GatewayAPIConfig, GcePersistentDiskCsiDriverConfig, GcfsConfig, @@ -196,6 +197,7 @@ "DeleteClusterRequest", "DeleteNodePoolRequest", "DnsCacheConfig", + "FastSocket", "GPUSharingConfig", "GatewayAPIConfig", "GcePersistentDiskCsiDriverConfig", diff --git a/google/cloud/container_v1/types/__init__.py b/google/cloud/container_v1/types/__init__.py index a3c78154..efccf26e 100644 --- a/google/cloud/container_v1/types/__init__.py +++ b/google/cloud/container_v1/types/__init__.py @@ -44,6 +44,7 @@ DeleteNodePoolRequest, DnsCacheConfig, DNSConfig, + FastSocket, GatewayAPIConfig, GcePersistentDiskCsiDriverConfig, GcfsConfig, @@ -187,6 +188,7 @@ "DeleteNodePoolRequest", "DnsCacheConfig", "DNSConfig", + "FastSocket", "GatewayAPIConfig", "GcePersistentDiskCsiDriverConfig", "GcfsConfig", diff --git a/google/cloud/container_v1/types/cluster_service.py b/google/cloud/container_v1/types/cluster_service.py index f5faa46a..2d9ae458 100644 --- a/google/cloud/container_v1/types/cluster_service.py +++ b/google/cloud/container_v1/types/cluster_service.py @@ -153,6 +153,7 @@ "DefaultSnatStatus", "ShieldedNodes", "VirtualNIC", + "FastSocket", "NotificationConfig", "ConfidentialNodes", "UpgradeEvent", @@ -507,6 +508,11 @@ class NodeConfig(proto.Message): Confidential nodes config. All the nodes in the node pool will be Confidential VM once enabled. + fast_socket (google.cloud.container_v1.types.FastSocket): + Enable or disable NCCL fast socket for the + node pool. + + This field is a member of `oneof`_ ``_fast_socket``. resource_labels (MutableMapping[str, str]): The resource labels for the node pool to use to annotate any related Google Compute Engine @@ -637,6 +643,12 @@ class NodeConfig(proto.Message): number=35, message="ConfidentialNodes", ) + fast_socket: "FastSocket" = proto.Field( + proto.MESSAGE, + number=36, + optional=True, + message="FastSocket", + ) resource_labels: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, @@ -1588,9 +1600,8 @@ class BinaryAuthorization(proto.Message): EVALUATION_MODE_UNSPECIFIED, this field is ignored. evaluation_mode (google.cloud.container_v1.types.BinaryAuthorization.EvaluationMode): Mode of operation for binauthz policy - evaluation. Currently the only options are - equivalent to enable/disable. If unspecified, - defaults to DISABLED. + evaluation. If unspecified, defaults to + DISABLED. """ class EvaluationMode(proto.Enum): @@ -3276,6 +3287,9 @@ class UpdateNodePoolRequest(proto.Message): Confidential VM once enabled. gvnic (google.cloud.container_v1.types.VirtualNIC): Enable or disable gvnic on the node pool. + fast_socket (google.cloud.container_v1.types.FastSocket): + Enable or disable NCCL fast socket for the + node pool. logging_config (google.cloud.container_v1.types.NodePoolLoggingConfig): Logging configuration. resource_labels (google.cloud.container_v1.types.ResourceLabels): @@ -3371,6 +3385,11 @@ class UpdateNodePoolRequest(proto.Message): number=29, message="VirtualNIC", ) + fast_socket: "FastSocket" = proto.Field( + proto.MESSAGE, + number=31, + message="FastSocket", + ) logging_config: "NodePoolLoggingConfig" = proto.Field( proto.MESSAGE, number=32, @@ -6810,6 +6829,21 @@ class VirtualNIC(proto.Message): ) +class FastSocket(proto.Message): + r"""Configuration of Fast Socket feature. + + Attributes: + enabled (bool): + Whether Fast Socket features are enabled in + the node pool. + """ + + enabled: bool = proto.Field( + proto.BOOL, + number=1, + ) + + class NotificationConfig(proto.Message): r"""NotificationConfig is the configuration of notifications. diff --git a/scripts/fixup_container_v1_keywords.py b/scripts/fixup_container_v1_keywords.py index 4f822170..854df513 100644 --- a/scripts/fixup_container_v1_keywords.py +++ b/scripts/fixup_container_v1_keywords.py @@ -71,7 +71,7 @@ class containerCallTransformer(cst.CSTTransformer): 'start_ip_rotation': ('project_id', 'zone', 'cluster_id', 'name', 'rotate_credentials', ), 'update_cluster': ('update', 'project_id', 'zone', 'cluster_id', 'name', ), 'update_master': ('master_version', 'project_id', 'zone', 'cluster_id', 'name', ), - 'update_node_pool': ('node_version', 'image_type', 'project_id', 'zone', 'cluster_id', 'node_pool_id', 'name', 'locations', 'workload_metadata_config', 'upgrade_settings', 'tags', 'taints', 'labels', 'linux_node_config', 'kubelet_config', 'node_network_config', 'gcfs_config', 'confidential_nodes', 'gvnic', 'logging_config', 'resource_labels', ), + 'update_node_pool': ('node_version', 'image_type', 'project_id', 'zone', 'cluster_id', 'node_pool_id', 'name', 'locations', 'workload_metadata_config', 'upgrade_settings', 'tags', 'taints', 'labels', 'linux_node_config', 'kubelet_config', 'node_network_config', 'gcfs_config', 'confidential_nodes', 'gvnic', 'fast_socket', 'logging_config', 'resource_labels', ), } def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode: