diff --git a/packages/google-cloud-bare-metal-solution/.coveragerc b/packages/google-cloud-bare-metal-solution/.coveragerc index bc6e34d098de..073facb995b1 100644 --- a/packages/google-cloud-bare-metal-solution/.coveragerc +++ b/packages/google-cloud-bare-metal-solution/.coveragerc @@ -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 diff --git a/packages/google-cloud-bare-metal-solution/google/cloud/bare_metal_solution_v2/gapic_version.py b/packages/google-cloud-bare-metal-solution/google/cloud/bare_metal_solution_v2/gapic_version.py new file mode 100644 index 000000000000..8f031bd4dd07 --- /dev/null +++ b/packages/google-cloud-bare-metal-solution/google/cloud/bare_metal_solution_v2/gapic_version.py @@ -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__ = "1.2.0" # {x-release-please-version} diff --git a/packages/google-cloud-bare-metal-solution/google/cloud/bare_metal_solution_v2/services/bare_metal_solution/async_client.py b/packages/google-cloud-bare-metal-solution/google/cloud/bare_metal_solution_v2/services/bare_metal_solution/async_client.py index b20bd8050b7b..4491ab5967db 100644 --- a/packages/google-cloud-bare-metal-solution/google/cloud/bare_metal_solution_v2/services/bare_metal_solution/async_client.py +++ b/packages/google-cloud-bare-metal-solution/google/cloud/bare_metal_solution_v2/services/bare_metal_solution/async_client.py @@ -34,7 +34,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.bare_metal_solution_v2 import gapic_version as package_version try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -256,7 +257,7 @@ async def list_instances( *, 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]] = (), ) -> pagers.ListInstancesAsyncPager: r"""List servers in a given project and location. @@ -371,7 +372,7 @@ async def get_instance( *, 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]] = (), ) -> instance.Instance: r"""Get details about a single server. @@ -470,7 +471,7 @@ async def update_instance( instance: Optional[gcb_instance.Instance] = None, update_mask: Optional[field_mask_pb2.FieldMask] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Update details of a single server. @@ -499,7 +500,7 @@ async def sample_update_instance(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) @@ -601,7 +602,7 @@ async def reset_instance( *, 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]] = (), ) -> operation_async.AsyncOperation: r"""Perform an ungraceful, hard reset on a server. @@ -633,7 +634,7 @@ async def sample_reset_instance(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) @@ -718,7 +719,7 @@ async def start_instance( *, 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]] = (), ) -> operation_async.AsyncOperation: r"""Starts a server that was shutdown. @@ -748,7 +749,7 @@ async def sample_start_instance(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) @@ -833,7 +834,7 @@ async def stop_instance( *, 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]] = (), ) -> operation_async.AsyncOperation: r"""Stop a running server. @@ -863,7 +864,7 @@ async def sample_stop_instance(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) @@ -948,7 +949,7 @@ async def detach_lun( instance: Optional[str] = None, lun: 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]] = (), ) -> operation_async.AsyncOperation: r"""Detach LUN from Instance. @@ -979,7 +980,7 @@ async def sample_detach_lun(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) @@ -1071,7 +1072,7 @@ async def list_volumes( *, 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]] = (), ) -> pagers.ListVolumesAsyncPager: r"""List storage volumes in a given project and location. @@ -1186,7 +1187,7 @@ async def get_volume( *, 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]] = (), ) -> volume.Volume: r"""Get details of a single storage volume. @@ -1285,7 +1286,7 @@ async def update_volume( volume: Optional[gcb_volume.Volume] = None, update_mask: Optional[field_mask_pb2.FieldMask] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Update details of a single storage volume. @@ -1314,7 +1315,7 @@ async def sample_update_volume(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) @@ -1418,7 +1419,7 @@ async def resize_volume( volume: Optional[str] = None, size_gib: Optional[int] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Emergency Volume resize. @@ -1448,7 +1449,7 @@ async def sample_resize_volume(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) @@ -1539,7 +1540,7 @@ async def list_networks( *, 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]] = (), ) -> pagers.ListNetworksAsyncPager: r"""List network in a given project and location. @@ -1654,7 +1655,7 @@ async def list_network_usage( *, location: 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]] = (), ) -> network.ListNetworkUsageResponse: r"""List all Networks (and used IPs for each Network) in @@ -1755,7 +1756,7 @@ async def get_network( *, 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]] = (), ) -> network.Network: r"""Get details of a single network. @@ -1854,7 +1855,7 @@ async def update_network( network: Optional[gcb_network.Network] = None, update_mask: Optional[field_mask_pb2.FieldMask] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Update details of a single network. @@ -1883,7 +1884,7 @@ async def sample_update_network(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) @@ -1984,7 +1985,7 @@ async def get_lun( *, 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]] = (), ) -> lun.Lun: r"""Get details of a single storage logical unit @@ -2085,7 +2086,7 @@ async def list_luns( *, 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]] = (), ) -> pagers.ListLunsAsyncPager: r"""List storage volume luns for given storage volume. @@ -2200,7 +2201,7 @@ async def get_nfs_share( *, 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]] = (), ) -> nfs_share.NfsShare: r"""Get details of a single NFS share. @@ -2298,7 +2299,7 @@ async def list_nfs_shares( *, 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]] = (), ) -> pagers.ListNfsSharesAsyncPager: r"""List NFS shares. @@ -2414,7 +2415,7 @@ async def update_nfs_share( nfs_share: Optional[gcb_nfs_share.NfsShare] = None, update_mask: Optional[field_mask_pb2.FieldMask] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Update details of a single NFS share. @@ -2443,7 +2444,7 @@ async def sample_update_nfs_share(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) @@ -2545,14 +2546,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-bare-metal-solution", - ).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__ = ("BareMetalSolutionAsyncClient",) diff --git a/packages/google-cloud-bare-metal-solution/google/cloud/bare_metal_solution_v2/services/bare_metal_solution/client.py b/packages/google-cloud-bare-metal-solution/google/cloud/bare_metal_solution_v2/services/bare_metal_solution/client.py index 3fa985a33fad..64ca295565ad 100644 --- a/packages/google-cloud-bare-metal-solution/google/cloud/bare_metal_solution_v2/services/bare_metal_solution/client.py +++ b/packages/google-cloud-bare-metal-solution/google/cloud/bare_metal_solution_v2/services/bare_metal_solution/client.py @@ -38,7 +38,8 @@ from google.auth.transport import mtls # type: ignore from google.auth.transport.grpc import SslCredentials # type: ignore from google.oauth2 import service_account # type: ignore -import pkg_resources + +from google.cloud.bare_metal_solution_v2 import gapic_version as package_version try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -581,7 +582,7 @@ def list_instances( *, 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]] = (), ) -> pagers.ListInstancesPager: r"""List servers in a given project and location. @@ -696,7 +697,7 @@ def get_instance( *, 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]] = (), ) -> instance.Instance: r"""Get details about a single server. @@ -795,7 +796,7 @@ def update_instance( instance: Optional[gcb_instance.Instance] = None, update_mask: Optional[field_mask_pb2.FieldMask] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Update details of a single server. @@ -926,7 +927,7 @@ def reset_instance( *, 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]] = (), ) -> operation.Operation: r"""Perform an ungraceful, hard reset on a server. @@ -1043,7 +1044,7 @@ def start_instance( *, 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]] = (), ) -> operation.Operation: r"""Starts a server that was shutdown. @@ -1158,7 +1159,7 @@ def stop_instance( *, 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]] = (), ) -> operation.Operation: r"""Stop a running server. @@ -1273,7 +1274,7 @@ def detach_lun( instance: Optional[str] = None, lun: 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]] = (), ) -> operation.Operation: r"""Detach LUN from Instance. @@ -1396,7 +1397,7 @@ def list_volumes( *, 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]] = (), ) -> pagers.ListVolumesPager: r"""List storage volumes in a given project and location. @@ -1511,7 +1512,7 @@ def get_volume( *, 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]] = (), ) -> volume.Volume: r"""Get details of a single storage volume. @@ -1610,7 +1611,7 @@ def update_volume( volume: Optional[gcb_volume.Volume] = None, update_mask: Optional[field_mask_pb2.FieldMask] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Update details of a single storage volume. @@ -1743,7 +1744,7 @@ def resize_volume( volume: Optional[str] = None, size_gib: Optional[int] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Emergency Volume resize. @@ -1864,7 +1865,7 @@ def list_networks( *, 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]] = (), ) -> pagers.ListNetworksPager: r"""List network in a given project and location. @@ -1979,7 +1980,7 @@ def list_network_usage( *, location: 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]] = (), ) -> network.ListNetworkUsageResponse: r"""List all Networks (and used IPs for each Network) in @@ -2080,7 +2081,7 @@ def get_network( *, 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]] = (), ) -> network.Network: r"""Get details of a single network. @@ -2179,7 +2180,7 @@ def update_network( network: Optional[gcb_network.Network] = None, update_mask: Optional[field_mask_pb2.FieldMask] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Update details of a single network. @@ -2309,7 +2310,7 @@ def get_lun( *, 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]] = (), ) -> lun.Lun: r"""Get details of a single storage logical unit @@ -2410,7 +2411,7 @@ def list_luns( *, 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]] = (), ) -> pagers.ListLunsPager: r"""List storage volume luns for given storage volume. @@ -2525,7 +2526,7 @@ def get_nfs_share( *, 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]] = (), ) -> nfs_share.NfsShare: r"""Get details of a single NFS share. @@ -2623,7 +2624,7 @@ def list_nfs_shares( *, 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]] = (), ) -> pagers.ListNfsSharesPager: r"""List NFS shares. @@ -2739,7 +2740,7 @@ def update_nfs_share( nfs_share: Optional[gcb_nfs_share.NfsShare] = None, update_mask: Optional[field_mask_pb2.FieldMask] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Update details of a single NFS share. @@ -2877,14 +2878,9 @@ def __exit__(self, type, value, traceback): self.transport.close() -try: - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( - gapic_version=pkg_resources.get_distribution( - "google-cloud-bare-metal-solution", - ).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__ = ("BareMetalSolutionClient",) diff --git a/packages/google-cloud-bare-metal-solution/google/cloud/bare_metal_solution_v2/services/bare_metal_solution/transports/base.py b/packages/google-cloud-bare-metal-solution/google/cloud/bare_metal_solution_v2/services/bare_metal_solution/transports/base.py index 98a8c0c608e5..23acdbd95234 100644 --- a/packages/google-cloud-bare-metal-solution/google/cloud/bare_metal_solution_v2/services/bare_metal_solution/transports/base.py +++ b/packages/google-cloud-bare-metal-solution/google/cloud/bare_metal_solution_v2/services/bare_metal_solution/transports/base.py @@ -24,8 +24,8 @@ from google.auth import credentials as ga_credentials # type: ignore from google.longrunning import operations_pb2 # type: ignore from google.oauth2 import service_account # type: ignore -import pkg_resources +from google.cloud.bare_metal_solution_v2 import gapic_version as package_version from google.cloud.bare_metal_solution_v2.types import nfs_share as gcb_nfs_share from google.cloud.bare_metal_solution_v2.types import instance from google.cloud.bare_metal_solution_v2.types import instance as gcb_instance @@ -36,14 +36,9 @@ from google.cloud.bare_metal_solution_v2.types import volume from google.cloud.bare_metal_solution_v2.types import volume as gcb_volume -try: - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( - gapic_version=pkg_resources.get_distribution( - "google-cloud-bare-metal-solution", - ).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__ +) class BareMetalSolutionTransport(abc.ABC): diff --git a/packages/google-cloud-bare-metal-solution/release-please-config.json b/packages/google-cloud-bare-metal-solution/release-please-config.json index 728a36f42e90..ce5a6d72991a 100644 --- a/packages/google-cloud-bare-metal-solution/release-please-config.json +++ b/packages/google-cloud-bare-metal-solution/release-please-config.json @@ -5,6 +5,7 @@ "release-type": "python", "extra-files": [ "google/cloud/bare_metal_solution/gapic_version.py", + "google/cloud/bare_metal_solution_v2/gapic_version.py", { "type": "json", "path": "samples/generated_samples/snippet_metadata_google.cloud.baremetalsolution.v2.json", diff --git a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_detach_lun_async.py b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_detach_lun_async.py index c8aabd95bac0..9dc5fb8aef33 100644 --- a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_detach_lun_async.py +++ b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_detach_lun_async.py @@ -49,7 +49,7 @@ async def sample_detach_lun(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) diff --git a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_reset_instance_async.py b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_reset_instance_async.py index b7f62c5e3b38..c8d64fc84991 100644 --- a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_reset_instance_async.py +++ b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_reset_instance_async.py @@ -48,7 +48,7 @@ async def sample_reset_instance(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) diff --git a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_resize_volume_async.py b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_resize_volume_async.py index 457d936b32be..f4b2560405f3 100644 --- a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_resize_volume_async.py +++ b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_resize_volume_async.py @@ -48,7 +48,7 @@ async def sample_resize_volume(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) diff --git a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_start_instance_async.py b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_start_instance_async.py index 5e1935d24780..d4fe31aa484c 100644 --- a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_start_instance_async.py +++ b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_start_instance_async.py @@ -48,7 +48,7 @@ async def sample_start_instance(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) diff --git a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_stop_instance_async.py b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_stop_instance_async.py index 7b5b691b2d24..6c6bda2bb849 100644 --- a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_stop_instance_async.py +++ b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_stop_instance_async.py @@ -48,7 +48,7 @@ async def sample_stop_instance(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) diff --git a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_update_instance_async.py b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_update_instance_async.py index 09c9337bb8fd..e19678a39bb0 100644 --- a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_update_instance_async.py +++ b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_update_instance_async.py @@ -47,7 +47,7 @@ async def sample_update_instance(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) diff --git a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_update_network_async.py b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_update_network_async.py index a74bd5fe5f33..568c3d7f9134 100644 --- a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_update_network_async.py +++ b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_update_network_async.py @@ -47,7 +47,7 @@ async def sample_update_network(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) diff --git a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_update_nfs_share_async.py b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_update_nfs_share_async.py index ee8ccb34e196..d806905104e5 100644 --- a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_update_nfs_share_async.py +++ b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_update_nfs_share_async.py @@ -47,7 +47,7 @@ async def sample_update_nfs_share(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) diff --git a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_update_volume_async.py b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_update_volume_async.py index eeab459a549c..7df9b4821baf 100644 --- a/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_update_volume_async.py +++ b/packages/google-cloud-bare-metal-solution/samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_update_volume_async.py @@ -47,7 +47,7 @@ async def sample_update_volume(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) diff --git a/packages/google-cloud-bare-metal-solution/samples/generated_samples/snippet_metadata_google.cloud.baremetalsolution.v2.json b/packages/google-cloud-bare-metal-solution/samples/generated_samples/snippet_metadata_google.cloud.baremetalsolution.v2.json index d011beca5fae..99c48f953bdd 100644 --- a/packages/google-cloud-bare-metal-solution/samples/generated_samples/snippet_metadata_google.cloud.baremetalsolution.v2.json +++ b/packages/google-cloud-bare-metal-solution/samples/generated_samples/snippet_metadata_google.cloud.baremetalsolution.v2.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-bare-metal-solution", - "version": "1.2.0" + "version": "0.1.0" }, "snippets": [ { diff --git a/packages/google-cloud-bare-metal-solution/setup.py b/packages/google-cloud-bare-metal-solution/setup.py index ac7240b0bd2a..b6e2513e29ad 100644 --- a/packages/google-cloud-bare-metal-solution/setup.py +++ b/packages/google-cloud-bare-metal-solution/setup.py @@ -38,7 +38,7 @@ release_status = "Development Status :: 5 - Production/Stable" dependencies = [ - "google-api-core[grpc] >= 1.33.2, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*", + "google-api-core[grpc] >= 1.34.0, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*,!=2.8.*,!=2.9.*,!=2.10.*", "proto-plus >= 1.22.0, <2.0.0dev", "protobuf>=3.19.5,<5.0.0dev,!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5", ] diff --git a/packages/google-cloud-bare-metal-solution/testing/constraints-3.7.txt b/packages/google-cloud-bare-metal-solution/testing/constraints-3.7.txt index 6f3158cc2034..6c44adfea7ee 100644 --- a/packages/google-cloud-bare-metal-solution/testing/constraints-3.7.txt +++ b/packages/google-cloud-bare-metal-solution/testing/constraints-3.7.txt @@ -4,6 +4,6 @@ # Pin the version to the lower bound. # e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0dev", # Then this file should have google-cloud-foo==1.14.0 -google-api-core==1.33.2 +google-api-core==1.34.0 proto-plus==1.22.0 protobuf==3.19.5