Skip to content
This repository was archived by the owner on Nov 29, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,3 @@ exclude_lines =
pragma: NO COVER
# Ignore debug-only repr
def __repr__
# Ignore pkg_resources exceptions.
# This is added at the module level as a safeguard for if someone
# generates the code and tries to run it without pip installing. This
# makes it virtually impossible to test properly.
except pkg_resources.DistributionNotFound
16 changes: 16 additions & 0 deletions google/cloud/container_v1/gapic_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-
# Copyright 2022 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.
#
__version__ = "2.13.0" # {x-release-please-version}
80 changes: 38 additions & 42 deletions google/cloud/container_v1/services/cluster_manager/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
from google.api_core.client_options import ClientOptions
from google.auth import credentials as ga_credentials # type: ignore
from google.oauth2 import service_account # type: ignore
import pkg_resources

from google.cloud.container_v1 import gapic_version as package_version

try:
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
Expand Down Expand Up @@ -224,7 +225,7 @@ async def list_clusters(
zone: Optional[str] = None,
parent: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
) -> cluster_service.ListClustersResponse:
r"""Lists all clusters owned by a project in either the
Expand Down Expand Up @@ -364,7 +365,7 @@ async def get_cluster(
cluster_id: Optional[str] = None,
name: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
) -> cluster_service.Cluster:
r"""Gets the details of a specific cluster.
Expand Down Expand Up @@ -511,7 +512,7 @@ async def create_cluster(
cluster: Optional[cluster_service.Cluster] = None,
parent: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
) -> cluster_service.Operation:
r"""Creates a cluster, consisting of the specified number and type
Expand Down Expand Up @@ -663,7 +664,7 @@ async def update_cluster(
update: Optional[cluster_service.ClusterUpdate] = None,
name: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
) -> cluster_service.Operation:
r"""Updates the settings of a specific cluster.
Expand Down Expand Up @@ -809,7 +810,7 @@ async def update_node_pool(
request: Optional[Union[cluster_service.UpdateNodePoolRequest, dict]] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
) -> cluster_service.Operation:
r"""Updates the version and/or image type for the
Expand Down Expand Up @@ -895,7 +896,7 @@ async def set_node_pool_autoscaling(
] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
) -> cluster_service.Operation:
r"""Sets the autoscaling settings for the specified node
Expand Down Expand Up @@ -982,7 +983,7 @@ async def set_logging_service(
logging_service: Optional[str] = None,
name: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
) -> cluster_service.Operation:
r"""Sets the logging service for a specific cluster.
Expand Down Expand Up @@ -1150,7 +1151,7 @@ async def set_monitoring_service(
monitoring_service: Optional[str] = None,
name: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
) -> cluster_service.Operation:
r"""Sets the monitoring service for a specific cluster.
Expand Down Expand Up @@ -1318,7 +1319,7 @@ async def set_addons_config(
addons_config: Optional[cluster_service.AddonsConfig] = None,
name: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
) -> cluster_service.Operation:
r"""Sets the addons for a specific cluster.
Expand Down Expand Up @@ -1470,7 +1471,7 @@ async def set_locations(
locations: Optional[MutableSequence[str]] = None,
name: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
) -> cluster_service.Operation:
r"""Sets the locations for a specific cluster. Deprecated. Use
Expand Down Expand Up @@ -1635,7 +1636,7 @@ async def update_master(
master_version: Optional[str] = None,
name: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
) -> cluster_service.Operation:
r"""Updates the master for a specific cluster.
Expand Down Expand Up @@ -1794,7 +1795,7 @@ async def set_master_auth(
request: Optional[Union[cluster_service.SetMasterAuthRequest, dict]] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
) -> cluster_service.Operation:
r"""Sets master auth materials. Currently supports
Expand Down Expand Up @@ -1883,7 +1884,7 @@ async def delete_cluster(
cluster_id: Optional[str] = None,
name: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
) -> cluster_service.Operation:
r"""Deletes the cluster, including the Kubernetes
Expand Down Expand Up @@ -2041,7 +2042,7 @@ async def list_operations(
project_id: Optional[str] = None,
zone: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
) -> cluster_service.ListOperationsResponse:
r"""Lists all operations in a project in a specific zone
Expand Down Expand Up @@ -2171,7 +2172,7 @@ async def get_operation(
operation_id: Optional[str] = None,
name: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
) -> cluster_service.Operation:
r"""Gets the specified operation.
Expand Down Expand Up @@ -2321,7 +2322,7 @@ async def cancel_operation(
operation_id: Optional[str] = None,
name: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
) -> None:
r"""Cancels the specified operation.
Expand Down Expand Up @@ -2446,7 +2447,7 @@ async def get_server_config(
zone: Optional[str] = None,
name: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
) -> cluster_service.ServerConfig:
r"""Returns configuration info about the Google
Expand Down Expand Up @@ -2580,7 +2581,7 @@ async def get_json_web_keys(
request: Optional[Union[cluster_service.GetJSONWebKeysRequest, dict]] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
) -> cluster_service.GetJSONWebKeysResponse:
r"""Gets the public component of the cluster signing keys
Expand Down Expand Up @@ -2670,7 +2671,7 @@ async def list_node_pools(
cluster_id: Optional[str] = None,
parent: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
) -> cluster_service.ListNodePoolsResponse:
r"""Lists the node pools for a cluster.
Expand Down Expand Up @@ -2819,7 +2820,7 @@ async def get_node_pool(
node_pool_id: Optional[str] = None,
name: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
) -> cluster_service.NodePool:
r"""Retrieves the requested node pool.
Expand Down Expand Up @@ -2986,7 +2987,7 @@ async def create_node_pool(
node_pool: Optional[cluster_service.NodePool] = None,
parent: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
) -> cluster_service.Operation:
r"""Creates a node pool for a cluster.
Expand Down Expand Up @@ -3134,7 +3135,7 @@ async def delete_node_pool(
node_pool_id: Optional[str] = None,
name: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
) -> cluster_service.Operation:
r"""Deletes a node pool from a cluster.
Expand Down Expand Up @@ -3293,7 +3294,7 @@ async def complete_node_pool_upgrade(
] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
) -> None:
r"""CompleteNodePoolUpgrade will signal an on-going node
Expand Down Expand Up @@ -3368,7 +3369,7 @@ async def rollback_node_pool_upgrade(
node_pool_id: Optional[str] = None,
name: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
) -> cluster_service.Operation:
r"""Rolls back a previously Aborted or Failed NodePool
Expand Down Expand Up @@ -3523,7 +3524,7 @@ async def set_node_pool_management(
] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
) -> cluster_service.Operation:
r"""Sets the NodeManagement options for a node pool.
Expand Down Expand Up @@ -3604,7 +3605,7 @@ async def set_labels(
request: Optional[Union[cluster_service.SetLabelsRequest, dict]] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
) -> cluster_service.Operation:
r"""Sets labels on a cluster.
Expand Down Expand Up @@ -3693,7 +3694,7 @@ async def set_legacy_abac(
enabled: Optional[bool] = None,
name: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
) -> cluster_service.Operation:
r"""Enables or disables the ABAC authorization mechanism
Expand Down Expand Up @@ -3845,7 +3846,7 @@ async def start_ip_rotation(
cluster_id: Optional[str] = None,
name: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
) -> cluster_service.Operation:
r"""Starts master IP rotation.
Expand Down Expand Up @@ -3988,7 +3989,7 @@ async def complete_ip_rotation(
cluster_id: Optional[str] = None,
name: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
) -> cluster_service.Operation:
r"""Completes master IP rotation.
Expand Down Expand Up @@ -4124,7 +4125,7 @@ async def set_node_pool_size(
request: Optional[Union[cluster_service.SetNodePoolSizeRequest, dict]] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
) -> cluster_service.Operation:
r"""Sets the size for a specific node pool. The new size will be
Expand Down Expand Up @@ -4214,7 +4215,7 @@ async def set_network_policy(
network_policy: Optional[cluster_service.NetworkPolicy] = None,
name: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
) -> cluster_service.Operation:
r"""Enables or disables Network Policy for a cluster.
Expand Down Expand Up @@ -4366,7 +4367,7 @@ async def set_maintenance_policy(
maintenance_policy: Optional[cluster_service.MaintenancePolicy] = None,
name: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
) -> cluster_service.Operation:
r"""Sets the maintenance policy for a cluster.
Expand Down Expand Up @@ -4515,7 +4516,7 @@ async def list_usable_subnetworks(
] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
) -> pagers.ListUsableSubnetworksAsyncPager:
r"""Lists subnetworks that are usable for creating
Expand Down Expand Up @@ -4613,14 +4614,9 @@ async def __aexit__(self, exc_type, exc, tb):
await self.transport.close()


try:
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
gapic_version=pkg_resources.get_distribution(
"google-cloud-container",
).version,
)
except pkg_resources.DistributionNotFound:
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo()
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
gapic_version=package_version.__version__
)


__all__ = ("ClusterManagerAsyncClient",)
Loading