diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index a9fcd07..2567653 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: - image: gcr.io/repo-automation-bots/owlbot-python:latest - digest: sha256:9743664022bd63a8084be67f144898314c7ca12f0a03e422ac17c733c129d803 + image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest + digest: sha256:87eee22d276554e4e52863ec9b1cb6a7245815dfae20439712bf644348215a5a diff --git a/.github/.OwlBot.yaml b/.github/.OwlBot.yaml index 5a63f4f..e30cae8 100644 --- a/.github/.OwlBot.yaml +++ b/.github/.OwlBot.yaml @@ -13,7 +13,7 @@ # limitations under the License. docker: - image: gcr.io/repo-automation-bots/owlbot-python:latest + image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest deep-remove-regex: - /owl-bot-staging diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 04608a7..ac454ba 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -41,7 +41,7 @@ python3 -m pip install --upgrade --quiet nox python3 -m nox --version # If this is a continuous build, send the test log to the FlakyBot. -# See https://github.com/googleapis/repo-automation-bots/tree/master/packages/flakybot. +# See https://github.com/googleapis/repo-automation-bots/tree/main/packages/flakybot. if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"continuous"* ]]; then cleanup() { chmod +x $KOKORO_GFILE_DIR/linux_amd64/flakybot diff --git a/.kokoro/test-samples-impl.sh b/.kokoro/test-samples-impl.sh index 311a8d5..8a324c9 100755 --- a/.kokoro/test-samples-impl.sh +++ b/.kokoro/test-samples-impl.sh @@ -80,7 +80,7 @@ for file in samples/**/requirements.txt; do EXIT=$? # If this is a periodic build, send the test log to the FlakyBot. - # See https://github.com/googleapis/repo-automation-bots/tree/master/packages/flakybot. + # See https://github.com/googleapis/repo-automation-bots/tree/main/packages/flakybot. if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"periodic"* ]]; then chmod +x $KOKORO_GFILE_DIR/linux_amd64/flakybot $KOKORO_GFILE_DIR/linux_amd64/flakybot diff --git a/CHANGELOG.md b/CHANGELOG.md index 36ee128..f82047f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [0.6.1](https://www.github.com/googleapis/python-network-connectivity/compare/v0.6.0...v0.6.1) (2021-09-24) + + +### Bug Fixes + +* add 'dict' annotation type to 'request' ([ae7ade1](https://www.github.com/googleapis/python-network-connectivity/commit/ae7ade17d232d016130b386e30812ab7c320f046)) + ## [0.6.0](https://www.github.com/googleapis/python-network-connectivity/compare/v0.5.0...v0.6.0) (2021-08-25) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 8738a0e..de8b377 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -50,9 +50,9 @@ You'll have to create a development environment using a Git checkout: # Configure remotes such that you can pull changes from the googleapis/python-network-connectivity # repository into your local repository. $ git remote add upstream git@github.com:googleapis/python-network-connectivity.git - # fetch and merge changes from upstream into master + # fetch and merge changes from upstream into main $ git fetch upstream - $ git merge upstream/master + $ git merge upstream/main Now your local repo is set up such that you will push changes to your GitHub repo, from which you can submit a pull request. @@ -110,12 +110,12 @@ Coding Style variables:: export GOOGLE_CLOUD_TESTING_REMOTE="upstream" - export GOOGLE_CLOUD_TESTING_BRANCH="master" + export GOOGLE_CLOUD_TESTING_BRANCH="main" By doing this, you are specifying the location of the most up-to-date - version of ``python-network-connectivity``. The the suggested remote name ``upstream`` - should point to the official ``googleapis`` checkout and the - the branch should be the main branch on that remote (``master``). + version of ``python-network-connectivity``. The + remote name ``upstream`` should point to the official ``googleapis`` + checkout and the branch should be the default branch on that remote (``main``). - This repository contains configuration for the `pre-commit <https://pre-commit.com/>`__ tool, which automates checking @@ -209,7 +209,7 @@ The `description on PyPI`_ for the project comes directly from the ``README``. Due to the reStructuredText (``rst``) parser used by PyPI, relative links which will work on GitHub (e.g. ``CONTRIBUTING.rst`` instead of -``https://github.com/googleapis/python-network-connectivity/blob/master/CONTRIBUTING.rst``) +``https://github.com/googleapis/python-network-connectivity/blob/main/CONTRIBUTING.rst``) may cause problems creating links or rendering the description. .. _description on PyPI: https://pypi.org/project/google-cloud-network-connectivity @@ -234,7 +234,7 @@ We support: Supported versions can be found in our ``noxfile.py`` `config`_. -.. _config: https://github.com/googleapis/python-network-connectivity/blob/master/noxfile.py +.. _config: https://github.com/googleapis/python-network-connectivity/blob/main/noxfile.py We also explicitly decided to support Python 3 beginning with version 3.6. diff --git a/README.rst b/README.rst index 72486dc..0f5a6ea 100644 --- a/README.rst +++ b/README.rst @@ -14,7 +14,7 @@ inconsistencies, etc. - `Product Documentation`_ .. |beta| image:: https://img.shields.io/badge/support-beta-orange.svg - :target: https://github.com/googleapis/google-cloud-python/blob/master/README.rst#beta-support + :target: https://github.com/googleapis/google-cloud-python/blob/main/README.rst#beta-support .. |pypi| image:: https://img.shields.io/pypi/v/google-cloud-network-connectivity.svg :target: https://pypi.org/project/google-cloud-network-connectivity/ .. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-network-connectivity.svg @@ -84,4 +84,4 @@ Next Steps APIs that we cover. .. _Network Connectivity Center Product documentation: https://cloud.google.com/network-connectivity/docs -.. _README: https://github.com/googleapis/google-cloud-python/blob/master/README.rst +.. _README: https://github.com/googleapis/google-cloud-python/blob/main/README.rst diff --git a/docs/conf.py b/docs/conf.py index e09f7b3..c4bd0bd 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -76,8 +76,8 @@ # The encoding of source files. # source_encoding = 'utf-8-sig' -# The master toctree document. -master_doc = "index" +# The root toctree document. +root_doc = "index" # General information about the project. project = "google-cloud-network-connectivity" @@ -280,7 +280,7 @@ # author, documentclass [howto, manual, or own class]). latex_documents = [ ( - master_doc, + root_doc, "google-cloud-network-connectivity.tex", "google-cloud-network-connectivity Documentation", author, @@ -315,7 +315,7 @@ # (source start file, name, description, authors, manual section). man_pages = [ ( - master_doc, + root_doc, "google-cloud-network-connectivity", "google-cloud-network-connectivity Documentation", [author], @@ -334,7 +334,7 @@ # dir menu entry, description, category) texinfo_documents = [ ( - master_doc, + root_doc, "google-cloud-network-connectivity", "google-cloud-network-connectivity Documentation", author, diff --git a/google/cloud/networkconnectivity_v1/services/hub_service/client.py b/google/cloud/networkconnectivity_v1/services/hub_service/client.py index 6a7f264..3f78354 100644 --- a/google/cloud/networkconnectivity_v1/services/hub_service/client.py +++ b/google/cloud/networkconnectivity_v1/services/hub_service/client.py @@ -17,7 +17,7 @@ from distutils import util import os import re -from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union +from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib # type: ignore @@ -441,7 +441,7 @@ def __init__( def list_hubs( self, - request: hub.ListHubsRequest = None, + request: Union[hub.ListHubsRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -451,7 +451,7 @@ def list_hubs( r"""Lists hubs in a given project. Args: - request (google.cloud.networkconnectivity_v1.types.ListHubsRequest): + request (Union[google.cloud.networkconnectivity_v1.types.ListHubsRequest, dict]): The request object. Request for [HubService.ListHubs][google.cloud.networkconnectivity.v1.HubService.ListHubs] method. @@ -521,7 +521,7 @@ def list_hubs( def get_hub( self, - request: hub.GetHubRequest = None, + request: Union[hub.GetHubRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -531,7 +531,7 @@ def get_hub( r"""Gets details about the specified hub. Args: - request (google.cloud.networkconnectivity_v1.types.GetHubRequest): + request (Union[google.cloud.networkconnectivity_v1.types.GetHubRequest, dict]): The request object. Request for [HubService.GetHub][google.cloud.networkconnectivity.v1.HubService.GetHub] method. @@ -597,7 +597,7 @@ def get_hub( def create_hub( self, - request: gcn_hub.CreateHubRequest = None, + request: Union[gcn_hub.CreateHubRequest, dict] = None, *, parent: str = None, hub: gcn_hub.Hub = None, @@ -609,7 +609,7 @@ def create_hub( r"""Creates a new hub in the specified project. Args: - request (google.cloud.networkconnectivity_v1.types.CreateHubRequest): + request (Union[google.cloud.networkconnectivity_v1.types.CreateHubRequest, dict]): The request object. Request for [HubService.CreateHub][google.cloud.networkconnectivity.v1.HubService.CreateHub] method. @@ -699,7 +699,7 @@ def create_hub( def update_hub( self, - request: gcn_hub.UpdateHubRequest = None, + request: Union[gcn_hub.UpdateHubRequest, dict] = None, *, hub: gcn_hub.Hub = None, update_mask: field_mask_pb2.FieldMask = None, @@ -711,7 +711,7 @@ def update_hub( specified hub. Args: - request (google.cloud.networkconnectivity_v1.types.UpdateHubRequest): + request (Union[google.cloud.networkconnectivity_v1.types.UpdateHubRequest, dict]): The request object. Request for [HubService.UpdateHub][google.cloud.networkconnectivity.v1.HubService.UpdateHub] method. @@ -798,7 +798,7 @@ def update_hub( def delete_hub( self, - request: hub.DeleteHubRequest = None, + request: Union[hub.DeleteHubRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -808,7 +808,7 @@ def delete_hub( r"""Deletes the specified hub. Args: - request (google.cloud.networkconnectivity_v1.types.DeleteHubRequest): + request (Union[google.cloud.networkconnectivity_v1.types.DeleteHubRequest, dict]): The request object. The request for [HubService.DeleteHub][google.cloud.networkconnectivity.v1.HubService.DeleteHub]. name (str): @@ -890,7 +890,7 @@ def delete_hub( def list_spokes( self, - request: hub.ListSpokesRequest = None, + request: Union[hub.ListSpokesRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -901,7 +901,7 @@ def list_spokes( location. Args: - request (google.cloud.networkconnectivity_v1.types.ListSpokesRequest): + request (Union[google.cloud.networkconnectivity_v1.types.ListSpokesRequest, dict]): The request object. The request for [HubService.ListSpokes][google.cloud.networkconnectivity.v1.HubService.ListSpokes]. parent (str): @@ -969,7 +969,7 @@ def list_spokes( def get_spoke( self, - request: hub.GetSpokeRequest = None, + request: Union[hub.GetSpokeRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -979,7 +979,7 @@ def get_spoke( r"""Gets details about the specified spoke. Args: - request (google.cloud.networkconnectivity_v1.types.GetSpokeRequest): + request (Union[google.cloud.networkconnectivity_v1.types.GetSpokeRequest, dict]): The request object. The request for [HubService.GetSpoke][google.cloud.networkconnectivity.v1.HubService.GetSpoke]. name (str): @@ -1048,7 +1048,7 @@ def get_spoke( def create_spoke( self, - request: hub.CreateSpokeRequest = None, + request: Union[hub.CreateSpokeRequest, dict] = None, *, parent: str = None, spoke: hub.Spoke = None, @@ -1061,7 +1061,7 @@ def create_spoke( location. Args: - request (google.cloud.networkconnectivity_v1.types.CreateSpokeRequest): + request (Union[google.cloud.networkconnectivity_v1.types.CreateSpokeRequest, dict]): The request object. The request for [HubService.CreateSpoke][google.cloud.networkconnectivity.v1.HubService.CreateSpoke]. parent (str): @@ -1156,7 +1156,7 @@ def create_spoke( def update_spoke( self, - request: hub.UpdateSpokeRequest = None, + request: Union[hub.UpdateSpokeRequest, dict] = None, *, spoke: hub.Spoke = None, update_mask: field_mask_pb2.FieldMask = None, @@ -1167,7 +1167,7 @@ def update_spoke( r"""Updates the parameters of the specified spoke. Args: - request (google.cloud.networkconnectivity_v1.types.UpdateSpokeRequest): + request (Union[google.cloud.networkconnectivity_v1.types.UpdateSpokeRequest, dict]): The request object. Request for [HubService.UpdateSpoke][google.cloud.networkconnectivity.v1.HubService.UpdateSpoke] method. @@ -1262,7 +1262,7 @@ def update_spoke( def delete_spoke( self, - request: hub.DeleteSpokeRequest = None, + request: Union[hub.DeleteSpokeRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -1272,7 +1272,7 @@ def delete_spoke( r"""Deletes the specified spoke. Args: - request (google.cloud.networkconnectivity_v1.types.DeleteSpokeRequest): + request (Union[google.cloud.networkconnectivity_v1.types.DeleteSpokeRequest, dict]): The request object. The request for [HubService.DeleteSpoke][google.cloud.networkconnectivity.v1.HubService.DeleteSpoke]. name (str): diff --git a/google/cloud/networkconnectivity_v1/services/hub_service/transports/base.py b/google/cloud/networkconnectivity_v1/services/hub_service/transports/base.py index 47d8b5a..7ace5df 100644 --- a/google/cloud/networkconnectivity_v1/services/hub_service/transports/base.py +++ b/google/cloud/networkconnectivity_v1/services/hub_service/transports/base.py @@ -120,7 +120,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) diff --git a/google/cloud/networkconnectivity_v1/services/hub_service/transports/grpc.py b/google/cloud/networkconnectivity_v1/services/hub_service/transports/grpc.py index 6f44d71..5e90888 100644 --- a/google/cloud/networkconnectivity_v1/services/hub_service/transports/grpc.py +++ b/google/cloud/networkconnectivity_v1/services/hub_service/transports/grpc.py @@ -86,16 +86,16 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or applicatin default SSL credentials. + ``client_cert_source`` or application default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/networkconnectivity_v1/services/hub_service/transports/grpc_asyncio.py b/google/cloud/networkconnectivity_v1/services/hub_service/transports/grpc_asyncio.py index 52846b5..fda2cc0 100644 --- a/google/cloud/networkconnectivity_v1/services/hub_service/transports/grpc_asyncio.py +++ b/google/cloud/networkconnectivity_v1/services/hub_service/transports/grpc_asyncio.py @@ -133,16 +133,16 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or applicatin default SSL credentials. + ``client_cert_source`` or application default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/networkconnectivity_v1alpha1/services/hub_service/client.py b/google/cloud/networkconnectivity_v1alpha1/services/hub_service/client.py index fd190a6..22264b6 100644 --- a/google/cloud/networkconnectivity_v1alpha1/services/hub_service/client.py +++ b/google/cloud/networkconnectivity_v1alpha1/services/hub_service/client.py @@ -17,7 +17,7 @@ from distutils import util import os import re -from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union +from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib # type: ignore @@ -426,7 +426,7 @@ def __init__( def list_hubs( self, - request: hub.ListHubsRequest = None, + request: Union[hub.ListHubsRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -436,7 +436,7 @@ def list_hubs( r"""Lists Hubs in a given project and location. Args: - request (google.cloud.networkconnectivity_v1alpha1.types.ListHubsRequest): + request (Union[google.cloud.networkconnectivity_v1alpha1.types.ListHubsRequest, dict]): The request object. Request for [HubService.ListHubs][google.cloud.networkconnectivity.v1alpha1.HubService.ListHubs] method. @@ -506,7 +506,7 @@ def list_hubs( def get_hub( self, - request: hub.GetHubRequest = None, + request: Union[hub.GetHubRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -516,7 +516,7 @@ def get_hub( r"""Gets details of a single Hub. Args: - request (google.cloud.networkconnectivity_v1alpha1.types.GetHubRequest): + request (Union[google.cloud.networkconnectivity_v1alpha1.types.GetHubRequest, dict]): The request object. Request for [HubService.GetHub][google.cloud.networkconnectivity.v1alpha1.HubService.GetHub] method. @@ -583,7 +583,7 @@ def get_hub( def create_hub( self, - request: gcn_hub.CreateHubRequest = None, + request: Union[gcn_hub.CreateHubRequest, dict] = None, *, parent: str = None, hub: gcn_hub.Hub = None, @@ -595,7 +595,7 @@ def create_hub( r"""Creates a new Hub in a given project and location. Args: - request (google.cloud.networkconnectivity_v1alpha1.types.CreateHubRequest): + request (Union[google.cloud.networkconnectivity_v1alpha1.types.CreateHubRequest, dict]): The request object. Request for [HubService.CreateHub][google.cloud.networkconnectivity.v1alpha1.HubService.CreateHub] method. @@ -688,7 +688,7 @@ def create_hub( def update_hub( self, - request: gcn_hub.UpdateHubRequest = None, + request: Union[gcn_hub.UpdateHubRequest, dict] = None, *, hub: gcn_hub.Hub = None, update_mask: field_mask_pb2.FieldMask = None, @@ -699,7 +699,7 @@ def update_hub( r"""Updates the parameters of a single Hub. Args: - request (google.cloud.networkconnectivity_v1alpha1.types.UpdateHubRequest): + request (Union[google.cloud.networkconnectivity_v1alpha1.types.UpdateHubRequest, dict]): The request object. Request for [HubService.UpdateHub][google.cloud.networkconnectivity.v1alpha1.HubService.UpdateHub] method. @@ -787,7 +787,7 @@ def update_hub( def delete_hub( self, - request: hub.DeleteHubRequest = None, + request: Union[hub.DeleteHubRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -797,7 +797,7 @@ def delete_hub( r"""Deletes a single Hub. Args: - request (google.cloud.networkconnectivity_v1alpha1.types.DeleteHubRequest): + request (Union[google.cloud.networkconnectivity_v1alpha1.types.DeleteHubRequest, dict]): The request object. The request for [HubService.DeleteHub][google.cloud.networkconnectivity.v1alpha1.HubService.DeleteHub]. name (str): @@ -879,7 +879,7 @@ def delete_hub( def list_spokes( self, - request: hub.ListSpokesRequest = None, + request: Union[hub.ListSpokesRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -889,7 +889,7 @@ def list_spokes( r"""Lists Spokes in a given project and location. Args: - request (google.cloud.networkconnectivity_v1alpha1.types.ListSpokesRequest): + request (Union[google.cloud.networkconnectivity_v1alpha1.types.ListSpokesRequest, dict]): The request object. The request for [HubService.ListSpokes][google.cloud.networkconnectivity.v1alpha1.HubService.ListSpokes]. parent (str): @@ -957,7 +957,7 @@ def list_spokes( def get_spoke( self, - request: hub.GetSpokeRequest = None, + request: Union[hub.GetSpokeRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -967,7 +967,7 @@ def get_spoke( r"""Gets details of a single Spoke. Args: - request (google.cloud.networkconnectivity_v1alpha1.types.GetSpokeRequest): + request (Union[google.cloud.networkconnectivity_v1alpha1.types.GetSpokeRequest, dict]): The request object. The request for [HubService.GetSpoke][google.cloud.networkconnectivity.v1alpha1.HubService.GetSpoke]. name (str): @@ -1029,7 +1029,7 @@ def get_spoke( def create_spoke( self, - request: hub.CreateSpokeRequest = None, + request: Union[hub.CreateSpokeRequest, dict] = None, *, parent: str = None, spoke: hub.Spoke = None, @@ -1041,7 +1041,7 @@ def create_spoke( r"""Creates a new Spoke in a given project and location. Args: - request (google.cloud.networkconnectivity_v1alpha1.types.CreateSpokeRequest): + request (Union[google.cloud.networkconnectivity_v1alpha1.types.CreateSpokeRequest, dict]): The request object. The request for [HubService.CreateSpoke][google.cloud.networkconnectivity.v1alpha1.HubService.CreateSpoke]. parent (str): @@ -1132,7 +1132,7 @@ def create_spoke( def update_spoke( self, - request: hub.UpdateSpokeRequest = None, + request: Union[hub.UpdateSpokeRequest, dict] = None, *, spoke: hub.Spoke = None, update_mask: field_mask_pb2.FieldMask = None, @@ -1143,7 +1143,7 @@ def update_spoke( r"""Updates the parameters of a single Spoke. Args: - request (google.cloud.networkconnectivity_v1alpha1.types.UpdateSpokeRequest): + request (Union[google.cloud.networkconnectivity_v1alpha1.types.UpdateSpokeRequest, dict]): The request object. Request for [HubService.UpdateSpoke][google.cloud.networkconnectivity.v1alpha1.HubService.UpdateSpoke] method. @@ -1232,7 +1232,7 @@ def update_spoke( def delete_spoke( self, - request: hub.DeleteSpokeRequest = None, + request: Union[hub.DeleteSpokeRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -1242,7 +1242,7 @@ def delete_spoke( r"""Deletes a single Spoke. Args: - request (google.cloud.networkconnectivity_v1alpha1.types.DeleteSpokeRequest): + request (Union[google.cloud.networkconnectivity_v1alpha1.types.DeleteSpokeRequest, dict]): The request object. The request for [HubService.DeleteSpoke][google.cloud.networkconnectivity.v1alpha1.HubService.DeleteSpoke]. name (str): diff --git a/google/cloud/networkconnectivity_v1alpha1/services/hub_service/transports/base.py b/google/cloud/networkconnectivity_v1alpha1/services/hub_service/transports/base.py index 8eb27eb..aa448a8 100644 --- a/google/cloud/networkconnectivity_v1alpha1/services/hub_service/transports/base.py +++ b/google/cloud/networkconnectivity_v1alpha1/services/hub_service/transports/base.py @@ -120,7 +120,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) diff --git a/google/cloud/networkconnectivity_v1alpha1/services/hub_service/transports/grpc.py b/google/cloud/networkconnectivity_v1alpha1/services/hub_service/transports/grpc.py index a2472f3..2c1ca98 100644 --- a/google/cloud/networkconnectivity_v1alpha1/services/hub_service/transports/grpc.py +++ b/google/cloud/networkconnectivity_v1alpha1/services/hub_service/transports/grpc.py @@ -86,16 +86,16 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or applicatin default SSL credentials. + ``client_cert_source`` or application default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/networkconnectivity_v1alpha1/services/hub_service/transports/grpc_asyncio.py b/google/cloud/networkconnectivity_v1alpha1/services/hub_service/transports/grpc_asyncio.py index 6442757..cc7602a 100644 --- a/google/cloud/networkconnectivity_v1alpha1/services/hub_service/transports/grpc_asyncio.py +++ b/google/cloud/networkconnectivity_v1alpha1/services/hub_service/transports/grpc_asyncio.py @@ -133,16 +133,16 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or applicatin default SSL credentials. + ``client_cert_source`` or application default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/owlbot.py b/owlbot.py index 628d7cf..17af778 100644 --- a/owlbot.py +++ b/owlbot.py @@ -43,3 +43,4 @@ ) s.shell.run(["nox", "-s", "blacken"], hide_output=False) + diff --git a/renovate.json b/renovate.json index c048955..c21036d 100644 --- a/renovate.json +++ b/renovate.json @@ -1,6 +1,9 @@ { "extends": [ - "config:base", ":preserveSemverRanges" + "config:base", + "group:all", + ":preserveSemverRanges", + ":disableDependencyDashboard" ], "ignorePaths": [".pre-commit-config.yaml"], "pip_requirements": { diff --git a/scripts/fixup_networkconnectivity_v1_keywords.py b/scripts/fixup_networkconnectivity_v1_keywords.py index 2c61070..067b307 100644 --- a/scripts/fixup_networkconnectivity_v1_keywords.py +++ b/scripts/fixup_networkconnectivity_v1_keywords.py @@ -39,16 +39,16 @@ def partition( class networkconnectivityCallTransformer(cst.CSTTransformer): CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata') METHOD_TO_PARAMS: Dict[str, Tuple[str]] = { - 'create_hub': ('parent', 'hub', 'hub_id', 'request_id', ), - 'create_spoke': ('parent', 'spoke', 'spoke_id', 'request_id', ), - 'delete_hub': ('name', 'request_id', ), - 'delete_spoke': ('name', 'request_id', ), - 'get_hub': ('name', ), - 'get_spoke': ('name', ), - 'list_hubs': ('parent', 'page_size', 'page_token', 'filter', 'order_by', ), - 'list_spokes': ('parent', 'page_size', 'page_token', 'filter', 'order_by', ), - 'update_hub': ('hub', 'update_mask', 'request_id', ), - 'update_spoke': ('spoke', 'update_mask', 'request_id', ), + 'create_hub': ('parent', 'hub', 'hub_id', 'request_id', ), + 'create_spoke': ('parent', 'spoke', 'spoke_id', 'request_id', ), + 'delete_hub': ('name', 'request_id', ), + 'delete_spoke': ('name', 'request_id', ), + 'get_hub': ('name', ), + 'get_spoke': ('name', ), + 'list_hubs': ('parent', 'page_size', 'page_token', 'filter', 'order_by', ), + 'list_spokes': ('parent', 'page_size', 'page_token', 'filter', 'order_by', ), + 'update_hub': ('hub', 'update_mask', 'request_id', ), + 'update_spoke': ('spoke', 'update_mask', 'request_id', ), } def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode: @@ -67,7 +67,7 @@ def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode: return updated kwargs, ctrl_kwargs = partition( - lambda a: not a.keyword.value in self.CTRL_PARAMS, + lambda a: a.keyword.value not in self.CTRL_PARAMS, kwargs ) diff --git a/scripts/fixup_networkconnectivity_v1alpha1_keywords.py b/scripts/fixup_networkconnectivity_v1alpha1_keywords.py index 2c61070..067b307 100644 --- a/scripts/fixup_networkconnectivity_v1alpha1_keywords.py +++ b/scripts/fixup_networkconnectivity_v1alpha1_keywords.py @@ -39,16 +39,16 @@ def partition( class networkconnectivityCallTransformer(cst.CSTTransformer): CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata') METHOD_TO_PARAMS: Dict[str, Tuple[str]] = { - 'create_hub': ('parent', 'hub', 'hub_id', 'request_id', ), - 'create_spoke': ('parent', 'spoke', 'spoke_id', 'request_id', ), - 'delete_hub': ('name', 'request_id', ), - 'delete_spoke': ('name', 'request_id', ), - 'get_hub': ('name', ), - 'get_spoke': ('name', ), - 'list_hubs': ('parent', 'page_size', 'page_token', 'filter', 'order_by', ), - 'list_spokes': ('parent', 'page_size', 'page_token', 'filter', 'order_by', ), - 'update_hub': ('hub', 'update_mask', 'request_id', ), - 'update_spoke': ('spoke', 'update_mask', 'request_id', ), + 'create_hub': ('parent', 'hub', 'hub_id', 'request_id', ), + 'create_spoke': ('parent', 'spoke', 'spoke_id', 'request_id', ), + 'delete_hub': ('name', 'request_id', ), + 'delete_spoke': ('name', 'request_id', ), + 'get_hub': ('name', ), + 'get_spoke': ('name', ), + 'list_hubs': ('parent', 'page_size', 'page_token', 'filter', 'order_by', ), + 'list_spokes': ('parent', 'page_size', 'page_token', 'filter', 'order_by', ), + 'update_hub': ('hub', 'update_mask', 'request_id', ), + 'update_spoke': ('spoke', 'update_mask', 'request_id', ), } def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode: @@ -67,7 +67,7 @@ def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode: return updated kwargs, ctrl_kwargs = partition( - lambda a: not a.keyword.value in self.CTRL_PARAMS, + lambda a: a.keyword.value not in self.CTRL_PARAMS, kwargs ) diff --git a/setup.py b/setup.py index 9fc4f71..3402bfb 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ import os import setuptools # type: ignore -version = "0.6.0" +version = "0.6.1" package_root = os.path.abspath(os.path.dirname(__file__))