google-cloud-container 2.65.0__tar.gz → 2.67.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {google_cloud_container-2.65.0/google_cloud_container.egg-info → google_cloud_container-2.67.0}/PKG-INFO +5 -5
- {google_cloud_container-2.65.0 → google_cloud_container-2.67.0}/google/cloud/container/__init__.py +16 -0
- {google_cloud_container-2.65.0 → google_cloud_container-2.67.0}/google/cloud/container/gapic_version.py +1 -1
- {google_cloud_container-2.65.0 → google_cloud_container-2.67.0}/google/cloud/container_v1/__init__.py +30 -86
- google_cloud_container-2.67.0/google/cloud/container_v1/_compat.py +262 -0
- {google_cloud_container-2.65.0 → google_cloud_container-2.67.0}/google/cloud/container_v1/gapic_metadata.json +15 -0
- {google_cloud_container-2.65.0/google/cloud/container_v1beta1 → google_cloud_container-2.67.0/google/cloud/container_v1}/gapic_version.py +1 -1
- {google_cloud_container-2.65.0 → google_cloud_container-2.67.0}/google/cloud/container_v1/services/cluster_manager/async_client.py +94 -3
- {google_cloud_container-2.65.0 → google_cloud_container-2.67.0}/google/cloud/container_v1/services/cluster_manager/client.py +117 -163
- {google_cloud_container-2.65.0 → google_cloud_container-2.67.0}/google/cloud/container_v1/services/cluster_manager/transports/base.py +15 -3
- {google_cloud_container-2.65.0 → google_cloud_container-2.67.0}/google/cloud/container_v1/services/cluster_manager/transports/grpc.py +32 -0
- {google_cloud_container-2.65.0 → google_cloud_container-2.67.0}/google/cloud/container_v1/services/cluster_manager/transports/grpc_asyncio.py +38 -0
- {google_cloud_container-2.65.0 → google_cloud_container-2.67.0}/google/cloud/container_v1/services/cluster_manager/transports/rest.py +554 -386
- google_cloud_container-2.67.0/google/cloud/container_v1/services/cluster_manager/transports/rest_base.py +827 -0
- {google_cloud_container-2.65.0 → google_cloud_container-2.67.0}/google/cloud/container_v1/types/__init__.py +16 -0
- {google_cloud_container-2.65.0 → google_cloud_container-2.67.0}/google/cloud/container_v1/types/cluster_service.py +481 -13
- {google_cloud_container-2.65.0 → google_cloud_container-2.67.0}/google/cloud/container_v1beta1/__init__.py +14 -86
- google_cloud_container-2.67.0/google/cloud/container_v1beta1/_compat.py +262 -0
- {google_cloud_container-2.65.0/google/cloud/container_v1 → google_cloud_container-2.67.0/google/cloud/container_v1beta1}/gapic_version.py +1 -1
- {google_cloud_container-2.65.0 → google_cloud_container-2.67.0}/google/cloud/container_v1beta1/services/cluster_manager/async_client.py +1 -3
- {google_cloud_container-2.65.0 → google_cloud_container-2.67.0}/google/cloud/container_v1beta1/services/cluster_manager/client.py +24 -163
- {google_cloud_container-2.65.0 → google_cloud_container-2.67.0}/google/cloud/container_v1beta1/services/cluster_manager/transports/base.py +1 -3
- {google_cloud_container-2.65.0 → google_cloud_container-2.67.0/google_cloud_container.egg-info}/PKG-INFO +5 -5
- {google_cloud_container-2.65.0 → google_cloud_container-2.67.0}/google_cloud_container.egg-info/SOURCES.txt +5 -1
- google_cloud_container-2.67.0/google_cloud_container.egg-info/requires.txt +8 -0
- {google_cloud_container-2.65.0 → google_cloud_container-2.67.0}/setup.py +8 -5
- {google_cloud_container-2.65.0 → google_cloud_container-2.67.0}/tests/unit/gapic/container_v1/test_cluster_manager.py +884 -679
- google_cloud_container-2.67.0/tests/unit/gapic/container_v1/test_compat.py +429 -0
- {google_cloud_container-2.65.0 → google_cloud_container-2.67.0}/tests/unit/gapic/container_v1beta1/test_cluster_manager.py +35 -297
- google_cloud_container-2.67.0/tests/unit/gapic/container_v1beta1/test_compat.py +429 -0
- google_cloud_container-2.65.0/google/cloud/container_v1/services/cluster_manager/transports/rest_base.py +0 -1898
- google_cloud_container-2.65.0/google_cloud_container.egg-info/requires.txt +0 -11
- {google_cloud_container-2.65.0 → google_cloud_container-2.67.0}/LICENSE +0 -0
- {google_cloud_container-2.65.0 → google_cloud_container-2.67.0}/MANIFEST.in +0 -0
- {google_cloud_container-2.65.0 → google_cloud_container-2.67.0}/README.rst +0 -0
- {google_cloud_container-2.65.0 → google_cloud_container-2.67.0}/google/cloud/container/py.typed +0 -0
- {google_cloud_container-2.65.0 → google_cloud_container-2.67.0}/google/cloud/container_v1/py.typed +0 -0
- {google_cloud_container-2.65.0 → google_cloud_container-2.67.0}/google/cloud/container_v1/services/__init__.py +0 -0
- {google_cloud_container-2.65.0 → google_cloud_container-2.67.0}/google/cloud/container_v1/services/cluster_manager/__init__.py +0 -0
- {google_cloud_container-2.65.0 → google_cloud_container-2.67.0}/google/cloud/container_v1/services/cluster_manager/pagers.py +0 -0
- {google_cloud_container-2.65.0 → google_cloud_container-2.67.0}/google/cloud/container_v1/services/cluster_manager/transports/__init__.py +0 -0
- {google_cloud_container-2.65.0 → google_cloud_container-2.67.0}/google/cloud/container_v1beta1/gapic_metadata.json +0 -0
- {google_cloud_container-2.65.0 → google_cloud_container-2.67.0}/google/cloud/container_v1beta1/py.typed +0 -0
- {google_cloud_container-2.65.0 → google_cloud_container-2.67.0}/google/cloud/container_v1beta1/services/__init__.py +0 -0
- {google_cloud_container-2.65.0 → google_cloud_container-2.67.0}/google/cloud/container_v1beta1/services/cluster_manager/__init__.py +0 -0
- {google_cloud_container-2.65.0 → google_cloud_container-2.67.0}/google/cloud/container_v1beta1/services/cluster_manager/pagers.py +0 -0
- {google_cloud_container-2.65.0 → google_cloud_container-2.67.0}/google/cloud/container_v1beta1/services/cluster_manager/transports/__init__.py +0 -0
- {google_cloud_container-2.65.0 → google_cloud_container-2.67.0}/google/cloud/container_v1beta1/services/cluster_manager/transports/grpc.py +0 -0
- {google_cloud_container-2.65.0 → google_cloud_container-2.67.0}/google/cloud/container_v1beta1/services/cluster_manager/transports/grpc_asyncio.py +0 -0
- {google_cloud_container-2.65.0 → google_cloud_container-2.67.0}/google/cloud/container_v1beta1/types/__init__.py +0 -0
- {google_cloud_container-2.65.0 → google_cloud_container-2.67.0}/google/cloud/container_v1beta1/types/cluster_service.py +0 -0
- {google_cloud_container-2.65.0 → google_cloud_container-2.67.0}/google_cloud_container.egg-info/dependency_links.txt +0 -0
- {google_cloud_container-2.65.0 → google_cloud_container-2.67.0}/google_cloud_container.egg-info/not-zip-safe +0 -0
- {google_cloud_container-2.65.0 → google_cloud_container-2.67.0}/google_cloud_container.egg-info/top_level.txt +0 -0
- {google_cloud_container-2.65.0 → google_cloud_container-2.67.0}/setup.cfg +0 -0
- {google_cloud_container-2.65.0 → google_cloud_container-2.67.0}/tests/__init__.py +0 -0
- {google_cloud_container-2.65.0 → google_cloud_container-2.67.0}/tests/system/__init__.py +0 -0
- {google_cloud_container-2.65.0 → google_cloud_container-2.67.0}/tests/system/smoke_test.py +0 -0
- {google_cloud_container-2.65.0 → google_cloud_container-2.67.0}/tests/unit/__init__.py +0 -0
- {google_cloud_container-2.65.0 → google_cloud_container-2.67.0}/tests/unit/gapic/__init__.py +0 -0
- {google_cloud_container-2.65.0 → google_cloud_container-2.67.0}/tests/unit/gapic/container_v1/__init__.py +0 -0
- {google_cloud_container-2.65.0 → google_cloud_container-2.67.0}/tests/unit/gapic/container_v1beta1/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: google-cloud-container
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.67.0
|
|
4
4
|
Summary: Google Cloud Container API client library
|
|
5
5
|
Home-page: https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-container
|
|
6
6
|
Author: Google LLC
|
|
@@ -17,17 +17,17 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.12
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.13
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.14
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
20
21
|
Classifier: Operating System :: OS Independent
|
|
21
22
|
Classifier: Topic :: Internet
|
|
22
23
|
Requires-Python: >=3.10
|
|
23
24
|
License-File: LICENSE
|
|
24
|
-
Requires-Dist: google-api-core[grpc]<3.0.0,>=2.
|
|
25
|
+
Requires-Dist: google-api-core[grpc]<3.0.0,>=2.28.0
|
|
25
26
|
Requires-Dist: google-auth!=2.24.0,!=2.25.0,<3.0.0,>=2.14.1
|
|
26
27
|
Requires-Dist: grpcio<2.0.0,>=1.59.0
|
|
27
28
|
Requires-Dist: grpcio<2.0.0,>=1.75.1; python_version >= "3.14"
|
|
28
|
-
Requires-Dist: proto-plus<2.0.0,>=1.
|
|
29
|
-
Requires-Dist:
|
|
30
|
-
Requires-Dist: protobuf<8.0.0,>=4.25.8
|
|
29
|
+
Requires-Dist: proto-plus<2.0.0,>=1.26.1
|
|
30
|
+
Requires-Dist: protobuf<8.0.0,>=6.33.5
|
|
31
31
|
Dynamic: author
|
|
32
32
|
Dynamic: author-email
|
|
33
33
|
Dynamic: classifier
|
{google_cloud_container-2.65.0 → google_cloud_container-2.67.0}/google/cloud/container/__init__.py
RENAMED
|
@@ -33,6 +33,7 @@ from google.cloud.container_v1.types.cluster_service import (
|
|
|
33
33
|
AddonsConfig,
|
|
34
34
|
AdvancedDatapathObservabilityConfig,
|
|
35
35
|
AdvancedMachineFeatures,
|
|
36
|
+
AgentSandboxConfig,
|
|
36
37
|
AnonymousAuthenticationConfig,
|
|
37
38
|
AuthenticatorGroupsConfig,
|
|
38
39
|
AutoIpamConfig,
|
|
@@ -55,6 +56,7 @@ from google.cloud.container_v1.types.cluster_service import (
|
|
|
55
56
|
ClusterPolicyConfig,
|
|
56
57
|
ClusterUpdate,
|
|
57
58
|
ClusterUpgradeInfo,
|
|
59
|
+
CompleteControlPlaneUpgradeRequest,
|
|
58
60
|
CompleteIPRotationRequest,
|
|
59
61
|
CompleteNodePoolUpgradeRequest,
|
|
60
62
|
CompliancePostureConfig,
|
|
@@ -66,15 +68,19 @@ from google.cloud.container_v1.types.cluster_service import (
|
|
|
66
68
|
CostManagementConfig,
|
|
67
69
|
CreateClusterRequest,
|
|
68
70
|
CreateNodePoolRequest,
|
|
71
|
+
CustomImageConfig,
|
|
72
|
+
CustomImageInfo,
|
|
69
73
|
DailyMaintenanceWindow,
|
|
70
74
|
DatabaseEncryption,
|
|
71
75
|
DatapathProvider,
|
|
76
|
+
DataplaneV2Config,
|
|
72
77
|
DefaultComputeClassConfig,
|
|
73
78
|
DefaultSnatStatus,
|
|
74
79
|
DeleteClusterRequest,
|
|
75
80
|
DeleteNodePoolRequest,
|
|
76
81
|
DesiredAdditionalIPRangesConfig,
|
|
77
82
|
DesiredEnterpriseConfig,
|
|
83
|
+
DiskIoScheduler,
|
|
78
84
|
DisruptionBudget,
|
|
79
85
|
DisruptionEvent,
|
|
80
86
|
DnsCacheConfig,
|
|
@@ -193,6 +199,8 @@ from google.cloud.container_v1.types.cluster_service import (
|
|
|
193
199
|
ResourceManagerTags,
|
|
194
200
|
ResourceUsageExportConfig,
|
|
195
201
|
RollbackNodePoolUpgradeRequest,
|
|
202
|
+
RollbackSafeUpgrade,
|
|
203
|
+
RollbackSafeUpgradeStatus,
|
|
196
204
|
SandboxConfig,
|
|
197
205
|
ScheduleUpgradeConfig,
|
|
198
206
|
SecondaryBootDisk,
|
|
@@ -257,6 +265,7 @@ __all__ = (
|
|
|
257
265
|
"AddonsConfig",
|
|
258
266
|
"AdvancedDatapathObservabilityConfig",
|
|
259
267
|
"AdvancedMachineFeatures",
|
|
268
|
+
"AgentSandboxConfig",
|
|
260
269
|
"AnonymousAuthenticationConfig",
|
|
261
270
|
"AuthenticatorGroupsConfig",
|
|
262
271
|
"AutoIpamConfig",
|
|
@@ -279,6 +288,7 @@ __all__ = (
|
|
|
279
288
|
"ClusterPolicyConfig",
|
|
280
289
|
"ClusterUpdate",
|
|
281
290
|
"ClusterUpgradeInfo",
|
|
291
|
+
"CompleteControlPlaneUpgradeRequest",
|
|
282
292
|
"CompleteIPRotationRequest",
|
|
283
293
|
"CompleteNodePoolUpgradeRequest",
|
|
284
294
|
"CompliancePostureConfig",
|
|
@@ -290,14 +300,18 @@ __all__ = (
|
|
|
290
300
|
"CostManagementConfig",
|
|
291
301
|
"CreateClusterRequest",
|
|
292
302
|
"CreateNodePoolRequest",
|
|
303
|
+
"CustomImageConfig",
|
|
304
|
+
"CustomImageInfo",
|
|
293
305
|
"DailyMaintenanceWindow",
|
|
294
306
|
"DatabaseEncryption",
|
|
307
|
+
"DataplaneV2Config",
|
|
295
308
|
"DefaultComputeClassConfig",
|
|
296
309
|
"DefaultSnatStatus",
|
|
297
310
|
"DeleteClusterRequest",
|
|
298
311
|
"DeleteNodePoolRequest",
|
|
299
312
|
"DesiredAdditionalIPRangesConfig",
|
|
300
313
|
"DesiredEnterpriseConfig",
|
|
314
|
+
"DiskIoScheduler",
|
|
301
315
|
"DisruptionBudget",
|
|
302
316
|
"DisruptionEvent",
|
|
303
317
|
"DnsCacheConfig",
|
|
@@ -412,6 +426,8 @@ __all__ = (
|
|
|
412
426
|
"ResourceManagerTags",
|
|
413
427
|
"ResourceUsageExportConfig",
|
|
414
428
|
"RollbackNodePoolUpgradeRequest",
|
|
429
|
+
"RollbackSafeUpgrade",
|
|
430
|
+
"RollbackSafeUpgradeStatus",
|
|
415
431
|
"SandboxConfig",
|
|
416
432
|
"ScheduleUpgradeConfig",
|
|
417
433
|
"SecondaryBootDisk",
|
|
@@ -13,15 +13,23 @@
|
|
|
13
13
|
# See the License for the specific language governing permissions and
|
|
14
14
|
# limitations under the License.
|
|
15
15
|
#
|
|
16
|
-
import sys
|
|
17
|
-
|
|
18
16
|
import google.api_core as api_core
|
|
19
17
|
|
|
20
18
|
from google.cloud.container_v1 import gapic_version as package_version
|
|
21
19
|
|
|
22
20
|
__version__ = package_version.__version__
|
|
23
21
|
|
|
24
|
-
|
|
22
|
+
# PEP 0810: Explicit Lazy Imports
|
|
23
|
+
# Python 3.15+ natively intercepts and defers these imports.
|
|
24
|
+
# Developers can disable this behavior and force eager imports.
|
|
25
|
+
# For more information, see:
|
|
26
|
+
# https://docs.python.org/3.15/library/sys.html#sys.set_lazy_imports_filter
|
|
27
|
+
# Older Python versions safely ignore this variable.
|
|
28
|
+
__lazy_modules__ = {
|
|
29
|
+
"google.cloud.container_v1.services.cluster_manager",
|
|
30
|
+
"google.cloud.container_v1.types.cluster_service",
|
|
31
|
+
}
|
|
32
|
+
|
|
25
33
|
|
|
26
34
|
from .services.cluster_manager import ClusterManagerAsyncClient, ClusterManagerClient
|
|
27
35
|
from .types.cluster_service import (
|
|
@@ -33,6 +41,7 @@ from .types.cluster_service import (
|
|
|
33
41
|
AddonsConfig,
|
|
34
42
|
AdvancedDatapathObservabilityConfig,
|
|
35
43
|
AdvancedMachineFeatures,
|
|
44
|
+
AgentSandboxConfig,
|
|
36
45
|
AnonymousAuthenticationConfig,
|
|
37
46
|
AuthenticatorGroupsConfig,
|
|
38
47
|
AutoIpamConfig,
|
|
@@ -55,6 +64,7 @@ from .types.cluster_service import (
|
|
|
55
64
|
ClusterPolicyConfig,
|
|
56
65
|
ClusterUpdate,
|
|
57
66
|
ClusterUpgradeInfo,
|
|
67
|
+
CompleteControlPlaneUpgradeRequest,
|
|
58
68
|
CompleteIPRotationRequest,
|
|
59
69
|
CompleteNodePoolUpgradeRequest,
|
|
60
70
|
CompliancePostureConfig,
|
|
@@ -66,15 +76,19 @@ from .types.cluster_service import (
|
|
|
66
76
|
CostManagementConfig,
|
|
67
77
|
CreateClusterRequest,
|
|
68
78
|
CreateNodePoolRequest,
|
|
79
|
+
CustomImageConfig,
|
|
80
|
+
CustomImageInfo,
|
|
69
81
|
DailyMaintenanceWindow,
|
|
70
82
|
DatabaseEncryption,
|
|
71
83
|
DatapathProvider,
|
|
84
|
+
DataplaneV2Config,
|
|
72
85
|
DefaultComputeClassConfig,
|
|
73
86
|
DefaultSnatStatus,
|
|
74
87
|
DeleteClusterRequest,
|
|
75
88
|
DeleteNodePoolRequest,
|
|
76
89
|
DesiredAdditionalIPRangesConfig,
|
|
77
90
|
DesiredEnterpriseConfig,
|
|
91
|
+
DiskIoScheduler,
|
|
78
92
|
DisruptionBudget,
|
|
79
93
|
DisruptionEvent,
|
|
80
94
|
DnsCacheConfig,
|
|
@@ -193,6 +207,8 @@ from .types.cluster_service import (
|
|
|
193
207
|
ResourceManagerTags,
|
|
194
208
|
ResourceUsageExportConfig,
|
|
195
209
|
RollbackNodePoolUpgradeRequest,
|
|
210
|
+
RollbackSafeUpgrade,
|
|
211
|
+
RollbackSafeUpgradeStatus,
|
|
196
212
|
SandboxConfig,
|
|
197
213
|
ScheduleUpgradeConfig,
|
|
198
214
|
SecondaryBootDisk,
|
|
@@ -246,89 +262,6 @@ from .types.cluster_service import (
|
|
|
246
262
|
WorkloadPolicyConfig,
|
|
247
263
|
)
|
|
248
264
|
|
|
249
|
-
if hasattr(api_core, "check_python_version") and hasattr(
|
|
250
|
-
api_core, "check_dependency_versions"
|
|
251
|
-
): # pragma: NO COVER
|
|
252
|
-
api_core.check_python_version("google.cloud.container_v1") # type: ignore
|
|
253
|
-
api_core.check_dependency_versions("google.cloud.container_v1") # type: ignore
|
|
254
|
-
else: # pragma: NO COVER
|
|
255
|
-
# An older version of api_core is installed which does not define the
|
|
256
|
-
# functions above. We do equivalent checks manually.
|
|
257
|
-
try:
|
|
258
|
-
import warnings
|
|
259
|
-
|
|
260
|
-
_py_version_str = sys.version.split()[0]
|
|
261
|
-
_package_label = "google.cloud.container_v1"
|
|
262
|
-
if sys.version_info < (3, 10):
|
|
263
|
-
warnings.warn(
|
|
264
|
-
"You are using a non-supported Python version "
|
|
265
|
-
+ f"({_py_version_str}). Google will not post any further "
|
|
266
|
-
+ f"updates to {_package_label} supporting this Python version. "
|
|
267
|
-
+ "Please upgrade to the latest Python version, or at "
|
|
268
|
-
+ f"least to Python 3.10, and then update {_package_label}.",
|
|
269
|
-
FutureWarning,
|
|
270
|
-
)
|
|
271
|
-
|
|
272
|
-
def parse_version_to_tuple(version_string: str):
|
|
273
|
-
"""Safely converts a semantic version string to a comparable tuple of integers.
|
|
274
|
-
Example: "4.25.8" -> (4, 25, 8)
|
|
275
|
-
Ignores non-numeric parts and handles common version formats.
|
|
276
|
-
Args:
|
|
277
|
-
version_string: Version string in the format "x.y.z" or "x.y.z<suffix>"
|
|
278
|
-
Returns:
|
|
279
|
-
Tuple of integers for the parsed version string.
|
|
280
|
-
"""
|
|
281
|
-
parts = []
|
|
282
|
-
for part in version_string.split("."):
|
|
283
|
-
try:
|
|
284
|
-
parts.append(int(part))
|
|
285
|
-
except ValueError:
|
|
286
|
-
# If it's a non-numeric part (e.g., '1.0.0b1' -> 'b1'), stop here.
|
|
287
|
-
# This is a simplification compared to 'packaging.parse_version', but sufficient
|
|
288
|
-
# for comparing strictly numeric semantic versions.
|
|
289
|
-
break
|
|
290
|
-
return tuple(parts)
|
|
291
|
-
|
|
292
|
-
def _get_version(dependency_name):
|
|
293
|
-
try:
|
|
294
|
-
version_string: str = metadata.version(dependency_name)
|
|
295
|
-
parsed_version = parse_version_to_tuple(version_string)
|
|
296
|
-
return (parsed_version, version_string)
|
|
297
|
-
except Exception:
|
|
298
|
-
# Catch exceptions from metadata.version() (e.g., PackageNotFoundError)
|
|
299
|
-
# or errors during parse_version_to_tuple
|
|
300
|
-
return (None, "--")
|
|
301
|
-
|
|
302
|
-
_dependency_package = "google.protobuf"
|
|
303
|
-
_next_supported_version = "4.25.8"
|
|
304
|
-
_next_supported_version_tuple = (4, 25, 8)
|
|
305
|
-
_recommendation = " (we recommend 6.x)"
|
|
306
|
-
(_version_used, _version_used_string) = _get_version(_dependency_package)
|
|
307
|
-
if _version_used and _version_used < _next_supported_version_tuple:
|
|
308
|
-
warnings.warn(
|
|
309
|
-
f"Package {_package_label} depends on "
|
|
310
|
-
+ f"{_dependency_package}, currently installed at version "
|
|
311
|
-
+ f"{_version_used_string}. Future updates to "
|
|
312
|
-
+ f"{_package_label} will require {_dependency_package} at "
|
|
313
|
-
+ f"version {_next_supported_version} or higher{_recommendation}."
|
|
314
|
-
+ " Please ensure "
|
|
315
|
-
+ "that either (a) your Python environment doesn't pin the "
|
|
316
|
-
+ f"version of {_dependency_package}, so that updates to "
|
|
317
|
-
+ f"{_package_label} can require the higher version, or "
|
|
318
|
-
+ "(b) you manually update your Python environment to use at "
|
|
319
|
-
+ f"least version {_next_supported_version} of "
|
|
320
|
-
+ f"{_dependency_package}.",
|
|
321
|
-
FutureWarning,
|
|
322
|
-
)
|
|
323
|
-
except Exception:
|
|
324
|
-
warnings.warn(
|
|
325
|
-
"Could not determine the version of Python "
|
|
326
|
-
+ "currently being used. To continue receiving "
|
|
327
|
-
+ "updates for {_package_label}, ensure you are "
|
|
328
|
-
+ "using a supported version of Python; see "
|
|
329
|
-
+ "https://devguide.python.org/versions/"
|
|
330
|
-
)
|
|
331
|
-
|
|
332
265
|
__all__ = (
|
|
333
266
|
"ClusterManagerAsyncClient",
|
|
334
267
|
"AcceleratorConfig",
|
|
@@ -339,6 +272,7 @@ __all__ = (
|
|
|
339
272
|
"AddonsConfig",
|
|
340
273
|
"AdvancedDatapathObservabilityConfig",
|
|
341
274
|
"AdvancedMachineFeatures",
|
|
275
|
+
"AgentSandboxConfig",
|
|
342
276
|
"AnonymousAuthenticationConfig",
|
|
343
277
|
"AuthenticatorGroupsConfig",
|
|
344
278
|
"AutoIpamConfig",
|
|
@@ -362,6 +296,7 @@ __all__ = (
|
|
|
362
296
|
"ClusterPolicyConfig",
|
|
363
297
|
"ClusterUpdate",
|
|
364
298
|
"ClusterUpgradeInfo",
|
|
299
|
+
"CompleteControlPlaneUpgradeRequest",
|
|
365
300
|
"CompleteIPRotationRequest",
|
|
366
301
|
"CompleteNodePoolUpgradeRequest",
|
|
367
302
|
"CompliancePostureConfig",
|
|
@@ -373,16 +308,20 @@ __all__ = (
|
|
|
373
308
|
"CostManagementConfig",
|
|
374
309
|
"CreateClusterRequest",
|
|
375
310
|
"CreateNodePoolRequest",
|
|
311
|
+
"CustomImageConfig",
|
|
312
|
+
"CustomImageInfo",
|
|
376
313
|
"DNSConfig",
|
|
377
314
|
"DailyMaintenanceWindow",
|
|
378
315
|
"DatabaseEncryption",
|
|
379
316
|
"DatapathProvider",
|
|
317
|
+
"DataplaneV2Config",
|
|
380
318
|
"DefaultComputeClassConfig",
|
|
381
319
|
"DefaultSnatStatus",
|
|
382
320
|
"DeleteClusterRequest",
|
|
383
321
|
"DeleteNodePoolRequest",
|
|
384
322
|
"DesiredAdditionalIPRangesConfig",
|
|
385
323
|
"DesiredEnterpriseConfig",
|
|
324
|
+
"DiskIoScheduler",
|
|
386
325
|
"DisruptionBudget",
|
|
387
326
|
"DisruptionEvent",
|
|
388
327
|
"DnsCacheConfig",
|
|
@@ -500,6 +439,8 @@ __all__ = (
|
|
|
500
439
|
"ResourceManagerTags",
|
|
501
440
|
"ResourceUsageExportConfig",
|
|
502
441
|
"RollbackNodePoolUpgradeRequest",
|
|
442
|
+
"RollbackSafeUpgrade",
|
|
443
|
+
"RollbackSafeUpgradeStatus",
|
|
503
444
|
"SandboxConfig",
|
|
504
445
|
"ScheduleUpgradeConfig",
|
|
505
446
|
"SecondaryBootDisk",
|
|
@@ -552,3 +493,6 @@ __all__ = (
|
|
|
552
493
|
"WorkloadMetadataConfig",
|
|
553
494
|
"WorkloadPolicyConfig",
|
|
554
495
|
)
|
|
496
|
+
|
|
497
|
+
api_core.check_python_version("google.cloud.container_v1")
|
|
498
|
+
api_core.check_dependency_versions("google.cloud.container_v1")
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Copyright 2026 Google LLC
|
|
3
|
+
#
|
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
# you may not use this file except in compliance with the License.
|
|
6
|
+
# You may obtain a copy of the License at
|
|
7
|
+
#
|
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
#
|
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
# See the License for the specific language governing permissions and
|
|
14
|
+
# limitations under the License.
|
|
15
|
+
#
|
|
16
|
+
"""A compatibility module for older versions of google-api-core."""
|
|
17
|
+
|
|
18
|
+
import json
|
|
19
|
+
import os
|
|
20
|
+
from typing import Any, Dict, List, Optional, Tuple
|
|
21
|
+
from urllib.parse import urlparse, urlunparse
|
|
22
|
+
|
|
23
|
+
from google.api_core import path_template
|
|
24
|
+
from google.api_core.universe import EmptyUniverseError
|
|
25
|
+
from google.auth.exceptions import MutualTLSChannelError
|
|
26
|
+
from google.protobuf import json_format
|
|
27
|
+
|
|
28
|
+
try:
|
|
29
|
+
# note: `#type: ignore` is added because the return type for `should_use_client_cert`
|
|
30
|
+
# is different than that of the fallback implementation below. This will be removed once
|
|
31
|
+
# we bump the minimum supported version of google-auth.
|
|
32
|
+
from google.auth.transport.mtls import should_use_client_cert # type: ignore
|
|
33
|
+
except ImportError: # pragma: NO COVER
|
|
34
|
+
|
|
35
|
+
def should_use_client_cert():
|
|
36
|
+
"""Returns whether client certificate should be used for mTLS."""
|
|
37
|
+
use_client_cert = os.getenv(
|
|
38
|
+
"GOOGLE_API_USE_CLIENT_CERTIFICATE", "false"
|
|
39
|
+
).lower()
|
|
40
|
+
if use_client_cert not in ("true", "false"):
|
|
41
|
+
raise ValueError(
|
|
42
|
+
"Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be"
|
|
43
|
+
" either `true` or `false`"
|
|
44
|
+
)
|
|
45
|
+
return use_client_cert == "true"
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def read_environment_variables():
|
|
49
|
+
"""Returns the environment variables used by the client.
|
|
50
|
+
|
|
51
|
+
Returns:
|
|
52
|
+
Tuple[bool, str, str]: returns the GOOGLE_API_USE_CLIENT_CERTIFICATE,
|
|
53
|
+
GOOGLE_API_USE_MTLS_ENDPOINT, and GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variables.
|
|
54
|
+
|
|
55
|
+
Raises:
|
|
56
|
+
ValueError: If GOOGLE_API_USE_CLIENT_CERTIFICATE is not
|
|
57
|
+
any of ["true", "false"].
|
|
58
|
+
google.auth.exceptions.MutualTLSChannelError: If GOOGLE_API_USE_MTLS_ENDPOINT
|
|
59
|
+
is not any of ["auto", "never", "always"].
|
|
60
|
+
"""
|
|
61
|
+
use_client_cert = should_use_client_cert()
|
|
62
|
+
use_mtls_endpoint = os.getenv("GOOGLE_API_USE_MTLS_ENDPOINT", "auto").lower()
|
|
63
|
+
universe_domain_env = os.getenv("GOOGLE_CLOUD_UNIVERSE_DOMAIN")
|
|
64
|
+
if use_mtls_endpoint not in ("auto", "never", "always"):
|
|
65
|
+
raise MutualTLSChannelError(
|
|
66
|
+
"Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`,"
|
|
67
|
+
" `auto` or `always`"
|
|
68
|
+
)
|
|
69
|
+
return use_client_cert, use_mtls_endpoint, universe_domain_env
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
DEFAULT_UNIVERSE = "googleapis.com"
|
|
73
|
+
|
|
74
|
+
try:
|
|
75
|
+
from google.api_core.universe import get_default_mtls_endpoint
|
|
76
|
+
except ImportError: # pragma: NO COVER
|
|
77
|
+
|
|
78
|
+
def get_default_mtls_endpoint(api_endpoint: Optional[str]) -> Optional[str]:
|
|
79
|
+
"""Converts api endpoint to mTLS endpoint.
|
|
80
|
+
|
|
81
|
+
Convert "*.sandbox.googleapis.com" and "*.googleapis.com" to
|
|
82
|
+
"*.mtls.sandbox.googleapis.com" and "*.mtls.googleapis.com" respectively.
|
|
83
|
+
Other URLs (including those that do not match these domain suffixes or
|
|
84
|
+
already contain '.mtls.') are passed through as-is.
|
|
85
|
+
|
|
86
|
+
Args:
|
|
87
|
+
api_endpoint (Optional[str]): the api endpoint to convert.
|
|
88
|
+
|
|
89
|
+
Returns:
|
|
90
|
+
Optional[str]: converted mTLS api endpoint.
|
|
91
|
+
"""
|
|
92
|
+
if not api_endpoint or ".mtls." in api_endpoint.lower():
|
|
93
|
+
return api_endpoint
|
|
94
|
+
|
|
95
|
+
has_scheme = "://" in api_endpoint
|
|
96
|
+
if not has_scheme:
|
|
97
|
+
parsed = urlparse("//" + api_endpoint)
|
|
98
|
+
else:
|
|
99
|
+
parsed = urlparse(api_endpoint)
|
|
100
|
+
|
|
101
|
+
host = parsed.hostname
|
|
102
|
+
if not host:
|
|
103
|
+
return api_endpoint
|
|
104
|
+
|
|
105
|
+
port = f":{parsed.port}" if parsed.port else ""
|
|
106
|
+
|
|
107
|
+
lowered_host = host.lower()
|
|
108
|
+
suffix_sandbox = ".sandbox.googleapis.com"
|
|
109
|
+
suffix_google = ".googleapis.com"
|
|
110
|
+
if lowered_host.endswith(suffix_sandbox):
|
|
111
|
+
new_host = host[: -len(suffix_sandbox)] + ".mtls.sandbox.googleapis.com"
|
|
112
|
+
elif lowered_host.endswith(suffix_google):
|
|
113
|
+
new_host = host[: -len(suffix_google)] + ".mtls.googleapis.com"
|
|
114
|
+
else:
|
|
115
|
+
return api_endpoint
|
|
116
|
+
|
|
117
|
+
netloc = new_host + port
|
|
118
|
+
new_parsed = parsed._replace(netloc=netloc)
|
|
119
|
+
|
|
120
|
+
if not has_scheme:
|
|
121
|
+
return urlunparse(new_parsed)[2:]
|
|
122
|
+
else:
|
|
123
|
+
return urlunparse(new_parsed)
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
try:
|
|
127
|
+
from google.api_core.universe import get_api_endpoint
|
|
128
|
+
except ImportError: # pragma: NO COVER
|
|
129
|
+
|
|
130
|
+
def get_api_endpoint(
|
|
131
|
+
api_override: Optional[str],
|
|
132
|
+
universe_domain: str,
|
|
133
|
+
default_universe: str,
|
|
134
|
+
default_mtls_endpoint: Optional[str],
|
|
135
|
+
default_endpoint_template: str,
|
|
136
|
+
use_mtls: bool,
|
|
137
|
+
) -> str:
|
|
138
|
+
"""Return the API endpoint used by the client.
|
|
139
|
+
|
|
140
|
+
Args:
|
|
141
|
+
api_override (Optional[str]): The API endpoint override. If specified,
|
|
142
|
+
this is always returned.
|
|
143
|
+
universe_domain (str): The universe domain used by the client.
|
|
144
|
+
default_universe (str): The default universe domain.
|
|
145
|
+
default_mtls_endpoint (Optional[str]): The default mTLS endpoint.
|
|
146
|
+
default_endpoint_template (str): The default endpoint template containing
|
|
147
|
+
a placeholder `{UNIVERSE_DOMAIN}`.
|
|
148
|
+
use_mtls (bool): Whether to use the mTLS endpoint.
|
|
149
|
+
|
|
150
|
+
Returns:
|
|
151
|
+
str: The API endpoint to be used by the client.
|
|
152
|
+
|
|
153
|
+
Raises:
|
|
154
|
+
google.auth.exceptions.MutualTLSChannelError: If mTLS is requested but
|
|
155
|
+
not supported in the configured universe domain.
|
|
156
|
+
ValueError: If mTLS is requested but no mTLS endpoint is available.
|
|
157
|
+
"""
|
|
158
|
+
if api_override is not None:
|
|
159
|
+
return api_override
|
|
160
|
+
|
|
161
|
+
if use_mtls:
|
|
162
|
+
if universe_domain.lower() != default_universe.lower():
|
|
163
|
+
raise MutualTLSChannelError(
|
|
164
|
+
f"mTLS is not supported in any universe other than {default_universe}."
|
|
165
|
+
)
|
|
166
|
+
if not default_mtls_endpoint:
|
|
167
|
+
raise ValueError("mTLS endpoint is not available.")
|
|
168
|
+
return default_mtls_endpoint
|
|
169
|
+
else:
|
|
170
|
+
return default_endpoint_template.format(UNIVERSE_DOMAIN=universe_domain)
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
try:
|
|
174
|
+
from google.api_core.universe import get_universe_domain
|
|
175
|
+
except ImportError: # pragma: NO COVER
|
|
176
|
+
|
|
177
|
+
def get_universe_domain(
|
|
178
|
+
*potential_universes: Optional[str],
|
|
179
|
+
default_universe: str,
|
|
180
|
+
) -> str:
|
|
181
|
+
"""Return the universe domain used by the client.
|
|
182
|
+
|
|
183
|
+
Args:
|
|
184
|
+
*potential_universes (Optional[str]): Potential universe domains in order of preference.
|
|
185
|
+
default_universe (str): The default universe domain.
|
|
186
|
+
|
|
187
|
+
Returns:
|
|
188
|
+
str: The universe domain to be used by the client.
|
|
189
|
+
|
|
190
|
+
Raises:
|
|
191
|
+
EmptyUniverseError: If the resolved universe domain is an empty string.
|
|
192
|
+
"""
|
|
193
|
+
resolved = next(
|
|
194
|
+
(x.strip() for x in potential_universes if x is not None),
|
|
195
|
+
default_universe,
|
|
196
|
+
)
|
|
197
|
+
|
|
198
|
+
if not resolved:
|
|
199
|
+
raise EmptyUniverseError()
|
|
200
|
+
return resolved
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
try:
|
|
204
|
+
from google.api_core.rest_helpers import transcode_request # type: ignore
|
|
205
|
+
except ImportError: # pragma: NO COVER
|
|
206
|
+
|
|
207
|
+
def transcode_request(
|
|
208
|
+
http_options: List[Dict[str, str]],
|
|
209
|
+
request: Any,
|
|
210
|
+
required_fields_default_values: Optional[Dict[str, Any]] = None,
|
|
211
|
+
rest_numeric_enums: bool = False,
|
|
212
|
+
) -> Tuple[Dict[str, Any], Optional[str], Dict[str, Any]]:
|
|
213
|
+
"""Transcodes a request into HTTP method, URI, body, and query parameters.
|
|
214
|
+
|
|
215
|
+
Args:
|
|
216
|
+
http_options (List[Dict[str, str]]): List of HTTP transcoding rules.
|
|
217
|
+
request (Any): The protobuf or proto-plus request message.
|
|
218
|
+
required_fields_default_values (Optional[Dict[str, Any]]): Dictionary
|
|
219
|
+
of required fields default values to merge into query parameters if missing.
|
|
220
|
+
rest_numeric_enums (bool): Whether to encode enums as integers.
|
|
221
|
+
|
|
222
|
+
Returns:
|
|
223
|
+
Tuple[Dict[str, Any], Optional[str], Dict[str, Any]]: A tuple containing:
|
|
224
|
+
- The raw transcoded request dictionary (containing keys like 'uri', 'method').
|
|
225
|
+
- The serialized request body JSON string, or None if no body.
|
|
226
|
+
- The query parameters dictionary.
|
|
227
|
+
"""
|
|
228
|
+
if request is None:
|
|
229
|
+
raise TypeError("request cannot be None")
|
|
230
|
+
|
|
231
|
+
# Convert proto-plus message to its underlying protobuf message if needed
|
|
232
|
+
pb_request = getattr(request, "_pb", request)
|
|
233
|
+
|
|
234
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
235
|
+
|
|
236
|
+
body_json = None
|
|
237
|
+
if transcoded_request.get("body") is not None:
|
|
238
|
+
body_json = json_format.MessageToJson(
|
|
239
|
+
transcoded_request["body"],
|
|
240
|
+
use_integers_for_enums=rest_numeric_enums,
|
|
241
|
+
)
|
|
242
|
+
|
|
243
|
+
query_params_json = {}
|
|
244
|
+
if transcoded_request.get("query_params") is not None:
|
|
245
|
+
query_params_json = json.loads(
|
|
246
|
+
json_format.MessageToJson(
|
|
247
|
+
transcoded_request["query_params"],
|
|
248
|
+
use_integers_for_enums=rest_numeric_enums,
|
|
249
|
+
)
|
|
250
|
+
)
|
|
251
|
+
|
|
252
|
+
# If required_fields_default_values is provided, we merge default values for missing
|
|
253
|
+
# required fields into the query parameters.
|
|
254
|
+
if required_fields_default_values:
|
|
255
|
+
for k, v in required_fields_default_values.items():
|
|
256
|
+
if k not in query_params_json:
|
|
257
|
+
query_params_json[k] = v
|
|
258
|
+
|
|
259
|
+
if rest_numeric_enums:
|
|
260
|
+
query_params_json["$alt"] = "json;enum-encoding=int"
|
|
261
|
+
|
|
262
|
+
return transcoded_request, body_json, query_params_json
|
|
@@ -20,6 +20,11 @@
|
|
|
20
20
|
"check_autopilot_compatibility"
|
|
21
21
|
]
|
|
22
22
|
},
|
|
23
|
+
"CompleteControlPlaneUpgrade": {
|
|
24
|
+
"methods": [
|
|
25
|
+
"complete_control_plane_upgrade"
|
|
26
|
+
]
|
|
27
|
+
},
|
|
23
28
|
"CompleteIPRotation": {
|
|
24
29
|
"methods": [
|
|
25
30
|
"complete_ip_rotation"
|
|
@@ -205,6 +210,11 @@
|
|
|
205
210
|
"check_autopilot_compatibility"
|
|
206
211
|
]
|
|
207
212
|
},
|
|
213
|
+
"CompleteControlPlaneUpgrade": {
|
|
214
|
+
"methods": [
|
|
215
|
+
"complete_control_plane_upgrade"
|
|
216
|
+
]
|
|
217
|
+
},
|
|
208
218
|
"CompleteIPRotation": {
|
|
209
219
|
"methods": [
|
|
210
220
|
"complete_ip_rotation"
|
|
@@ -390,6 +400,11 @@
|
|
|
390
400
|
"check_autopilot_compatibility"
|
|
391
401
|
]
|
|
392
402
|
},
|
|
403
|
+
"CompleteControlPlaneUpgrade": {
|
|
404
|
+
"methods": [
|
|
405
|
+
"complete_control_plane_upgrade"
|
|
406
|
+
]
|
|
407
|
+
},
|
|
393
408
|
"CompleteIPRotation": {
|
|
394
409
|
"methods": [
|
|
395
410
|
"complete_ip_rotation"
|