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

Commit f77bd7c

Browse files
authored
Merge branch 'main' into delete-owlbot-py
2 parents aa40411 + 360327a commit f77bd7c

File tree

20 files changed

+1285
-453
lines changed

20 files changed

+1285
-453
lines changed

.github/.OwlBot.lock.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
docker:
22
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
3-
digest: sha256:4ee57a76a176ede9087c14330c625a71553cf9c72828b2c0ca12f5338171ba60
3+
digest: sha256:0e18b9475fbeb12d9ad4302283171edebb6baf2dfca1bd215ee3b34ed79d95d7

.github/CODEOWNERS

+5-4
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
#
44
# For syntax help see:
55
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax
6+
# Note: This file is autogenerated. To make changes to the codeowner team, please update .repo-metadata.json.
67

7-
# The @googleapis/yoshi-python is the default owner for changes in this repo
8-
* @googleapis/yoshi-python @googleapis/anthos-dpe
8+
# @googleapis/yoshi-python @googleapis/anthos-dpe are the default owners for changes in this repo
9+
* @googleapis/yoshi-python @googleapis/anthos-dpe
910

10-
# The python-samples-reviewers team is the default owner for samples changes
11-
/samples/ @googleapis/python-samples-owners
11+
# @googleapis/python-samples-owners @googleapis/anthos-dpe are the default owners for samples changes
12+
/samples/ @googleapis/python-samples-owners @googleapis/anthos-dpe

docs/container_v1/services.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Services for Google Container v1 API
2-
====================================
1+
Services for Google Cloud Container v1 API
2+
==========================================
33
.. toctree::
44
:maxdepth: 2
55

docs/container_v1/types.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Types for Google Container v1 API
2-
=================================
1+
Types for Google Cloud Container v1 API
2+
=======================================
33

44
.. automodule:: google.cloud.container_v1.types
55
:members:

docs/container_v1beta1/services.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Services for Google Container v1beta1 API
2-
=========================================
1+
Services for Google Cloud Container v1beta1 API
2+
===============================================
33
.. toctree::
44
:maxdepth: 2
55

docs/container_v1beta1/types.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Types for Google Container v1beta1 API
2-
======================================
1+
Types for Google Cloud Container v1beta1 API
2+
============================================
33

44
.. automodule:: google.cloud.container_v1beta1.types
55
:members:

google/cloud/container_v1/services/cluster_manager/async_client.py

+8-5
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,17 @@
2020
import pkg_resources
2121
import warnings
2222

23-
from google.api_core.client_options import ClientOptions # type: ignore
24-
from google.api_core import exceptions as core_exceptions # type: ignore
25-
from google.api_core import gapic_v1 # type: ignore
26-
from google.api_core import retry as retries # type: ignore
23+
from google.api_core.client_options import ClientOptions
24+
from google.api_core import exceptions as core_exceptions
25+
from google.api_core import gapic_v1
26+
from google.api_core import retry as retries
2727
from google.auth import credentials as ga_credentials # type: ignore
2828
from google.oauth2 import service_account # type: ignore
2929

30-
OptionalRetry = Union[retries.Retry, object]
30+
try:
31+
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
32+
except AttributeError: # pragma: NO COVER
33+
OptionalRetry = Union[retries.Retry, object] # type: ignore
3134

3235
from google.cloud.container_v1.services.cluster_manager import pagers
3336
from google.cloud.container_v1.types import cluster_service

google/cloud/container_v1/services/cluster_manager/client.py

+17-8
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,26 @@
1414
# limitations under the License.
1515
#
1616
from collections import OrderedDict
17-
from distutils import util
1817
import os
1918
import re
2019
from typing import Dict, Optional, Sequence, Tuple, Type, Union
2120
import pkg_resources
2221
import warnings
2322

