Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

Commit

Permalink
feat: add a FastSocket API (#318)
Browse files Browse the repository at this point in the history
* feat: add a FastSocket API

PiperOrigin-RevId: 491259489

Source-Link: googleapis/googleapis@39bcdf4

Source-Link: googleapis/googleapis-gen@ee2470d
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 <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] committed Nov 28, 2022
1 parent 0d49eb0 commit 4d61084
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 4 deletions.
2 changes: 2 additions & 0 deletions google/cloud/container/__init__.py
Expand Up @@ -55,6 +55,7 @@
DeleteNodePoolRequest,
DnsCacheConfig,
DNSConfig,
FastSocket,
GatewayAPIConfig,
GcePersistentDiskCsiDriverConfig,
GcfsConfig,
Expand Down Expand Up @@ -200,6 +201,7 @@
"DeleteNodePoolRequest",
"DnsCacheConfig",
"DNSConfig",
"FastSocket",
"GatewayAPIConfig",
"GcePersistentDiskCsiDriverConfig",
"GcfsConfig",
Expand Down
2 changes: 2 additions & 0 deletions google/cloud/container_v1/__init__.py
Expand Up @@ -50,6 +50,7 @@
DeleteNodePoolRequest,
DnsCacheConfig,
DNSConfig,
FastSocket,
GatewayAPIConfig,
GcePersistentDiskCsiDriverConfig,
GcfsConfig,
Expand Down Expand Up @@ -196,6 +197,7 @@
"DeleteClusterRequest",
"DeleteNodePoolRequest",
"DnsCacheConfig",
"FastSocket",
"GPUSharingConfig",
"GatewayAPIConfig",
"GcePersistentDiskCsiDriverConfig",
Expand Down
2 changes: 2 additions & 0 deletions google/cloud/container_v1/types/__init__.py
Expand Up @@ -44,6 +44,7 @@
DeleteNodePoolRequest,
DnsCacheConfig,
DNSConfig,
FastSocket,
GatewayAPIConfig,
GcePersistentDiskCsiDriverConfig,
GcfsConfig,
Expand Down Expand Up @@ -187,6 +188,7 @@
"DeleteNodePoolRequest",
"DnsCacheConfig",
"DNSConfig",
"FastSocket",
"GatewayAPIConfig",
"GcePersistentDiskCsiDriverConfig",
"GcfsConfig",
Expand Down
40 changes: 37 additions & 3 deletions google/cloud/container_v1/types/cluster_service.py
Expand Up @@ -153,6 +153,7 @@
"DefaultSnatStatus",
"ShieldedNodes",
"VirtualNIC",
"FastSocket",
"NotificationConfig",
"ConfidentialNodes",
"UpgradeEvent",
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion scripts/fixup_container_v1_keywords.py
Expand Up @@ -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:
Expand Down

0 comments on commit 4d61084

Please sign in to comment.