24-
from google.api_core import client_options as client_options_lib # type: ignore
25-
from google.api_core import exceptions as core_exceptions # type: ignore
26-
from google.api_core import gapic_v1 # type: ignore
27-
from google.api_core import retry as retries # type: ignore
23+
from google.api_core import client_options as client_options_lib
24+
from google.api_core import exceptions as core_exceptions
25+
from google.api_core import gapic_v1
26+
from google.api_core import retry as retries
2827
from google.auth import credentials as ga_credentials # type: ignore
2928
from google.auth.transport import mtls # type: ignore
3029
from google.auth.transport.grpc import SslCredentials # type: ignore
3130
from google.auth.exceptions import MutualTLSChannelError # type: ignore
3231
from google.oauth2 import service_account # type: ignore
3332

34-
OptionalRetry = Union[retries.Retry, object]
33+
try:
34+
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
35+
except AttributeError: # pragma: NO COVER
36+
OptionalRetry = Union[retries.Retry, object] # type: ignore
3537

3638
from google.cloud.container_v1.services.cluster_manager import pagers
3739
from google.cloud.container_v1.types import cluster_service
@@ -268,8 +270,15 @@ def __init__(
268270
client_options = client_options_lib.ClientOptions()
269271

270272
# Create SSL credentials for mutual TLS if needed.
271-
use_client_cert = bool(
272-
util.strtobool(os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false"))
273+
if os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") not in (
274+
"true",
275+
"false",
276+
):
277+
raise ValueError(
278+
"Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`"
279+
)
280+
use_client_cert = (
281+
os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") == "true"
273282
)
274283

275284
client_cert_source_func = None

google/cloud/container_v1/services/cluster_manager/transports/base.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
import pkg_resources
1919

2020
import google.auth # type: ignore
21-
import google.api_core # type: ignore
22-
from google.api_core import exceptions as core_exceptions # type: ignore
23-
from google.api_core import gapic_v1 # type: ignore
24-
from google.api_core import retry as retries # type: ignore
21+
import google.api_core
22+
from google.api_core import exceptions as core_exceptions
23+
from google.api_core import gapic_v1
24+
from google.api_core import retry as retries
2525
from google.auth import credentials as ga_credentials # type: ignore
2626
from google.oauth2 import service_account # type: ignore
2727

google/cloud/container_v1/services/cluster_manager/transports/grpc.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
import warnings
1717
from typing import Callable, Dict, Optional, Sequence, Tuple, Union
1818

19-
from google.api_core import grpc_helpers # type: ignore
20-
from google.api_core import gapic_v1 # type: ignore
19+
from google.api_core import grpc_helpers
20+
from google.api_core import gapic_v1
2121
import google.auth # type: ignore
2222
from google.auth import credentials as ga_credentials # type: ignore
2323
from google.auth.transport.grpc import SslCredentials # type: ignore

google/cloud/container_v1/services/cluster_manager/transports/grpc_asyncio.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
import warnings
1717
from typing import Awaitable, Callable, Dict, Optional, Sequence, Tuple, Union
1818

19-
from google.api_core import gapic_v1 # type: ignore
20-
from google.api_core import grpc_helpers_async # type: ignore
19+
from google.api_core import gapic_v1
20+
from google.api_core import grpc_helpers_async
2121
from google.auth import credentials as ga_credentials # type: ignore
2222
from google.auth.transport.grpc import SslCredentials # type: ignore
2323

google/cloud/container_v1/types/cluster_service.py

+5
Original file line numberDiff line numberDiff line change
@@ -1621,13 +1621,16 @@ class Metric(proto.Message):
16211621
"percent done".
16221622
int_value (int):
16231623
For metrics with integer value.
1624+
16241625
This field is a member of `oneof`_ ``value``.
16251626
double_value (float):
16261627
For metrics with floating point value.
1628+
16271629
This field is a member of `oneof`_ ``value``.
16281630
string_value (str):
16291631
For metrics with custom values (ratios,
16301632
visual progress, etc.).
1633+
16311634
This field is a member of `oneof`_ ``value``.
16321635
"""
16331636

@@ -2731,13 +2734,15 @@ class MaintenanceWindow(proto.Message):
27312734
daily_maintenance_window (google.cloud.container_v1.types.DailyMaintenanceWindow):
27322735
DailyMaintenanceWindow specifies a daily
27332736
maintenance operation window.
2737+
27342738
This field is a member of `oneof`_ ``policy``.
27352739
recurring_window (google.cloud.container_v1.types.RecurringTimeWindow):
27362740
RecurringWindow specifies some number of
27372741
recurring time periods for maintenance to occur.
27382742
The time windows may be overlapping. If no
27392743
maintenance windows are set, maintenance can
27402744
occur at any time.
2745+
27412746
This field is a member of `oneof`_ ``policy``.
27422747
maintenance_exclusions (Sequence[google.cloud.container_v1.types.MaintenanceWindow.MaintenanceExclusionsEntry]):
27432748
Exceptions to maintenance window. Non-

google/cloud/container_v1beta1/services/cluster_manager/async_client.py

+8-5
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,17 @@
2020
import pkg_resources
2121
import warnings
2222

23-
from google.api_core.client_options import ClientOptions # type: ignore
24-
from google.api_core import exceptions as core_exceptions # type: ignore
25-
from google.api_core import gapic_v1 # type: ignore
26-
from google.api_core import retry as retries # type: ignore
23+
from google.api_core.client_options import ClientOptions
24+
from google.api_core import exceptions as core_exceptions
25+
from google.api_core import gapic_v1
26+
from google.api_core import retry as retries
2727
from google.auth import credentials as ga_credentials # type: ignore
2828
from google.oauth2 import service_account # type: ignore
2929

30-
OptionalRetry = Union[retries.Retry, object]
30+
try:
31+
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
32+
except AttributeError: # pragma: NO COVER
33+
OptionalRetry = Union[retries.Retry, object] # type: ignore
3134

3235
from google.cloud.container_v1beta1.services.cluster_manager import pagers
3336
from google.cloud.container_v1beta1.types import cluster_service

google/cloud/container_v1beta1/services/cluster_manager/client.py

+17-8
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,26 @@
1414
# limitations under the License.
1515
#
1616
from collections import OrderedDict
17-
from distutils import util
1817
import os
1918
import re
2019
from typing import Dict, Optional, Sequence, Tuple, Type, Union
2120
import pkg_resources
2221
import warnings
2322

24-
from google.api_core import client_options as client_options_lib # type: ignore
25-
from google.api_core import exceptions as core_exceptions # type: ignore
26-
from google.api_core import gapic_v1 # type: ignore
27-
from google.api_core import retry as retries # type: ignore
23+
from google.api_core import client_options as client_options_lib
24+
from google.api_core import exceptions as core_exceptions
25+
from google.api_core import gapic_v1
26+
from google.api_core import retry as retries
2827
from google.auth import credentials as ga_credentials # type: ignore
2928
from google.auth.transport import mtls # type: ignore
3029
from google.auth.transport.grpc import SslCredentials # type: ignore
3130
from google.auth.exceptions import MutualTLSChannelError # type: ignore
3231
from google.oauth2 import service_account # type: ignore
3332

34-
OptionalRetry = Union[retries.Retry, object]
33+
try:
34+
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
35+
except AttributeError: # pragma: NO COVER
36+
OptionalRetry = Union[retries.Retry, object] # type: ignore
3537

3638
from google.cloud.container_v1beta1.services.cluster_manager import pagers
3739
from google.cloud.container_v1beta1.types import cluster_service
@@ -280,8 +282,15 @@ def __init__(
280282
client_options = client_options_lib.ClientOptions()
281283

282284
# Create SSL credentials for mutual TLS if needed.
283-
use_client_cert = bool(
284-
util.strtobool(os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false"))
285+
if os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") not in (
286+
"true",
287+
"false",
288+
):
289+
raise ValueError(
290+
"Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`"
291+
)
292+
use_client_cert = (
293+
os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") == "true"
285294
)
286295

287296
client_cert_source_func = None

google/cloud/container_v1beta1/services/cluster_manager/transports/base.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
import pkg_resources
1919

2020
import google.auth # type: ignore
21-
import google.api_core # type: ignore
22-
from google.api_core import exceptions as core_exceptions # type: ignore
23-
from google.api_core import gapic_v1 # type: ignore
24-
from google.api_core import retry as retries # type: ignore
21+
import google.api_core
22+
from google.api_core import exceptions as core_exceptions
23+
from google.api_core import gapic_v1
24+
from google.api_core import retry as retries
2525
from google.auth import credentials as ga_credentials # type: ignore
2626
from google.oauth2 import service_account # type: ignore
2727

google/cloud/container_v1beta1/services/cluster_manager/transports/grpc.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
import warnings
1717
from typing import Callable, Dict, Optional, Sequence, Tuple, Union
1818

19-
from google.api_core import grpc_helpers # type: ignore
20-
from google.api_core import gapic_v1 # type: ignore
19+
from google.api_core import grpc_helpers
20+
from google.api_core import gapic_v1
2121
import google.auth # type: ignore
2222
from google.auth import credentials as ga_credentials # type: ignore
2323
from google.auth.transport.grpc import SslCredentials # type: ignore

google/cloud/container_v1beta1/services/cluster_manager/transports/grpc_asyncio.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
import warnings
1717
from typing import Awaitable, Callable, Dict, Optional, Sequence, Tuple, Union
1818

19-
from google.api_core import gapic_v1 # type: ignore
20-
from google.api_core import grpc_helpers_async # type: ignore
19+
from google.api_core import gapic_v1
20+
from google.api_core import grpc_helpers_async
2121
from google.auth import credentials as ga_credentials # type: ignore
2222
from google.auth.transport.grpc import SslCredentials # type: ignore
2323

google/cloud/container_v1beta1/types/cluster_service.py

+6
Original file line numberDiff line numberDiff line change
@@ -1634,6 +1634,7 @@ class Cluster(proto.Message):
16341634
Default NodePool settings for the entire
16351635
cluster. These settings are overridden if
16361636
specified on the specific NodePool object.
1637+
16371638
This field is a member of `oneof`_ ``_node_pool_defaults``.
16381639
logging_config (google.cloud.container_v1beta1.types.LoggingConfig):
16391640
Logging configuration for the cluster.
@@ -2170,13 +2171,16 @@ class Metric(proto.Message):
21702171
"percent done".
21712172
int_value (int):
21722173
For metrics with integer value.
2174+
21732175
This field is a member of `oneof`_ ``value``.
21742176
double_value (float):
21752177
For metrics with floating point value.
2178+
21762179
This field is a member of `oneof`_ ``value``.
21772180
string_value (str):
21782181
For metrics with custom values (ratios,
21792182
visual progress, etc.).
2183+
21802184
This field is a member of `oneof`_ ``value``.
21812185
"""
21822186

@@ -3364,13 +3368,15 @@ class MaintenanceWindow(proto.Message):
33643368
daily_maintenance_window (google.cloud.container_v1beta1.types.DailyMaintenanceWindow):
33653369
DailyMaintenanceWindow specifies a daily
33663370
maintenance operation window.
3371+
33673372
This field is a member of `oneof`_ ``policy``.
33683373
recurring_window (google.cloud.container_v1beta1.types.RecurringTimeWindow):
33693374
RecurringWindow specifies some number of
33703375
recurring time periods for maintenance to occur.
33713376
The time windows may be overlapping. If no
33723377
maintenance windows are set, maintenance can
33733378
occur at any time.
3379+
33743380
This field is a member of `oneof`_ ``policy``.
33753381
maintenance_exclusions (Sequence[google.cloud.container_v1beta1.types.MaintenanceWindow.MaintenanceExclusionsEntry]):
33763382
Exceptions to maintenance window. Non-

0 commit comments

Comments
 (0)