From 22645920abc02099e825274328a708fad2567779 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 23 Mar 2022 11:35:05 -0600 Subject: [PATCH 01/20] chore(python): configure release-please on previous major versions (#27) Source-Link: https://github.com/googleapis/synthtool/commit/c1dd87e9287f8de99930d3046dd555c4d03384c6 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:2d13c2172a5d6129c861edaa48b60ead15aeaf58aa75e02d870c4cbdfa63aaba Co-authored-by: Owl Bot --- .github/.OwlBot.lock.yaml | 2 +- .github/release-please.yml | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 44c78f7..8807627 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:4e1991042fe54b991db9ca17c8fb386e61b22fe4d1472a568bf0fcac85dcf5d3 + digest: sha256:2d13c2172a5d6129c861edaa48b60ead15aeaf58aa75e02d870c4cbdfa63aaba diff --git a/.github/release-please.yml b/.github/release-please.yml index 466597e..6def37a 100644 --- a/.github/release-please.yml +++ b/.github/release-please.yml @@ -1,2 +1,8 @@ releaseType: python handleGHRelease: true +# NOTE: this section is generated by synthtool.languages.python +# See https://github.com/googleapis/synthtool/blob/master/synthtool/languages/python.py +branches: +- branch: v0 + handleGHRelease: true + releaseType: python From a1e5b8a1c9190c5fd8b1db1a2fb4d23acab13752 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 29 Mar 2022 00:02:19 +0000 Subject: [PATCH 02/20] chore(python): use black==22.3.0 (#28) Source-Link: https://github.com/googleapis/synthtool/commit/6fab84af09f2cf89a031fd8671d1def6b2931b11 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:7cffbc10910c3ab1b852c05114a08d374c195a81cdec1d4a67a1d129331d0bfe --- .github/.OwlBot.lock.yaml | 2 +- docs/conf.py | 5 +- .../services/vm_migration/async_client.py | 341 +- .../services/vm_migration/client.py | 439 ++- .../services/vm_migration/transports/base.py | 126 +- .../services/vm_migration/transports/grpc.py | 3 +- .../cloud/vmmigration_v1/types/vmmigration.py | 1555 ++++++-- noxfile.py | 9 +- .../gapic/vmmigration_v1/test_vm_migration.py | 3233 +++++++++++++---- 9 files changed, 4435 insertions(+), 1278 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 8807627..87dd006 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:2d13c2172a5d6129c861edaa48b60ead15aeaf58aa75e02d870c4cbdfa63aaba + digest: sha256:7cffbc10910c3ab1b852c05114a08d374c195a81cdec1d4a67a1d129331d0bfe diff --git a/docs/conf.py b/docs/conf.py index a3d3196..097160f 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -361,7 +361,10 @@ intersphinx_mapping = { "python": ("https://python.readthedocs.org/en/latest/", None), "google-auth": ("https://googleapis.dev/python/google-auth/latest/", None), - "google.api_core": ("https://googleapis.dev/python/google-api-core/latest/", None,), + "google.api_core": ( + "https://googleapis.dev/python/google-api-core/latest/", + None, + ), "grpc": ("https://grpc.github.io/grpc/python/", None), "proto-plus": ("https://proto-plus-python.readthedocs.io/en/latest/", None), "protobuf": ("https://googleapis.dev/python/protobuf/latest/", None), diff --git a/google/cloud/vmmigration_v1/services/vm_migration/async_client.py b/google/cloud/vmmigration_v1/services/vm_migration/async_client.py index 2a9f272..abba716 100644 --- a/google/cloud/vmmigration_v1/services/vm_migration/async_client.py +++ b/google/cloud/vmmigration_v1/services/vm_migration/async_client.py @@ -316,12 +316,20 @@ def sample_list_sources(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # This method is paged; wrap the response in a pager, which provides # an `__aiter__` convenience method. response = pagers.ListSourcesAsyncPager( - method=rpc, request=request, response=response, metadata=metadata, + method=rpc, + request=request, + response=response, + metadata=metadata, ) # Done; return the response. @@ -412,7 +420,12 @@ def sample_get_source(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Done; return the response. return response @@ -523,7 +536,12 @@ def sample_create_source(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation_async.from_gapic( @@ -640,7 +658,12 @@ def sample_update_source(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation_async.from_gapic( @@ -753,7 +776,12 @@ def sample_delete_source(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation_async.from_gapic( @@ -856,7 +884,12 @@ def sample_fetch_inventory(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Done; return the response. return response @@ -951,12 +984,20 @@ def sample_list_utilization_reports(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # This method is paged; wrap the response in a pager, which provides # an `__aiter__` convenience method. response = pagers.ListUtilizationReportsAsyncPager( - method=rpc, request=request, response=response, metadata=metadata, + method=rpc, + request=request, + response=response, + metadata=metadata, ) # Done; return the response. @@ -1048,7 +1089,12 @@ def sample_get_utilization_report(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Done; return the response. return response @@ -1168,7 +1214,12 @@ def sample_create_utilization_report(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation_async.from_gapic( @@ -1283,7 +1334,12 @@ def sample_delete_utilization_report(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation_async.from_gapic( @@ -1386,12 +1442,20 @@ def sample_list_datacenter_connectors(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # This method is paged; wrap the response in a pager, which provides # an `__aiter__` convenience method. response = pagers.ListDatacenterConnectorsAsyncPager( - method=rpc, request=request, response=response, metadata=metadata, + method=rpc, + request=request, + response=response, + metadata=metadata, ) # Done; return the response. @@ -1486,7 +1550,12 @@ def sample_get_datacenter_connector(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Done; return the response. return response @@ -1607,7 +1676,12 @@ def sample_create_datacenter_connector(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation_async.from_gapic( @@ -1722,7 +1796,12 @@ def sample_delete_datacenter_connector(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation_async.from_gapic( @@ -1841,7 +1920,12 @@ def sample_create_migrating_vm(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation_async.from_gapic( @@ -1944,12 +2028,20 @@ def sample_list_migrating_vms(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # This method is paged; wrap the response in a pager, which provides # an `__aiter__` convenience method. response = pagers.ListMigratingVmsAsyncPager( - method=rpc, request=request, response=response, metadata=metadata, + method=rpc, + request=request, + response=response, + metadata=metadata, ) # Done; return the response. @@ -2041,7 +2133,12 @@ def sample_get_migrating_vm(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Done; return the response. return response @@ -2150,7 +2247,12 @@ def sample_update_migrating_vm(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation_async.from_gapic( @@ -2265,7 +2367,12 @@ def sample_delete_migrating_vm(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation_async.from_gapic( @@ -2375,7 +2482,12 @@ def sample_start_migration(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation_async.from_gapic( @@ -2466,7 +2578,12 @@ def sample_resume_migration(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation_async.from_gapic( @@ -2555,7 +2672,12 @@ def sample_pause_migration(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation_async.from_gapic( @@ -2665,7 +2787,12 @@ def sample_finalize_migration(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation_async.from_gapic( @@ -2796,7 +2923,12 @@ def sample_create_clone_job(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation_async.from_gapic( @@ -2899,7 +3031,12 @@ def sample_cancel_clone_job(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation_async.from_gapic( @@ -3002,12 +3139,20 @@ def sample_list_clone_jobs(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # This method is paged; wrap the response in a pager, which provides # an `__aiter__` convenience method. response = pagers.ListCloneJobsAsyncPager( - method=rpc, request=request, response=response, metadata=metadata, + method=rpc, + request=request, + response=response, + metadata=metadata, ) # Done; return the response. @@ -3108,7 +3253,12 @@ def sample_get_clone_job(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Done; return the response. return response @@ -3224,7 +3374,12 @@ def sample_create_cutover_job(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation_async.from_gapic( @@ -3327,7 +3482,12 @@ def sample_cancel_cutover_job(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation_async.from_gapic( @@ -3430,12 +3590,20 @@ def sample_list_cutover_jobs(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # This method is paged; wrap the response in a pager, which provides # an `__aiter__` convenience method. response = pagers.ListCutoverJobsAsyncPager( - method=rpc, request=request, response=response, metadata=metadata, + method=rpc, + request=request, + response=response, + metadata=metadata, ) # Done; return the response. @@ -3528,7 +3696,12 @@ def sample_get_cutover_job(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Done; return the response. return response @@ -3623,12 +3796,20 @@ def sample_list_groups(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # This method is paged; wrap the response in a pager, which provides # an `__aiter__` convenience method. response = pagers.ListGroupsAsyncPager( - method=rpc, request=request, response=response, metadata=metadata, + method=rpc, + request=request, + response=response, + metadata=metadata, ) # Done; return the response. @@ -3718,7 +3899,12 @@ def sample_get_group(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Done; return the response. return response @@ -3829,7 +4015,12 @@ def sample_create_group(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation_async.from_gapic( @@ -3946,7 +4137,12 @@ def sample_update_group(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation_async.from_gapic( @@ -4059,7 +4255,12 @@ def sample_delete_group(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation_async.from_gapic( @@ -4164,7 +4365,12 @@ def sample_add_group_migration(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation_async.from_gapic( @@ -4267,7 +4473,12 @@ def sample_remove_group_migration(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation_async.from_gapic( @@ -4374,12 +4585,20 @@ def sample_list_target_projects(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # This method is paged; wrap the response in a pager, which provides # an `__aiter__` convenience method. response = pagers.ListTargetProjectsAsyncPager( - method=rpc, request=request, response=response, metadata=metadata, + method=rpc, + request=request, + response=response, + metadata=metadata, ) # Done; return the response. @@ -4473,7 +4692,12 @@ def sample_get_target_project(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Done; return the response. return response @@ -4588,7 +4812,12 @@ def sample_create_target_project(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation_async.from_gapic( @@ -4709,7 +4938,12 @@ def sample_update_target_project(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation_async.from_gapic( @@ -4826,7 +5060,12 @@ def sample_delete_target_project(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation_async.from_gapic( diff --git a/google/cloud/vmmigration_v1/services/vm_migration/client.py b/google/cloud/vmmigration_v1/services/vm_migration/client.py index ebf5ecf..55119fe 100644 --- a/google/cloud/vmmigration_v1/services/vm_migration/client.py +++ b/google/cloud/vmmigration_v1/services/vm_migration/client.py @@ -59,7 +59,10 @@ class VmMigrationClientMeta(type): _transport_registry["grpc"] = VmMigrationGrpcTransport _transport_registry["grpc_asyncio"] = VmMigrationGrpcAsyncIOTransport - def get_transport_class(cls, label: str = None,) -> Type[VmMigrationTransport]: + def get_transport_class( + cls, + label: str = None, + ) -> Type[VmMigrationTransport]: """Returns an appropriate transport class. Args: @@ -165,7 +168,11 @@ def transport(self) -> VmMigrationTransport: @staticmethod def clone_job_path( - project: str, location: str, source: str, migrating_vm: str, clone_job: str, + project: str, + location: str, + source: str, + migrating_vm: str, + clone_job: str, ) -> str: """Returns a fully-qualified clone_job string.""" return "projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}/cloneJobs/{clone_job}".format( @@ -187,7 +194,11 @@ def parse_clone_job_path(path: str) -> Dict[str, str]: @staticmethod def cutover_job_path( - project: str, location: str, source: str, migrating_vm: str, cutover_job: str, + project: str, + location: str, + source: str, + migrating_vm: str, + cutover_job: str, ) -> str: """Returns a fully-qualified cutover_job string.""" return "projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}/cutoverJobs/{cutover_job}".format( @@ -209,7 +220,10 @@ def parse_cutover_job_path(path: str) -> Dict[str, str]: @staticmethod def datacenter_connector_path( - project: str, location: str, source: str, datacenter_connector: str, + project: str, + location: str, + source: str, + datacenter_connector: str, ) -> str: """Returns a fully-qualified datacenter_connector string.""" return "projects/{project}/locations/{location}/sources/{source}/datacenterConnectors/{datacenter_connector}".format( @@ -229,10 +243,16 @@ def parse_datacenter_connector_path(path: str) -> Dict[str, str]: return m.groupdict() if m else {} @staticmethod - def group_path(project: str, location: str, group: str,) -> str: + def group_path( + project: str, + location: str, + group: str, + ) -> str: """Returns a fully-qualified group string.""" return "projects/{project}/locations/{location}/groups/{group}".format( - project=project, location=location, group=group, + project=project, + location=location, + group=group, ) @staticmethod @@ -246,7 +266,10 @@ def parse_group_path(path: str) -> Dict[str, str]: @staticmethod def migrating_vm_path( - project: str, location: str, source: str, migrating_vm: str, + project: str, + location: str, + source: str, + migrating_vm: str, ) -> str: """Returns a fully-qualified migrating_vm string.""" return "projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}".format( @@ -266,10 +289,16 @@ def parse_migrating_vm_path(path: str) -> Dict[str, str]: return m.groupdict() if m else {} @staticmethod - def source_path(project: str, location: str, source: str,) -> str: + def source_path( + project: str, + location: str, + source: str, + ) -> str: """Returns a fully-qualified source string.""" return "projects/{project}/locations/{location}/sources/{source}".format( - project=project, location=location, source=source, + project=project, + location=location, + source=source, ) @staticmethod @@ -282,10 +311,16 @@ def parse_source_path(path: str) -> Dict[str, str]: return m.groupdict() if m else {} @staticmethod - def target_project_path(project: str, location: str, target_project: str,) -> str: + def target_project_path( + project: str, + location: str, + target_project: str, + ) -> str: """Returns a fully-qualified target_project string.""" return "projects/{project}/locations/{location}/targetProjects/{target_project}".format( - project=project, location=location, target_project=target_project, + project=project, + location=location, + target_project=target_project, ) @staticmethod @@ -299,7 +334,10 @@ def parse_target_project_path(path: str) -> Dict[str, str]: @staticmethod def utilization_report_path( - project: str, location: str, source: str, utilization_report: str, + project: str, + location: str, + source: str, + utilization_report: str, ) -> str: """Returns a fully-qualified utilization_report string.""" return "projects/{project}/locations/{location}/sources/{source}/utilizationReports/{utilization_report}".format( @@ -319,7 +357,9 @@ def parse_utilization_report_path(path: str) -> Dict[str, str]: return m.groupdict() if m else {} @staticmethod - def common_billing_account_path(billing_account: str,) -> str: + def common_billing_account_path( + billing_account: str, + ) -> str: """Returns a fully-qualified billing_account string.""" return "billingAccounts/{billing_account}".format( billing_account=billing_account, @@ -332,9 +372,13 @@ def parse_common_billing_account_path(path: str) -> Dict[str, str]: return m.groupdict() if m else {} @staticmethod - def common_folder_path(folder: str,) -> str: + def common_folder_path( + folder: str, + ) -> str: """Returns a fully-qualified folder string.""" - return "folders/{folder}".format(folder=folder,) + return "folders/{folder}".format( + folder=folder, + ) @staticmethod def parse_common_folder_path(path: str) -> Dict[str, str]: @@ -343,9 +387,13 @@ def parse_common_folder_path(path: str) -> Dict[str, str]: return m.groupdict() if m else {} @staticmethod - def common_organization_path(organization: str,) -> str: + def common_organization_path( + organization: str, + ) -> str: """Returns a fully-qualified organization string.""" - return "organizations/{organization}".format(organization=organization,) + return "organizations/{organization}".format( + organization=organization, + ) @staticmethod def parse_common_organization_path(path: str) -> Dict[str, str]: @@ -354,9 +402,13 @@ def parse_common_organization_path(path: str) -> Dict[str, str]: return m.groupdict() if m else {} @staticmethod - def common_project_path(project: str,) -> str: + def common_project_path( + project: str, + ) -> str: """Returns a fully-qualified project string.""" - return "projects/{project}".format(project=project,) + return "projects/{project}".format( + project=project, + ) @staticmethod def parse_common_project_path(path: str) -> Dict[str, str]: @@ -365,10 +417,14 @@ def parse_common_project_path(path: str) -> Dict[str, str]: return m.groupdict() if m else {} @staticmethod - def common_location_path(project: str, location: str,) -> str: + def common_location_path( + project: str, + location: str, + ) -> str: """Returns a fully-qualified location string.""" return "projects/{project}/locations/{location}".format( - project=project, location=location, + project=project, + location=location, ) @staticmethod @@ -632,12 +688,20 @@ def sample_list_sources(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # This method is paged; wrap the response in a pager, which provides # an `__iter__` convenience method. response = pagers.ListSourcesPager( - method=rpc, request=request, response=response, metadata=metadata, + method=rpc, + request=request, + response=response, + metadata=metadata, ) # Done; return the response. @@ -728,7 +792,12 @@ def sample_get_source(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Done; return the response. return response @@ -839,7 +908,12 @@ def sample_create_source(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation.from_gapic( @@ -956,7 +1030,12 @@ def sample_update_source(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation.from_gapic( @@ -1069,7 +1148,12 @@ def sample_delete_source(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation.from_gapic( @@ -1172,7 +1256,12 @@ def sample_fetch_inventory(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Done; return the response. return response @@ -1267,12 +1356,20 @@ def sample_list_utilization_reports(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # This method is paged; wrap the response in a pager, which provides # an `__iter__` convenience method. response = pagers.ListUtilizationReportsPager( - method=rpc, request=request, response=response, metadata=metadata, + method=rpc, + request=request, + response=response, + metadata=metadata, ) # Done; return the response. @@ -1364,7 +1461,12 @@ def sample_get_utilization_report(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Done; return the response. return response @@ -1486,7 +1588,12 @@ def sample_create_utilization_report(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation.from_gapic( @@ -1603,7 +1710,12 @@ def sample_delete_utilization_report(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation.from_gapic( @@ -1708,12 +1820,20 @@ def sample_list_datacenter_connectors(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # This method is paged; wrap the response in a pager, which provides # an `__iter__` convenience method. response = pagers.ListDatacenterConnectorsPager( - method=rpc, request=request, response=response, metadata=metadata, + method=rpc, + request=request, + response=response, + metadata=metadata, ) # Done; return the response. @@ -1808,7 +1928,12 @@ def sample_get_datacenter_connector(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Done; return the response. return response @@ -1931,7 +2056,12 @@ def sample_create_datacenter_connector(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation.from_gapic( @@ -2048,7 +2178,12 @@ def sample_delete_datacenter_connector(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation.from_gapic( @@ -2167,7 +2302,12 @@ def sample_create_migrating_vm(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation.from_gapic( @@ -2270,12 +2410,20 @@ def sample_list_migrating_vms(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # This method is paged; wrap the response in a pager, which provides # an `__iter__` convenience method. response = pagers.ListMigratingVmsPager( - method=rpc, request=request, response=response, metadata=metadata, + method=rpc, + request=request, + response=response, + metadata=metadata, ) # Done; return the response. @@ -2367,7 +2515,12 @@ def sample_get_migrating_vm(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Done; return the response. return response @@ -2476,7 +2629,12 @@ def sample_update_migrating_vm(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation.from_gapic( @@ -2591,7 +2749,12 @@ def sample_delete_migrating_vm(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation.from_gapic( @@ -2701,7 +2864,12 @@ def sample_start_migration(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation.from_gapic( @@ -2793,7 +2961,12 @@ def sample_resume_migration(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation.from_gapic( @@ -2883,7 +3056,12 @@ def sample_pause_migration(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation.from_gapic( @@ -2993,7 +3171,12 @@ def sample_finalize_migration(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation.from_gapic( @@ -3124,7 +3307,12 @@ def sample_create_clone_job(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation.from_gapic( @@ -3227,7 +3415,12 @@ def sample_cancel_clone_job(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation.from_gapic( @@ -3330,12 +3523,20 @@ def sample_list_clone_jobs(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # This method is paged; wrap the response in a pager, which provides # an `__iter__` convenience method. response = pagers.ListCloneJobsPager( - method=rpc, request=request, response=response, metadata=metadata, + method=rpc, + request=request, + response=response, + metadata=metadata, ) # Done; return the response. @@ -3436,7 +3637,12 @@ def sample_get_clone_job(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Done; return the response. return response @@ -3552,7 +3758,12 @@ def sample_create_cutover_job(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation.from_gapic( @@ -3655,7 +3866,12 @@ def sample_cancel_cutover_job(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation.from_gapic( @@ -3758,12 +3974,20 @@ def sample_list_cutover_jobs(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # This method is paged; wrap the response in a pager, which provides # an `__iter__` convenience method. response = pagers.ListCutoverJobsPager( - method=rpc, request=request, response=response, metadata=metadata, + method=rpc, + request=request, + response=response, + metadata=metadata, ) # Done; return the response. @@ -3856,7 +4080,12 @@ def sample_get_cutover_job(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Done; return the response. return response @@ -3951,12 +4180,20 @@ def sample_list_groups(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # This method is paged; wrap the response in a pager, which provides # an `__iter__` convenience method. response = pagers.ListGroupsPager( - method=rpc, request=request, response=response, metadata=metadata, + method=rpc, + request=request, + response=response, + metadata=metadata, ) # Done; return the response. @@ -4046,7 +4283,12 @@ def sample_get_group(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Done; return the response. return response @@ -4157,7 +4399,12 @@ def sample_create_group(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation.from_gapic( @@ -4274,7 +4521,12 @@ def sample_update_group(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation.from_gapic( @@ -4387,7 +4639,12 @@ def sample_delete_group(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation.from_gapic( @@ -4492,7 +4749,12 @@ def sample_add_group_migration(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation.from_gapic( @@ -4595,7 +4857,12 @@ def sample_remove_group_migration(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation.from_gapic( @@ -4702,12 +4969,20 @@ def sample_list_target_projects(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # This method is paged; wrap the response in a pager, which provides # an `__iter__` convenience method. response = pagers.ListTargetProjectsPager( - method=rpc, request=request, response=response, metadata=metadata, + method=rpc, + request=request, + response=response, + metadata=metadata, ) # Done; return the response. @@ -4801,7 +5076,12 @@ def sample_get_target_project(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Done; return the response. return response @@ -4916,7 +5196,12 @@ def sample_create_target_project(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation.from_gapic( @@ -5037,7 +5322,12 @@ def sample_update_target_project(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation.from_gapic( @@ -5154,7 +5444,12 @@ def sample_delete_target_project(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation.from_gapic( diff --git a/google/cloud/vmmigration_v1/services/vm_migration/transports/base.py b/google/cloud/vmmigration_v1/services/vm_migration/transports/base.py index 1d6f8dd..8489fde 100644 --- a/google/cloud/vmmigration_v1/services/vm_migration/transports/base.py +++ b/google/cloud/vmmigration_v1/services/vm_migration/transports/base.py @@ -123,22 +123,34 @@ def _prep_wrapped_messages(self, client_info): # Precompute the wrapped methods. self._wrapped_methods = { self.list_sources: gapic_v1.method.wrap_method( - self.list_sources, default_timeout=None, client_info=client_info, + self.list_sources, + default_timeout=None, + client_info=client_info, ), self.get_source: gapic_v1.method.wrap_method( - self.get_source, default_timeout=None, client_info=client_info, + self.get_source, + default_timeout=None, + client_info=client_info, ), self.create_source: gapic_v1.method.wrap_method( - self.create_source, default_timeout=900.0, client_info=client_info, + self.create_source, + default_timeout=900.0, + client_info=client_info, ), self.update_source: gapic_v1.method.wrap_method( - self.update_source, default_timeout=None, client_info=client_info, + self.update_source, + default_timeout=None, + client_info=client_info, ), self.delete_source: gapic_v1.method.wrap_method( - self.delete_source, default_timeout=None, client_info=client_info, + self.delete_source, + default_timeout=None, + client_info=client_info, ), self.fetch_inventory: gapic_v1.method.wrap_method( - self.fetch_inventory, default_timeout=300.0, client_info=client_info, + self.fetch_inventory, + default_timeout=300.0, + client_info=client_info, ), self.list_utilization_reports: gapic_v1.method.wrap_method( self.list_utilization_reports, @@ -181,73 +193,119 @@ def _prep_wrapped_messages(self, client_info): client_info=client_info, ), self.create_migrating_vm: gapic_v1.method.wrap_method( - self.create_migrating_vm, default_timeout=None, client_info=client_info, + self.create_migrating_vm, + default_timeout=None, + client_info=client_info, ), self.list_migrating_vms: gapic_v1.method.wrap_method( - self.list_migrating_vms, default_timeout=None, client_info=client_info, + self.list_migrating_vms, + default_timeout=None, + client_info=client_info, ), self.get_migrating_vm: gapic_v1.method.wrap_method( - self.get_migrating_vm, default_timeout=None, client_info=client_info, + self.get_migrating_vm, + default_timeout=None, + client_info=client_info, ), self.update_migrating_vm: gapic_v1.method.wrap_method( - self.update_migrating_vm, default_timeout=None, client_info=client_info, + self.update_migrating_vm, + default_timeout=None, + client_info=client_info, ), self.delete_migrating_vm: gapic_v1.method.wrap_method( - self.delete_migrating_vm, default_timeout=None, client_info=client_info, + self.delete_migrating_vm, + default_timeout=None, + client_info=client_info, ), self.start_migration: gapic_v1.method.wrap_method( - self.start_migration, default_timeout=None, client_info=client_info, + self.start_migration, + default_timeout=None, + client_info=client_info, ), self.resume_migration: gapic_v1.method.wrap_method( - self.resume_migration, default_timeout=None, client_info=client_info, + self.resume_migration, + default_timeout=None, + client_info=client_info, ), self.pause_migration: gapic_v1.method.wrap_method( - self.pause_migration, default_timeout=None, client_info=client_info, + self.pause_migration, + default_timeout=None, + client_info=client_info, ), self.finalize_migration: gapic_v1.method.wrap_method( - self.finalize_migration, default_timeout=None, client_info=client_info, + self.finalize_migration, + default_timeout=None, + client_info=client_info, ), self.create_clone_job: gapic_v1.method.wrap_method( - self.create_clone_job, default_timeout=None, client_info=client_info, + self.create_clone_job, + default_timeout=None, + client_info=client_info, ), self.cancel_clone_job: gapic_v1.method.wrap_method( - self.cancel_clone_job, default_timeout=None, client_info=client_info, + self.cancel_clone_job, + default_timeout=None, + client_info=client_info, ), self.list_clone_jobs: gapic_v1.method.wrap_method( - self.list_clone_jobs, default_timeout=None, client_info=client_info, + self.list_clone_jobs, + default_timeout=None, + client_info=client_info, ), self.get_clone_job: gapic_v1.method.wrap_method( - self.get_clone_job, default_timeout=None, client_info=client_info, + self.get_clone_job, + default_timeout=None, + client_info=client_info, ), self.create_cutover_job: gapic_v1.method.wrap_method( - self.create_cutover_job, default_timeout=None, client_info=client_info, + self.create_cutover_job, + default_timeout=None, + client_info=client_info, ), self.cancel_cutover_job: gapic_v1.method.wrap_method( - self.cancel_cutover_job, default_timeout=None, client_info=client_info, + self.cancel_cutover_job, + default_timeout=None, + client_info=client_info, ), self.list_cutover_jobs: gapic_v1.method.wrap_method( - self.list_cutover_jobs, default_timeout=None, client_info=client_info, + self.list_cutover_jobs, + default_timeout=None, + client_info=client_info, ), self.get_cutover_job: gapic_v1.method.wrap_method( - self.get_cutover_job, default_timeout=None, client_info=client_info, + self.get_cutover_job, + default_timeout=None, + client_info=client_info, ), self.list_groups: gapic_v1.method.wrap_method( - self.list_groups, default_timeout=None, client_info=client_info, + self.list_groups, + default_timeout=None, + client_info=client_info, ), self.get_group: gapic_v1.method.wrap_method( - self.get_group, default_timeout=None, client_info=client_info, + self.get_group, + default_timeout=None, + client_info=client_info, ), self.create_group: gapic_v1.method.wrap_method( - self.create_group, default_timeout=None, client_info=client_info, + self.create_group, + default_timeout=None, + client_info=client_info, ), self.update_group: gapic_v1.method.wrap_method( - self.update_group, default_timeout=None, client_info=client_info, + self.update_group, + default_timeout=None, + client_info=client_info, ), self.delete_group: gapic_v1.method.wrap_method( - self.delete_group, default_timeout=None, client_info=client_info, + self.delete_group, + default_timeout=None, + client_info=client_info, ), self.add_group_migration: gapic_v1.method.wrap_method( - self.add_group_migration, default_timeout=None, client_info=client_info, + self.add_group_migration, + default_timeout=None, + client_info=client_info, ), self.remove_group_migration: gapic_v1.method.wrap_method( self.remove_group_migration, @@ -260,7 +318,9 @@ def _prep_wrapped_messages(self, client_info): client_info=client_info, ), self.get_target_project: gapic_v1.method.wrap_method( - self.get_target_project, default_timeout=None, client_info=client_info, + self.get_target_project, + default_timeout=None, + client_info=client_info, ), self.create_target_project: gapic_v1.method.wrap_method( self.create_target_project, @@ -282,9 +342,9 @@ def _prep_wrapped_messages(self, client_info): def close(self): """Closes resources associated with the transport. - .. warning:: - Only call this method if the transport is NOT shared - with other clients - this may cause errors in other clients! + .. warning:: + Only call this method if the transport is NOT shared + with other clients - this may cause errors in other clients! """ raise NotImplementedError() diff --git a/google/cloud/vmmigration_v1/services/vm_migration/transports/grpc.py b/google/cloud/vmmigration_v1/services/vm_migration/transports/grpc.py index f9e0937..e12a85f 100644 --- a/google/cloud/vmmigration_v1/services/vm_migration/transports/grpc.py +++ b/google/cloud/vmmigration_v1/services/vm_migration/transports/grpc.py @@ -227,8 +227,7 @@ def create_channel( @property def grpc_channel(self) -> grpc.Channel: - """Return the channel designed to connect to this service. - """ + """Return the channel designed to connect to this service.""" return self._grpc_channel @property diff --git a/google/cloud/vmmigration_v1/types/vmmigration.py b/google/cloud/vmmigration_v1/types/vmmigration.py index 058d519..6ed3da9 100644 --- a/google/cloud/vmmigration_v1/types/vmmigration.py +++ b/google/cloud/vmmigration_v1/types/vmmigration.py @@ -158,8 +158,15 @@ class ReplicationCycle(proto.Message): cycle. """ - start_time = proto.Field(proto.MESSAGE, number=1, message=timestamp_pb2.Timestamp,) - progress_percent = proto.Field(proto.INT32, number=5,) + start_time = proto.Field( + proto.MESSAGE, + number=1, + message=timestamp_pb2.Timestamp, + ) + progress_percent = proto.Field( + proto.INT32, + number=5, + ) class ReplicationSync(proto.Message): @@ -173,7 +180,9 @@ class ReplicationSync(proto.Message): """ last_sync_time = proto.Field( - proto.MESSAGE, number=1, message=timestamp_pb2.Timestamp, + proto.MESSAGE, + number=1, + message=timestamp_pb2.Timestamp, ) @@ -258,24 +267,71 @@ class State(proto.Enum): oneof="target_vm_defaults", message="ComputeEngineTargetDefaults", ) - name = proto.Field(proto.STRING, number=1,) - source_vm_id = proto.Field(proto.STRING, number=2,) - display_name = proto.Field(proto.STRING, number=18,) - description = proto.Field(proto.STRING, number=3,) - policy = proto.Field(proto.MESSAGE, number=8, message="SchedulePolicy",) - create_time = proto.Field(proto.MESSAGE, number=9, message=timestamp_pb2.Timestamp,) + name = proto.Field( + proto.STRING, + number=1, + ) + source_vm_id = proto.Field( + proto.STRING, + number=2, + ) + display_name = proto.Field( + proto.STRING, + number=18, + ) + description = proto.Field( + proto.STRING, + number=3, + ) + policy = proto.Field( + proto.MESSAGE, + number=8, + message="SchedulePolicy", + ) + create_time = proto.Field( + proto.MESSAGE, + number=9, + message=timestamp_pb2.Timestamp, + ) update_time = proto.Field( - proto.MESSAGE, number=10, message=timestamp_pb2.Timestamp, + proto.MESSAGE, + number=10, + message=timestamp_pb2.Timestamp, + ) + last_sync = proto.Field( + proto.MESSAGE, + number=11, + message="ReplicationSync", + ) + state = proto.Field( + proto.ENUM, + number=23, + enum=State, + ) + state_time = proto.Field( + proto.MESSAGE, + number=22, + message=timestamp_pb2.Timestamp, ) - last_sync = proto.Field(proto.MESSAGE, number=11, message="ReplicationSync",) - state = proto.Field(proto.ENUM, number=23, enum=State,) - state_time = proto.Field(proto.MESSAGE, number=22, message=timestamp_pb2.Timestamp,) current_sync_info = proto.Field( - proto.MESSAGE, number=13, message="ReplicationCycle", + proto.MESSAGE, + number=13, + message="ReplicationCycle", + ) + group = proto.Field( + proto.STRING, + number=15, + ) + labels = proto.MapField( + proto.STRING, + proto.STRING, + number=16, + ) + error = proto.Field( + proto.MESSAGE, + number=19, + message=status_pb2.Status, ) - group = proto.Field(proto.STRING, number=15,) - labels = proto.MapField(proto.STRING, proto.STRING, number=16,) - error = proto.Field(proto.MESSAGE, number=19, message=status_pb2.Status,) class CloneJob(proto.Message): @@ -333,11 +389,30 @@ class State(proto.Enum): oneof="target_vm_details", message="ComputeEngineTargetDetails", ) - create_time = proto.Field(proto.MESSAGE, number=1, message=timestamp_pb2.Timestamp,) - name = proto.Field(proto.STRING, number=3,) - state = proto.Field(proto.ENUM, number=12, enum=State,) - state_time = proto.Field(proto.MESSAGE, number=14, message=timestamp_pb2.Timestamp,) - error = proto.Field(proto.MESSAGE, number=17, message=status_pb2.Status,) + create_time = proto.Field( + proto.MESSAGE, + number=1, + message=timestamp_pb2.Timestamp, + ) + name = proto.Field( + proto.STRING, + number=3, + ) + state = proto.Field( + proto.ENUM, + number=12, + enum=State, + ) + state_time = proto.Field( + proto.MESSAGE, + number=14, + message=timestamp_pb2.Timestamp, + ) + error = proto.Field( + proto.MESSAGE, + number=17, + message=status_pb2.Status, + ) class CutoverJob(proto.Message): @@ -393,13 +468,38 @@ class State(proto.Enum): oneof="target_vm_details", message="ComputeEngineTargetDetails", ) - create_time = proto.Field(proto.MESSAGE, number=1, message=timestamp_pb2.Timestamp,) - name = proto.Field(proto.STRING, number=3,) - state = proto.Field(proto.ENUM, number=5, enum=State,) - state_time = proto.Field(proto.MESSAGE, number=6, message=timestamp_pb2.Timestamp,) - progress_percent = proto.Field(proto.INT32, number=13,) - error = proto.Field(proto.MESSAGE, number=9, message=status_pb2.Status,) - state_message = proto.Field(proto.STRING, number=10,) + create_time = proto.Field( + proto.MESSAGE, + number=1, + message=timestamp_pb2.Timestamp, + ) + name = proto.Field( + proto.STRING, + number=3, + ) + state = proto.Field( + proto.ENUM, + number=5, + enum=State, + ) + state_time = proto.Field( + proto.MESSAGE, + number=6, + message=timestamp_pb2.Timestamp, + ) + progress_percent = proto.Field( + proto.INT32, + number=13, + ) + error = proto.Field( + proto.MESSAGE, + number=9, + message=status_pb2.Status, + ) + state_message = proto.Field( + proto.STRING, + number=10, + ) class CreateCloneJobRequest(proto.Message): @@ -432,10 +532,23 @@ class CreateCloneJobRequest(proto.Message): (00000000-0000-0000-0000-000000000000). """ - parent = proto.Field(proto.STRING, number=1,) - clone_job_id = proto.Field(proto.STRING, number=2,) - clone_job = proto.Field(proto.MESSAGE, number=3, message="CloneJob",) - request_id = proto.Field(proto.STRING, number=4,) + parent = proto.Field( + proto.STRING, + number=1, + ) + clone_job_id = proto.Field( + proto.STRING, + number=2, + ) + clone_job = proto.Field( + proto.MESSAGE, + number=3, + message="CloneJob", + ) + request_id = proto.Field( + proto.STRING, + number=4, + ) class CancelCloneJobRequest(proto.Message): @@ -446,12 +559,14 @@ class CancelCloneJobRequest(proto.Message): Required. The clone job id """ - name = proto.Field(proto.STRING, number=1,) + name = proto.Field( + proto.STRING, + number=1, + ) class CancelCloneJobResponse(proto.Message): - r"""Response message for 'CancelCloneJob' request. - """ + r"""Response message for 'CancelCloneJob' request.""" class ListCloneJobsRequest(proto.Message): @@ -481,11 +596,26 @@ class ListCloneJobsRequest(proto.Message): Optional. the order by fields for the result. """ - parent = proto.Field(proto.STRING, number=1,) - page_size = proto.Field(proto.INT32, number=2,) - page_token = proto.Field(proto.STRING, number=3,) - filter = proto.Field(proto.STRING, number=4,) - order_by = proto.Field(proto.STRING, number=5,) + parent = proto.Field( + proto.STRING, + number=1, + ) + page_size = proto.Field( + proto.INT32, + number=2, + ) + page_token = proto.Field( + proto.STRING, + number=3, + ) + filter = proto.Field( + proto.STRING, + number=4, + ) + order_by = proto.Field( + proto.STRING, + number=5, + ) class ListCloneJobsResponse(proto.Message): @@ -507,9 +637,19 @@ class ListCloneJobsResponse(proto.Message): def raw_page(self): return self - clone_jobs = proto.RepeatedField(proto.MESSAGE, number=1, message="CloneJob",) - next_page_token = proto.Field(proto.STRING, number=2,) - unreachable = proto.RepeatedField(proto.STRING, number=3,) + clone_jobs = proto.RepeatedField( + proto.MESSAGE, + number=1, + message="CloneJob", + ) + next_page_token = proto.Field( + proto.STRING, + number=2, + ) + unreachable = proto.RepeatedField( + proto.STRING, + number=3, + ) class GetCloneJobRequest(proto.Message): @@ -520,7 +660,10 @@ class GetCloneJobRequest(proto.Message): Required. The name of the CloneJob. """ - name = proto.Field(proto.STRING, number=1,) + name = proto.Field( + proto.STRING, + number=1, + ) class Source(proto.Message): @@ -548,13 +691,34 @@ class Source(proto.Message): """ vmware = proto.Field( - proto.MESSAGE, number=10, oneof="source_details", message="VmwareSourceDetails", + proto.MESSAGE, + number=10, + oneof="source_details", + message="VmwareSourceDetails", + ) + name = proto.Field( + proto.STRING, + number=1, + ) + create_time = proto.Field( + proto.MESSAGE, + number=2, + message=timestamp_pb2.Timestamp, + ) + update_time = proto.Field( + proto.MESSAGE, + number=3, + message=timestamp_pb2.Timestamp, + ) + labels = proto.MapField( + proto.STRING, + proto.STRING, + number=4, + ) + description = proto.Field( + proto.STRING, + number=6, ) - name = proto.Field(proto.STRING, number=1,) - create_time = proto.Field(proto.MESSAGE, number=2, message=timestamp_pb2.Timestamp,) - update_time = proto.Field(proto.MESSAGE, number=3, message=timestamp_pb2.Timestamp,) - labels = proto.MapField(proto.STRING, proto.STRING, number=4,) - description = proto.Field(proto.STRING, number=6,) class VmwareSourceDetails(proto.Message): @@ -576,10 +740,22 @@ class VmwareSourceDetails(proto.Message): for the vcenter. """ - username = proto.Field(proto.STRING, number=1,) - password = proto.Field(proto.STRING, number=2,) - vcenter_ip = proto.Field(proto.STRING, number=3,) - thumbprint = proto.Field(proto.STRING, number=4,) + username = proto.Field( + proto.STRING, + number=1, + ) + password = proto.Field( + proto.STRING, + number=2, + ) + vcenter_ip = proto.Field( + proto.STRING, + number=3, + ) + thumbprint = proto.Field( + proto.STRING, + number=4, + ) class DatacenterConnector(proto.Message): @@ -633,16 +809,51 @@ class State(proto.Enum): FAILED = 3 ACTIVE = 4 - create_time = proto.Field(proto.MESSAGE, number=1, message=timestamp_pb2.Timestamp,) - update_time = proto.Field(proto.MESSAGE, number=2, message=timestamp_pb2.Timestamp,) - name = proto.Field(proto.STRING, number=3,) - registration_id = proto.Field(proto.STRING, number=12,) - service_account = proto.Field(proto.STRING, number=5,) - version = proto.Field(proto.STRING, number=6,) - bucket = proto.Field(proto.STRING, number=10,) - state = proto.Field(proto.ENUM, number=7, enum=State,) - state_time = proto.Field(proto.MESSAGE, number=8, message=timestamp_pb2.Timestamp,) - error = proto.Field(proto.MESSAGE, number=11, message=status_pb2.Status,) + create_time = proto.Field( + proto.MESSAGE, + number=1, + message=timestamp_pb2.Timestamp, + ) + update_time = proto.Field( + proto.MESSAGE, + number=2, + message=timestamp_pb2.Timestamp, + ) + name = proto.Field( + proto.STRING, + number=3, + ) + registration_id = proto.Field( + proto.STRING, + number=12, + ) + service_account = proto.Field( + proto.STRING, + number=5, + ) + version = proto.Field( + proto.STRING, + number=6, + ) + bucket = proto.Field( + proto.STRING, + number=10, + ) + state = proto.Field( + proto.ENUM, + number=7, + enum=State, + ) + state_time = proto.Field( + proto.MESSAGE, + number=8, + message=timestamp_pb2.Timestamp, + ) + error = proto.Field( + proto.MESSAGE, + number=11, + message=status_pb2.Status, + ) class ListSourcesRequest(proto.Message): @@ -672,11 +883,26 @@ class ListSourcesRequest(proto.Message): Optional. the order by fields for the result. """ - parent = proto.Field(proto.STRING, number=1,) - page_size = proto.Field(proto.INT32, number=2,) - page_token = proto.Field(proto.STRING, number=3,) - filter = proto.Field(proto.STRING, number=4,) - order_by = proto.Field(proto.STRING, number=5,) + parent = proto.Field( + proto.STRING, + number=1, + ) + page_size = proto.Field( + proto.INT32, + number=2, + ) + page_token = proto.Field( + proto.STRING, + number=3, + ) + filter = proto.Field( + proto.STRING, + number=4, + ) + order_by = proto.Field( + proto.STRING, + number=5, + ) class ListSourcesResponse(proto.Message): @@ -698,9 +924,19 @@ class ListSourcesResponse(proto.Message): def raw_page(self): return self - sources = proto.RepeatedField(proto.MESSAGE, number=1, message="Source",) - next_page_token = proto.Field(proto.STRING, number=2,) - unreachable = proto.RepeatedField(proto.STRING, number=3,) + sources = proto.RepeatedField( + proto.MESSAGE, + number=1, + message="Source", + ) + next_page_token = proto.Field( + proto.STRING, + number=2, + ) + unreachable = proto.RepeatedField( + proto.STRING, + number=3, + ) class GetSourceRequest(proto.Message): @@ -711,7 +947,10 @@ class GetSourceRequest(proto.Message): Required. The Source name. """ - name = proto.Field(proto.STRING, number=1,) + name = proto.Field( + proto.STRING, + number=1, + ) class CreateSourceRequest(proto.Message): @@ -744,10 +983,23 @@ class CreateSourceRequest(proto.Message): (00000000-0000-0000-0000-000000000000). """ - parent = proto.Field(proto.STRING, number=1,) - source_id = proto.Field(proto.STRING, number=2,) - source = proto.Field(proto.MESSAGE, number=3, message="Source",) - request_id = proto.Field(proto.STRING, number=4,) + parent = proto.Field( + proto.STRING, + number=1, + ) + source_id = proto.Field( + proto.STRING, + number=2, + ) + source = proto.Field( + proto.MESSAGE, + number=3, + message="Source", + ) + request_id = proto.Field( + proto.STRING, + number=4, + ) class UpdateSourceRequest(proto.Message): @@ -784,10 +1036,19 @@ class UpdateSourceRequest(proto.Message): """ update_mask = proto.Field( - proto.MESSAGE, number=1, message=field_mask_pb2.FieldMask, + proto.MESSAGE, + number=1, + message=field_mask_pb2.FieldMask, + ) + source = proto.Field( + proto.MESSAGE, + number=2, + message="Source", + ) + request_id = proto.Field( + proto.STRING, + number=3, ) - source = proto.Field(proto.MESSAGE, number=2, message="Source",) - request_id = proto.Field(proto.STRING, number=3,) class DeleteSourceRequest(proto.Message): @@ -816,8 +1077,14 @@ class DeleteSourceRequest(proto.Message): (00000000-0000-0000-0000-000000000000). """ - name = proto.Field(proto.STRING, number=1,) - request_id = proto.Field(proto.STRING, number=2,) + name = proto.Field( + proto.STRING, + number=1, + ) + request_id = proto.Field( + proto.STRING, + number=2, + ) class FetchInventoryRequest(proto.Message): @@ -833,8 +1100,14 @@ class FetchInventoryRequest(proto.Message): Using this flag will make the call slower. """ - source = proto.Field(proto.STRING, number=1,) - force_refresh = proto.Field(proto.BOOL, number=2,) + source = proto.Field( + proto.STRING, + number=1, + ) + force_refresh = proto.Field( + proto.BOOL, + number=2, + ) class VmwareVmDetails(proto.Message): @@ -889,18 +1162,56 @@ class BootOption(proto.Enum): EFI = 1 BIOS = 2 - vm_id = proto.Field(proto.STRING, number=1,) - datacenter_id = proto.Field(proto.STRING, number=2,) - datacenter_description = proto.Field(proto.STRING, number=3,) - uuid = proto.Field(proto.STRING, number=4,) - display_name = proto.Field(proto.STRING, number=5,) - power_state = proto.Field(proto.ENUM, number=6, enum=PowerState,) - cpu_count = proto.Field(proto.INT32, number=7,) - memory_mb = proto.Field(proto.INT32, number=8,) - disk_count = proto.Field(proto.INT32, number=9,) - committed_storage_mb = proto.Field(proto.INT64, number=12,) - guest_description = proto.Field(proto.STRING, number=11,) - boot_option = proto.Field(proto.ENUM, number=13, enum=BootOption,) + vm_id = proto.Field( + proto.STRING, + number=1, + ) + datacenter_id = proto.Field( + proto.STRING, + number=2, + ) + datacenter_description = proto.Field( + proto.STRING, + number=3, + ) + uuid = proto.Field( + proto.STRING, + number=4, + ) + display_name = proto.Field( + proto.STRING, + number=5, + ) + power_state = proto.Field( + proto.ENUM, + number=6, + enum=PowerState, + ) + cpu_count = proto.Field( + proto.INT32, + number=7, + ) + memory_mb = proto.Field( + proto.INT32, + number=8, + ) + disk_count = proto.Field( + proto.INT32, + number=9, + ) + committed_storage_mb = proto.Field( + proto.INT64, + number=12, + ) + guest_description = proto.Field( + proto.STRING, + number=11, + ) + boot_option = proto.Field( + proto.ENUM, + number=13, + enum=BootOption, + ) class VmwareVmsDetails(proto.Message): @@ -911,7 +1222,11 @@ class VmwareVmsDetails(proto.Message): The details of the vmware VMs. """ - details = proto.RepeatedField(proto.MESSAGE, number=1, message="VmwareVmDetails",) + details = proto.RepeatedField( + proto.MESSAGE, + number=1, + message="VmwareVmDetails", + ) class FetchInventoryResponse(proto.Message): @@ -934,9 +1249,16 @@ class FetchInventoryResponse(proto.Message): """ vmware_vms = proto.Field( - proto.MESSAGE, number=1, oneof="SourceVms", message="VmwareVmsDetails", + proto.MESSAGE, + number=1, + oneof="SourceVms", + message="VmwareVmsDetails", + ) + update_time = proto.Field( + proto.MESSAGE, + number=2, + message=timestamp_pb2.Timestamp, ) - update_time = proto.Field(proto.MESSAGE, number=2, message=timestamp_pb2.Timestamp,) class UtilizationReport(proto.Message): @@ -992,18 +1314,53 @@ class TimeFrame(proto.Enum): MONTH = 2 YEAR = 3 - name = proto.Field(proto.STRING, number=1,) - display_name = proto.Field(proto.STRING, number=2,) - state = proto.Field(proto.ENUM, number=3, enum=State,) - state_time = proto.Field(proto.MESSAGE, number=4, message=timestamp_pb2.Timestamp,) - error = proto.Field(proto.MESSAGE, number=5, message=status_pb2.Status,) - create_time = proto.Field(proto.MESSAGE, number=6, message=timestamp_pb2.Timestamp,) - time_frame = proto.Field(proto.ENUM, number=7, enum=TimeFrame,) + name = proto.Field( + proto.STRING, + number=1, + ) + display_name = proto.Field( + proto.STRING, + number=2, + ) + state = proto.Field( + proto.ENUM, + number=3, + enum=State, + ) + state_time = proto.Field( + proto.MESSAGE, + number=4, + message=timestamp_pb2.Timestamp, + ) + error = proto.Field( + proto.MESSAGE, + number=5, + message=status_pb2.Status, + ) + create_time = proto.Field( + proto.MESSAGE, + number=6, + message=timestamp_pb2.Timestamp, + ) + time_frame = proto.Field( + proto.ENUM, + number=7, + enum=TimeFrame, + ) frame_end_time = proto.Field( - proto.MESSAGE, number=8, message=timestamp_pb2.Timestamp, + proto.MESSAGE, + number=8, + message=timestamp_pb2.Timestamp, + ) + vm_count = proto.Field( + proto.INT32, + number=9, + ) + vms = proto.RepeatedField( + proto.MESSAGE, + number=10, + message="VmUtilizationInfo", ) - vm_count = proto.Field(proto.INT32, number=9,) - vms = proto.RepeatedField(proto.MESSAGE, number=10, message="VmUtilizationInfo",) class VmUtilizationInfo(proto.Message): @@ -1024,10 +1381,20 @@ class VmUtilizationInfo(proto.Message): """ vmware_vm_details = proto.Field( - proto.MESSAGE, number=1, oneof="VmDetails", message="VmwareVmDetails", + proto.MESSAGE, + number=1, + oneof="VmDetails", + message="VmwareVmDetails", + ) + vm_id = proto.Field( + proto.STRING, + number=3, + ) + utilization = proto.Field( + proto.MESSAGE, + number=2, + message="VmUtilizationMetrics", ) - vm_id = proto.Field(proto.STRING, number=3,) - utilization = proto.Field(proto.MESSAGE, number=2, message="VmUtilizationMetrics",) class VmUtilizationMetrics(proto.Message): @@ -1057,14 +1424,38 @@ class VmUtilizationMetrics(proto.Message): per second. """ - cpu_max_percent = proto.Field(proto.INT32, number=9,) - cpu_average_percent = proto.Field(proto.INT32, number=10,) - memory_max_percent = proto.Field(proto.INT32, number=11,) - memory_average_percent = proto.Field(proto.INT32, number=12,) - disk_io_rate_max_kbps = proto.Field(proto.INT64, number=13,) - disk_io_rate_average_kbps = proto.Field(proto.INT64, number=14,) - network_throughput_max_kbps = proto.Field(proto.INT64, number=15,) - network_throughput_average_kbps = proto.Field(proto.INT64, number=16,) + cpu_max_percent = proto.Field( + proto.INT32, + number=9, + ) + cpu_average_percent = proto.Field( + proto.INT32, + number=10, + ) + memory_max_percent = proto.Field( + proto.INT32, + number=11, + ) + memory_average_percent = proto.Field( + proto.INT32, + number=12, + ) + disk_io_rate_max_kbps = proto.Field( + proto.INT64, + number=13, + ) + disk_io_rate_average_kbps = proto.Field( + proto.INT64, + number=14, + ) + network_throughput_max_kbps = proto.Field( + proto.INT64, + number=15, + ) + network_throughput_average_kbps = proto.Field( + proto.INT64, + number=16, + ) class ListUtilizationReportsRequest(proto.Message): @@ -1096,12 +1487,31 @@ class ListUtilizationReportsRequest(proto.Message): Optional. the order by fields for the result. """ - parent = proto.Field(proto.STRING, number=1,) - view = proto.Field(proto.ENUM, number=2, enum="UtilizationReportView",) - page_size = proto.Field(proto.INT32, number=3,) - page_token = proto.Field(proto.STRING, number=4,) - filter = proto.Field(proto.STRING, number=5,) - order_by = proto.Field(proto.STRING, number=6,) + parent = proto.Field( + proto.STRING, + number=1, + ) + view = proto.Field( + proto.ENUM, + number=2, + enum="UtilizationReportView", + ) + page_size = proto.Field( + proto.INT32, + number=3, + ) + page_token = proto.Field( + proto.STRING, + number=4, + ) + filter = proto.Field( + proto.STRING, + number=5, + ) + order_by = proto.Field( + proto.STRING, + number=6, + ) class ListUtilizationReportsResponse(proto.Message): @@ -1124,10 +1534,18 @@ def raw_page(self): return self utilization_reports = proto.RepeatedField( - proto.MESSAGE, number=1, message="UtilizationReport", + proto.MESSAGE, + number=1, + message="UtilizationReport", + ) + next_page_token = proto.Field( + proto.STRING, + number=2, + ) + unreachable = proto.RepeatedField( + proto.STRING, + number=3, ) - next_page_token = proto.Field(proto.STRING, number=2,) - unreachable = proto.RepeatedField(proto.STRING, number=3,) class GetUtilizationReportRequest(proto.Message): @@ -1141,8 +1559,15 @@ class GetUtilizationReportRequest(proto.Message): Defaults to FULL """ - name = proto.Field(proto.STRING, number=1,) - view = proto.Field(proto.ENUM, number=2, enum="UtilizationReportView",) + name = proto.Field( + proto.STRING, + number=1, + ) + view = proto.Field( + proto.ENUM, + number=2, + enum="UtilizationReportView", + ) class CreateUtilizationReportRequest(proto.Message): @@ -1180,12 +1605,23 @@ class CreateUtilizationReportRequest(proto.Message): (00000000-0000-0000-0000-000000000000). """ - parent = proto.Field(proto.STRING, number=1,) + parent = proto.Field( + proto.STRING, + number=1, + ) utilization_report = proto.Field( - proto.MESSAGE, number=2, message="UtilizationReport", + proto.MESSAGE, + number=2, + message="UtilizationReport", + ) + utilization_report_id = proto.Field( + proto.STRING, + number=3, + ) + request_id = proto.Field( + proto.STRING, + number=4, ) - utilization_report_id = proto.Field(proto.STRING, number=3,) - request_id = proto.Field(proto.STRING, number=4,) class DeleteUtilizationReportRequest(proto.Message): @@ -1214,8 +1650,14 @@ class DeleteUtilizationReportRequest(proto.Message): (00000000-0000-0000-0000-000000000000). """ - name = proto.Field(proto.STRING, number=1,) - request_id = proto.Field(proto.STRING, number=2,) + name = proto.Field( + proto.STRING, + number=1, + ) + request_id = proto.Field( + proto.STRING, + number=2, + ) class ListDatacenterConnectorsResponse(proto.Message): @@ -1238,10 +1680,18 @@ def raw_page(self): return self datacenter_connectors = proto.RepeatedField( - proto.MESSAGE, number=1, message="DatacenterConnector", + proto.MESSAGE, + number=1, + message="DatacenterConnector", + ) + next_page_token = proto.Field( + proto.STRING, + number=2, + ) + unreachable = proto.RepeatedField( + proto.STRING, + number=3, ) - next_page_token = proto.Field(proto.STRING, number=2,) - unreachable = proto.RepeatedField(proto.STRING, number=3,) class GetDatacenterConnectorRequest(proto.Message): @@ -1253,7 +1703,10 @@ class GetDatacenterConnectorRequest(proto.Message): DatacenterConnector. """ - name = proto.Field(proto.STRING, number=1,) + name = proto.Field( + proto.STRING, + number=1, + ) class CreateDatacenterConnectorRequest(proto.Message): @@ -1289,12 +1742,23 @@ class CreateDatacenterConnectorRequest(proto.Message): (00000000-0000-0000-0000-000000000000). """ - parent = proto.Field(proto.STRING, number=1,) - datacenter_connector_id = proto.Field(proto.STRING, number=2,) + parent = proto.Field( + proto.STRING, + number=1, + ) + datacenter_connector_id = proto.Field( + proto.STRING, + number=2, + ) datacenter_connector = proto.Field( - proto.MESSAGE, number=3, message="DatacenterConnector", + proto.MESSAGE, + number=3, + message="DatacenterConnector", + ) + request_id = proto.Field( + proto.STRING, + number=4, ) - request_id = proto.Field(proto.STRING, number=4,) class DeleteDatacenterConnectorRequest(proto.Message): @@ -1323,8 +1787,14 @@ class DeleteDatacenterConnectorRequest(proto.Message): (00000000-0000-0000-0000-000000000000). """ - name = proto.Field(proto.STRING, number=1,) - request_id = proto.Field(proto.STRING, number=2,) + name = proto.Field( + proto.STRING, + number=1, + ) + request_id = proto.Field( + proto.STRING, + number=2, + ) class ListDatacenterConnectorsRequest(proto.Message): @@ -1354,11 +1824,26 @@ class ListDatacenterConnectorsRequest(proto.Message): Optional. the order by fields for the result. """ - parent = proto.Field(proto.STRING, number=1,) - page_size = proto.Field(proto.INT32, number=2,) - page_token = proto.Field(proto.STRING, number=3,) - filter = proto.Field(proto.STRING, number=4,) - order_by = proto.Field(proto.STRING, number=5,) + parent = proto.Field( + proto.STRING, + number=1, + ) + page_size = proto.Field( + proto.INT32, + number=2, + ) + page_token = proto.Field( + proto.STRING, + number=3, + ) + filter = proto.Field( + proto.STRING, + number=4, + ) + order_by = proto.Field( + proto.STRING, + number=5, + ) class ComputeEngineTargetDefaults(proto.Message): @@ -1410,26 +1895,78 @@ class ComputeEngineTargetDefaults(proto.Message): VM. """ - vm_name = proto.Field(proto.STRING, number=1,) - target_project = proto.Field(proto.STRING, number=2,) - zone = proto.Field(proto.STRING, number=3,) - machine_type_series = proto.Field(proto.STRING, number=4,) - machine_type = proto.Field(proto.STRING, number=5,) - network_tags = proto.RepeatedField(proto.STRING, number=6,) + vm_name = proto.Field( + proto.STRING, + number=1, + ) + target_project = proto.Field( + proto.STRING, + number=2, + ) + zone = proto.Field( + proto.STRING, + number=3, + ) + machine_type_series = proto.Field( + proto.STRING, + number=4, + ) + machine_type = proto.Field( + proto.STRING, + number=5, + ) + network_tags = proto.RepeatedField( + proto.STRING, + number=6, + ) network_interfaces = proto.RepeatedField( - proto.MESSAGE, number=7, message="NetworkInterface", + proto.MESSAGE, + number=7, + message="NetworkInterface", + ) + service_account = proto.Field( + proto.STRING, + number=8, + ) + disk_type = proto.Field( + proto.ENUM, + number=9, + enum="ComputeEngineDiskType", + ) + labels = proto.MapField( + proto.STRING, + proto.STRING, + number=10, + ) + license_type = proto.Field( + proto.ENUM, + number=11, + enum="ComputeEngineLicenseType", + ) + applied_license = proto.Field( + proto.MESSAGE, + number=12, + message="AppliedLicense", ) - service_account = proto.Field(proto.STRING, number=8,) - disk_type = proto.Field(proto.ENUM, number=9, enum="ComputeEngineDiskType",) - labels = proto.MapField(proto.STRING, proto.STRING, number=10,) - license_type = proto.Field(proto.ENUM, number=11, enum="ComputeEngineLicenseType",) - applied_license = proto.Field(proto.MESSAGE, number=12, message="AppliedLicense",) compute_scheduling = proto.Field( - proto.MESSAGE, number=13, message="ComputeScheduling", + proto.MESSAGE, + number=13, + message="ComputeScheduling", + ) + secure_boot = proto.Field( + proto.BOOL, + number=14, + ) + boot_option = proto.Field( + proto.ENUM, + number=15, + enum="ComputeEngineBootOption", + ) + metadata = proto.MapField( + proto.STRING, + proto.STRING, + number=16, ) - secure_boot = proto.Field(proto.BOOL, number=14,) - boot_option = proto.Field(proto.ENUM, number=15, enum="ComputeEngineBootOption",) - metadata = proto.MapField(proto.STRING, proto.STRING, number=16,) class ComputeEngineTargetDetails(proto.Message): @@ -1478,26 +2015,78 @@ class ComputeEngineTargetDetails(proto.Message): VM. """ - vm_name = proto.Field(proto.STRING, number=1,) - project = proto.Field(proto.STRING, number=2,) - zone = proto.Field(proto.STRING, number=3,) - machine_type_series = proto.Field(proto.STRING, number=4,) - machine_type = proto.Field(proto.STRING, number=5,) - network_tags = proto.RepeatedField(proto.STRING, number=6,) + vm_name = proto.Field( + proto.STRING, + number=1, + ) + project = proto.Field( + proto.STRING, + number=2, + ) + zone = proto.Field( + proto.STRING, + number=3, + ) + machine_type_series = proto.Field( + proto.STRING, + number=4, + ) + machine_type = proto.Field( + proto.STRING, + number=5, + ) + network_tags = proto.RepeatedField( + proto.STRING, + number=6, + ) network_interfaces = proto.RepeatedField( - proto.MESSAGE, number=7, message="NetworkInterface", + proto.MESSAGE, + number=7, + message="NetworkInterface", + ) + service_account = proto.Field( + proto.STRING, + number=8, + ) + disk_type = proto.Field( + proto.ENUM, + number=9, + enum="ComputeEngineDiskType", + ) + labels = proto.MapField( + proto.STRING, + proto.STRING, + number=10, + ) + license_type = proto.Field( + proto.ENUM, + number=11, + enum="ComputeEngineLicenseType", + ) + applied_license = proto.Field( + proto.MESSAGE, + number=12, + message="AppliedLicense", ) - service_account = proto.Field(proto.STRING, number=8,) - disk_type = proto.Field(proto.ENUM, number=9, enum="ComputeEngineDiskType",) - labels = proto.MapField(proto.STRING, proto.STRING, number=10,) - license_type = proto.Field(proto.ENUM, number=11, enum="ComputeEngineLicenseType",) - applied_license = proto.Field(proto.MESSAGE, number=12, message="AppliedLicense",) compute_scheduling = proto.Field( - proto.MESSAGE, number=13, message="ComputeScheduling", + proto.MESSAGE, + number=13, + message="ComputeScheduling", + ) + secure_boot = proto.Field( + proto.BOOL, + number=14, + ) + boot_option = proto.Field( + proto.ENUM, + number=15, + enum="ComputeEngineBootOption", + ) + metadata = proto.MapField( + proto.STRING, + proto.STRING, + number=16, ) - secure_boot = proto.Field(proto.BOOL, number=14,) - boot_option = proto.Field(proto.ENUM, number=15, enum="ComputeEngineBootOption",) - metadata = proto.MapField(proto.STRING, proto.STRING, number=16,) class NetworkInterface(proto.Message): @@ -1516,10 +2105,22 @@ class NetworkInterface(proto.Message): The external IP to define in the NIC. """ - network = proto.Field(proto.STRING, number=1,) - subnetwork = proto.Field(proto.STRING, number=2,) - internal_ip = proto.Field(proto.STRING, number=3,) - external_ip = proto.Field(proto.STRING, number=4,) + network = proto.Field( + proto.STRING, + number=1, + ) + subnetwork = proto.Field( + proto.STRING, + number=2, + ) + internal_ip = proto.Field( + proto.STRING, + number=3, + ) + external_ip = proto.Field( + proto.STRING, + number=4, + ) class AppliedLicense(proto.Message): @@ -1542,8 +2143,15 @@ class Type(proto.Enum): PAYG = 2 BYOL = 3 - type_ = proto.Field(proto.ENUM, number=1, enum=Type,) - os_license = proto.Field(proto.STRING, number=2,) + type_ = proto.Field( + proto.ENUM, + number=1, + enum=Type, + ) + os_license = proto.Field( + proto.STRING, + number=2, + ) class SchedulingNodeAffinity(proto.Message): @@ -1570,9 +2178,19 @@ class Operator(proto.Enum): IN = 1 NOT_IN = 2 - key = proto.Field(proto.STRING, number=1,) - operator = proto.Field(proto.ENUM, number=2, enum=Operator,) - values = proto.RepeatedField(proto.STRING, number=3,) + key = proto.Field( + proto.STRING, + number=1, + ) + operator = proto.Field( + proto.ENUM, + number=2, + enum=Operator, + ) + values = proto.RepeatedField( + proto.STRING, + number=3, + ) class ComputeScheduling(proto.Message): @@ -1616,12 +2234,25 @@ class RestartType(proto.Enum): AUTOMATIC_RESTART = 1 NO_AUTOMATIC_RESTART = 2 - on_host_maintenance = proto.Field(proto.ENUM, number=1, enum=OnHostMaintenance,) - restart_type = proto.Field(proto.ENUM, number=5, enum=RestartType,) + on_host_maintenance = proto.Field( + proto.ENUM, + number=1, + enum=OnHostMaintenance, + ) + restart_type = proto.Field( + proto.ENUM, + number=5, + enum=RestartType, + ) node_affinities = proto.RepeatedField( - proto.MESSAGE, number=3, message="SchedulingNodeAffinity", + proto.MESSAGE, + number=3, + message="SchedulingNodeAffinity", + ) + min_node_cpus = proto.Field( + proto.INT32, + number=4, ) - min_node_cpus = proto.Field(proto.INT32, number=4,) class SchedulePolicy(proto.Message): @@ -1638,8 +2269,15 @@ class SchedulePolicy(proto.Message): fully function on Compute Engine. """ - idle_duration = proto.Field(proto.MESSAGE, number=1, message=duration_pb2.Duration,) - skip_os_adaptation = proto.Field(proto.BOOL, number=2,) + idle_duration = proto.Field( + proto.MESSAGE, + number=1, + message=duration_pb2.Duration, + ) + skip_os_adaptation = proto.Field( + proto.BOOL, + number=2, + ) class CreateMigratingVmRequest(proto.Message): @@ -1672,10 +2310,23 @@ class CreateMigratingVmRequest(proto.Message): (00000000-0000-0000-0000-000000000000). """ - parent = proto.Field(proto.STRING, number=1,) - migrating_vm_id = proto.Field(proto.STRING, number=2,) - migrating_vm = proto.Field(proto.MESSAGE, number=3, message="MigratingVm",) - request_id = proto.Field(proto.STRING, number=4,) + parent = proto.Field( + proto.STRING, + number=1, + ) + migrating_vm_id = proto.Field( + proto.STRING, + number=2, + ) + migrating_vm = proto.Field( + proto.MESSAGE, + number=3, + message="MigratingVm", + ) + request_id = proto.Field( + proto.STRING, + number=4, + ) class ListMigratingVmsRequest(proto.Message): @@ -1706,11 +2357,26 @@ class ListMigratingVmsRequest(proto.Message): Optional. the order by fields for the result. """ - parent = proto.Field(proto.STRING, number=1,) - page_size = proto.Field(proto.INT32, number=2,) - page_token = proto.Field(proto.STRING, number=3,) - filter = proto.Field(proto.STRING, number=4,) - order_by = proto.Field(proto.STRING, number=5,) + parent = proto.Field( + proto.STRING, + number=1, + ) + page_size = proto.Field( + proto.INT32, + number=2, + ) + page_token = proto.Field( + proto.STRING, + number=3, + ) + filter = proto.Field( + proto.STRING, + number=4, + ) + order_by = proto.Field( + proto.STRING, + number=5, + ) class ListMigratingVmsResponse(proto.Message): @@ -1733,9 +2399,19 @@ class ListMigratingVmsResponse(proto.Message): def raw_page(self): return self - migrating_vms = proto.RepeatedField(proto.MESSAGE, number=1, message="MigratingVm",) - next_page_token = proto.Field(proto.STRING, number=2,) - unreachable = proto.RepeatedField(proto.STRING, number=3,) + migrating_vms = proto.RepeatedField( + proto.MESSAGE, + number=1, + message="MigratingVm", + ) + next_page_token = proto.Field( + proto.STRING, + number=2, + ) + unreachable = proto.RepeatedField( + proto.STRING, + number=3, + ) class GetMigratingVmRequest(proto.Message): @@ -1746,7 +2422,10 @@ class GetMigratingVmRequest(proto.Message): Required. The name of the MigratingVm. """ - name = proto.Field(proto.STRING, number=1,) + name = proto.Field( + proto.STRING, + number=1, + ) class UpdateMigratingVmRequest(proto.Message): @@ -1783,10 +2462,19 @@ class UpdateMigratingVmRequest(proto.Message): """ update_mask = proto.Field( - proto.MESSAGE, number=1, message=field_mask_pb2.FieldMask, + proto.MESSAGE, + number=1, + message=field_mask_pb2.FieldMask, + ) + migrating_vm = proto.Field( + proto.MESSAGE, + number=2, + message="MigratingVm", + ) + request_id = proto.Field( + proto.STRING, + number=3, ) - migrating_vm = proto.Field(proto.MESSAGE, number=2, message="MigratingVm",) - request_id = proto.Field(proto.STRING, number=3,) class DeleteMigratingVmRequest(proto.Message): @@ -1797,7 +2485,10 @@ class DeleteMigratingVmRequest(proto.Message): Required. The name of the MigratingVm. """ - name = proto.Field(proto.STRING, number=1,) + name = proto.Field( + proto.STRING, + number=1, + ) class StartMigrationRequest(proto.Message): @@ -1808,12 +2499,14 @@ class StartMigrationRequest(proto.Message): Required. The name of the MigratingVm. """ - migrating_vm = proto.Field(proto.STRING, number=1,) + migrating_vm = proto.Field( + proto.STRING, + number=1, + ) class StartMigrationResponse(proto.Message): - r"""Response message for 'StartMigration' request. - """ + r"""Response message for 'StartMigration' request.""" class PauseMigrationRequest(proto.Message): @@ -1824,12 +2517,14 @@ class PauseMigrationRequest(proto.Message): Required. The name of the MigratingVm. """ - migrating_vm = proto.Field(proto.STRING, number=1,) + migrating_vm = proto.Field( + proto.STRING, + number=1, + ) class PauseMigrationResponse(proto.Message): - r"""Response message for 'PauseMigration' request. - """ + r"""Response message for 'PauseMigration' request.""" class ResumeMigrationRequest(proto.Message): @@ -1840,12 +2535,14 @@ class ResumeMigrationRequest(proto.Message): Required. The name of the MigratingVm. """ - migrating_vm = proto.Field(proto.STRING, number=1,) + migrating_vm = proto.Field( + proto.STRING, + number=1, + ) class ResumeMigrationResponse(proto.Message): - r"""Response message for 'ResumeMigration' request. - """ + r"""Response message for 'ResumeMigration' request.""" class FinalizeMigrationRequest(proto.Message): @@ -1856,12 +2553,14 @@ class FinalizeMigrationRequest(proto.Message): Required. The name of the MigratingVm. """ - migrating_vm = proto.Field(proto.STRING, number=1,) + migrating_vm = proto.Field( + proto.STRING, + number=1, + ) class FinalizeMigrationResponse(proto.Message): - r"""Response message for 'FinalizeMigration' request. - """ + r"""Response message for 'FinalizeMigration' request.""" class TargetProject(proto.Message): @@ -1886,11 +2585,28 @@ class TargetProject(proto.Message): resource was updated. """ - name = proto.Field(proto.STRING, number=1,) - project = proto.Field(proto.STRING, number=2,) - description = proto.Field(proto.STRING, number=3,) - create_time = proto.Field(proto.MESSAGE, number=4, message=timestamp_pb2.Timestamp,) - update_time = proto.Field(proto.MESSAGE, number=5, message=timestamp_pb2.Timestamp,) + name = proto.Field( + proto.STRING, + number=1, + ) + project = proto.Field( + proto.STRING, + number=2, + ) + description = proto.Field( + proto.STRING, + number=3, + ) + create_time = proto.Field( + proto.MESSAGE, + number=4, + message=timestamp_pb2.Timestamp, + ) + update_time = proto.Field( + proto.MESSAGE, + number=5, + message=timestamp_pb2.Timestamp, + ) class GetTargetProjectRequest(proto.Message): @@ -1901,7 +2617,10 @@ class GetTargetProjectRequest(proto.Message): Required. The TargetProject name. """ - name = proto.Field(proto.STRING, number=1,) + name = proto.Field( + proto.STRING, + number=1, + ) class ListTargetProjectsRequest(proto.Message): @@ -1931,11 +2650,26 @@ class ListTargetProjectsRequest(proto.Message): Optional. the order by fields for the result. """ - parent = proto.Field(proto.STRING, number=1,) - page_size = proto.Field(proto.INT32, number=2,) - page_token = proto.Field(proto.STRING, number=3,) - filter = proto.Field(proto.STRING, number=4,) - order_by = proto.Field(proto.STRING, number=5,) + parent = proto.Field( + proto.STRING, + number=1, + ) + page_size = proto.Field( + proto.INT32, + number=2, + ) + page_token = proto.Field( + proto.STRING, + number=3, + ) + filter = proto.Field( + proto.STRING, + number=4, + ) + order_by = proto.Field( + proto.STRING, + number=5, + ) class ListTargetProjectsResponse(proto.Message): @@ -1958,10 +2692,18 @@ def raw_page(self): return self target_projects = proto.RepeatedField( - proto.MESSAGE, number=1, message="TargetProject", + proto.MESSAGE, + number=1, + message="TargetProject", + ) + next_page_token = proto.Field( + proto.STRING, + number=2, + ) + unreachable = proto.RepeatedField( + proto.STRING, + number=3, ) - next_page_token = proto.Field(proto.STRING, number=2,) - unreachable = proto.RepeatedField(proto.STRING, number=3,) class CreateTargetProjectRequest(proto.Message): @@ -1994,10 +2736,23 @@ class CreateTargetProjectRequest(proto.Message): (00000000-0000-0000-0000-000000000000). """ - parent = proto.Field(proto.STRING, number=1,) - target_project_id = proto.Field(proto.STRING, number=2,) - target_project = proto.Field(proto.MESSAGE, number=3, message="TargetProject",) - request_id = proto.Field(proto.STRING, number=4,) + parent = proto.Field( + proto.STRING, + number=1, + ) + target_project_id = proto.Field( + proto.STRING, + number=2, + ) + target_project = proto.Field( + proto.MESSAGE, + number=3, + message="TargetProject", + ) + request_id = proto.Field( + proto.STRING, + number=4, + ) class UpdateTargetProjectRequest(proto.Message): @@ -2034,10 +2789,19 @@ class UpdateTargetProjectRequest(proto.Message): """ update_mask = proto.Field( - proto.MESSAGE, number=1, message=field_mask_pb2.FieldMask, + proto.MESSAGE, + number=1, + message=field_mask_pb2.FieldMask, + ) + target_project = proto.Field( + proto.MESSAGE, + number=2, + message="TargetProject", + ) + request_id = proto.Field( + proto.STRING, + number=3, ) - target_project = proto.Field(proto.MESSAGE, number=2, message="TargetProject",) - request_id = proto.Field(proto.STRING, number=3,) class DeleteTargetProjectRequest(proto.Message): @@ -2066,8 +2830,14 @@ class DeleteTargetProjectRequest(proto.Message): (00000000-0000-0000-0000-000000000000). """ - name = proto.Field(proto.STRING, number=1,) - request_id = proto.Field(proto.STRING, number=2,) + name = proto.Field( + proto.STRING, + number=1, + ) + request_id = proto.Field( + proto.STRING, + number=2, + ) class Group(proto.Message): @@ -2088,11 +2858,28 @@ class Group(proto.Message): group which can be updated. """ - name = proto.Field(proto.STRING, number=1,) - create_time = proto.Field(proto.MESSAGE, number=2, message=timestamp_pb2.Timestamp,) - update_time = proto.Field(proto.MESSAGE, number=3, message=timestamp_pb2.Timestamp,) - description = proto.Field(proto.STRING, number=4,) - display_name = proto.Field(proto.STRING, number=5,) + name = proto.Field( + proto.STRING, + number=1, + ) + create_time = proto.Field( + proto.MESSAGE, + number=2, + message=timestamp_pb2.Timestamp, + ) + update_time = proto.Field( + proto.MESSAGE, + number=3, + message=timestamp_pb2.Timestamp, + ) + description = proto.Field( + proto.STRING, + number=4, + ) + display_name = proto.Field( + proto.STRING, + number=5, + ) class ListGroupsRequest(proto.Message): @@ -2122,11 +2909,26 @@ class ListGroupsRequest(proto.Message): Optional. the order by fields for the result. """ - parent = proto.Field(proto.STRING, number=1,) - page_size = proto.Field(proto.INT32, number=2,) - page_token = proto.Field(proto.STRING, number=3,) - filter = proto.Field(proto.STRING, number=4,) - order_by = proto.Field(proto.STRING, number=5,) + parent = proto.Field( + proto.STRING, + number=1, + ) + page_size = proto.Field( + proto.INT32, + number=2, + ) + page_token = proto.Field( + proto.STRING, + number=3, + ) + filter = proto.Field( + proto.STRING, + number=4, + ) + order_by = proto.Field( + proto.STRING, + number=5, + ) class ListGroupsResponse(proto.Message): @@ -2148,9 +2950,19 @@ class ListGroupsResponse(proto.Message): def raw_page(self): return self - groups = proto.RepeatedField(proto.MESSAGE, number=1, message="Group",) - next_page_token = proto.Field(proto.STRING, number=2,) - unreachable = proto.RepeatedField(proto.STRING, number=3,) + groups = proto.RepeatedField( + proto.MESSAGE, + number=1, + message="Group", + ) + next_page_token = proto.Field( + proto.STRING, + number=2, + ) + unreachable = proto.RepeatedField( + proto.STRING, + number=3, + ) class GetGroupRequest(proto.Message): @@ -2161,7 +2973,10 @@ class GetGroupRequest(proto.Message): Required. The group name. """ - name = proto.Field(proto.STRING, number=1,) + name = proto.Field( + proto.STRING, + number=1, + ) class CreateGroupRequest(proto.Message): @@ -2194,10 +3009,23 @@ class CreateGroupRequest(proto.Message): (00000000-0000-0000-0000-000000000000). """ - parent = proto.Field(proto.STRING, number=1,) - group_id = proto.Field(proto.STRING, number=2,) - group = proto.Field(proto.MESSAGE, number=3, message="Group",) - request_id = proto.Field(proto.STRING, number=4,) + parent = proto.Field( + proto.STRING, + number=1, + ) + group_id = proto.Field( + proto.STRING, + number=2, + ) + group = proto.Field( + proto.MESSAGE, + number=3, + message="Group", + ) + request_id = proto.Field( + proto.STRING, + number=4, + ) class UpdateGroupRequest(proto.Message): @@ -2234,10 +3062,19 @@ class UpdateGroupRequest(proto.Message): """ update_mask = proto.Field( - proto.MESSAGE, number=1, message=field_mask_pb2.FieldMask, + proto.MESSAGE, + number=1, + message=field_mask_pb2.FieldMask, + ) + group = proto.Field( + proto.MESSAGE, + number=2, + message="Group", + ) + request_id = proto.Field( + proto.STRING, + number=3, ) - group = proto.Field(proto.MESSAGE, number=2, message="Group",) - request_id = proto.Field(proto.STRING, number=3,) class DeleteGroupRequest(proto.Message): @@ -2266,8 +3103,14 @@ class DeleteGroupRequest(proto.Message): (00000000-0000-0000-0000-000000000000). """ - name = proto.Field(proto.STRING, number=1,) - request_id = proto.Field(proto.STRING, number=2,) + name = proto.Field( + proto.STRING, + number=1, + ) + request_id = proto.Field( + proto.STRING, + number=2, + ) class AddGroupMigrationRequest(proto.Message): @@ -2281,13 +3124,18 @@ class AddGroupMigrationRequest(proto.Message): The full path name of the MigratingVm to add. """ - group = proto.Field(proto.STRING, number=1,) - migrating_vm = proto.Field(proto.STRING, number=2,) + group = proto.Field( + proto.STRING, + number=1, + ) + migrating_vm = proto.Field( + proto.STRING, + number=2, + ) class AddGroupMigrationResponse(proto.Message): - r"""Response message for 'AddGroupMigration' request. - """ + r"""Response message for 'AddGroupMigration' request.""" class RemoveGroupMigrationRequest(proto.Message): @@ -2300,13 +3148,18 @@ class RemoveGroupMigrationRequest(proto.Message): The MigratingVm to remove. """ - group = proto.Field(proto.STRING, number=1,) - migrating_vm = proto.Field(proto.STRING, number=2,) + group = proto.Field( + proto.STRING, + number=1, + ) + migrating_vm = proto.Field( + proto.STRING, + number=2, + ) class RemoveGroupMigrationResponse(proto.Message): - r"""Response message for 'RemoveMigration' request. - """ + r"""Response message for 'RemoveMigration' request.""" class CreateCutoverJobRequest(proto.Message): @@ -2339,10 +3192,23 @@ class CreateCutoverJobRequest(proto.Message): (00000000-0000-0000-0000-000000000000). """ - parent = proto.Field(proto.STRING, number=1,) - cutover_job_id = proto.Field(proto.STRING, number=2,) - cutover_job = proto.Field(proto.MESSAGE, number=3, message="CutoverJob",) - request_id = proto.Field(proto.STRING, number=4,) + parent = proto.Field( + proto.STRING, + number=1, + ) + cutover_job_id = proto.Field( + proto.STRING, + number=2, + ) + cutover_job = proto.Field( + proto.MESSAGE, + number=3, + message="CutoverJob", + ) + request_id = proto.Field( + proto.STRING, + number=4, + ) class CancelCutoverJobRequest(proto.Message): @@ -2353,12 +3219,14 @@ class CancelCutoverJobRequest(proto.Message): Required. The cutover job id """ - name = proto.Field(proto.STRING, number=1,) + name = proto.Field( + proto.STRING, + number=1, + ) class CancelCutoverJobResponse(proto.Message): - r"""Response message for 'CancelCutoverJob' request. - """ + r"""Response message for 'CancelCutoverJob' request.""" class ListCutoverJobsRequest(proto.Message): @@ -2388,11 +3256,26 @@ class ListCutoverJobsRequest(proto.Message): Optional. the order by fields for the result. """ - parent = proto.Field(proto.STRING, number=1,) - page_size = proto.Field(proto.INT32, number=2,) - page_token = proto.Field(proto.STRING, number=3,) - filter = proto.Field(proto.STRING, number=4,) - order_by = proto.Field(proto.STRING, number=5,) + parent = proto.Field( + proto.STRING, + number=1, + ) + page_size = proto.Field( + proto.INT32, + number=2, + ) + page_token = proto.Field( + proto.STRING, + number=3, + ) + filter = proto.Field( + proto.STRING, + number=4, + ) + order_by = proto.Field( + proto.STRING, + number=5, + ) class ListCutoverJobsResponse(proto.Message): @@ -2415,9 +3298,19 @@ class ListCutoverJobsResponse(proto.Message): def raw_page(self): return self - cutover_jobs = proto.RepeatedField(proto.MESSAGE, number=1, message="CutoverJob",) - next_page_token = proto.Field(proto.STRING, number=2,) - unreachable = proto.RepeatedField(proto.STRING, number=3,) + cutover_jobs = proto.RepeatedField( + proto.MESSAGE, + number=1, + message="CutoverJob", + ) + next_page_token = proto.Field( + proto.STRING, + number=2, + ) + unreachable = proto.RepeatedField( + proto.STRING, + number=3, + ) class GetCutoverJobRequest(proto.Message): @@ -2428,7 +3321,10 @@ class GetCutoverJobRequest(proto.Message): Required. The name of the CutoverJob. """ - name = proto.Field(proto.STRING, number=1,) + name = proto.Field( + proto.STRING, + number=1, + ) class OperationMetadata(proto.Message): @@ -2461,13 +3357,36 @@ class OperationMetadata(proto.Message): operation. """ - create_time = proto.Field(proto.MESSAGE, number=1, message=timestamp_pb2.Timestamp,) - end_time = proto.Field(proto.MESSAGE, number=2, message=timestamp_pb2.Timestamp,) - target = proto.Field(proto.STRING, number=3,) - verb = proto.Field(proto.STRING, number=4,) - status_message = proto.Field(proto.STRING, number=5,) - requested_cancellation = proto.Field(proto.BOOL, number=6,) - api_version = proto.Field(proto.STRING, number=7,) + create_time = proto.Field( + proto.MESSAGE, + number=1, + message=timestamp_pb2.Timestamp, + ) + end_time = proto.Field( + proto.MESSAGE, + number=2, + message=timestamp_pb2.Timestamp, + ) + target = proto.Field( + proto.STRING, + number=3, + ) + verb = proto.Field( + proto.STRING, + number=4, + ) + status_message = proto.Field( + proto.STRING, + number=5, + ) + requested_cancellation = proto.Field( + proto.BOOL, + number=6, + ) + api_version = proto.Field( + proto.STRING, + number=7, + ) class MigrationError(proto.Message): @@ -2502,17 +3421,31 @@ class ErrorCode(proto.Enum): CUTOVER_ERROR = 7 UTILIZATION_REPORT_ERROR = 8 - code = proto.Field(proto.ENUM, number=1, enum=ErrorCode,) + code = proto.Field( + proto.ENUM, + number=1, + enum=ErrorCode, + ) error_message = proto.Field( - proto.MESSAGE, number=2, message=error_details_pb2.LocalizedMessage, + proto.MESSAGE, + number=2, + message=error_details_pb2.LocalizedMessage, ) action_item = proto.Field( - proto.MESSAGE, number=3, message=error_details_pb2.LocalizedMessage, + proto.MESSAGE, + number=3, + message=error_details_pb2.LocalizedMessage, ) help_links = proto.RepeatedField( - proto.MESSAGE, number=4, message=error_details_pb2.Help.Link, + proto.MESSAGE, + number=4, + message=error_details_pb2.Help.Link, + ) + error_time = proto.Field( + proto.MESSAGE, + number=5, + message=timestamp_pb2.Timestamp, ) - error_time = proto.Field(proto.MESSAGE, number=5, message=timestamp_pb2.Timestamp,) __all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/noxfile.py b/noxfile.py index 2a2001c..3addb4e 100644 --- a/noxfile.py +++ b/noxfile.py @@ -24,7 +24,7 @@ import nox -BLACK_VERSION = "black==19.10b0" +BLACK_VERSION = "black==22.3.0" BLACK_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"] DEFAULT_PYTHON_VERSION = "3.8" @@ -57,7 +57,9 @@ def lint(session): """ session.install("flake8", BLACK_VERSION) session.run( - "black", "--check", *BLACK_PATHS, + "black", + "--check", + *BLACK_PATHS, ) session.run("flake8", "google", "tests") @@ -67,7 +69,8 @@ def blacken(session): """Run black. Format code to uniform standard.""" session.install(BLACK_VERSION) session.run( - "black", *BLACK_PATHS, + "black", + *BLACK_PATHS, ) diff --git a/tests/unit/gapic/vmmigration_v1/test_vm_migration.py b/tests/unit/gapic/vmmigration_v1/test_vm_migration.py index e8f63c2..d2140b0 100644 --- a/tests/unit/gapic/vmmigration_v1/test_vm_migration.py +++ b/tests/unit/gapic/vmmigration_v1/test_vm_migration.py @@ -91,7 +91,13 @@ def test__get_default_mtls_endpoint(): assert VmMigrationClient._get_default_mtls_endpoint(non_googleapi) == non_googleapi -@pytest.mark.parametrize("client_class", [VmMigrationClient, VmMigrationAsyncClient,]) +@pytest.mark.parametrize( + "client_class", + [ + VmMigrationClient, + VmMigrationAsyncClient, + ], +) def test_vm_migration_client_from_service_account_info(client_class): creds = ga_credentials.AnonymousCredentials() with mock.patch.object( @@ -131,7 +137,13 @@ def test_vm_migration_client_service_account_always_use_jwt( use_jwt.assert_not_called() -@pytest.mark.parametrize("client_class", [VmMigrationClient, VmMigrationAsyncClient,]) +@pytest.mark.parametrize( + "client_class", + [ + VmMigrationClient, + VmMigrationAsyncClient, + ], +) def test_vm_migration_client_from_service_account_file(client_class): creds = ga_credentials.AnonymousCredentials() with mock.patch.object( @@ -486,7 +498,9 @@ def test_vm_migration_client_client_options_scopes( client_class, transport_class, transport_name ): # Check the case scopes are provided. - options = client_options.ClientOptions(scopes=["1", "2"],) + options = client_options.ClientOptions( + scopes=["1", "2"], + ) with mock.patch.object(transport_class, "__init__") as patched: patched.return_value = None client = client_class(client_options=options, transport=transport_name) @@ -614,10 +628,17 @@ def test_vm_migration_client_create_channel_credentials_file( ) -@pytest.mark.parametrize("request_type", [vmmigration.ListSourcesRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + vmmigration.ListSourcesRequest, + dict, + ], +) def test_list_sources(request_type, transport: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -628,7 +649,8 @@ def test_list_sources(request_type, transport: str = "grpc"): with mock.patch.object(type(client.transport.list_sources), "__call__") as call: # Designate an appropriate return value for the call. call.return_value = vmmigration.ListSourcesResponse( - next_page_token="next_page_token_value", unreachable=["unreachable_value"], + next_page_token="next_page_token_value", + unreachable=["unreachable_value"], ) response = client.list_sources(request) @@ -647,7 +669,8 @@ def test_list_sources_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -663,7 +686,8 @@ async def test_list_sources_async( transport: str = "grpc_asyncio", request_type=vmmigration.ListSourcesRequest ): client = VmMigrationAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -698,7 +722,9 @@ async def test_list_sources_async_from_dict(): def test_list_sources_field_headers(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -718,12 +744,17 @@ def test_list_sources_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] @pytest.mark.asyncio async def test_list_sources_field_headers_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -745,11 +776,16 @@ async def test_list_sources_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] def test_list_sources_flattened(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_sources), "__call__") as call: @@ -757,7 +793,9 @@ def test_list_sources_flattened(): call.return_value = vmmigration.ListSourcesResponse() # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - client.list_sources(parent="parent_value",) + client.list_sources( + parent="parent_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -769,19 +807,24 @@ def test_list_sources_flattened(): def test_list_sources_flattened_error(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): client.list_sources( - vmmigration.ListSourcesRequest(), parent="parent_value", + vmmigration.ListSourcesRequest(), + parent="parent_value", ) @pytest.mark.asyncio async def test_list_sources_flattened_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_sources), "__call__") as call: @@ -793,7 +836,9 @@ async def test_list_sources_flattened_async(): ) # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - response = await client.list_sources(parent="parent_value",) + response = await client.list_sources( + parent="parent_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -806,19 +851,23 @@ async def test_list_sources_flattened_async(): @pytest.mark.asyncio async def test_list_sources_flattened_error_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): await client.list_sources( - vmmigration.ListSourcesRequest(), parent="parent_value", + vmmigration.ListSourcesRequest(), + parent="parent_value", ) def test_list_sources_pager(transport_name: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials, transport=transport_name, + credentials=ga_credentials.AnonymousCredentials, + transport=transport_name, ) # Mock the actual call within the gRPC stub, and fake the request. @@ -833,12 +882,21 @@ def test_list_sources_pager(transport_name: str = "grpc"): ], next_page_token="abc", ), - vmmigration.ListSourcesResponse(sources=[], next_page_token="def",), vmmigration.ListSourcesResponse( - sources=[vmmigration.Source(),], next_page_token="ghi", + sources=[], + next_page_token="def", + ), + vmmigration.ListSourcesResponse( + sources=[ + vmmigration.Source(), + ], + next_page_token="ghi", ), vmmigration.ListSourcesResponse( - sources=[vmmigration.Source(), vmmigration.Source(),], + sources=[ + vmmigration.Source(), + vmmigration.Source(), + ], ), RuntimeError, ) @@ -858,7 +916,8 @@ def test_list_sources_pager(transport_name: str = "grpc"): def test_list_sources_pages(transport_name: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials, transport=transport_name, + credentials=ga_credentials.AnonymousCredentials, + transport=transport_name, ) # Mock the actual call within the gRPC stub, and fake the request. @@ -873,12 +932,21 @@ def test_list_sources_pages(transport_name: str = "grpc"): ], next_page_token="abc", ), - vmmigration.ListSourcesResponse(sources=[], next_page_token="def",), vmmigration.ListSourcesResponse( - sources=[vmmigration.Source(),], next_page_token="ghi", + sources=[], + next_page_token="def", + ), + vmmigration.ListSourcesResponse( + sources=[ + vmmigration.Source(), + ], + next_page_token="ghi", ), vmmigration.ListSourcesResponse( - sources=[vmmigration.Source(), vmmigration.Source(),], + sources=[ + vmmigration.Source(), + vmmigration.Source(), + ], ), RuntimeError, ) @@ -889,7 +957,9 @@ def test_list_sources_pages(transport_name: str = "grpc"): @pytest.mark.asyncio async def test_list_sources_async_pager(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials,) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials, + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -905,16 +975,27 @@ async def test_list_sources_async_pager(): ], next_page_token="abc", ), - vmmigration.ListSourcesResponse(sources=[], next_page_token="def",), vmmigration.ListSourcesResponse( - sources=[vmmigration.Source(),], next_page_token="ghi", + sources=[], + next_page_token="def", + ), + vmmigration.ListSourcesResponse( + sources=[ + vmmigration.Source(), + ], + next_page_token="ghi", ), vmmigration.ListSourcesResponse( - sources=[vmmigration.Source(), vmmigration.Source(),], + sources=[ + vmmigration.Source(), + vmmigration.Source(), + ], ), RuntimeError, ) - async_pager = await client.list_sources(request={},) + async_pager = await client.list_sources( + request={}, + ) assert async_pager.next_page_token == "abc" responses = [] async for response in async_pager: @@ -926,7 +1007,9 @@ async def test_list_sources_async_pager(): @pytest.mark.asyncio async def test_list_sources_async_pages(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials,) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials, + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -942,12 +1025,21 @@ async def test_list_sources_async_pages(): ], next_page_token="abc", ), - vmmigration.ListSourcesResponse(sources=[], next_page_token="def",), vmmigration.ListSourcesResponse( - sources=[vmmigration.Source(),], next_page_token="ghi", + sources=[], + next_page_token="def", + ), + vmmigration.ListSourcesResponse( + sources=[ + vmmigration.Source(), + ], + next_page_token="ghi", ), vmmigration.ListSourcesResponse( - sources=[vmmigration.Source(), vmmigration.Source(),], + sources=[ + vmmigration.Source(), + vmmigration.Source(), + ], ), RuntimeError, ) @@ -958,10 +1050,17 @@ async def test_list_sources_async_pages(): assert page_.raw_page.next_page_token == token -@pytest.mark.parametrize("request_type", [vmmigration.GetSourceRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + vmmigration.GetSourceRequest, + dict, + ], +) def test_get_source(request_type, transport: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -993,7 +1092,8 @@ def test_get_source_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -1009,7 +1109,8 @@ async def test_get_source_async( transport: str = "grpc_asyncio", request_type=vmmigration.GetSourceRequest ): client = VmMigrationAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -1020,7 +1121,10 @@ async def test_get_source_async( with mock.patch.object(type(client.transport.get_source), "__call__") as call: # Designate an appropriate return value for the call. call.return_value = grpc_helpers_async.FakeUnaryUnaryCall( - vmmigration.Source(name="name_value", description="description_value",) + vmmigration.Source( + name="name_value", + description="description_value", + ) ) response = await client.get_source(request) @@ -1041,7 +1145,9 @@ async def test_get_source_async_from_dict(): def test_get_source_field_headers(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -1061,12 +1167,17 @@ def test_get_source_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] @pytest.mark.asyncio async def test_get_source_field_headers_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -1086,11 +1197,16 @@ async def test_get_source_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] def test_get_source_flattened(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.get_source), "__call__") as call: @@ -1098,7 +1214,9 @@ def test_get_source_flattened(): call.return_value = vmmigration.Source() # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - client.get_source(name="name_value",) + client.get_source( + name="name_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -1110,19 +1228,24 @@ def test_get_source_flattened(): def test_get_source_flattened_error(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): client.get_source( - vmmigration.GetSourceRequest(), name="name_value", + vmmigration.GetSourceRequest(), + name="name_value", ) @pytest.mark.asyncio async def test_get_source_flattened_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.get_source), "__call__") as call: @@ -1132,7 +1255,9 @@ async def test_get_source_flattened_async(): call.return_value = grpc_helpers_async.FakeUnaryUnaryCall(vmmigration.Source()) # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - response = await client.get_source(name="name_value",) + response = await client.get_source( + name="name_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -1145,20 +1270,30 @@ async def test_get_source_flattened_async(): @pytest.mark.asyncio async def test_get_source_flattened_error_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): await client.get_source( - vmmigration.GetSourceRequest(), name="name_value", + vmmigration.GetSourceRequest(), + name="name_value", ) -@pytest.mark.parametrize("request_type", [vmmigration.CreateSourceRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + vmmigration.CreateSourceRequest, + dict, + ], +) def test_create_source(request_type, transport: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -1184,7 +1319,8 @@ def test_create_source_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -1200,7 +1336,8 @@ async def test_create_source_async( transport: str = "grpc_asyncio", request_type=vmmigration.CreateSourceRequest ): client = VmMigrationAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -1230,7 +1367,9 @@ async def test_create_source_async_from_dict(): def test_create_source_field_headers(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -1250,12 +1389,17 @@ def test_create_source_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] @pytest.mark.asyncio async def test_create_source_field_headers_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -1277,11 +1421,16 @@ async def test_create_source_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] def test_create_source_flattened(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.create_source), "__call__") as call: @@ -1315,7 +1464,9 @@ def test_create_source_flattened(): def test_create_source_flattened_error(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. @@ -1332,7 +1483,9 @@ def test_create_source_flattened_error(): @pytest.mark.asyncio async def test_create_source_flattened_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.create_source), "__call__") as call: @@ -1371,7 +1524,9 @@ async def test_create_source_flattened_async(): @pytest.mark.asyncio async def test_create_source_flattened_error_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. @@ -1386,10 +1541,17 @@ async def test_create_source_flattened_error_async(): ) -@pytest.mark.parametrize("request_type", [vmmigration.UpdateSourceRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + vmmigration.UpdateSourceRequest, + dict, + ], +) def test_update_source(request_type, transport: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -1415,7 +1577,8 @@ def test_update_source_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -1431,7 +1594,8 @@ async def test_update_source_async( transport: str = "grpc_asyncio", request_type=vmmigration.UpdateSourceRequest ): client = VmMigrationAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -1461,7 +1625,9 @@ async def test_update_source_async_from_dict(): def test_update_source_field_headers(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -1481,12 +1647,17 @@ def test_update_source_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "source.name=source.name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "source.name=source.name/value", + ) in kw["metadata"] @pytest.mark.asyncio async def test_update_source_field_headers_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -1508,11 +1679,16 @@ async def test_update_source_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "source.name=source.name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "source.name=source.name/value", + ) in kw["metadata"] def test_update_source_flattened(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.update_source), "__call__") as call: @@ -1542,7 +1718,9 @@ def test_update_source_flattened(): def test_update_source_flattened_error(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. @@ -1558,7 +1736,9 @@ def test_update_source_flattened_error(): @pytest.mark.asyncio async def test_update_source_flattened_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.update_source), "__call__") as call: @@ -1593,7 +1773,9 @@ async def test_update_source_flattened_async(): @pytest.mark.asyncio async def test_update_source_flattened_error_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. @@ -1607,10 +1789,17 @@ async def test_update_source_flattened_error_async(): ) -@pytest.mark.parametrize("request_type", [vmmigration.DeleteSourceRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + vmmigration.DeleteSourceRequest, + dict, + ], +) def test_delete_source(request_type, transport: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -1636,7 +1825,8 @@ def test_delete_source_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -1652,7 +1842,8 @@ async def test_delete_source_async( transport: str = "grpc_asyncio", request_type=vmmigration.DeleteSourceRequest ): client = VmMigrationAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -1682,7 +1873,9 @@ async def test_delete_source_async_from_dict(): def test_delete_source_field_headers(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -1702,12 +1895,17 @@ def test_delete_source_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] @pytest.mark.asyncio async def test_delete_source_field_headers_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -1729,11 +1927,16 @@ async def test_delete_source_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] def test_delete_source_flattened(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.delete_source), "__call__") as call: @@ -1741,7 +1944,9 @@ def test_delete_source_flattened(): call.return_value = operations_pb2.Operation(name="operations/op") # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - client.delete_source(name="name_value",) + client.delete_source( + name="name_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -1753,19 +1958,24 @@ def test_delete_source_flattened(): def test_delete_source_flattened_error(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): client.delete_source( - vmmigration.DeleteSourceRequest(), name="name_value", + vmmigration.DeleteSourceRequest(), + name="name_value", ) @pytest.mark.asyncio async def test_delete_source_flattened_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.delete_source), "__call__") as call: @@ -1777,7 +1987,9 @@ async def test_delete_source_flattened_async(): ) # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - response = await client.delete_source(name="name_value",) + response = await client.delete_source( + name="name_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -1790,20 +2002,30 @@ async def test_delete_source_flattened_async(): @pytest.mark.asyncio async def test_delete_source_flattened_error_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): await client.delete_source( - vmmigration.DeleteSourceRequest(), name="name_value", + vmmigration.DeleteSourceRequest(), + name="name_value", ) -@pytest.mark.parametrize("request_type", [vmmigration.FetchInventoryRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + vmmigration.FetchInventoryRequest, + dict, + ], +) def test_fetch_inventory(request_type, transport: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -1833,7 +2055,8 @@ def test_fetch_inventory_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -1849,7 +2072,8 @@ async def test_fetch_inventory_async( transport: str = "grpc_asyncio", request_type=vmmigration.FetchInventoryRequest ): client = VmMigrationAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -1879,7 +2103,9 @@ async def test_fetch_inventory_async_from_dict(): def test_fetch_inventory_field_headers(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -1899,12 +2125,17 @@ def test_fetch_inventory_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "source=source/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "source=source/value", + ) in kw["metadata"] @pytest.mark.asyncio async def test_fetch_inventory_field_headers_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -1926,11 +2157,16 @@ async def test_fetch_inventory_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "source=source/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "source=source/value", + ) in kw["metadata"] def test_fetch_inventory_flattened(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.fetch_inventory), "__call__") as call: @@ -1938,8 +2174,10 @@ def test_fetch_inventory_flattened(): call.return_value = vmmigration.FetchInventoryResponse() # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - client.fetch_inventory(source="source_value",) - + client.fetch_inventory( + source="source_value", + ) + # Establish that the underlying call was made with the expected # request object values. assert len(call.mock_calls) == 1 @@ -1950,19 +2188,24 @@ def test_fetch_inventory_flattened(): def test_fetch_inventory_flattened_error(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): client.fetch_inventory( - vmmigration.FetchInventoryRequest(), source="source_value", + vmmigration.FetchInventoryRequest(), + source="source_value", ) @pytest.mark.asyncio async def test_fetch_inventory_flattened_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.fetch_inventory), "__call__") as call: @@ -1974,7 +2217,9 @@ async def test_fetch_inventory_flattened_async(): ) # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - response = await client.fetch_inventory(source="source_value",) + response = await client.fetch_inventory( + source="source_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -1987,22 +2232,30 @@ async def test_fetch_inventory_flattened_async(): @pytest.mark.asyncio async def test_fetch_inventory_flattened_error_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): await client.fetch_inventory( - vmmigration.FetchInventoryRequest(), source="source_value", + vmmigration.FetchInventoryRequest(), + source="source_value", ) @pytest.mark.parametrize( - "request_type", [vmmigration.ListUtilizationReportsRequest, dict,] + "request_type", + [ + vmmigration.ListUtilizationReportsRequest, + dict, + ], ) def test_list_utilization_reports(request_type, transport: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -2015,7 +2268,8 @@ def test_list_utilization_reports(request_type, transport: str = "grpc"): ) as call: # Designate an appropriate return value for the call. call.return_value = vmmigration.ListUtilizationReportsResponse( - next_page_token="next_page_token_value", unreachable=["unreachable_value"], + next_page_token="next_page_token_value", + unreachable=["unreachable_value"], ) response = client.list_utilization_reports(request) @@ -2034,7 +2288,8 @@ def test_list_utilization_reports_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -2053,7 +2308,8 @@ async def test_list_utilization_reports_async( request_type=vmmigration.ListUtilizationReportsRequest, ): client = VmMigrationAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -2090,7 +2346,9 @@ async def test_list_utilization_reports_async_from_dict(): def test_list_utilization_reports_field_headers(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -2112,12 +2370,17 @@ def test_list_utilization_reports_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] @pytest.mark.asyncio async def test_list_utilization_reports_field_headers_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -2141,11 +2404,16 @@ async def test_list_utilization_reports_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] def test_list_utilization_reports_flattened(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2155,7 +2423,9 @@ def test_list_utilization_reports_flattened(): call.return_value = vmmigration.ListUtilizationReportsResponse() # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - client.list_utilization_reports(parent="parent_value",) + client.list_utilization_reports( + parent="parent_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -2167,19 +2437,24 @@ def test_list_utilization_reports_flattened(): def test_list_utilization_reports_flattened_error(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): client.list_utilization_reports( - vmmigration.ListUtilizationReportsRequest(), parent="parent_value", + vmmigration.ListUtilizationReportsRequest(), + parent="parent_value", ) @pytest.mark.asyncio async def test_list_utilization_reports_flattened_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2193,7 +2468,9 @@ async def test_list_utilization_reports_flattened_async(): ) # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - response = await client.list_utilization_reports(parent="parent_value",) + response = await client.list_utilization_reports( + parent="parent_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -2206,19 +2483,23 @@ async def test_list_utilization_reports_flattened_async(): @pytest.mark.asyncio async def test_list_utilization_reports_flattened_error_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): await client.list_utilization_reports( - vmmigration.ListUtilizationReportsRequest(), parent="parent_value", + vmmigration.ListUtilizationReportsRequest(), + parent="parent_value", ) def test_list_utilization_reports_pager(transport_name: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials, transport=transport_name, + credentials=ga_credentials.AnonymousCredentials, + transport=transport_name, ) # Mock the actual call within the gRPC stub, and fake the request. @@ -2236,10 +2517,13 @@ def test_list_utilization_reports_pager(transport_name: str = "grpc"): next_page_token="abc", ), vmmigration.ListUtilizationReportsResponse( - utilization_reports=[], next_page_token="def", + utilization_reports=[], + next_page_token="def", ), vmmigration.ListUtilizationReportsResponse( - utilization_reports=[vmmigration.UtilizationReport(),], + utilization_reports=[ + vmmigration.UtilizationReport(), + ], next_page_token="ghi", ), vmmigration.ListUtilizationReportsResponse( @@ -2266,7 +2550,8 @@ def test_list_utilization_reports_pager(transport_name: str = "grpc"): def test_list_utilization_reports_pages(transport_name: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials, transport=transport_name, + credentials=ga_credentials.AnonymousCredentials, + transport=transport_name, ) # Mock the actual call within the gRPC stub, and fake the request. @@ -2284,10 +2569,13 @@ def test_list_utilization_reports_pages(transport_name: str = "grpc"): next_page_token="abc", ), vmmigration.ListUtilizationReportsResponse( - utilization_reports=[], next_page_token="def", + utilization_reports=[], + next_page_token="def", ), vmmigration.ListUtilizationReportsResponse( - utilization_reports=[vmmigration.UtilizationReport(),], + utilization_reports=[ + vmmigration.UtilizationReport(), + ], next_page_token="ghi", ), vmmigration.ListUtilizationReportsResponse( @@ -2305,7 +2593,9 @@ def test_list_utilization_reports_pages(transport_name: str = "grpc"): @pytest.mark.asyncio async def test_list_utilization_reports_async_pager(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials,) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials, + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2324,10 +2614,13 @@ async def test_list_utilization_reports_async_pager(): next_page_token="abc", ), vmmigration.ListUtilizationReportsResponse( - utilization_reports=[], next_page_token="def", + utilization_reports=[], + next_page_token="def", ), vmmigration.ListUtilizationReportsResponse( - utilization_reports=[vmmigration.UtilizationReport(),], + utilization_reports=[ + vmmigration.UtilizationReport(), + ], next_page_token="ghi", ), vmmigration.ListUtilizationReportsResponse( @@ -2338,7 +2631,9 @@ async def test_list_utilization_reports_async_pager(): ), RuntimeError, ) - async_pager = await client.list_utilization_reports(request={},) + async_pager = await client.list_utilization_reports( + request={}, + ) assert async_pager.next_page_token == "abc" responses = [] async for response in async_pager: @@ -2350,7 +2645,9 @@ async def test_list_utilization_reports_async_pager(): @pytest.mark.asyncio async def test_list_utilization_reports_async_pages(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials,) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials, + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2369,10 +2666,13 @@ async def test_list_utilization_reports_async_pages(): next_page_token="abc", ), vmmigration.ListUtilizationReportsResponse( - utilization_reports=[], next_page_token="def", + utilization_reports=[], + next_page_token="def", ), vmmigration.ListUtilizationReportsResponse( - utilization_reports=[vmmigration.UtilizationReport(),], + utilization_reports=[ + vmmigration.UtilizationReport(), + ], next_page_token="ghi", ), vmmigration.ListUtilizationReportsResponse( @@ -2391,11 +2691,16 @@ async def test_list_utilization_reports_async_pages(): @pytest.mark.parametrize( - "request_type", [vmmigration.GetUtilizationReportRequest, dict,] + "request_type", + [ + vmmigration.GetUtilizationReportRequest, + dict, + ], ) def test_get_utilization_report(request_type, transport: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -2434,7 +2739,8 @@ def test_get_utilization_report_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -2453,7 +2759,8 @@ async def test_get_utilization_report_async( request_type=vmmigration.GetUtilizationReportRequest, ): client = VmMigrationAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -2496,7 +2803,9 @@ async def test_get_utilization_report_async_from_dict(): def test_get_utilization_report_field_headers(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -2518,12 +2827,17 @@ def test_get_utilization_report_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] @pytest.mark.asyncio async def test_get_utilization_report_field_headers_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -2547,11 +2861,16 @@ async def test_get_utilization_report_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] def test_get_utilization_report_flattened(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2561,7 +2880,9 @@ def test_get_utilization_report_flattened(): call.return_value = vmmigration.UtilizationReport() # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - client.get_utilization_report(name="name_value",) + client.get_utilization_report( + name="name_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -2573,19 +2894,24 @@ def test_get_utilization_report_flattened(): def test_get_utilization_report_flattened_error(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): client.get_utilization_report( - vmmigration.GetUtilizationReportRequest(), name="name_value", + vmmigration.GetUtilizationReportRequest(), + name="name_value", ) @pytest.mark.asyncio async def test_get_utilization_report_flattened_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2599,7 +2925,9 @@ async def test_get_utilization_report_flattened_async(): ) # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - response = await client.get_utilization_report(name="name_value",) + response = await client.get_utilization_report( + name="name_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -2612,22 +2940,30 @@ async def test_get_utilization_report_flattened_async(): @pytest.mark.asyncio async def test_get_utilization_report_flattened_error_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): await client.get_utilization_report( - vmmigration.GetUtilizationReportRequest(), name="name_value", + vmmigration.GetUtilizationReportRequest(), + name="name_value", ) @pytest.mark.parametrize( - "request_type", [vmmigration.CreateUtilizationReportRequest, dict,] + "request_type", + [ + vmmigration.CreateUtilizationReportRequest, + dict, + ], ) def test_create_utilization_report(request_type, transport: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -2655,7 +2991,8 @@ def test_create_utilization_report_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -2674,7 +3011,8 @@ async def test_create_utilization_report_async( request_type=vmmigration.CreateUtilizationReportRequest, ): client = VmMigrationAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -2706,7 +3044,9 @@ async def test_create_utilization_report_async_from_dict(): def test_create_utilization_report_field_headers(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -2728,12 +3068,17 @@ def test_create_utilization_report_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] @pytest.mark.asyncio async def test_create_utilization_report_field_headers_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -2757,11 +3102,16 @@ async def test_create_utilization_report_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] def test_create_utilization_report_flattened(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2793,7 +3143,9 @@ def test_create_utilization_report_flattened(): def test_create_utilization_report_flattened_error(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. @@ -2808,7 +3160,9 @@ def test_create_utilization_report_flattened_error(): @pytest.mark.asyncio async def test_create_utilization_report_flattened_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2845,7 +3199,9 @@ async def test_create_utilization_report_flattened_async(): @pytest.mark.asyncio async def test_create_utilization_report_flattened_error_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. @@ -2859,11 +3215,16 @@ async def test_create_utilization_report_flattened_error_async(): @pytest.mark.parametrize( - "request_type", [vmmigration.DeleteUtilizationReportRequest, dict,] + "request_type", + [ + vmmigration.DeleteUtilizationReportRequest, + dict, + ], ) def test_delete_utilization_report(request_type, transport: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -2891,7 +3252,8 @@ def test_delete_utilization_report_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -2910,7 +3272,8 @@ async def test_delete_utilization_report_async( request_type=vmmigration.DeleteUtilizationReportRequest, ): client = VmMigrationAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -2942,7 +3305,9 @@ async def test_delete_utilization_report_async_from_dict(): def test_delete_utilization_report_field_headers(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -2964,12 +3329,17 @@ def test_delete_utilization_report_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] @pytest.mark.asyncio async def test_delete_utilization_report_field_headers_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -2993,11 +3363,16 @@ async def test_delete_utilization_report_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] def test_delete_utilization_report_flattened(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3007,7 +3382,9 @@ def test_delete_utilization_report_flattened(): call.return_value = operations_pb2.Operation(name="operations/op") # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - client.delete_utilization_report(name="name_value",) + client.delete_utilization_report( + name="name_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -3019,19 +3396,24 @@ def test_delete_utilization_report_flattened(): def test_delete_utilization_report_flattened_error(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): client.delete_utilization_report( - vmmigration.DeleteUtilizationReportRequest(), name="name_value", + vmmigration.DeleteUtilizationReportRequest(), + name="name_value", ) @pytest.mark.asyncio async def test_delete_utilization_report_flattened_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3045,7 +3427,9 @@ async def test_delete_utilization_report_flattened_async(): ) # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - response = await client.delete_utilization_report(name="name_value",) + response = await client.delete_utilization_report( + name="name_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -3058,22 +3442,30 @@ async def test_delete_utilization_report_flattened_async(): @pytest.mark.asyncio async def test_delete_utilization_report_flattened_error_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): await client.delete_utilization_report( - vmmigration.DeleteUtilizationReportRequest(), name="name_value", + vmmigration.DeleteUtilizationReportRequest(), + name="name_value", ) @pytest.mark.parametrize( - "request_type", [vmmigration.ListDatacenterConnectorsRequest, dict,] + "request_type", + [ + vmmigration.ListDatacenterConnectorsRequest, + dict, + ], ) def test_list_datacenter_connectors(request_type, transport: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -3086,7 +3478,8 @@ def test_list_datacenter_connectors(request_type, transport: str = "grpc"): ) as call: # Designate an appropriate return value for the call. call.return_value = vmmigration.ListDatacenterConnectorsResponse( - next_page_token="next_page_token_value", unreachable=["unreachable_value"], + next_page_token="next_page_token_value", + unreachable=["unreachable_value"], ) response = client.list_datacenter_connectors(request) @@ -3105,7 +3498,8 @@ def test_list_datacenter_connectors_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -3124,7 +3518,8 @@ async def test_list_datacenter_connectors_async( request_type=vmmigration.ListDatacenterConnectorsRequest, ): client = VmMigrationAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -3161,7 +3556,9 @@ async def test_list_datacenter_connectors_async_from_dict(): def test_list_datacenter_connectors_field_headers(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -3183,12 +3580,17 @@ def test_list_datacenter_connectors_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] @pytest.mark.asyncio async def test_list_datacenter_connectors_field_headers_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -3212,11 +3614,16 @@ async def test_list_datacenter_connectors_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] def test_list_datacenter_connectors_flattened(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3226,7 +3633,9 @@ def test_list_datacenter_connectors_flattened(): call.return_value = vmmigration.ListDatacenterConnectorsResponse() # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - client.list_datacenter_connectors(parent="parent_value",) + client.list_datacenter_connectors( + parent="parent_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -3238,19 +3647,24 @@ def test_list_datacenter_connectors_flattened(): def test_list_datacenter_connectors_flattened_error(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): client.list_datacenter_connectors( - vmmigration.ListDatacenterConnectorsRequest(), parent="parent_value", + vmmigration.ListDatacenterConnectorsRequest(), + parent="parent_value", ) @pytest.mark.asyncio async def test_list_datacenter_connectors_flattened_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3264,7 +3678,9 @@ async def test_list_datacenter_connectors_flattened_async(): ) # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - response = await client.list_datacenter_connectors(parent="parent_value",) + response = await client.list_datacenter_connectors( + parent="parent_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -3277,19 +3693,23 @@ async def test_list_datacenter_connectors_flattened_async(): @pytest.mark.asyncio async def test_list_datacenter_connectors_flattened_error_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): await client.list_datacenter_connectors( - vmmigration.ListDatacenterConnectorsRequest(), parent="parent_value", + vmmigration.ListDatacenterConnectorsRequest(), + parent="parent_value", ) def test_list_datacenter_connectors_pager(transport_name: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials, transport=transport_name, + credentials=ga_credentials.AnonymousCredentials, + transport=transport_name, ) # Mock the actual call within the gRPC stub, and fake the request. @@ -3307,10 +3727,13 @@ def test_list_datacenter_connectors_pager(transport_name: str = "grpc"): next_page_token="abc", ), vmmigration.ListDatacenterConnectorsResponse( - datacenter_connectors=[], next_page_token="def", + datacenter_connectors=[], + next_page_token="def", ), vmmigration.ListDatacenterConnectorsResponse( - datacenter_connectors=[vmmigration.DatacenterConnector(),], + datacenter_connectors=[ + vmmigration.DatacenterConnector(), + ], next_page_token="ghi", ), vmmigration.ListDatacenterConnectorsResponse( @@ -3337,7 +3760,8 @@ def test_list_datacenter_connectors_pager(transport_name: str = "grpc"): def test_list_datacenter_connectors_pages(transport_name: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials, transport=transport_name, + credentials=ga_credentials.AnonymousCredentials, + transport=transport_name, ) # Mock the actual call within the gRPC stub, and fake the request. @@ -3355,10 +3779,13 @@ def test_list_datacenter_connectors_pages(transport_name: str = "grpc"): next_page_token="abc", ), vmmigration.ListDatacenterConnectorsResponse( - datacenter_connectors=[], next_page_token="def", + datacenter_connectors=[], + next_page_token="def", ), vmmigration.ListDatacenterConnectorsResponse( - datacenter_connectors=[vmmigration.DatacenterConnector(),], + datacenter_connectors=[ + vmmigration.DatacenterConnector(), + ], next_page_token="ghi", ), vmmigration.ListDatacenterConnectorsResponse( @@ -3376,7 +3803,9 @@ def test_list_datacenter_connectors_pages(transport_name: str = "grpc"): @pytest.mark.asyncio async def test_list_datacenter_connectors_async_pager(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials,) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials, + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3395,10 +3824,13 @@ async def test_list_datacenter_connectors_async_pager(): next_page_token="abc", ), vmmigration.ListDatacenterConnectorsResponse( - datacenter_connectors=[], next_page_token="def", + datacenter_connectors=[], + next_page_token="def", ), vmmigration.ListDatacenterConnectorsResponse( - datacenter_connectors=[vmmigration.DatacenterConnector(),], + datacenter_connectors=[ + vmmigration.DatacenterConnector(), + ], next_page_token="ghi", ), vmmigration.ListDatacenterConnectorsResponse( @@ -3409,7 +3841,9 @@ async def test_list_datacenter_connectors_async_pager(): ), RuntimeError, ) - async_pager = await client.list_datacenter_connectors(request={},) + async_pager = await client.list_datacenter_connectors( + request={}, + ) assert async_pager.next_page_token == "abc" responses = [] async for response in async_pager: @@ -3421,7 +3855,9 @@ async def test_list_datacenter_connectors_async_pager(): @pytest.mark.asyncio async def test_list_datacenter_connectors_async_pages(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials,) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials, + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3440,10 +3876,13 @@ async def test_list_datacenter_connectors_async_pages(): next_page_token="abc", ), vmmigration.ListDatacenterConnectorsResponse( - datacenter_connectors=[], next_page_token="def", + datacenter_connectors=[], + next_page_token="def", ), vmmigration.ListDatacenterConnectorsResponse( - datacenter_connectors=[vmmigration.DatacenterConnector(),], + datacenter_connectors=[ + vmmigration.DatacenterConnector(), + ], next_page_token="ghi", ), vmmigration.ListDatacenterConnectorsResponse( @@ -3462,11 +3901,16 @@ async def test_list_datacenter_connectors_async_pages(): @pytest.mark.parametrize( - "request_type", [vmmigration.GetDatacenterConnectorRequest, dict,] + "request_type", + [ + vmmigration.GetDatacenterConnectorRequest, + dict, + ], ) def test_get_datacenter_connector(request_type, transport: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -3507,7 +3951,8 @@ def test_get_datacenter_connector_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -3526,7 +3971,8 @@ async def test_get_datacenter_connector_async( request_type=vmmigration.GetDatacenterConnectorRequest, ): client = VmMigrationAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -3571,7 +4017,9 @@ async def test_get_datacenter_connector_async_from_dict(): def test_get_datacenter_connector_field_headers(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -3593,12 +4041,17 @@ def test_get_datacenter_connector_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] @pytest.mark.asyncio async def test_get_datacenter_connector_field_headers_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -3622,11 +4075,16 @@ async def test_get_datacenter_connector_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] def test_get_datacenter_connector_flattened(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3636,7 +4094,9 @@ def test_get_datacenter_connector_flattened(): call.return_value = vmmigration.DatacenterConnector() # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - client.get_datacenter_connector(name="name_value",) + client.get_datacenter_connector( + name="name_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -3648,19 +4108,24 @@ def test_get_datacenter_connector_flattened(): def test_get_datacenter_connector_flattened_error(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): client.get_datacenter_connector( - vmmigration.GetDatacenterConnectorRequest(), name="name_value", + vmmigration.GetDatacenterConnectorRequest(), + name="name_value", ) @pytest.mark.asyncio async def test_get_datacenter_connector_flattened_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3674,7 +4139,9 @@ async def test_get_datacenter_connector_flattened_async(): ) # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - response = await client.get_datacenter_connector(name="name_value",) + response = await client.get_datacenter_connector( + name="name_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -3687,22 +4154,30 @@ async def test_get_datacenter_connector_flattened_async(): @pytest.mark.asyncio async def test_get_datacenter_connector_flattened_error_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): await client.get_datacenter_connector( - vmmigration.GetDatacenterConnectorRequest(), name="name_value", + vmmigration.GetDatacenterConnectorRequest(), + name="name_value", ) @pytest.mark.parametrize( - "request_type", [vmmigration.CreateDatacenterConnectorRequest, dict,] + "request_type", + [ + vmmigration.CreateDatacenterConnectorRequest, + dict, + ], ) def test_create_datacenter_connector(request_type, transport: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -3730,7 +4205,8 @@ def test_create_datacenter_connector_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -3749,7 +4225,8 @@ async def test_create_datacenter_connector_async( request_type=vmmigration.CreateDatacenterConnectorRequest, ): client = VmMigrationAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -3781,7 +4258,9 @@ async def test_create_datacenter_connector_async_from_dict(): def test_create_datacenter_connector_field_headers(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -3803,12 +4282,17 @@ def test_create_datacenter_connector_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] @pytest.mark.asyncio async def test_create_datacenter_connector_field_headers_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -3832,11 +4316,16 @@ async def test_create_datacenter_connector_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] def test_create_datacenter_connector_flattened(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3872,7 +4361,9 @@ def test_create_datacenter_connector_flattened(): def test_create_datacenter_connector_flattened_error(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. @@ -3889,7 +4380,9 @@ def test_create_datacenter_connector_flattened_error(): @pytest.mark.asyncio async def test_create_datacenter_connector_flattened_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3930,7 +4423,9 @@ async def test_create_datacenter_connector_flattened_async(): @pytest.mark.asyncio async def test_create_datacenter_connector_flattened_error_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. @@ -3946,11 +4441,16 @@ async def test_create_datacenter_connector_flattened_error_async(): @pytest.mark.parametrize( - "request_type", [vmmigration.DeleteDatacenterConnectorRequest, dict,] + "request_type", + [ + vmmigration.DeleteDatacenterConnectorRequest, + dict, + ], ) def test_delete_datacenter_connector(request_type, transport: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -3978,7 +4478,8 @@ def test_delete_datacenter_connector_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -3997,7 +4498,8 @@ async def test_delete_datacenter_connector_async( request_type=vmmigration.DeleteDatacenterConnectorRequest, ): client = VmMigrationAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -4029,7 +4531,9 @@ async def test_delete_datacenter_connector_async_from_dict(): def test_delete_datacenter_connector_field_headers(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -4051,12 +4555,17 @@ def test_delete_datacenter_connector_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] @pytest.mark.asyncio async def test_delete_datacenter_connector_field_headers_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -4080,11 +4589,16 @@ async def test_delete_datacenter_connector_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] def test_delete_datacenter_connector_flattened(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -4094,7 +4608,9 @@ def test_delete_datacenter_connector_flattened(): call.return_value = operations_pb2.Operation(name="operations/op") # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - client.delete_datacenter_connector(name="name_value",) + client.delete_datacenter_connector( + name="name_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -4106,19 +4622,24 @@ def test_delete_datacenter_connector_flattened(): def test_delete_datacenter_connector_flattened_error(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): client.delete_datacenter_connector( - vmmigration.DeleteDatacenterConnectorRequest(), name="name_value", + vmmigration.DeleteDatacenterConnectorRequest(), + name="name_value", ) @pytest.mark.asyncio async def test_delete_datacenter_connector_flattened_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -4132,7 +4653,9 @@ async def test_delete_datacenter_connector_flattened_async(): ) # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - response = await client.delete_datacenter_connector(name="name_value",) + response = await client.delete_datacenter_connector( + name="name_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -4145,20 +4668,30 @@ async def test_delete_datacenter_connector_flattened_async(): @pytest.mark.asyncio async def test_delete_datacenter_connector_flattened_error_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): await client.delete_datacenter_connector( - vmmigration.DeleteDatacenterConnectorRequest(), name="name_value", + vmmigration.DeleteDatacenterConnectorRequest(), + name="name_value", ) -@pytest.mark.parametrize("request_type", [vmmigration.CreateMigratingVmRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + vmmigration.CreateMigratingVmRequest, + dict, + ], +) def test_create_migrating_vm(request_type, transport: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -4186,7 +4719,8 @@ def test_create_migrating_vm_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -4204,7 +4738,8 @@ async def test_create_migrating_vm_async( transport: str = "grpc_asyncio", request_type=vmmigration.CreateMigratingVmRequest ): client = VmMigrationAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -4236,7 +4771,9 @@ async def test_create_migrating_vm_async_from_dict(): def test_create_migrating_vm_field_headers(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -4258,12 +4795,17 @@ def test_create_migrating_vm_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] @pytest.mark.asyncio async def test_create_migrating_vm_field_headers_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -4287,11 +4829,16 @@ async def test_create_migrating_vm_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] def test_create_migrating_vm_flattened(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -4331,7 +4878,9 @@ def test_create_migrating_vm_flattened(): def test_create_migrating_vm_flattened_error(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. @@ -4350,7 +4899,9 @@ def test_create_migrating_vm_flattened_error(): @pytest.mark.asyncio async def test_create_migrating_vm_flattened_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -4395,7 +4946,9 @@ async def test_create_migrating_vm_flattened_async(): @pytest.mark.asyncio async def test_create_migrating_vm_flattened_error_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. @@ -4412,10 +4965,17 @@ async def test_create_migrating_vm_flattened_error_async(): ) -@pytest.mark.parametrize("request_type", [vmmigration.ListMigratingVmsRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + vmmigration.ListMigratingVmsRequest, + dict, + ], +) def test_list_migrating_vms(request_type, transport: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -4428,7 +4988,8 @@ def test_list_migrating_vms(request_type, transport: str = "grpc"): ) as call: # Designate an appropriate return value for the call. call.return_value = vmmigration.ListMigratingVmsResponse( - next_page_token="next_page_token_value", unreachable=["unreachable_value"], + next_page_token="next_page_token_value", + unreachable=["unreachable_value"], ) response = client.list_migrating_vms(request) @@ -4447,7 +5008,8 @@ def test_list_migrating_vms_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -4465,7 +5027,8 @@ async def test_list_migrating_vms_async( transport: str = "grpc_asyncio", request_type=vmmigration.ListMigratingVmsRequest ): client = VmMigrationAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -4502,7 +5065,9 @@ async def test_list_migrating_vms_async_from_dict(): def test_list_migrating_vms_field_headers(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -4524,12 +5089,17 @@ def test_list_migrating_vms_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] @pytest.mark.asyncio async def test_list_migrating_vms_field_headers_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -4553,11 +5123,16 @@ async def test_list_migrating_vms_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] def test_list_migrating_vms_flattened(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -4567,7 +5142,9 @@ def test_list_migrating_vms_flattened(): call.return_value = vmmigration.ListMigratingVmsResponse() # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - client.list_migrating_vms(parent="parent_value",) + client.list_migrating_vms( + parent="parent_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -4579,19 +5156,24 @@ def test_list_migrating_vms_flattened(): def test_list_migrating_vms_flattened_error(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): client.list_migrating_vms( - vmmigration.ListMigratingVmsRequest(), parent="parent_value", + vmmigration.ListMigratingVmsRequest(), + parent="parent_value", ) @pytest.mark.asyncio async def test_list_migrating_vms_flattened_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -4605,7 +5187,9 @@ async def test_list_migrating_vms_flattened_async(): ) # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - response = await client.list_migrating_vms(parent="parent_value",) + response = await client.list_migrating_vms( + parent="parent_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -4618,19 +5202,23 @@ async def test_list_migrating_vms_flattened_async(): @pytest.mark.asyncio async def test_list_migrating_vms_flattened_error_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): await client.list_migrating_vms( - vmmigration.ListMigratingVmsRequest(), parent="parent_value", + vmmigration.ListMigratingVmsRequest(), + parent="parent_value", ) def test_list_migrating_vms_pager(transport_name: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials, transport=transport_name, + credentials=ga_credentials.AnonymousCredentials, + transport=transport_name, ) # Mock the actual call within the gRPC stub, and fake the request. @@ -4648,13 +5236,20 @@ def test_list_migrating_vms_pager(transport_name: str = "grpc"): next_page_token="abc", ), vmmigration.ListMigratingVmsResponse( - migrating_vms=[], next_page_token="def", + migrating_vms=[], + next_page_token="def", ), vmmigration.ListMigratingVmsResponse( - migrating_vms=[vmmigration.MigratingVm(),], next_page_token="ghi", + migrating_vms=[ + vmmigration.MigratingVm(), + ], + next_page_token="ghi", ), vmmigration.ListMigratingVmsResponse( - migrating_vms=[vmmigration.MigratingVm(), vmmigration.MigratingVm(),], + migrating_vms=[ + vmmigration.MigratingVm(), + vmmigration.MigratingVm(), + ], ), RuntimeError, ) @@ -4674,7 +5269,8 @@ def test_list_migrating_vms_pager(transport_name: str = "grpc"): def test_list_migrating_vms_pages(transport_name: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials, transport=transport_name, + credentials=ga_credentials.AnonymousCredentials, + transport=transport_name, ) # Mock the actual call within the gRPC stub, and fake the request. @@ -4692,13 +5288,20 @@ def test_list_migrating_vms_pages(transport_name: str = "grpc"): next_page_token="abc", ), vmmigration.ListMigratingVmsResponse( - migrating_vms=[], next_page_token="def", + migrating_vms=[], + next_page_token="def", ), vmmigration.ListMigratingVmsResponse( - migrating_vms=[vmmigration.MigratingVm(),], next_page_token="ghi", + migrating_vms=[ + vmmigration.MigratingVm(), + ], + next_page_token="ghi", ), vmmigration.ListMigratingVmsResponse( - migrating_vms=[vmmigration.MigratingVm(), vmmigration.MigratingVm(),], + migrating_vms=[ + vmmigration.MigratingVm(), + vmmigration.MigratingVm(), + ], ), RuntimeError, ) @@ -4709,7 +5312,9 @@ def test_list_migrating_vms_pages(transport_name: str = "grpc"): @pytest.mark.asyncio async def test_list_migrating_vms_async_pager(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials,) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials, + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -4728,17 +5333,26 @@ async def test_list_migrating_vms_async_pager(): next_page_token="abc", ), vmmigration.ListMigratingVmsResponse( - migrating_vms=[], next_page_token="def", + migrating_vms=[], + next_page_token="def", ), vmmigration.ListMigratingVmsResponse( - migrating_vms=[vmmigration.MigratingVm(),], next_page_token="ghi", + migrating_vms=[ + vmmigration.MigratingVm(), + ], + next_page_token="ghi", ), vmmigration.ListMigratingVmsResponse( - migrating_vms=[vmmigration.MigratingVm(), vmmigration.MigratingVm(),], + migrating_vms=[ + vmmigration.MigratingVm(), + vmmigration.MigratingVm(), + ], ), RuntimeError, ) - async_pager = await client.list_migrating_vms(request={},) + async_pager = await client.list_migrating_vms( + request={}, + ) assert async_pager.next_page_token == "abc" responses = [] async for response in async_pager: @@ -4750,7 +5364,9 @@ async def test_list_migrating_vms_async_pager(): @pytest.mark.asyncio async def test_list_migrating_vms_async_pages(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials,) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials, + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -4769,13 +5385,20 @@ async def test_list_migrating_vms_async_pages(): next_page_token="abc", ), vmmigration.ListMigratingVmsResponse( - migrating_vms=[], next_page_token="def", + migrating_vms=[], + next_page_token="def", ), vmmigration.ListMigratingVmsResponse( - migrating_vms=[vmmigration.MigratingVm(),], next_page_token="ghi", + migrating_vms=[ + vmmigration.MigratingVm(), + ], + next_page_token="ghi", ), vmmigration.ListMigratingVmsResponse( - migrating_vms=[vmmigration.MigratingVm(), vmmigration.MigratingVm(),], + migrating_vms=[ + vmmigration.MigratingVm(), + vmmigration.MigratingVm(), + ], ), RuntimeError, ) @@ -4786,10 +5409,17 @@ async def test_list_migrating_vms_async_pages(): assert page_.raw_page.next_page_token == token -@pytest.mark.parametrize("request_type", [vmmigration.GetMigratingVmRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + vmmigration.GetMigratingVmRequest, + dict, + ], +) def test_get_migrating_vm(request_type, transport: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -4831,7 +5461,8 @@ def test_get_migrating_vm_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -4847,7 +5478,8 @@ async def test_get_migrating_vm_async( transport: str = "grpc_asyncio", request_type=vmmigration.GetMigratingVmRequest ): client = VmMigrationAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -4890,7 +5522,9 @@ async def test_get_migrating_vm_async_from_dict(): def test_get_migrating_vm_field_headers(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -4910,12 +5544,17 @@ def test_get_migrating_vm_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] @pytest.mark.asyncio async def test_get_migrating_vm_field_headers_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -4937,11 +5576,16 @@ async def test_get_migrating_vm_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] def test_get_migrating_vm_flattened(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.get_migrating_vm), "__call__") as call: @@ -4949,7 +5593,9 @@ def test_get_migrating_vm_flattened(): call.return_value = vmmigration.MigratingVm() # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - client.get_migrating_vm(name="name_value",) + client.get_migrating_vm( + name="name_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -4961,19 +5607,24 @@ def test_get_migrating_vm_flattened(): def test_get_migrating_vm_flattened_error(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): client.get_migrating_vm( - vmmigration.GetMigratingVmRequest(), name="name_value", + vmmigration.GetMigratingVmRequest(), + name="name_value", ) @pytest.mark.asyncio async def test_get_migrating_vm_flattened_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.get_migrating_vm), "__call__") as call: @@ -4985,7 +5636,9 @@ async def test_get_migrating_vm_flattened_async(): ) # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - response = await client.get_migrating_vm(name="name_value",) + response = await client.get_migrating_vm( + name="name_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -4998,20 +5651,30 @@ async def test_get_migrating_vm_flattened_async(): @pytest.mark.asyncio async def test_get_migrating_vm_flattened_error_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): await client.get_migrating_vm( - vmmigration.GetMigratingVmRequest(), name="name_value", + vmmigration.GetMigratingVmRequest(), + name="name_value", ) -@pytest.mark.parametrize("request_type", [vmmigration.UpdateMigratingVmRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + vmmigration.UpdateMigratingVmRequest, + dict, + ], +) def test_update_migrating_vm(request_type, transport: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -5039,7 +5702,8 @@ def test_update_migrating_vm_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -5057,7 +5721,8 @@ async def test_update_migrating_vm_async( transport: str = "grpc_asyncio", request_type=vmmigration.UpdateMigratingVmRequest ): client = VmMigrationAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -5089,7 +5754,9 @@ async def test_update_migrating_vm_async_from_dict(): def test_update_migrating_vm_field_headers(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -5119,7 +5786,9 @@ def test_update_migrating_vm_field_headers(): @pytest.mark.asyncio async def test_update_migrating_vm_field_headers_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -5150,7 +5819,9 @@ async def test_update_migrating_vm_field_headers_async(): def test_update_migrating_vm_flattened(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -5186,7 +5857,9 @@ def test_update_migrating_vm_flattened(): def test_update_migrating_vm_flattened_error(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. @@ -5204,7 +5877,9 @@ def test_update_migrating_vm_flattened_error(): @pytest.mark.asyncio async def test_update_migrating_vm_flattened_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -5245,7 +5920,9 @@ async def test_update_migrating_vm_flattened_async(): @pytest.mark.asyncio async def test_update_migrating_vm_flattened_error_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. @@ -5261,10 +5938,17 @@ async def test_update_migrating_vm_flattened_error_async(): ) -@pytest.mark.parametrize("request_type", [vmmigration.DeleteMigratingVmRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + vmmigration.DeleteMigratingVmRequest, + dict, + ], +) def test_delete_migrating_vm(request_type, transport: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -5292,7 +5976,8 @@ def test_delete_migrating_vm_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -5310,7 +5995,8 @@ async def test_delete_migrating_vm_async( transport: str = "grpc_asyncio", request_type=vmmigration.DeleteMigratingVmRequest ): client = VmMigrationAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -5342,7 +6028,9 @@ async def test_delete_migrating_vm_async_from_dict(): def test_delete_migrating_vm_field_headers(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -5364,12 +6052,17 @@ def test_delete_migrating_vm_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] @pytest.mark.asyncio async def test_delete_migrating_vm_field_headers_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -5393,11 +6086,16 @@ async def test_delete_migrating_vm_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] def test_delete_migrating_vm_flattened(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -5407,7 +6105,9 @@ def test_delete_migrating_vm_flattened(): call.return_value = operations_pb2.Operation(name="operations/op") # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - client.delete_migrating_vm(name="name_value",) + client.delete_migrating_vm( + name="name_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -5419,19 +6119,24 @@ def test_delete_migrating_vm_flattened(): def test_delete_migrating_vm_flattened_error(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): client.delete_migrating_vm( - vmmigration.DeleteMigratingVmRequest(), name="name_value", + vmmigration.DeleteMigratingVmRequest(), + name="name_value", ) @pytest.mark.asyncio async def test_delete_migrating_vm_flattened_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -5445,7 +6150,9 @@ async def test_delete_migrating_vm_flattened_async(): ) # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - response = await client.delete_migrating_vm(name="name_value",) + response = await client.delete_migrating_vm( + name="name_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -5458,20 +6165,30 @@ async def test_delete_migrating_vm_flattened_async(): @pytest.mark.asyncio async def test_delete_migrating_vm_flattened_error_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): await client.delete_migrating_vm( - vmmigration.DeleteMigratingVmRequest(), name="name_value", + vmmigration.DeleteMigratingVmRequest(), + name="name_value", ) -@pytest.mark.parametrize("request_type", [vmmigration.StartMigrationRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + vmmigration.StartMigrationRequest, + dict, + ], +) def test_start_migration(request_type, transport: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -5497,7 +6214,8 @@ def test_start_migration_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -5513,7 +6231,8 @@ async def test_start_migration_async( transport: str = "grpc_asyncio", request_type=vmmigration.StartMigrationRequest ): client = VmMigrationAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -5543,7 +6262,9 @@ async def test_start_migration_async_from_dict(): def test_start_migration_field_headers(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -5563,14 +6284,17 @@ def test_start_migration_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "migrating_vm=migrating_vm/value",) in kw[ - "metadata" - ] + assert ( + "x-goog-request-params", + "migrating_vm=migrating_vm/value", + ) in kw["metadata"] @pytest.mark.asyncio async def test_start_migration_field_headers_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -5592,13 +6316,16 @@ async def test_start_migration_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "migrating_vm=migrating_vm/value",) in kw[ - "metadata" - ] + assert ( + "x-goog-request-params", + "migrating_vm=migrating_vm/value", + ) in kw["metadata"] def test_start_migration_flattened(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.start_migration), "__call__") as call: @@ -5606,7 +6333,9 @@ def test_start_migration_flattened(): call.return_value = operations_pb2.Operation(name="operations/op") # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - client.start_migration(migrating_vm="migrating_vm_value",) + client.start_migration( + migrating_vm="migrating_vm_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -5618,19 +6347,24 @@ def test_start_migration_flattened(): def test_start_migration_flattened_error(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): client.start_migration( - vmmigration.StartMigrationRequest(), migrating_vm="migrating_vm_value", + vmmigration.StartMigrationRequest(), + migrating_vm="migrating_vm_value", ) @pytest.mark.asyncio async def test_start_migration_flattened_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.start_migration), "__call__") as call: @@ -5642,7 +6376,9 @@ async def test_start_migration_flattened_async(): ) # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - response = await client.start_migration(migrating_vm="migrating_vm_value",) + response = await client.start_migration( + migrating_vm="migrating_vm_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -5655,20 +6391,30 @@ async def test_start_migration_flattened_async(): @pytest.mark.asyncio async def test_start_migration_flattened_error_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): await client.start_migration( - vmmigration.StartMigrationRequest(), migrating_vm="migrating_vm_value", + vmmigration.StartMigrationRequest(), + migrating_vm="migrating_vm_value", ) -@pytest.mark.parametrize("request_type", [vmmigration.ResumeMigrationRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + vmmigration.ResumeMigrationRequest, + dict, + ], +) def test_resume_migration(request_type, transport: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -5694,7 +6440,8 @@ def test_resume_migration_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -5710,7 +6457,8 @@ async def test_resume_migration_async( transport: str = "grpc_asyncio", request_type=vmmigration.ResumeMigrationRequest ): client = VmMigrationAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -5740,7 +6488,9 @@ async def test_resume_migration_async_from_dict(): def test_resume_migration_field_headers(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -5760,14 +6510,17 @@ def test_resume_migration_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "migrating_vm=migrating_vm/value",) in kw[ - "metadata" - ] + assert ( + "x-goog-request-params", + "migrating_vm=migrating_vm/value", + ) in kw["metadata"] @pytest.mark.asyncio async def test_resume_migration_field_headers_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -5789,15 +6542,23 @@ async def test_resume_migration_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "migrating_vm=migrating_vm/value",) in kw[ - "metadata" - ] + assert ( + "x-goog-request-params", + "migrating_vm=migrating_vm/value", + ) in kw["metadata"] -@pytest.mark.parametrize("request_type", [vmmigration.PauseMigrationRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + vmmigration.PauseMigrationRequest, + dict, + ], +) def test_pause_migration(request_type, transport: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -5823,7 +6584,8 @@ def test_pause_migration_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -5839,7 +6601,8 @@ async def test_pause_migration_async( transport: str = "grpc_asyncio", request_type=vmmigration.PauseMigrationRequest ): client = VmMigrationAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -5869,7 +6632,9 @@ async def test_pause_migration_async_from_dict(): def test_pause_migration_field_headers(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -5889,14 +6654,17 @@ def test_pause_migration_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "migrating_vm=migrating_vm/value",) in kw[ - "metadata" - ] + assert ( + "x-goog-request-params", + "migrating_vm=migrating_vm/value", + ) in kw["metadata"] @pytest.mark.asyncio async def test_pause_migration_field_headers_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -5918,15 +6686,23 @@ async def test_pause_migration_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "migrating_vm=migrating_vm/value",) in kw[ - "metadata" - ] + assert ( + "x-goog-request-params", + "migrating_vm=migrating_vm/value", + ) in kw["metadata"] -@pytest.mark.parametrize("request_type", [vmmigration.FinalizeMigrationRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + vmmigration.FinalizeMigrationRequest, + dict, + ], +) def test_finalize_migration(request_type, transport: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -5954,7 +6730,8 @@ def test_finalize_migration_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -5972,7 +6749,8 @@ async def test_finalize_migration_async( transport: str = "grpc_asyncio", request_type=vmmigration.FinalizeMigrationRequest ): client = VmMigrationAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -6004,7 +6782,9 @@ async def test_finalize_migration_async_from_dict(): def test_finalize_migration_field_headers(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -6026,14 +6806,17 @@ def test_finalize_migration_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "migrating_vm=migrating_vm/value",) in kw[ - "metadata" - ] + assert ( + "x-goog-request-params", + "migrating_vm=migrating_vm/value", + ) in kw["metadata"] @pytest.mark.asyncio async def test_finalize_migration_field_headers_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -6057,13 +6840,16 @@ async def test_finalize_migration_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "migrating_vm=migrating_vm/value",) in kw[ - "metadata" - ] + assert ( + "x-goog-request-params", + "migrating_vm=migrating_vm/value", + ) in kw["metadata"] def test_finalize_migration_flattened(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -6073,7 +6859,9 @@ def test_finalize_migration_flattened(): call.return_value = operations_pb2.Operation(name="operations/op") # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - client.finalize_migration(migrating_vm="migrating_vm_value",) + client.finalize_migration( + migrating_vm="migrating_vm_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -6085,19 +6873,24 @@ def test_finalize_migration_flattened(): def test_finalize_migration_flattened_error(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): client.finalize_migration( - vmmigration.FinalizeMigrationRequest(), migrating_vm="migrating_vm_value", + vmmigration.FinalizeMigrationRequest(), + migrating_vm="migrating_vm_value", ) @pytest.mark.asyncio async def test_finalize_migration_flattened_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -6111,7 +6904,9 @@ async def test_finalize_migration_flattened_async(): ) # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - response = await client.finalize_migration(migrating_vm="migrating_vm_value",) + response = await client.finalize_migration( + migrating_vm="migrating_vm_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -6124,20 +6919,30 @@ async def test_finalize_migration_flattened_async(): @pytest.mark.asyncio async def test_finalize_migration_flattened_error_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): await client.finalize_migration( - vmmigration.FinalizeMigrationRequest(), migrating_vm="migrating_vm_value", + vmmigration.FinalizeMigrationRequest(), + migrating_vm="migrating_vm_value", ) -@pytest.mark.parametrize("request_type", [vmmigration.CreateCloneJobRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + vmmigration.CreateCloneJobRequest, + dict, + ], +) def test_create_clone_job(request_type, transport: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -6163,7 +6968,8 @@ def test_create_clone_job_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -6179,7 +6985,8 @@ async def test_create_clone_job_async( transport: str = "grpc_asyncio", request_type=vmmigration.CreateCloneJobRequest ): client = VmMigrationAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -6209,7 +7016,9 @@ async def test_create_clone_job_async_from_dict(): def test_create_clone_job_field_headers(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -6229,12 +7038,17 @@ def test_create_clone_job_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] @pytest.mark.asyncio async def test_create_clone_job_field_headers_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -6256,11 +7070,16 @@ async def test_create_clone_job_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] def test_create_clone_job_flattened(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.create_clone_job), "__call__") as call: @@ -6298,7 +7117,9 @@ def test_create_clone_job_flattened(): def test_create_clone_job_flattened_error(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. @@ -6317,7 +7138,9 @@ def test_create_clone_job_flattened_error(): @pytest.mark.asyncio async def test_create_clone_job_flattened_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.create_clone_job), "__call__") as call: @@ -6360,7 +7183,9 @@ async def test_create_clone_job_flattened_async(): @pytest.mark.asyncio async def test_create_clone_job_flattened_error_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. @@ -6377,10 +7202,17 @@ async def test_create_clone_job_flattened_error_async(): ) -@pytest.mark.parametrize("request_type", [vmmigration.CancelCloneJobRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + vmmigration.CancelCloneJobRequest, + dict, + ], +) def test_cancel_clone_job(request_type, transport: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -6406,7 +7238,8 @@ def test_cancel_clone_job_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -6422,7 +7255,8 @@ async def test_cancel_clone_job_async( transport: str = "grpc_asyncio", request_type=vmmigration.CancelCloneJobRequest ): client = VmMigrationAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -6452,7 +7286,9 @@ async def test_cancel_clone_job_async_from_dict(): def test_cancel_clone_job_field_headers(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -6472,12 +7308,17 @@ def test_cancel_clone_job_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] @pytest.mark.asyncio async def test_cancel_clone_job_field_headers_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -6499,11 +7340,16 @@ async def test_cancel_clone_job_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] def test_cancel_clone_job_flattened(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.cancel_clone_job), "__call__") as call: @@ -6511,7 +7357,9 @@ def test_cancel_clone_job_flattened(): call.return_value = operations_pb2.Operation(name="operations/op") # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - client.cancel_clone_job(name="name_value",) + client.cancel_clone_job( + name="name_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -6523,19 +7371,24 @@ def test_cancel_clone_job_flattened(): def test_cancel_clone_job_flattened_error(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): client.cancel_clone_job( - vmmigration.CancelCloneJobRequest(), name="name_value", + vmmigration.CancelCloneJobRequest(), + name="name_value", ) @pytest.mark.asyncio async def test_cancel_clone_job_flattened_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.cancel_clone_job), "__call__") as call: @@ -6547,7 +7400,9 @@ async def test_cancel_clone_job_flattened_async(): ) # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - response = await client.cancel_clone_job(name="name_value",) + response = await client.cancel_clone_job( + name="name_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -6560,20 +7415,30 @@ async def test_cancel_clone_job_flattened_async(): @pytest.mark.asyncio async def test_cancel_clone_job_flattened_error_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): await client.cancel_clone_job( - vmmigration.CancelCloneJobRequest(), name="name_value", + vmmigration.CancelCloneJobRequest(), + name="name_value", ) -@pytest.mark.parametrize("request_type", [vmmigration.ListCloneJobsRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + vmmigration.ListCloneJobsRequest, + dict, + ], +) def test_list_clone_jobs(request_type, transport: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -6584,7 +7449,8 @@ def test_list_clone_jobs(request_type, transport: str = "grpc"): with mock.patch.object(type(client.transport.list_clone_jobs), "__call__") as call: # Designate an appropriate return value for the call. call.return_value = vmmigration.ListCloneJobsResponse( - next_page_token="next_page_token_value", unreachable=["unreachable_value"], + next_page_token="next_page_token_value", + unreachable=["unreachable_value"], ) response = client.list_clone_jobs(request) @@ -6603,7 +7469,8 @@ def test_list_clone_jobs_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -6619,7 +7486,8 @@ async def test_list_clone_jobs_async( transport: str = "grpc_asyncio", request_type=vmmigration.ListCloneJobsRequest ): client = VmMigrationAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -6654,7 +7522,9 @@ async def test_list_clone_jobs_async_from_dict(): def test_list_clone_jobs_field_headers(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -6674,12 +7544,17 @@ def test_list_clone_jobs_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] @pytest.mark.asyncio async def test_list_clone_jobs_field_headers_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -6701,11 +7576,16 @@ async def test_list_clone_jobs_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] def test_list_clone_jobs_flattened(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_clone_jobs), "__call__") as call: @@ -6713,7 +7593,9 @@ def test_list_clone_jobs_flattened(): call.return_value = vmmigration.ListCloneJobsResponse() # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - client.list_clone_jobs(parent="parent_value",) + client.list_clone_jobs( + parent="parent_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -6725,19 +7607,24 @@ def test_list_clone_jobs_flattened(): def test_list_clone_jobs_flattened_error(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): client.list_clone_jobs( - vmmigration.ListCloneJobsRequest(), parent="parent_value", + vmmigration.ListCloneJobsRequest(), + parent="parent_value", ) @pytest.mark.asyncio async def test_list_clone_jobs_flattened_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_clone_jobs), "__call__") as call: @@ -6749,7 +7636,9 @@ async def test_list_clone_jobs_flattened_async(): ) # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - response = await client.list_clone_jobs(parent="parent_value",) + response = await client.list_clone_jobs( + parent="parent_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -6762,19 +7651,23 @@ async def test_list_clone_jobs_flattened_async(): @pytest.mark.asyncio async def test_list_clone_jobs_flattened_error_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): await client.list_clone_jobs( - vmmigration.ListCloneJobsRequest(), parent="parent_value", + vmmigration.ListCloneJobsRequest(), + parent="parent_value", ) def test_list_clone_jobs_pager(transport_name: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials, transport=transport_name, + credentials=ga_credentials.AnonymousCredentials, + transport=transport_name, ) # Mock the actual call within the gRPC stub, and fake the request. @@ -6789,12 +7682,21 @@ def test_list_clone_jobs_pager(transport_name: str = "grpc"): ], next_page_token="abc", ), - vmmigration.ListCloneJobsResponse(clone_jobs=[], next_page_token="def",), vmmigration.ListCloneJobsResponse( - clone_jobs=[vmmigration.CloneJob(),], next_page_token="ghi", + clone_jobs=[], + next_page_token="def", ), vmmigration.ListCloneJobsResponse( - clone_jobs=[vmmigration.CloneJob(), vmmigration.CloneJob(),], + clone_jobs=[ + vmmigration.CloneJob(), + ], + next_page_token="ghi", + ), + vmmigration.ListCloneJobsResponse( + clone_jobs=[ + vmmigration.CloneJob(), + vmmigration.CloneJob(), + ], ), RuntimeError, ) @@ -6814,7 +7716,8 @@ def test_list_clone_jobs_pager(transport_name: str = "grpc"): def test_list_clone_jobs_pages(transport_name: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials, transport=transport_name, + credentials=ga_credentials.AnonymousCredentials, + transport=transport_name, ) # Mock the actual call within the gRPC stub, and fake the request. @@ -6829,12 +7732,21 @@ def test_list_clone_jobs_pages(transport_name: str = "grpc"): ], next_page_token="abc", ), - vmmigration.ListCloneJobsResponse(clone_jobs=[], next_page_token="def",), vmmigration.ListCloneJobsResponse( - clone_jobs=[vmmigration.CloneJob(),], next_page_token="ghi", + clone_jobs=[], + next_page_token="def", + ), + vmmigration.ListCloneJobsResponse( + clone_jobs=[ + vmmigration.CloneJob(), + ], + next_page_token="ghi", ), vmmigration.ListCloneJobsResponse( - clone_jobs=[vmmigration.CloneJob(), vmmigration.CloneJob(),], + clone_jobs=[ + vmmigration.CloneJob(), + vmmigration.CloneJob(), + ], ), RuntimeError, ) @@ -6845,7 +7757,9 @@ def test_list_clone_jobs_pages(transport_name: str = "grpc"): @pytest.mark.asyncio async def test_list_clone_jobs_async_pager(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials,) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials, + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -6861,16 +7775,27 @@ async def test_list_clone_jobs_async_pager(): ], next_page_token="abc", ), - vmmigration.ListCloneJobsResponse(clone_jobs=[], next_page_token="def",), vmmigration.ListCloneJobsResponse( - clone_jobs=[vmmigration.CloneJob(),], next_page_token="ghi", + clone_jobs=[], + next_page_token="def", + ), + vmmigration.ListCloneJobsResponse( + clone_jobs=[ + vmmigration.CloneJob(), + ], + next_page_token="ghi", ), vmmigration.ListCloneJobsResponse( - clone_jobs=[vmmigration.CloneJob(), vmmigration.CloneJob(),], + clone_jobs=[ + vmmigration.CloneJob(), + vmmigration.CloneJob(), + ], ), RuntimeError, ) - async_pager = await client.list_clone_jobs(request={},) + async_pager = await client.list_clone_jobs( + request={}, + ) assert async_pager.next_page_token == "abc" responses = [] async for response in async_pager: @@ -6882,7 +7807,9 @@ async def test_list_clone_jobs_async_pager(): @pytest.mark.asyncio async def test_list_clone_jobs_async_pages(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials,) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials, + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -6898,12 +7825,21 @@ async def test_list_clone_jobs_async_pages(): ], next_page_token="abc", ), - vmmigration.ListCloneJobsResponse(clone_jobs=[], next_page_token="def",), vmmigration.ListCloneJobsResponse( - clone_jobs=[vmmigration.CloneJob(),], next_page_token="ghi", + clone_jobs=[], + next_page_token="def", + ), + vmmigration.ListCloneJobsResponse( + clone_jobs=[ + vmmigration.CloneJob(), + ], + next_page_token="ghi", ), vmmigration.ListCloneJobsResponse( - clone_jobs=[vmmigration.CloneJob(), vmmigration.CloneJob(),], + clone_jobs=[ + vmmigration.CloneJob(), + vmmigration.CloneJob(), + ], ), RuntimeError, ) @@ -6914,10 +7850,17 @@ async def test_list_clone_jobs_async_pages(): assert page_.raw_page.next_page_token == token -@pytest.mark.parametrize("request_type", [vmmigration.GetCloneJobRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + vmmigration.GetCloneJobRequest, + dict, + ], +) def test_get_clone_job(request_type, transport: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -6951,7 +7894,8 @@ def test_get_clone_job_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -6967,7 +7911,8 @@ async def test_get_clone_job_async( transport: str = "grpc_asyncio", request_type=vmmigration.GetCloneJobRequest ): client = VmMigrationAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -6979,7 +7924,8 @@ async def test_get_clone_job_async( # Designate an appropriate return value for the call. call.return_value = grpc_helpers_async.FakeUnaryUnaryCall( vmmigration.CloneJob( - name="name_value", state=vmmigration.CloneJob.State.PENDING, + name="name_value", + state=vmmigration.CloneJob.State.PENDING, ) ) response = await client.get_clone_job(request) @@ -7001,7 +7947,9 @@ async def test_get_clone_job_async_from_dict(): def test_get_clone_job_field_headers(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -7021,12 +7969,17 @@ def test_get_clone_job_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] @pytest.mark.asyncio async def test_get_clone_job_field_headers_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -7048,11 +8001,16 @@ async def test_get_clone_job_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] def test_get_clone_job_flattened(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.get_clone_job), "__call__") as call: @@ -7060,7 +8018,9 @@ def test_get_clone_job_flattened(): call.return_value = vmmigration.CloneJob() # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - client.get_clone_job(name="name_value",) + client.get_clone_job( + name="name_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -7072,19 +8032,24 @@ def test_get_clone_job_flattened(): def test_get_clone_job_flattened_error(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): client.get_clone_job( - vmmigration.GetCloneJobRequest(), name="name_value", + vmmigration.GetCloneJobRequest(), + name="name_value", ) @pytest.mark.asyncio async def test_get_clone_job_flattened_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.get_clone_job), "__call__") as call: @@ -7096,7 +8061,9 @@ async def test_get_clone_job_flattened_async(): ) # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - response = await client.get_clone_job(name="name_value",) + response = await client.get_clone_job( + name="name_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -7109,20 +8076,30 @@ async def test_get_clone_job_flattened_async(): @pytest.mark.asyncio async def test_get_clone_job_flattened_error_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): await client.get_clone_job( - vmmigration.GetCloneJobRequest(), name="name_value", + vmmigration.GetCloneJobRequest(), + name="name_value", ) -@pytest.mark.parametrize("request_type", [vmmigration.CreateCutoverJobRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + vmmigration.CreateCutoverJobRequest, + dict, + ], +) def test_create_cutover_job(request_type, transport: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -7150,7 +8127,8 @@ def test_create_cutover_job_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -7168,7 +8146,8 @@ async def test_create_cutover_job_async( transport: str = "grpc_asyncio", request_type=vmmigration.CreateCutoverJobRequest ): client = VmMigrationAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -7200,7 +8179,9 @@ async def test_create_cutover_job_async_from_dict(): def test_create_cutover_job_field_headers(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -7222,12 +8203,17 @@ def test_create_cutover_job_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] @pytest.mark.asyncio async def test_create_cutover_job_field_headers_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -7251,11 +8237,16 @@ async def test_create_cutover_job_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] def test_create_cutover_job_flattened(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -7295,7 +8286,9 @@ def test_create_cutover_job_flattened(): def test_create_cutover_job_flattened_error(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. @@ -7314,7 +8307,9 @@ def test_create_cutover_job_flattened_error(): @pytest.mark.asyncio async def test_create_cutover_job_flattened_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -7359,7 +8354,9 @@ async def test_create_cutover_job_flattened_async(): @pytest.mark.asyncio async def test_create_cutover_job_flattened_error_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. @@ -7376,10 +8373,17 @@ async def test_create_cutover_job_flattened_error_async(): ) -@pytest.mark.parametrize("request_type", [vmmigration.CancelCutoverJobRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + vmmigration.CancelCutoverJobRequest, + dict, + ], +) def test_cancel_cutover_job(request_type, transport: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -7407,7 +8411,8 @@ def test_cancel_cutover_job_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -7425,7 +8430,8 @@ async def test_cancel_cutover_job_async( transport: str = "grpc_asyncio", request_type=vmmigration.CancelCutoverJobRequest ): client = VmMigrationAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -7457,7 +8463,9 @@ async def test_cancel_cutover_job_async_from_dict(): def test_cancel_cutover_job_field_headers(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -7479,12 +8487,17 @@ def test_cancel_cutover_job_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] @pytest.mark.asyncio async def test_cancel_cutover_job_field_headers_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -7508,11 +8521,16 @@ async def test_cancel_cutover_job_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] def test_cancel_cutover_job_flattened(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -7522,7 +8540,9 @@ def test_cancel_cutover_job_flattened(): call.return_value = operations_pb2.Operation(name="operations/op") # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - client.cancel_cutover_job(name="name_value",) + client.cancel_cutover_job( + name="name_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -7534,19 +8554,24 @@ def test_cancel_cutover_job_flattened(): def test_cancel_cutover_job_flattened_error(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): client.cancel_cutover_job( - vmmigration.CancelCutoverJobRequest(), name="name_value", + vmmigration.CancelCutoverJobRequest(), + name="name_value", ) @pytest.mark.asyncio async def test_cancel_cutover_job_flattened_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -7560,7 +8585,9 @@ async def test_cancel_cutover_job_flattened_async(): ) # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - response = await client.cancel_cutover_job(name="name_value",) + response = await client.cancel_cutover_job( + name="name_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -7573,20 +8600,30 @@ async def test_cancel_cutover_job_flattened_async(): @pytest.mark.asyncio async def test_cancel_cutover_job_flattened_error_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): await client.cancel_cutover_job( - vmmigration.CancelCutoverJobRequest(), name="name_value", + vmmigration.CancelCutoverJobRequest(), + name="name_value", ) -@pytest.mark.parametrize("request_type", [vmmigration.ListCutoverJobsRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + vmmigration.ListCutoverJobsRequest, + dict, + ], +) def test_list_cutover_jobs(request_type, transport: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -7599,7 +8636,8 @@ def test_list_cutover_jobs(request_type, transport: str = "grpc"): ) as call: # Designate an appropriate return value for the call. call.return_value = vmmigration.ListCutoverJobsResponse( - next_page_token="next_page_token_value", unreachable=["unreachable_value"], + next_page_token="next_page_token_value", + unreachable=["unreachable_value"], ) response = client.list_cutover_jobs(request) @@ -7618,7 +8656,8 @@ def test_list_cutover_jobs_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -7636,7 +8675,8 @@ async def test_list_cutover_jobs_async( transport: str = "grpc_asyncio", request_type=vmmigration.ListCutoverJobsRequest ): client = VmMigrationAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -7673,7 +8713,9 @@ async def test_list_cutover_jobs_async_from_dict(): def test_list_cutover_jobs_field_headers(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -7695,12 +8737,17 @@ def test_list_cutover_jobs_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] @pytest.mark.asyncio async def test_list_cutover_jobs_field_headers_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -7724,11 +8771,16 @@ async def test_list_cutover_jobs_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] def test_list_cutover_jobs_flattened(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -7738,7 +8790,9 @@ def test_list_cutover_jobs_flattened(): call.return_value = vmmigration.ListCutoverJobsResponse() # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - client.list_cutover_jobs(parent="parent_value",) + client.list_cutover_jobs( + parent="parent_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -7750,19 +8804,24 @@ def test_list_cutover_jobs_flattened(): def test_list_cutover_jobs_flattened_error(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): client.list_cutover_jobs( - vmmigration.ListCutoverJobsRequest(), parent="parent_value", + vmmigration.ListCutoverJobsRequest(), + parent="parent_value", ) @pytest.mark.asyncio async def test_list_cutover_jobs_flattened_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -7776,7 +8835,9 @@ async def test_list_cutover_jobs_flattened_async(): ) # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - response = await client.list_cutover_jobs(parent="parent_value",) + response = await client.list_cutover_jobs( + parent="parent_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -7789,19 +8850,23 @@ async def test_list_cutover_jobs_flattened_async(): @pytest.mark.asyncio async def test_list_cutover_jobs_flattened_error_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): await client.list_cutover_jobs( - vmmigration.ListCutoverJobsRequest(), parent="parent_value", + vmmigration.ListCutoverJobsRequest(), + parent="parent_value", ) def test_list_cutover_jobs_pager(transport_name: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials, transport=transport_name, + credentials=ga_credentials.AnonymousCredentials, + transport=transport_name, ) # Mock the actual call within the gRPC stub, and fake the request. @@ -7819,13 +8884,20 @@ def test_list_cutover_jobs_pager(transport_name: str = "grpc"): next_page_token="abc", ), vmmigration.ListCutoverJobsResponse( - cutover_jobs=[], next_page_token="def", + cutover_jobs=[], + next_page_token="def", ), vmmigration.ListCutoverJobsResponse( - cutover_jobs=[vmmigration.CutoverJob(),], next_page_token="ghi", + cutover_jobs=[ + vmmigration.CutoverJob(), + ], + next_page_token="ghi", ), vmmigration.ListCutoverJobsResponse( - cutover_jobs=[vmmigration.CutoverJob(), vmmigration.CutoverJob(),], + cutover_jobs=[ + vmmigration.CutoverJob(), + vmmigration.CutoverJob(), + ], ), RuntimeError, ) @@ -7845,7 +8917,8 @@ def test_list_cutover_jobs_pager(transport_name: str = "grpc"): def test_list_cutover_jobs_pages(transport_name: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials, transport=transport_name, + credentials=ga_credentials.AnonymousCredentials, + transport=transport_name, ) # Mock the actual call within the gRPC stub, and fake the request. @@ -7863,13 +8936,20 @@ def test_list_cutover_jobs_pages(transport_name: str = "grpc"): next_page_token="abc", ), vmmigration.ListCutoverJobsResponse( - cutover_jobs=[], next_page_token="def", + cutover_jobs=[], + next_page_token="def", ), vmmigration.ListCutoverJobsResponse( - cutover_jobs=[vmmigration.CutoverJob(),], next_page_token="ghi", + cutover_jobs=[ + vmmigration.CutoverJob(), + ], + next_page_token="ghi", ), vmmigration.ListCutoverJobsResponse( - cutover_jobs=[vmmigration.CutoverJob(), vmmigration.CutoverJob(),], + cutover_jobs=[ + vmmigration.CutoverJob(), + vmmigration.CutoverJob(), + ], ), RuntimeError, ) @@ -7880,7 +8960,9 @@ def test_list_cutover_jobs_pages(transport_name: str = "grpc"): @pytest.mark.asyncio async def test_list_cutover_jobs_async_pager(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials,) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials, + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -7899,17 +8981,26 @@ async def test_list_cutover_jobs_async_pager(): next_page_token="abc", ), vmmigration.ListCutoverJobsResponse( - cutover_jobs=[], next_page_token="def", + cutover_jobs=[], + next_page_token="def", ), vmmigration.ListCutoverJobsResponse( - cutover_jobs=[vmmigration.CutoverJob(),], next_page_token="ghi", + cutover_jobs=[ + vmmigration.CutoverJob(), + ], + next_page_token="ghi", ), vmmigration.ListCutoverJobsResponse( - cutover_jobs=[vmmigration.CutoverJob(), vmmigration.CutoverJob(),], + cutover_jobs=[ + vmmigration.CutoverJob(), + vmmigration.CutoverJob(), + ], ), RuntimeError, ) - async_pager = await client.list_cutover_jobs(request={},) + async_pager = await client.list_cutover_jobs( + request={}, + ) assert async_pager.next_page_token == "abc" responses = [] async for response in async_pager: @@ -7921,7 +9012,9 @@ async def test_list_cutover_jobs_async_pager(): @pytest.mark.asyncio async def test_list_cutover_jobs_async_pages(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials,) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials, + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -7940,13 +9033,20 @@ async def test_list_cutover_jobs_async_pages(): next_page_token="abc", ), vmmigration.ListCutoverJobsResponse( - cutover_jobs=[], next_page_token="def", + cutover_jobs=[], + next_page_token="def", ), vmmigration.ListCutoverJobsResponse( - cutover_jobs=[vmmigration.CutoverJob(),], next_page_token="ghi", + cutover_jobs=[ + vmmigration.CutoverJob(), + ], + next_page_token="ghi", ), vmmigration.ListCutoverJobsResponse( - cutover_jobs=[vmmigration.CutoverJob(), vmmigration.CutoverJob(),], + cutover_jobs=[ + vmmigration.CutoverJob(), + vmmigration.CutoverJob(), + ], ), RuntimeError, ) @@ -7957,10 +9057,17 @@ async def test_list_cutover_jobs_async_pages(): assert page_.raw_page.next_page_token == token -@pytest.mark.parametrize("request_type", [vmmigration.GetCutoverJobRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + vmmigration.GetCutoverJobRequest, + dict, + ], +) def test_get_cutover_job(request_type, transport: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -7998,7 +9105,8 @@ def test_get_cutover_job_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -8014,7 +9122,8 @@ async def test_get_cutover_job_async( transport: str = "grpc_asyncio", request_type=vmmigration.GetCutoverJobRequest ): client = VmMigrationAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -8053,7 +9162,9 @@ async def test_get_cutover_job_async_from_dict(): def test_get_cutover_job_field_headers(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -8073,12 +9184,17 @@ def test_get_cutover_job_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] @pytest.mark.asyncio async def test_get_cutover_job_field_headers_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -8100,11 +9216,16 @@ async def test_get_cutover_job_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] def test_get_cutover_job_flattened(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.get_cutover_job), "__call__") as call: @@ -8112,7 +9233,9 @@ def test_get_cutover_job_flattened(): call.return_value = vmmigration.CutoverJob() # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - client.get_cutover_job(name="name_value",) + client.get_cutover_job( + name="name_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -8124,19 +9247,24 @@ def test_get_cutover_job_flattened(): def test_get_cutover_job_flattened_error(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): client.get_cutover_job( - vmmigration.GetCutoverJobRequest(), name="name_value", + vmmigration.GetCutoverJobRequest(), + name="name_value", ) @pytest.mark.asyncio async def test_get_cutover_job_flattened_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.get_cutover_job), "__call__") as call: @@ -8148,7 +9276,9 @@ async def test_get_cutover_job_flattened_async(): ) # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - response = await client.get_cutover_job(name="name_value",) + response = await client.get_cutover_job( + name="name_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -8161,20 +9291,30 @@ async def test_get_cutover_job_flattened_async(): @pytest.mark.asyncio async def test_get_cutover_job_flattened_error_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): await client.get_cutover_job( - vmmigration.GetCutoverJobRequest(), name="name_value", + vmmigration.GetCutoverJobRequest(), + name="name_value", ) -@pytest.mark.parametrize("request_type", [vmmigration.ListGroupsRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + vmmigration.ListGroupsRequest, + dict, + ], +) def test_list_groups(request_type, transport: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -8185,7 +9325,8 @@ def test_list_groups(request_type, transport: str = "grpc"): with mock.patch.object(type(client.transport.list_groups), "__call__") as call: # Designate an appropriate return value for the call. call.return_value = vmmigration.ListGroupsResponse( - next_page_token="next_page_token_value", unreachable=["unreachable_value"], + next_page_token="next_page_token_value", + unreachable=["unreachable_value"], ) response = client.list_groups(request) @@ -8204,7 +9345,8 @@ def test_list_groups_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -8220,7 +9362,8 @@ async def test_list_groups_async( transport: str = "grpc_asyncio", request_type=vmmigration.ListGroupsRequest ): client = VmMigrationAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -8255,7 +9398,9 @@ async def test_list_groups_async_from_dict(): def test_list_groups_field_headers(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -8275,12 +9420,17 @@ def test_list_groups_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] @pytest.mark.asyncio async def test_list_groups_field_headers_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -8302,11 +9452,16 @@ async def test_list_groups_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] def test_list_groups_flattened(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_groups), "__call__") as call: @@ -8314,7 +9469,9 @@ def test_list_groups_flattened(): call.return_value = vmmigration.ListGroupsResponse() # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - client.list_groups(parent="parent_value",) + client.list_groups( + parent="parent_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -8326,19 +9483,24 @@ def test_list_groups_flattened(): def test_list_groups_flattened_error(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): client.list_groups( - vmmigration.ListGroupsRequest(), parent="parent_value", + vmmigration.ListGroupsRequest(), + parent="parent_value", ) @pytest.mark.asyncio async def test_list_groups_flattened_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_groups), "__call__") as call: @@ -8350,7 +9512,9 @@ async def test_list_groups_flattened_async(): ) # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - response = await client.list_groups(parent="parent_value",) + response = await client.list_groups( + parent="parent_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -8363,19 +9527,23 @@ async def test_list_groups_flattened_async(): @pytest.mark.asyncio async def test_list_groups_flattened_error_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): await client.list_groups( - vmmigration.ListGroupsRequest(), parent="parent_value", + vmmigration.ListGroupsRequest(), + parent="parent_value", ) def test_list_groups_pager(transport_name: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials, transport=transport_name, + credentials=ga_credentials.AnonymousCredentials, + transport=transport_name, ) # Mock the actual call within the gRPC stub, and fake the request. @@ -8383,15 +9551,28 @@ def test_list_groups_pager(transport_name: str = "grpc"): # Set the response to a series of pages. call.side_effect = ( vmmigration.ListGroupsResponse( - groups=[vmmigration.Group(), vmmigration.Group(), vmmigration.Group(),], + groups=[ + vmmigration.Group(), + vmmigration.Group(), + vmmigration.Group(), + ], next_page_token="abc", ), - vmmigration.ListGroupsResponse(groups=[], next_page_token="def",), vmmigration.ListGroupsResponse( - groups=[vmmigration.Group(),], next_page_token="ghi", + groups=[], + next_page_token="def", + ), + vmmigration.ListGroupsResponse( + groups=[ + vmmigration.Group(), + ], + next_page_token="ghi", ), vmmigration.ListGroupsResponse( - groups=[vmmigration.Group(), vmmigration.Group(),], + groups=[ + vmmigration.Group(), + vmmigration.Group(), + ], ), RuntimeError, ) @@ -8411,7 +9592,8 @@ def test_list_groups_pager(transport_name: str = "grpc"): def test_list_groups_pages(transport_name: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials, transport=transport_name, + credentials=ga_credentials.AnonymousCredentials, + transport=transport_name, ) # Mock the actual call within the gRPC stub, and fake the request. @@ -8419,15 +9601,28 @@ def test_list_groups_pages(transport_name: str = "grpc"): # Set the response to a series of pages. call.side_effect = ( vmmigration.ListGroupsResponse( - groups=[vmmigration.Group(), vmmigration.Group(), vmmigration.Group(),], + groups=[ + vmmigration.Group(), + vmmigration.Group(), + vmmigration.Group(), + ], next_page_token="abc", ), - vmmigration.ListGroupsResponse(groups=[], next_page_token="def",), vmmigration.ListGroupsResponse( - groups=[vmmigration.Group(),], next_page_token="ghi", + groups=[], + next_page_token="def", ), vmmigration.ListGroupsResponse( - groups=[vmmigration.Group(), vmmigration.Group(),], + groups=[ + vmmigration.Group(), + ], + next_page_token="ghi", + ), + vmmigration.ListGroupsResponse( + groups=[ + vmmigration.Group(), + vmmigration.Group(), + ], ), RuntimeError, ) @@ -8438,7 +9633,9 @@ def test_list_groups_pages(transport_name: str = "grpc"): @pytest.mark.asyncio async def test_list_groups_async_pager(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials,) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials, + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -8447,19 +9644,34 @@ async def test_list_groups_async_pager(): # Set the response to a series of pages. call.side_effect = ( vmmigration.ListGroupsResponse( - groups=[vmmigration.Group(), vmmigration.Group(), vmmigration.Group(),], + groups=[ + vmmigration.Group(), + vmmigration.Group(), + vmmigration.Group(), + ], next_page_token="abc", ), - vmmigration.ListGroupsResponse(groups=[], next_page_token="def",), vmmigration.ListGroupsResponse( - groups=[vmmigration.Group(),], next_page_token="ghi", + groups=[], + next_page_token="def", ), vmmigration.ListGroupsResponse( - groups=[vmmigration.Group(), vmmigration.Group(),], + groups=[ + vmmigration.Group(), + ], + next_page_token="ghi", + ), + vmmigration.ListGroupsResponse( + groups=[ + vmmigration.Group(), + vmmigration.Group(), + ], ), RuntimeError, ) - async_pager = await client.list_groups(request={},) + async_pager = await client.list_groups( + request={}, + ) assert async_pager.next_page_token == "abc" responses = [] async for response in async_pager: @@ -8471,7 +9683,9 @@ async def test_list_groups_async_pager(): @pytest.mark.asyncio async def test_list_groups_async_pages(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials,) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials, + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -8480,15 +9694,28 @@ async def test_list_groups_async_pages(): # Set the response to a series of pages. call.side_effect = ( vmmigration.ListGroupsResponse( - groups=[vmmigration.Group(), vmmigration.Group(), vmmigration.Group(),], + groups=[ + vmmigration.Group(), + vmmigration.Group(), + vmmigration.Group(), + ], next_page_token="abc", ), - vmmigration.ListGroupsResponse(groups=[], next_page_token="def",), vmmigration.ListGroupsResponse( - groups=[vmmigration.Group(),], next_page_token="ghi", + groups=[], + next_page_token="def", + ), + vmmigration.ListGroupsResponse( + groups=[ + vmmigration.Group(), + ], + next_page_token="ghi", ), vmmigration.ListGroupsResponse( - groups=[vmmigration.Group(), vmmigration.Group(),], + groups=[ + vmmigration.Group(), + vmmigration.Group(), + ], ), RuntimeError, ) @@ -8499,10 +9726,17 @@ async def test_list_groups_async_pages(): assert page_.raw_page.next_page_token == token -@pytest.mark.parametrize("request_type", [vmmigration.GetGroupRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + vmmigration.GetGroupRequest, + dict, + ], +) def test_get_group(request_type, transport: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -8535,7 +9769,8 @@ def test_get_group_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -8551,7 +9786,8 @@ async def test_get_group_async( transport: str = "grpc_asyncio", request_type=vmmigration.GetGroupRequest ): client = VmMigrationAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -8588,7 +9824,9 @@ async def test_get_group_async_from_dict(): def test_get_group_field_headers(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -8608,12 +9846,17 @@ def test_get_group_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] @pytest.mark.asyncio async def test_get_group_field_headers_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -8633,11 +9876,16 @@ async def test_get_group_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] def test_get_group_flattened(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.get_group), "__call__") as call: @@ -8645,7 +9893,9 @@ def test_get_group_flattened(): call.return_value = vmmigration.Group() # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - client.get_group(name="name_value",) + client.get_group( + name="name_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -8657,19 +9907,24 @@ def test_get_group_flattened(): def test_get_group_flattened_error(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): client.get_group( - vmmigration.GetGroupRequest(), name="name_value", + vmmigration.GetGroupRequest(), + name="name_value", ) @pytest.mark.asyncio async def test_get_group_flattened_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.get_group), "__call__") as call: @@ -8679,7 +9934,9 @@ async def test_get_group_flattened_async(): call.return_value = grpc_helpers_async.FakeUnaryUnaryCall(vmmigration.Group()) # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - response = await client.get_group(name="name_value",) + response = await client.get_group( + name="name_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -8692,20 +9949,30 @@ async def test_get_group_flattened_async(): @pytest.mark.asyncio async def test_get_group_flattened_error_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): await client.get_group( - vmmigration.GetGroupRequest(), name="name_value", + vmmigration.GetGroupRequest(), + name="name_value", ) -@pytest.mark.parametrize("request_type", [vmmigration.CreateGroupRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + vmmigration.CreateGroupRequest, + dict, + ], +) def test_create_group(request_type, transport: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -8731,7 +9998,8 @@ def test_create_group_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -8747,7 +10015,8 @@ async def test_create_group_async( transport: str = "grpc_asyncio", request_type=vmmigration.CreateGroupRequest ): client = VmMigrationAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -8777,7 +10046,9 @@ async def test_create_group_async_from_dict(): def test_create_group_field_headers(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -8797,12 +10068,17 @@ def test_create_group_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] @pytest.mark.asyncio async def test_create_group_field_headers_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -8824,11 +10100,16 @@ async def test_create_group_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] def test_create_group_flattened(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.create_group), "__call__") as call: @@ -8858,7 +10139,9 @@ def test_create_group_flattened(): def test_create_group_flattened_error(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. @@ -8873,7 +10156,9 @@ def test_create_group_flattened_error(): @pytest.mark.asyncio async def test_create_group_flattened_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.create_group), "__call__") as call: @@ -8908,7 +10193,9 @@ async def test_create_group_flattened_async(): @pytest.mark.asyncio async def test_create_group_flattened_error_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. @@ -8921,10 +10208,17 @@ async def test_create_group_flattened_error_async(): ) -@pytest.mark.parametrize("request_type", [vmmigration.UpdateGroupRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + vmmigration.UpdateGroupRequest, + dict, + ], +) def test_update_group(request_type, transport: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -8950,7 +10244,8 @@ def test_update_group_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -8966,7 +10261,8 @@ async def test_update_group_async( transport: str = "grpc_asyncio", request_type=vmmigration.UpdateGroupRequest ): client = VmMigrationAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -8996,7 +10292,9 @@ async def test_update_group_async_from_dict(): def test_update_group_field_headers(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -9016,12 +10314,17 @@ def test_update_group_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "group.name=group.name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "group.name=group.name/value", + ) in kw["metadata"] @pytest.mark.asyncio async def test_update_group_field_headers_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -9043,11 +10346,16 @@ async def test_update_group_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "group.name=group.name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "group.name=group.name/value", + ) in kw["metadata"] def test_update_group_flattened(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.update_group), "__call__") as call: @@ -9073,7 +10381,9 @@ def test_update_group_flattened(): def test_update_group_flattened_error(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. @@ -9087,7 +10397,9 @@ def test_update_group_flattened_error(): @pytest.mark.asyncio async def test_update_group_flattened_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.update_group), "__call__") as call: @@ -9118,7 +10430,9 @@ async def test_update_group_flattened_async(): @pytest.mark.asyncio async def test_update_group_flattened_error_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. @@ -9130,10 +10444,17 @@ async def test_update_group_flattened_error_async(): ) -@pytest.mark.parametrize("request_type", [vmmigration.DeleteGroupRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + vmmigration.DeleteGroupRequest, + dict, + ], +) def test_delete_group(request_type, transport: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -9159,7 +10480,8 @@ def test_delete_group_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -9175,7 +10497,8 @@ async def test_delete_group_async( transport: str = "grpc_asyncio", request_type=vmmigration.DeleteGroupRequest ): client = VmMigrationAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -9205,7 +10528,9 @@ async def test_delete_group_async_from_dict(): def test_delete_group_field_headers(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -9225,12 +10550,17 @@ def test_delete_group_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] @pytest.mark.asyncio async def test_delete_group_field_headers_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -9252,11 +10582,16 @@ async def test_delete_group_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] def test_delete_group_flattened(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.delete_group), "__call__") as call: @@ -9264,7 +10599,9 @@ def test_delete_group_flattened(): call.return_value = operations_pb2.Operation(name="operations/op") # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - client.delete_group(name="name_value",) + client.delete_group( + name="name_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -9276,19 +10613,24 @@ def test_delete_group_flattened(): def test_delete_group_flattened_error(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): client.delete_group( - vmmigration.DeleteGroupRequest(), name="name_value", + vmmigration.DeleteGroupRequest(), + name="name_value", ) @pytest.mark.asyncio async def test_delete_group_flattened_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.delete_group), "__call__") as call: @@ -9300,7 +10642,9 @@ async def test_delete_group_flattened_async(): ) # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - response = await client.delete_group(name="name_value",) + response = await client.delete_group( + name="name_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -9313,20 +10657,30 @@ async def test_delete_group_flattened_async(): @pytest.mark.asyncio async def test_delete_group_flattened_error_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): await client.delete_group( - vmmigration.DeleteGroupRequest(), name="name_value", + vmmigration.DeleteGroupRequest(), + name="name_value", ) -@pytest.mark.parametrize("request_type", [vmmigration.AddGroupMigrationRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + vmmigration.AddGroupMigrationRequest, + dict, + ], +) def test_add_group_migration(request_type, transport: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -9354,7 +10708,8 @@ def test_add_group_migration_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -9372,7 +10727,8 @@ async def test_add_group_migration_async( transport: str = "grpc_asyncio", request_type=vmmigration.AddGroupMigrationRequest ): client = VmMigrationAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -9404,7 +10760,9 @@ async def test_add_group_migration_async_from_dict(): def test_add_group_migration_field_headers(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -9426,12 +10784,17 @@ def test_add_group_migration_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "group=group/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "group=group/value", + ) in kw["metadata"] @pytest.mark.asyncio async def test_add_group_migration_field_headers_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -9455,11 +10818,16 @@ async def test_add_group_migration_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "group=group/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "group=group/value", + ) in kw["metadata"] def test_add_group_migration_flattened(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -9469,7 +10837,9 @@ def test_add_group_migration_flattened(): call.return_value = operations_pb2.Operation(name="operations/op") # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - client.add_group_migration(group="group_value",) + client.add_group_migration( + group="group_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -9481,19 +10851,24 @@ def test_add_group_migration_flattened(): def test_add_group_migration_flattened_error(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): client.add_group_migration( - vmmigration.AddGroupMigrationRequest(), group="group_value", + vmmigration.AddGroupMigrationRequest(), + group="group_value", ) @pytest.mark.asyncio async def test_add_group_migration_flattened_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -9507,7 +10882,9 @@ async def test_add_group_migration_flattened_async(): ) # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - response = await client.add_group_migration(group="group_value",) + response = await client.add_group_migration( + group="group_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -9520,22 +10897,30 @@ async def test_add_group_migration_flattened_async(): @pytest.mark.asyncio async def test_add_group_migration_flattened_error_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): await client.add_group_migration( - vmmigration.AddGroupMigrationRequest(), group="group_value", + vmmigration.AddGroupMigrationRequest(), + group="group_value", ) @pytest.mark.parametrize( - "request_type", [vmmigration.RemoveGroupMigrationRequest, dict,] + "request_type", + [ + vmmigration.RemoveGroupMigrationRequest, + dict, + ], ) def test_remove_group_migration(request_type, transport: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -9563,7 +10948,8 @@ def test_remove_group_migration_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -9582,7 +10968,8 @@ async def test_remove_group_migration_async( request_type=vmmigration.RemoveGroupMigrationRequest, ): client = VmMigrationAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -9614,7 +11001,9 @@ async def test_remove_group_migration_async_from_dict(): def test_remove_group_migration_field_headers(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -9636,12 +11025,17 @@ def test_remove_group_migration_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "group=group/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "group=group/value", + ) in kw["metadata"] @pytest.mark.asyncio async def test_remove_group_migration_field_headers_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -9665,11 +11059,16 @@ async def test_remove_group_migration_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "group=group/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "group=group/value", + ) in kw["metadata"] def test_remove_group_migration_flattened(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -9679,7 +11078,9 @@ def test_remove_group_migration_flattened(): call.return_value = operations_pb2.Operation(name="operations/op") # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - client.remove_group_migration(group="group_value",) + client.remove_group_migration( + group="group_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -9691,19 +11092,24 @@ def test_remove_group_migration_flattened(): def test_remove_group_migration_flattened_error(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): client.remove_group_migration( - vmmigration.RemoveGroupMigrationRequest(), group="group_value", + vmmigration.RemoveGroupMigrationRequest(), + group="group_value", ) @pytest.mark.asyncio async def test_remove_group_migration_flattened_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -9717,7 +11123,9 @@ async def test_remove_group_migration_flattened_async(): ) # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - response = await client.remove_group_migration(group="group_value",) + response = await client.remove_group_migration( + group="group_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -9730,20 +11138,30 @@ async def test_remove_group_migration_flattened_async(): @pytest.mark.asyncio async def test_remove_group_migration_flattened_error_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): await client.remove_group_migration( - vmmigration.RemoveGroupMigrationRequest(), group="group_value", + vmmigration.RemoveGroupMigrationRequest(), + group="group_value", ) -@pytest.mark.parametrize("request_type", [vmmigration.ListTargetProjectsRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + vmmigration.ListTargetProjectsRequest, + dict, + ], +) def test_list_target_projects(request_type, transport: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -9756,7 +11174,8 @@ def test_list_target_projects(request_type, transport: str = "grpc"): ) as call: # Designate an appropriate return value for the call. call.return_value = vmmigration.ListTargetProjectsResponse( - next_page_token="next_page_token_value", unreachable=["unreachable_value"], + next_page_token="next_page_token_value", + unreachable=["unreachable_value"], ) response = client.list_target_projects(request) @@ -9775,7 +11194,8 @@ def test_list_target_projects_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -9793,7 +11213,8 @@ async def test_list_target_projects_async( transport: str = "grpc_asyncio", request_type=vmmigration.ListTargetProjectsRequest ): client = VmMigrationAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -9830,7 +11251,9 @@ async def test_list_target_projects_async_from_dict(): def test_list_target_projects_field_headers(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -9852,12 +11275,17 @@ def test_list_target_projects_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] @pytest.mark.asyncio async def test_list_target_projects_field_headers_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -9881,11 +11309,16 @@ async def test_list_target_projects_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] def test_list_target_projects_flattened(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -9895,7 +11328,9 @@ def test_list_target_projects_flattened(): call.return_value = vmmigration.ListTargetProjectsResponse() # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - client.list_target_projects(parent="parent_value",) + client.list_target_projects( + parent="parent_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -9907,19 +11342,24 @@ def test_list_target_projects_flattened(): def test_list_target_projects_flattened_error(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): client.list_target_projects( - vmmigration.ListTargetProjectsRequest(), parent="parent_value", + vmmigration.ListTargetProjectsRequest(), + parent="parent_value", ) @pytest.mark.asyncio async def test_list_target_projects_flattened_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -9933,7 +11373,9 @@ async def test_list_target_projects_flattened_async(): ) # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - response = await client.list_target_projects(parent="parent_value",) + response = await client.list_target_projects( + parent="parent_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -9946,19 +11388,23 @@ async def test_list_target_projects_flattened_async(): @pytest.mark.asyncio async def test_list_target_projects_flattened_error_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): await client.list_target_projects( - vmmigration.ListTargetProjectsRequest(), parent="parent_value", + vmmigration.ListTargetProjectsRequest(), + parent="parent_value", ) def test_list_target_projects_pager(transport_name: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials, transport=transport_name, + credentials=ga_credentials.AnonymousCredentials, + transport=transport_name, ) # Mock the actual call within the gRPC stub, and fake the request. @@ -9976,10 +11422,14 @@ def test_list_target_projects_pager(transport_name: str = "grpc"): next_page_token="abc", ), vmmigration.ListTargetProjectsResponse( - target_projects=[], next_page_token="def", + target_projects=[], + next_page_token="def", ), vmmigration.ListTargetProjectsResponse( - target_projects=[vmmigration.TargetProject(),], next_page_token="ghi", + target_projects=[ + vmmigration.TargetProject(), + ], + next_page_token="ghi", ), vmmigration.ListTargetProjectsResponse( target_projects=[ @@ -10005,7 +11455,8 @@ def test_list_target_projects_pager(transport_name: str = "grpc"): def test_list_target_projects_pages(transport_name: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials, transport=transport_name, + credentials=ga_credentials.AnonymousCredentials, + transport=transport_name, ) # Mock the actual call within the gRPC stub, and fake the request. @@ -10023,10 +11474,14 @@ def test_list_target_projects_pages(transport_name: str = "grpc"): next_page_token="abc", ), vmmigration.ListTargetProjectsResponse( - target_projects=[], next_page_token="def", + target_projects=[], + next_page_token="def", ), vmmigration.ListTargetProjectsResponse( - target_projects=[vmmigration.TargetProject(),], next_page_token="ghi", + target_projects=[ + vmmigration.TargetProject(), + ], + next_page_token="ghi", ), vmmigration.ListTargetProjectsResponse( target_projects=[ @@ -10043,7 +11498,9 @@ def test_list_target_projects_pages(transport_name: str = "grpc"): @pytest.mark.asyncio async def test_list_target_projects_async_pager(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials,) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials, + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -10062,10 +11519,14 @@ async def test_list_target_projects_async_pager(): next_page_token="abc", ), vmmigration.ListTargetProjectsResponse( - target_projects=[], next_page_token="def", + target_projects=[], + next_page_token="def", ), vmmigration.ListTargetProjectsResponse( - target_projects=[vmmigration.TargetProject(),], next_page_token="ghi", + target_projects=[ + vmmigration.TargetProject(), + ], + next_page_token="ghi", ), vmmigration.ListTargetProjectsResponse( target_projects=[ @@ -10075,7 +11536,9 @@ async def test_list_target_projects_async_pager(): ), RuntimeError, ) - async_pager = await client.list_target_projects(request={},) + async_pager = await client.list_target_projects( + request={}, + ) assert async_pager.next_page_token == "abc" responses = [] async for response in async_pager: @@ -10087,7 +11550,9 @@ async def test_list_target_projects_async_pager(): @pytest.mark.asyncio async def test_list_target_projects_async_pages(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials,) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials, + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -10106,10 +11571,14 @@ async def test_list_target_projects_async_pages(): next_page_token="abc", ), vmmigration.ListTargetProjectsResponse( - target_projects=[], next_page_token="def", + target_projects=[], + next_page_token="def", ), vmmigration.ListTargetProjectsResponse( - target_projects=[vmmigration.TargetProject(),], next_page_token="ghi", + target_projects=[ + vmmigration.TargetProject(), + ], + next_page_token="ghi", ), vmmigration.ListTargetProjectsResponse( target_projects=[ @@ -10126,10 +11595,17 @@ async def test_list_target_projects_async_pages(): assert page_.raw_page.next_page_token == token -@pytest.mark.parametrize("request_type", [vmmigration.GetTargetProjectRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + vmmigration.GetTargetProjectRequest, + dict, + ], +) def test_get_target_project(request_type, transport: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -10142,7 +11618,9 @@ def test_get_target_project(request_type, transport: str = "grpc"): ) as call: # Designate an appropriate return value for the call. call.return_value = vmmigration.TargetProject( - name="name_value", project="project_value", description="description_value", + name="name_value", + project="project_value", + description="description_value", ) response = client.get_target_project(request) @@ -10162,7 +11640,8 @@ def test_get_target_project_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -10180,7 +11659,8 @@ async def test_get_target_project_async( transport: str = "grpc_asyncio", request_type=vmmigration.GetTargetProjectRequest ): client = VmMigrationAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -10219,7 +11699,9 @@ async def test_get_target_project_async_from_dict(): def test_get_target_project_field_headers(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -10241,12 +11723,17 @@ def test_get_target_project_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] @pytest.mark.asyncio async def test_get_target_project_field_headers_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -10270,11 +11757,16 @@ async def test_get_target_project_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] def test_get_target_project_flattened(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -10284,7 +11776,9 @@ def test_get_target_project_flattened(): call.return_value = vmmigration.TargetProject() # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - client.get_target_project(name="name_value",) + client.get_target_project( + name="name_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -10296,19 +11790,24 @@ def test_get_target_project_flattened(): def test_get_target_project_flattened_error(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): client.get_target_project( - vmmigration.GetTargetProjectRequest(), name="name_value", + vmmigration.GetTargetProjectRequest(), + name="name_value", ) @pytest.mark.asyncio async def test_get_target_project_flattened_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -10322,7 +11821,9 @@ async def test_get_target_project_flattened_async(): ) # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - response = await client.get_target_project(name="name_value",) + response = await client.get_target_project( + name="name_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -10335,22 +11836,30 @@ async def test_get_target_project_flattened_async(): @pytest.mark.asyncio async def test_get_target_project_flattened_error_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): await client.get_target_project( - vmmigration.GetTargetProjectRequest(), name="name_value", + vmmigration.GetTargetProjectRequest(), + name="name_value", ) @pytest.mark.parametrize( - "request_type", [vmmigration.CreateTargetProjectRequest, dict,] + "request_type", + [ + vmmigration.CreateTargetProjectRequest, + dict, + ], ) def test_create_target_project(request_type, transport: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -10378,7 +11887,8 @@ def test_create_target_project_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -10396,7 +11906,8 @@ async def test_create_target_project_async( transport: str = "grpc_asyncio", request_type=vmmigration.CreateTargetProjectRequest ): client = VmMigrationAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -10428,7 +11939,9 @@ async def test_create_target_project_async_from_dict(): def test_create_target_project_field_headers(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -10450,12 +11963,17 @@ def test_create_target_project_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] @pytest.mark.asyncio async def test_create_target_project_field_headers_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -10479,11 +11997,16 @@ async def test_create_target_project_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] def test_create_target_project_flattened(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -10515,7 +12038,9 @@ def test_create_target_project_flattened(): def test_create_target_project_flattened_error(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. @@ -10530,7 +12055,9 @@ def test_create_target_project_flattened_error(): @pytest.mark.asyncio async def test_create_target_project_flattened_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -10567,7 +12094,9 @@ async def test_create_target_project_flattened_async(): @pytest.mark.asyncio async def test_create_target_project_flattened_error_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. @@ -10581,11 +12110,16 @@ async def test_create_target_project_flattened_error_async(): @pytest.mark.parametrize( - "request_type", [vmmigration.UpdateTargetProjectRequest, dict,] + "request_type", + [ + vmmigration.UpdateTargetProjectRequest, + dict, + ], ) def test_update_target_project(request_type, transport: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -10613,7 +12147,8 @@ def test_update_target_project_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -10631,7 +12166,8 @@ async def test_update_target_project_async( transport: str = "grpc_asyncio", request_type=vmmigration.UpdateTargetProjectRequest ): client = VmMigrationAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -10663,7 +12199,9 @@ async def test_update_target_project_async_from_dict(): def test_update_target_project_field_headers(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -10693,7 +12231,9 @@ def test_update_target_project_field_headers(): @pytest.mark.asyncio async def test_update_target_project_field_headers_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -10724,7 +12264,9 @@ async def test_update_target_project_field_headers_async(): def test_update_target_project_flattened(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -10752,7 +12294,9 @@ def test_update_target_project_flattened(): def test_update_target_project_flattened_error(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. @@ -10766,7 +12310,9 @@ def test_update_target_project_flattened_error(): @pytest.mark.asyncio async def test_update_target_project_flattened_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -10799,7 +12345,9 @@ async def test_update_target_project_flattened_async(): @pytest.mark.asyncio async def test_update_target_project_flattened_error_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. @@ -10812,11 +12360,16 @@ async def test_update_target_project_flattened_error_async(): @pytest.mark.parametrize( - "request_type", [vmmigration.DeleteTargetProjectRequest, dict,] + "request_type", + [ + vmmigration.DeleteTargetProjectRequest, + dict, + ], ) def test_delete_target_project(request_type, transport: str = "grpc"): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -10844,7 +12397,8 @@ def test_delete_target_project_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -10862,7 +12416,8 @@ async def test_delete_target_project_async( transport: str = "grpc_asyncio", request_type=vmmigration.DeleteTargetProjectRequest ): client = VmMigrationAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -10894,7 +12449,9 @@ async def test_delete_target_project_async_from_dict(): def test_delete_target_project_field_headers(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -10916,12 +12473,17 @@ def test_delete_target_project_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] @pytest.mark.asyncio async def test_delete_target_project_field_headers_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Any value that is part of the HTTP/1.1 URI should be sent as # a field header. Set these to a non-empty value. @@ -10945,11 +12507,16 @@ async def test_delete_target_project_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] def test_delete_target_project_flattened(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -10959,7 +12526,9 @@ def test_delete_target_project_flattened(): call.return_value = operations_pb2.Operation(name="operations/op") # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - client.delete_target_project(name="name_value",) + client.delete_target_project( + name="name_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -10971,19 +12540,24 @@ def test_delete_target_project_flattened(): def test_delete_target_project_flattened_error(): - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): client.delete_target_project( - vmmigration.DeleteTargetProjectRequest(), name="name_value", + vmmigration.DeleteTargetProjectRequest(), + name="name_value", ) @pytest.mark.asyncio async def test_delete_target_project_flattened_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -10997,7 +12571,9 @@ async def test_delete_target_project_flattened_async(): ) # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - response = await client.delete_target_project(name="name_value",) + response = await client.delete_target_project( + name="name_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -11010,13 +12586,16 @@ async def test_delete_target_project_flattened_async(): @pytest.mark.asyncio async def test_delete_target_project_flattened_error_async(): - client = VmMigrationAsyncClient(credentials=ga_credentials.AnonymousCredentials(),) + client = VmMigrationAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): await client.delete_target_project( - vmmigration.DeleteTargetProjectRequest(), name="name_value", + vmmigration.DeleteTargetProjectRequest(), + name="name_value", ) @@ -11027,7 +12606,8 @@ def test_credentials_transport_error(): ) with pytest.raises(ValueError): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # It is an error to provide a credentials file and a transport instance. @@ -11047,7 +12627,10 @@ def test_credentials_transport_error(): options = client_options.ClientOptions() options.api_key = "api_key" with pytest.raises(ValueError): - client = VmMigrationClient(client_options=options, transport=transport,) + client = VmMigrationClient( + client_options=options, + transport=transport, + ) # It is an error to provide an api_key and a credential. options = mock.Mock() @@ -11063,7 +12646,8 @@ def test_credentials_transport_error(): ) with pytest.raises(ValueError): client = VmMigrationClient( - client_options={"scopes": ["1", "2"]}, transport=transport, + client_options={"scopes": ["1", "2"]}, + transport=transport, ) @@ -11093,7 +12677,10 @@ def test_transport_get_channel(): @pytest.mark.parametrize( "transport_class", - [transports.VmMigrationGrpcTransport, transports.VmMigrationGrpcAsyncIOTransport,], + [ + transports.VmMigrationGrpcTransport, + transports.VmMigrationGrpcAsyncIOTransport, + ], ) def test_transport_adc(transport_class): # Test default credentials are used if not provided. @@ -11105,8 +12692,13 @@ def test_transport_adc(transport_class): def test_transport_grpc_default(): # A client should use the gRPC transport by default. - client = VmMigrationClient(credentials=ga_credentials.AnonymousCredentials(),) - assert isinstance(client.transport, transports.VmMigrationGrpcTransport,) + client = VmMigrationClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + assert isinstance( + client.transport, + transports.VmMigrationGrpcTransport, + ) def test_vm_migration_base_transport_error(): @@ -11198,7 +12790,8 @@ def test_vm_migration_base_transport_with_credentials_file(): Transport.return_value = None load_creds.return_value = (ga_credentials.AnonymousCredentials(), None) transport = transports.VmMigrationTransport( - credentials_file="credentials.json", quota_project_id="octopus", + credentials_file="credentials.json", + quota_project_id="octopus", ) load_creds.assert_called_once_with( "credentials.json", @@ -11233,7 +12826,10 @@ def test_vm_migration_auth_adc(): @pytest.mark.parametrize( "transport_class", - [transports.VmMigrationGrpcTransport, transports.VmMigrationGrpcAsyncIOTransport,], + [ + transports.VmMigrationGrpcTransport, + transports.VmMigrationGrpcAsyncIOTransport, + ], ) def test_vm_migration_transport_auth_adc(transport_class): # If credentials and host are not provided, the transport class should use @@ -11350,7 +12946,8 @@ def test_vm_migration_grpc_transport_channel(): # Check that channel is used if provided. transport = transports.VmMigrationGrpcTransport( - host="squid.clam.whelk", channel=channel, + host="squid.clam.whelk", + channel=channel, ) assert transport.grpc_channel == channel assert transport._host == "squid.clam.whelk:443" @@ -11362,7 +12959,8 @@ def test_vm_migration_grpc_asyncio_transport_channel(): # Check that channel is used if provided. transport = transports.VmMigrationGrpcAsyncIOTransport( - host="squid.clam.whelk", channel=channel, + host="squid.clam.whelk", + channel=channel, ) assert transport.grpc_channel == channel assert transport._host == "squid.clam.whelk:443" @@ -11463,12 +13061,16 @@ def test_vm_migration_transport_channel_mtls_with_adc(transport_class): def test_vm_migration_grpc_lro_client(): client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) transport = client.transport # Ensure that we have a api-core operations client. - assert isinstance(transport.operations_client, operations_v1.OperationsClient,) + assert isinstance( + transport.operations_client, + operations_v1.OperationsClient, + ) # Ensure that subsequent calls to the property send the exact same object. assert transport.operations_client is transport.operations_client @@ -11476,12 +13078,16 @@ def test_vm_migration_grpc_lro_client(): def test_vm_migration_grpc_lro_async_client(): client = VmMigrationAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc_asyncio", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc_asyncio", ) transport = client.transport # Ensure that we have a api-core operations client. - assert isinstance(transport.operations_client, operations_v1.OperationsAsyncClient,) + assert isinstance( + transport.operations_client, + operations_v1.OperationsAsyncClient, + ) # Ensure that subsequent calls to the property send the exact same object. assert transport.operations_client is transport.operations_client @@ -11591,7 +13197,9 @@ def test_group_path(): location = "nudibranch" group = "cuttlefish" expected = "projects/{project}/locations/{location}/groups/{group}".format( - project=project, location=location, group=group, + project=project, + location=location, + group=group, ) actual = VmMigrationClient.group_path(project, location, group) assert expected == actual @@ -11616,7 +13224,10 @@ def test_migrating_vm_path(): source = "squid" migrating_vm = "clam" expected = "projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}".format( - project=project, location=location, source=source, migrating_vm=migrating_vm, + project=project, + location=location, + source=source, + migrating_vm=migrating_vm, ) actual = VmMigrationClient.migrating_vm_path( project, location, source, migrating_vm @@ -11643,7 +13254,9 @@ def test_source_path(): location = "mussel" source = "winkle" expected = "projects/{project}/locations/{location}/sources/{source}".format( - project=project, location=location, source=source, + project=project, + location=location, + source=source, ) actual = VmMigrationClient.source_path(project, location, source) assert expected == actual @@ -11667,7 +13280,9 @@ def test_target_project_path(): location = "clam" target_project = "whelk" expected = "projects/{project}/locations/{location}/targetProjects/{target_project}".format( - project=project, location=location, target_project=target_project, + project=project, + location=location, + target_project=target_project, ) actual = VmMigrationClient.target_project_path(project, location, target_project) assert expected == actual @@ -11739,7 +13354,9 @@ def test_parse_common_billing_account_path(): def test_common_folder_path(): folder = "oyster" - expected = "folders/{folder}".format(folder=folder,) + expected = "folders/{folder}".format( + folder=folder, + ) actual = VmMigrationClient.common_folder_path(folder) assert expected == actual @@ -11757,7 +13374,9 @@ def test_parse_common_folder_path(): def test_common_organization_path(): organization = "cuttlefish" - expected = "organizations/{organization}".format(organization=organization,) + expected = "organizations/{organization}".format( + organization=organization, + ) actual = VmMigrationClient.common_organization_path(organization) assert expected == actual @@ -11775,7 +13394,9 @@ def test_parse_common_organization_path(): def test_common_project_path(): project = "winkle" - expected = "projects/{project}".format(project=project,) + expected = "projects/{project}".format( + project=project, + ) actual = VmMigrationClient.common_project_path(project) assert expected == actual @@ -11795,7 +13416,8 @@ def test_common_location_path(): project = "scallop" location = "abalone" expected = "projects/{project}/locations/{location}".format( - project=project, location=location, + project=project, + location=location, ) actual = VmMigrationClient.common_location_path(project, location) assert expected == actual @@ -11820,7 +13442,8 @@ def test_client_with_default_client_info(): transports.VmMigrationTransport, "_prep_wrapped_messages" ) as prep: client = VmMigrationClient( - credentials=ga_credentials.AnonymousCredentials(), client_info=client_info, + credentials=ga_credentials.AnonymousCredentials(), + client_info=client_info, ) prep.assert_called_once_with(client_info) @@ -11829,7 +13452,8 @@ def test_client_with_default_client_info(): ) as prep: transport_class = VmMigrationClient.get_transport_class() transport = transport_class( - credentials=ga_credentials.AnonymousCredentials(), client_info=client_info, + credentials=ga_credentials.AnonymousCredentials(), + client_info=client_info, ) prep.assert_called_once_with(client_info) @@ -11837,7 +13461,8 @@ def test_client_with_default_client_info(): @pytest.mark.asyncio async def test_transport_close_async(): client = VmMigrationAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc_asyncio", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc_asyncio", ) with mock.patch.object( type(getattr(client.transport, "grpc_channel")), "close" From b182caad8e4d7cc18b2b3bce93d64f29a0780e96 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 30 Mar 2022 17:00:21 +0000 Subject: [PATCH 03/20] chore(python): add E231 to .flake8 ignore list (#29) Source-Link: https://github.com/googleapis/synthtool/commit/7ff4aad2ec5af0380e8bd6da1fa06eaadf24ec81 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:462782b0b492346b2d9099aaff52206dd30bc8e031ea97082e6facecc2373244 --- .flake8 | 2 +- .github/.OwlBot.lock.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.flake8 b/.flake8 index 29227d4..2e43874 100644 --- a/.flake8 +++ b/.flake8 @@ -16,7 +16,7 @@ # Generated by synthtool. DO NOT EDIT! [flake8] -ignore = E203, E266, E501, W503 +ignore = E203, E231, E266, E501, W503 exclude = # Exclude generated code. **/proto/** diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 87dd006..9e0a935 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:7cffbc10910c3ab1b852c05114a08d374c195a81cdec1d4a67a1d129331d0bfe + digest: sha256:462782b0b492346b2d9099aaff52206dd30bc8e031ea97082e6facecc2373244 From aaa585404d78e0414ce1511a095d16101353fbf6 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 30 Mar 2022 17:35:10 -0400 Subject: [PATCH 04/20] chore(python): add E231 to .flake8 ignore list (#30) Source-Link: https://github.com/googleapis/synthtool/commit/7ff4aad2ec5af0380e8bd6da1fa06eaadf24ec81 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:462782b0b492346b2d9099aaff52206dd30bc8e031ea97082e6facecc2373244 Co-authored-by: Owl Bot --- .github/.OwlBot.lock.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 9e0a935..23434dd 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -14,3 +14,4 @@ docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest digest: sha256:462782b0b492346b2d9099aaff52206dd30bc8e031ea97082e6facecc2373244 +# created: 2022-03-30T16:01:47.58797443Z From 65c7506df78c32e79d363fc0bc19b15c237bdc15 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 1 Apr 2022 00:32:26 +0000 Subject: [PATCH 05/20] chore(python): update .pre-commit-config.yaml to use black==22.3.0 (#31) Source-Link: https://github.com/googleapis/synthtool/commit/7804ade3daae0d66649bee8df6c55484c6580b8d Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:eede5672562a32821444a8e803fb984a6f61f2237ea3de229d2de24453f4ae7d --- .github/.OwlBot.lock.yaml | 4 ++-- .pre-commit-config.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 23434dd..22cc254 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:462782b0b492346b2d9099aaff52206dd30bc8e031ea97082e6facecc2373244 -# created: 2022-03-30T16:01:47.58797443Z + digest: sha256:eede5672562a32821444a8e803fb984a6f61f2237ea3de229d2de24453f4ae7d +# created: 2022-03-30T23:44:26.560599165Z diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 62eb5a7..46d2371 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -22,7 +22,7 @@ repos: - id: end-of-file-fixer - id: check-yaml - repo: https://github.com/psf/black - rev: 19.10b0 + rev: 22.3.0 hooks: - id: black - repo: https://gitlab.com/pycqa/flake8 From 25eb37192e1b594eea2a06122ac3c3a0c3622a54 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 31 Mar 2022 22:22:21 -0400 Subject: [PATCH 06/20] chore(python): Enable size-label bot (#32) Source-Link: https://github.com/googleapis/synthtool/commit/06e82790dd719a165ad32b8a06f8f6ec3e3cae0f Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:b3500c053313dc34e07b1632ba9e4e589f4f77036a7cf39e1fe8906811ae0fce Co-authored-by: Owl Bot --- .github/.OwlBot.lock.yaml | 4 ++-- .github/auto-label.yaml | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 .github/auto-label.yaml diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 22cc254..58a0b15 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:eede5672562a32821444a8e803fb984a6f61f2237ea3de229d2de24453f4ae7d -# created: 2022-03-30T23:44:26.560599165Z + digest: sha256:b3500c053313dc34e07b1632ba9e4e589f4f77036a7cf39e1fe8906811ae0fce +# created: 2022-04-01T01:42:03.609279246Z diff --git a/.github/auto-label.yaml b/.github/auto-label.yaml new file mode 100644 index 0000000..09c8d73 --- /dev/null +++ b/.github/auto-label.yaml @@ -0,0 +1,2 @@ +requestsize: + enabled: true From aaa6451b834a12f563a82986e20144b028276e6a Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 1 Apr 2022 15:33:44 -0400 Subject: [PATCH 07/20] chore(python): refactor unit / system test dependency install (#33) Source-Link: https://github.com/googleapis/synthtool/commit/993985f0fc4b37152e588f0549bcbdaf34666023 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:1894490910e891a385484514b22eb5133578897eb5b3c380e6d8ad475c6647cd Co-authored-by: Owl Bot --- .github/.OwlBot.lock.yaml | 4 +- noxfile.py | 105 ++++++++++++++++++++++++++++++-------- 2 files changed, 87 insertions(+), 22 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 58a0b15..fa57622 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:b3500c053313dc34e07b1632ba9e4e589f4f77036a7cf39e1fe8906811ae0fce -# created: 2022-04-01T01:42:03.609279246Z + digest: sha256:1894490910e891a385484514b22eb5133578897eb5b3c380e6d8ad475c6647cd +# created: 2022-04-01T15:48:07.524222836Z diff --git a/noxfile.py b/noxfile.py index 3addb4e..6ee5e8a 100644 --- a/noxfile.py +++ b/noxfile.py @@ -20,16 +20,40 @@ import os import pathlib import shutil +import warnings import nox - BLACK_VERSION = "black==22.3.0" BLACK_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"] DEFAULT_PYTHON_VERSION = "3.8" -SYSTEM_TEST_PYTHON_VERSIONS = ["3.8"] + UNIT_TEST_PYTHON_VERSIONS = ["3.6", "3.7", "3.8", "3.9", "3.10"] +UNIT_TEST_STANDARD_DEPENDENCIES = [ + "mock", + "asyncmock", + "pytest", + "pytest-cov", + "pytest-asyncio", +] +UNIT_TEST_EXTERNAL_DEPENDENCIES = [] +UNIT_TEST_LOCAL_DEPENDENCIES = [] +UNIT_TEST_DEPENDENCIES = [] +UNIT_TEST_EXTRAS = [] +UNIT_TEST_EXTRAS_BY_PYTHON = {} + +SYSTEM_TEST_PYTHON_VERSIONS = ["3.8"] +SYSTEM_TEST_STANDARD_DEPENDENCIES = [ + "mock", + "pytest", + "google-cloud-testutils", +] +SYSTEM_TEST_EXTERNAL_DEPENDENCIES = [] +SYSTEM_TEST_LOCAL_DEPENDENCIES = [] +SYSTEM_TEST_DEPENDENCIES = [] +SYSTEM_TEST_EXTRAS = [] +SYSTEM_TEST_EXTRAS_BY_PYTHON = {} CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -81,23 +105,41 @@ def lint_setup_py(session): session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def install_unittest_dependencies(session, *constraints): + standard_deps = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_DEPENDENCIES + session.install(*standard_deps, *constraints) + + if UNIT_TEST_EXTERNAL_DEPENDENCIES: + warnings.warn( + "'unit_test_external_dependencies' is deprecated. Instead, please " + "use 'unit_test_dependencies' or 'unit_test_local_dependencies'.", + DeprecationWarning, + ) + session.install(*UNIT_TEST_EXTERNAL_DEPENDENCIES, *constraints) + + if UNIT_TEST_LOCAL_DEPENDENCIES: + session.install(*UNIT_TEST_LOCAL_DEPENDENCIES, *constraints) + + if UNIT_TEST_EXTRAS_BY_PYTHON: + extras = UNIT_TEST_EXTRAS_BY_PYTHON.get(session.python, []) + elif UNIT_TEST_EXTRAS: + extras = UNIT_TEST_EXTRAS + else: + extras = [] + + if extras: + session.install("-e", f".[{','.join(extras)}]", *constraints) + else: + session.install("-e", ".", *constraints) + + def default(session): # Install all test dependencies, then install this package in-place. constraints_path = str( CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" ) - session.install( - "mock", - "asyncmock", - "pytest", - "pytest-cov", - "pytest-asyncio", - "-c", - constraints_path, - ) - - session.install("-e", ".", "-c", constraints_path) + install_unittest_dependencies(session, "-c", constraints_path) # Run py.test against the unit tests. session.run( @@ -121,6 +163,35 @@ def unit(session): default(session) +def install_systemtest_dependencies(session, *constraints): + + # Use pre-release gRPC for system tests. + session.install("--pre", "grpcio") + + session.install(*SYSTEM_TEST_STANDARD_DEPENDENCIES, *constraints) + + if SYSTEM_TEST_EXTERNAL_DEPENDENCIES: + session.install(*SYSTEM_TEST_EXTERNAL_DEPENDENCIES, *constraints) + + if SYSTEM_TEST_LOCAL_DEPENDENCIES: + session.install("-e", *SYSTEM_TEST_LOCAL_DEPENDENCIES, *constraints) + + if SYSTEM_TEST_DEPENDENCIES: + session.install("-e", *SYSTEM_TEST_DEPENDENCIES, *constraints) + + if SYSTEM_TEST_EXTRAS_BY_PYTHON: + extras = SYSTEM_TEST_EXTRAS_BY_PYTHON.get(session.python, []) + elif SYSTEM_TEST_EXTRAS: + extras = SYSTEM_TEST_EXTRAS + else: + extras = [] + + if extras: + session.install("-e", f".[{','.join(extras)}]", *constraints) + else: + session.install("-e", ".", *constraints) + + @nox.session(python=SYSTEM_TEST_PYTHON_VERSIONS) def system(session): """Run the system test suite.""" @@ -143,13 +214,7 @@ def system(session): if not system_test_exists and not system_test_folder_exists: session.skip("System tests were not found") - # Use pre-release gRPC for system tests. - session.install("--pre", "grpcio") - - # Install all test dependencies, then install this package into the - # virtualenv's dist-packages. - session.install("mock", "pytest", "google-cloud-testutils", "-c", constraints_path) - session.install("-e", ".", "-c", constraints_path) + install_systemtest_dependencies(session, "-c", constraints_path) # Run py.test against the system tests. if system_test_exists: From c482ce86ea1b3cbfbfda24c270963b37ed7f36ed Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 6 Apr 2022 06:57:28 -0400 Subject: [PATCH 08/20] chore(python): add license header to auto-label.yaml (#35) Source-Link: https://github.com/googleapis/synthtool/commit/eb78c980b52c7c6746d2edb77d9cf7aaa99a2aab Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:8a5d3f6a2e43ed8293f34e06a2f56931d1e88a2694c3bb11b15df4eb256ad163 Co-authored-by: Owl Bot --- .github/.OwlBot.lock.yaml | 4 ++-- .github/auto-label.yaml | 13 +++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index fa57622..bc893c9 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:1894490910e891a385484514b22eb5133578897eb5b3c380e6d8ad475c6647cd -# created: 2022-04-01T15:48:07.524222836Z + digest: sha256:8a5d3f6a2e43ed8293f34e06a2f56931d1e88a2694c3bb11b15df4eb256ad163 +# created: 2022-04-06T10:30:21.687684602Z diff --git a/.github/auto-label.yaml b/.github/auto-label.yaml index 09c8d73..41bff0b 100644 --- a/.github/auto-label.yaml +++ b/.github/auto-label.yaml @@ -1,2 +1,15 @@ +# 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. requestsize: enabled: true From 2a016e50d819816619b9d9b6ea5401bc359280de Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 14 Apr 2022 13:13:57 -0400 Subject: [PATCH 09/20] chore: use gapic-generator-python 0.65.1 (#39) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: use gapic-generator-python 0.65.1 PiperOrigin-RevId: 441524537 Source-Link: https://github.com/googleapis/googleapis/commit/2a273915b3f70fe86c9d2a75470a0b83e48d0abf Source-Link: https://github.com/googleapis/googleapis-gen/commit/ab6756a48c89b5bcb9fb73443cb8e55d574f4643 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWI2NzU2YTQ4Yzg5YjViY2I5ZmI3MzQ0M2NiOGU1NWQ1NzRmNDY0MyJ9 * chore: use gapic-generator-python 0.65.1 PiperOrigin-RevId: 441524537 Source-Link: https://github.com/googleapis/googleapis/commit/2a273915b3f70fe86c9d2a75470a0b83e48d0abf Source-Link: https://github.com/googleapis/googleapis-gen/commit/ab6756a48c89b5bcb9fb73443cb8e55d574f4643 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWI2NzU2YTQ4Yzg5YjViY2I5ZmI3MzQ0M2NiOGU1NWQ1NzRmNDY0MyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../services/vm_migration/async_client.py | 13 +- .../services/vm_migration/client.py | 13 +- .../services/vm_migration/transports/base.py | 5 + .../services/vm_migration/transports/grpc.py | 4 + .../cloud/vmmigration_v1/types/vmmigration.py | 12 +- .../snippet_metadata_vmmigration_v1.json | 3594 ++++++++++++++++- .../gapic/vmmigration_v1/test_vm_migration.py | 123 +- 7 files changed, 3529 insertions(+), 235 deletions(-) diff --git a/google/cloud/vmmigration_v1/services/vm_migration/async_client.py b/google/cloud/vmmigration_v1/services/vm_migration/async_client.py index abba716..c37d5f4 100644 --- a/google/cloud/vmmigration_v1/services/vm_migration/async_client.py +++ b/google/cloud/vmmigration_v1/services/vm_migration/async_client.py @@ -16,7 +16,7 @@ from collections import OrderedDict import functools import re -from typing import Dict, Optional, Sequence, Tuple, Type, Union +from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core.client_options import ClientOptions @@ -811,7 +811,6 @@ async def fetch_inventory( as opposed to listing the MigratingVms resources in the vmmigration service. - .. code-block:: python from google.cloud import vmmigration_v1 @@ -2398,7 +2397,6 @@ async def start_migration( uploading data and creating snapshots, in replication cycles scheduled by the policy. - .. code-block:: python from google.cloud import vmmigration_v1 @@ -2515,7 +2513,6 @@ async def resume_migration( start the process of uploading data and creating snapshots. - .. code-block:: python from google.cloud import vmmigration_v1 @@ -2609,7 +2606,6 @@ async def pause_migration( data. Further replication cycles will not be triggered while the VM is paused. - .. code-block:: python from google.cloud import vmmigration_v1 @@ -2703,7 +2699,6 @@ async def finalize_migration( resources that are no longer being used. Only applicable after cutover is done. - .. code-block:: python from google.cloud import vmmigration_v1 @@ -3278,7 +3273,6 @@ async def create_cutover_job( The returned LRO is completed when the cutover job resource is created and the job is initiated. - .. code-block:: python from google.cloud import vmmigration_v1 @@ -4505,7 +4499,6 @@ async def list_target_projects( NOTE: TargetProject is a global resource; hence the only supported value for location is ``global``. - .. code-block:: python from google.cloud import vmmigration_v1 @@ -4618,7 +4611,6 @@ async def get_target_project( NOTE: TargetProject is a global resource; hence the only supported value for location is ``global``. - .. code-block:: python from google.cloud import vmmigration_v1 @@ -4718,7 +4710,6 @@ async def create_target_project( NOTE: TargetProject is a global resource; hence the only supported value for location is ``global``. - .. code-block:: python from google.cloud import vmmigration_v1 @@ -4845,7 +4836,6 @@ async def update_target_project( NOTE: TargetProject is a global resource; hence the only supported value for location is ``global``. - .. code-block:: python from google.cloud import vmmigration_v1 @@ -4970,7 +4960,6 @@ async def delete_target_project( NOTE: TargetProject is a global resource; hence the only supported value for location is ``global``. - .. code-block:: python from google.cloud import vmmigration_v1 diff --git a/google/cloud/vmmigration_v1/services/vm_migration/client.py b/google/cloud/vmmigration_v1/services/vm_migration/client.py index 55119fe..71e49f1 100644 --- a/google/cloud/vmmigration_v1/services/vm_migration/client.py +++ b/google/cloud/vmmigration_v1/services/vm_migration/client.py @@ -16,7 +16,7 @@ from collections import OrderedDict import os import re -from typing import Dict, Optional, Sequence, Tuple, Type, Union +from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib @@ -1183,7 +1183,6 @@ def fetch_inventory( as opposed to listing the MigratingVms resources in the vmmigration service. - .. code-block:: python from google.cloud import vmmigration_v1 @@ -2780,7 +2779,6 @@ def start_migration( uploading data and creating snapshots, in replication cycles scheduled by the policy. - .. code-block:: python from google.cloud import vmmigration_v1 @@ -2897,7 +2895,6 @@ def resume_migration( start the process of uploading data and creating snapshots. - .. code-block:: python from google.cloud import vmmigration_v1 @@ -2992,7 +2989,6 @@ def pause_migration( data. Further replication cycles will not be triggered while the VM is paused. - .. code-block:: python from google.cloud import vmmigration_v1 @@ -3087,7 +3083,6 @@ def finalize_migration( resources that are no longer being used. Only applicable after cutover is done. - .. code-block:: python from google.cloud import vmmigration_v1 @@ -3662,7 +3657,6 @@ def create_cutover_job( The returned LRO is completed when the cutover job resource is created and the job is initiated. - .. code-block:: python from google.cloud import vmmigration_v1 @@ -4889,7 +4883,6 @@ def list_target_projects( NOTE: TargetProject is a global resource; hence the only supported value for location is ``global``. - .. code-block:: python from google.cloud import vmmigration_v1 @@ -5002,7 +4995,6 @@ def get_target_project( NOTE: TargetProject is a global resource; hence the only supported value for location is ``global``. - .. code-block:: python from google.cloud import vmmigration_v1 @@ -5102,7 +5094,6 @@ def create_target_project( NOTE: TargetProject is a global resource; hence the only supported value for location is ``global``. - .. code-block:: python from google.cloud import vmmigration_v1 @@ -5229,7 +5220,6 @@ def update_target_project( NOTE: TargetProject is a global resource; hence the only supported value for location is ``global``. - .. code-block:: python from google.cloud import vmmigration_v1 @@ -5354,7 +5344,6 @@ def delete_target_project( NOTE: TargetProject is a global resource; hence the only supported value for location is ``global``. - .. code-block:: python from google.cloud import vmmigration_v1 diff --git a/google/cloud/vmmigration_v1/services/vm_migration/transports/base.py b/google/cloud/vmmigration_v1/services/vm_migration/transports/base.py index 8489fde..9bf9719 100644 --- a/google/cloud/vmmigration_v1/services/vm_migration/transports/base.py +++ b/google/cloud/vmmigration_v1/services/vm_migration/transports/base.py @@ -82,6 +82,7 @@ def __init__( always_use_jwt_access (Optional[bool]): Whether self signed JWT should be used for service account credentials. """ + # Save the hostname. Default to port 443 (HTTPS) if none is specified. if ":" not in host: host += ":443" @@ -767,5 +768,9 @@ def delete_target_project( ]: raise NotImplementedError() + @property + def kind(self) -> str: + raise NotImplementedError() + __all__ = ("VmMigrationTransport",) diff --git a/google/cloud/vmmigration_v1/services/vm_migration/transports/grpc.py b/google/cloud/vmmigration_v1/services/vm_migration/transports/grpc.py index e12a85f..1a6f810 100644 --- a/google/cloud/vmmigration_v1/services/vm_migration/transports/grpc.py +++ b/google/cloud/vmmigration_v1/services/vm_migration/transports/grpc.py @@ -1426,5 +1426,9 @@ def delete_target_project( def close(self): self.grpc_channel.close() + @property + def kind(self) -> str: + return "grpc" + __all__ = ("VmMigrationGrpcTransport",) diff --git a/google/cloud/vmmigration_v1/types/vmmigration.py b/google/cloud/vmmigration_v1/types/vmmigration.py index 6ed3da9..924d2b3 100644 --- a/google/cloud/vmmigration_v1/types/vmmigration.py +++ b/google/cloud/vmmigration_v1/types/vmmigration.py @@ -238,7 +238,7 @@ class MigratingVm(proto.Message): any. The group is represented by the full path of the appropriate [Group][google.cloud.vmmigration.v1.Group] resource. - labels (Sequence[google.cloud.vmmigration_v1.types.MigratingVm.LabelsEntry]): + labels (Mapping[str, str]): The labels of the migrating VM. error (google.rpc.status_pb2.Status): Output only. Provides details on the state of @@ -684,7 +684,7 @@ class Source(proto.Message): Output only. The create time timestamp. update_time (google.protobuf.timestamp_pb2.Timestamp): Output only. The update time timestamp. - labels (Sequence[google.cloud.vmmigration_v1.types.Source.LabelsEntry]): + labels (Mapping[str, str]): The labels of the source. description (str): User-provided description of the source. @@ -1873,7 +1873,7 @@ class ComputeEngineTargetDefaults(proto.Message): The service account to associate the VM with. disk_type (google.cloud.vmmigration_v1.types.ComputeEngineDiskType): The disk type to use in the VM. - labels (Sequence[google.cloud.vmmigration_v1.types.ComputeEngineTargetDefaults.LabelsEntry]): + labels (Mapping[str, str]): A map of labels to associate with the VM. license_type (google.cloud.vmmigration_v1.types.ComputeEngineLicenseType): The license type to use in OS adaptation. @@ -1890,7 +1890,7 @@ class ComputeEngineTargetDefaults(proto.Message): boot_option (google.cloud.vmmigration_v1.types.ComputeEngineBootOption): Output only. The VM Boot Option, as set in the source vm. - metadata (Sequence[google.cloud.vmmigration_v1.types.ComputeEngineTargetDefaults.MetadataEntry]): + metadata (Mapping[str, str]): The metadata key/value pairs to assign to the VM. """ @@ -1994,7 +1994,7 @@ class ComputeEngineTargetDetails(proto.Message): The service account to associate the VM with. disk_type (google.cloud.vmmigration_v1.types.ComputeEngineDiskType): The disk type to use in the VM. - labels (Sequence[google.cloud.vmmigration_v1.types.ComputeEngineTargetDetails.LabelsEntry]): + labels (Mapping[str, str]): A map of labels to associate with the VM. license_type (google.cloud.vmmigration_v1.types.ComputeEngineLicenseType): The license type to use in OS adaptation. @@ -2010,7 +2010,7 @@ class ComputeEngineTargetDetails(proto.Message): boot option is EFI. boot_option (google.cloud.vmmigration_v1.types.ComputeEngineBootOption): The VM Boot Option, as set in the source vm. - metadata (Sequence[google.cloud.vmmigration_v1.types.ComputeEngineTargetDetails.MetadataEntry]): + metadata (Mapping[str, str]): The metadata key/value pairs to assign to the VM. """ diff --git a/samples/generated_samples/snippet_metadata_vmmigration_v1.json b/samples/generated_samples/snippet_metadata_vmmigration_v1.json index b747054..b6631d2 100644 --- a/samples/generated_samples/snippet_metadata_vmmigration_v1.json +++ b/samples/generated_samples/snippet_metadata_vmmigration_v1.json @@ -1,16 +1,61 @@ { + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.vmmigration.v1", + "version": "v1" + } + ], + "language": "PYTHON", + "name": "google-cloud-vm-migration" + }, "snippets": [ { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient", + "shortName": "VmMigrationAsyncClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient.add_group_migration", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.AddGroupMigration", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "AddGroupMigration" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.AddGroupMigrationRequest" + }, + { + "name": "group", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "add_group_migration" }, + "description": "Sample for AddGroupMigration", "file": "vmmigration_v1_generated_vm_migration_add_group_migration_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_AddGroupMigration_async", "segments": [ { @@ -43,18 +88,54 @@ "start": 46, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_add_group_migration_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient", + "shortName": "VmMigrationClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient.add_group_migration", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.AddGroupMigration", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "AddGroupMigration" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.AddGroupMigrationRequest" + }, + { + "name": "group", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "add_group_migration" }, + "description": "Sample for AddGroupMigration", "file": "vmmigration_v1_generated_vm_migration_add_group_migration_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_AddGroupMigration_sync", "segments": [ { @@ -87,19 +168,55 @@ "start": 46, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_add_group_migration_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient", + "shortName": "VmMigrationAsyncClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient.cancel_clone_job", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.CancelCloneJob", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "CancelCloneJob" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.CancelCloneJobRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "cancel_clone_job" }, + "description": "Sample for CancelCloneJob", "file": "vmmigration_v1_generated_vm_migration_cancel_clone_job_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_CancelCloneJob_async", "segments": [ { @@ -132,18 +249,54 @@ "start": 46, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_cancel_clone_job_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient", + "shortName": "VmMigrationClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient.cancel_clone_job", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.CancelCloneJob", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "CancelCloneJob" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.CancelCloneJobRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "cancel_clone_job" }, + "description": "Sample for CancelCloneJob", "file": "vmmigration_v1_generated_vm_migration_cancel_clone_job_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_CancelCloneJob_sync", "segments": [ { @@ -176,19 +329,55 @@ "start": 46, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_cancel_clone_job_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient", + "shortName": "VmMigrationAsyncClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient.cancel_cutover_job", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.CancelCutoverJob", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "CancelCutoverJob" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.CancelCutoverJobRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "cancel_cutover_job" }, + "description": "Sample for CancelCutoverJob", "file": "vmmigration_v1_generated_vm_migration_cancel_cutover_job_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_CancelCutoverJob_async", "segments": [ { @@ -221,18 +410,54 @@ "start": 46, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_cancel_cutover_job_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient", + "shortName": "VmMigrationClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient.cancel_cutover_job", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.CancelCutoverJob", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "CancelCutoverJob" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.CancelCutoverJobRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "cancel_cutover_job" }, + "description": "Sample for CancelCutoverJob", "file": "vmmigration_v1_generated_vm_migration_cancel_cutover_job_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_CancelCutoverJob_sync", "segments": [ { @@ -265,19 +490,63 @@ "start": 46, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_cancel_cutover_job_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient", + "shortName": "VmMigrationAsyncClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient.create_clone_job", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.CreateCloneJob", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "CreateCloneJob" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.CreateCloneJobRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "clone_job", + "type": "google.cloud.vmmigration_v1.types.CloneJob" + }, + { + "name": "clone_job_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_clone_job" }, + "description": "Sample for CreateCloneJob", "file": "vmmigration_v1_generated_vm_migration_create_clone_job_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_CreateCloneJob_async", "segments": [ { @@ -310,18 +579,62 @@ "start": 47, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_create_clone_job_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient", + "shortName": "VmMigrationClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient.create_clone_job", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.CreateCloneJob", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "CreateCloneJob" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.CreateCloneJobRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "clone_job", + "type": "google.cloud.vmmigration_v1.types.CloneJob" + }, + { + "name": "clone_job_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_clone_job" }, + "description": "Sample for CreateCloneJob", "file": "vmmigration_v1_generated_vm_migration_create_clone_job_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_CreateCloneJob_sync", "segments": [ { @@ -354,19 +667,63 @@ "start": 47, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_create_clone_job_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient", + "shortName": "VmMigrationAsyncClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient.create_cutover_job", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.CreateCutoverJob", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "CreateCutoverJob" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.CreateCutoverJobRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "cutover_job", + "type": "google.cloud.vmmigration_v1.types.CutoverJob" + }, + { + "name": "cutover_job_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_cutover_job" }, + "description": "Sample for CreateCutoverJob", "file": "vmmigration_v1_generated_vm_migration_create_cutover_job_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_CreateCutoverJob_async", "segments": [ { @@ -399,18 +756,62 @@ "start": 47, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_create_cutover_job_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient", + "shortName": "VmMigrationClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient.create_cutover_job", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.CreateCutoverJob", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "CreateCutoverJob" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.CreateCutoverJobRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "cutover_job", + "type": "google.cloud.vmmigration_v1.types.CutoverJob" + }, + { + "name": "cutover_job_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_cutover_job" }, + "description": "Sample for CreateCutoverJob", "file": "vmmigration_v1_generated_vm_migration_create_cutover_job_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_CreateCutoverJob_sync", "segments": [ { @@ -443,19 +844,63 @@ "start": 47, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_create_cutover_job_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient", + "shortName": "VmMigrationAsyncClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient.create_datacenter_connector", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.CreateDatacenterConnector", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "CreateDatacenterConnector" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.CreateDatacenterConnectorRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "datacenter_connector", + "type": "google.cloud.vmmigration_v1.types.DatacenterConnector" + }, + { + "name": "datacenter_connector_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_datacenter_connector" }, + "description": "Sample for CreateDatacenterConnector", "file": "vmmigration_v1_generated_vm_migration_create_datacenter_connector_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_CreateDatacenterConnector_async", "segments": [ { @@ -488,18 +933,62 @@ "start": 47, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_create_datacenter_connector_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient", + "shortName": "VmMigrationClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient.create_datacenter_connector", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.CreateDatacenterConnector", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "CreateDatacenterConnector" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.CreateDatacenterConnectorRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "datacenter_connector", + "type": "google.cloud.vmmigration_v1.types.DatacenterConnector" + }, + { + "name": "datacenter_connector_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_datacenter_connector" }, + "description": "Sample for CreateDatacenterConnector", "file": "vmmigration_v1_generated_vm_migration_create_datacenter_connector_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_CreateDatacenterConnector_sync", "segments": [ { @@ -532,19 +1021,63 @@ "start": 47, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_create_datacenter_connector_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient", + "shortName": "VmMigrationAsyncClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient.create_group", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.CreateGroup", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "CreateGroup" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.CreateGroupRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "group", + "type": "google.cloud.vmmigration_v1.types.Group" + }, + { + "name": "group_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_group" }, + "description": "Sample for CreateGroup", "file": "vmmigration_v1_generated_vm_migration_create_group_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_CreateGroup_async", "segments": [ { @@ -577,18 +1110,62 @@ "start": 47, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_create_group_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient", + "shortName": "VmMigrationClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient.create_group", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.CreateGroup", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "CreateGroup" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.CreateGroupRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "group", + "type": "google.cloud.vmmigration_v1.types.Group" + }, + { + "name": "group_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_group" }, + "description": "Sample for CreateGroup", "file": "vmmigration_v1_generated_vm_migration_create_group_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_CreateGroup_sync", "segments": [ { @@ -621,19 +1198,63 @@ "start": 47, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_create_group_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient", + "shortName": "VmMigrationAsyncClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient.create_migrating_vm", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.CreateMigratingVm", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "CreateMigratingVm" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.CreateMigratingVmRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "migrating_vm", + "type": "google.cloud.vmmigration_v1.types.MigratingVm" + }, + { + "name": "migrating_vm_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_migrating_vm" }, + "description": "Sample for CreateMigratingVm", "file": "vmmigration_v1_generated_vm_migration_create_migrating_vm_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_CreateMigratingVm_async", "segments": [ { @@ -666,18 +1287,62 @@ "start": 47, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_create_migrating_vm_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient", + "shortName": "VmMigrationClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient.create_migrating_vm", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.CreateMigratingVm", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "CreateMigratingVm" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.CreateMigratingVmRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "migrating_vm", + "type": "google.cloud.vmmigration_v1.types.MigratingVm" + }, + { + "name": "migrating_vm_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_migrating_vm" }, + "description": "Sample for CreateMigratingVm", "file": "vmmigration_v1_generated_vm_migration_create_migrating_vm_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_CreateMigratingVm_sync", "segments": [ { @@ -710,19 +1375,63 @@ "start": 47, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_create_migrating_vm_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient", + "shortName": "VmMigrationAsyncClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient.create_source", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.CreateSource", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "CreateSource" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.CreateSourceRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "source", + "type": "google.cloud.vmmigration_v1.types.Source" + }, + { + "name": "source_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_source" }, + "description": "Sample for CreateSource", "file": "vmmigration_v1_generated_vm_migration_create_source_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_CreateSource_async", "segments": [ { @@ -755,18 +1464,62 @@ "start": 47, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_create_source_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient", + "shortName": "VmMigrationClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient.create_source", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.CreateSource", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "CreateSource" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.CreateSourceRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "source", + "type": "google.cloud.vmmigration_v1.types.Source" + }, + { + "name": "source_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_source" }, + "description": "Sample for CreateSource", "file": "vmmigration_v1_generated_vm_migration_create_source_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_CreateSource_sync", "segments": [ { @@ -799,19 +1552,63 @@ "start": 47, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_create_source_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient", + "shortName": "VmMigrationAsyncClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient.create_target_project", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.CreateTargetProject", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "CreateTargetProject" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.CreateTargetProjectRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "target_project", + "type": "google.cloud.vmmigration_v1.types.TargetProject" + }, + { + "name": "target_project_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_target_project" }, + "description": "Sample for CreateTargetProject", "file": "vmmigration_v1_generated_vm_migration_create_target_project_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_CreateTargetProject_async", "segments": [ { @@ -844,18 +1641,62 @@ "start": 47, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_create_target_project_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient", + "shortName": "VmMigrationClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient.create_target_project", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.CreateTargetProject", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "CreateTargetProject" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.CreateTargetProjectRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "target_project", + "type": "google.cloud.vmmigration_v1.types.TargetProject" + }, + { + "name": "target_project_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_target_project" }, + "description": "Sample for CreateTargetProject", "file": "vmmigration_v1_generated_vm_migration_create_target_project_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_CreateTargetProject_sync", "segments": [ { @@ -888,19 +1729,63 @@ "start": 47, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_create_target_project_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient", + "shortName": "VmMigrationAsyncClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient.create_utilization_report", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.CreateUtilizationReport", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "CreateUtilizationReport" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.CreateUtilizationReportRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "utilization_report", + "type": "google.cloud.vmmigration_v1.types.UtilizationReport" + }, + { + "name": "utilization_report_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_utilization_report" }, + "description": "Sample for CreateUtilizationReport", "file": "vmmigration_v1_generated_vm_migration_create_utilization_report_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_CreateUtilizationReport_async", "segments": [ { @@ -933,18 +1818,62 @@ "start": 47, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_create_utilization_report_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient", + "shortName": "VmMigrationClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient.create_utilization_report", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.CreateUtilizationReport", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "CreateUtilizationReport" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.CreateUtilizationReportRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "utilization_report", + "type": "google.cloud.vmmigration_v1.types.UtilizationReport" + }, + { + "name": "utilization_report_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_utilization_report" }, + "description": "Sample for CreateUtilizationReport", "file": "vmmigration_v1_generated_vm_migration_create_utilization_report_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_CreateUtilizationReport_sync", "segments": [ { @@ -977,19 +1906,55 @@ "start": 47, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_create_utilization_report_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient", + "shortName": "VmMigrationAsyncClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient.delete_datacenter_connector", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.DeleteDatacenterConnector", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "DeleteDatacenterConnector" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.DeleteDatacenterConnectorRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "delete_datacenter_connector" }, + "description": "Sample for DeleteDatacenterConnector", "file": "vmmigration_v1_generated_vm_migration_delete_datacenter_connector_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_DeleteDatacenterConnector_async", "segments": [ { @@ -1022,18 +1987,54 @@ "start": 46, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_delete_datacenter_connector_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient", + "shortName": "VmMigrationClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient.delete_datacenter_connector", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.DeleteDatacenterConnector", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "DeleteDatacenterConnector" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.DeleteDatacenterConnectorRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "delete_datacenter_connector" }, + "description": "Sample for DeleteDatacenterConnector", "file": "vmmigration_v1_generated_vm_migration_delete_datacenter_connector_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_DeleteDatacenterConnector_sync", "segments": [ { @@ -1066,19 +2067,55 @@ "start": 46, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_delete_datacenter_connector_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient", + "shortName": "VmMigrationAsyncClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient.delete_group", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.DeleteGroup", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "DeleteGroup" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.DeleteGroupRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "delete_group" }, + "description": "Sample for DeleteGroup", "file": "vmmigration_v1_generated_vm_migration_delete_group_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_DeleteGroup_async", "segments": [ { @@ -1111,18 +2148,54 @@ "start": 46, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_delete_group_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient", + "shortName": "VmMigrationClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient.delete_group", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.DeleteGroup", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "DeleteGroup" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.DeleteGroupRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "delete_group" }, + "description": "Sample for DeleteGroup", "file": "vmmigration_v1_generated_vm_migration_delete_group_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_DeleteGroup_sync", "segments": [ { @@ -1155,19 +2228,55 @@ "start": 46, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_delete_group_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient", + "shortName": "VmMigrationAsyncClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient.delete_migrating_vm", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.DeleteMigratingVm", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "DeleteMigratingVm" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.DeleteMigratingVmRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "delete_migrating_vm" }, + "description": "Sample for DeleteMigratingVm", "file": "vmmigration_v1_generated_vm_migration_delete_migrating_vm_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_DeleteMigratingVm_async", "segments": [ { @@ -1200,18 +2309,54 @@ "start": 46, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_delete_migrating_vm_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient", + "shortName": "VmMigrationClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient.delete_migrating_vm", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.DeleteMigratingVm", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "DeleteMigratingVm" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.DeleteMigratingVmRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "delete_migrating_vm" }, + "description": "Sample for DeleteMigratingVm", "file": "vmmigration_v1_generated_vm_migration_delete_migrating_vm_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_DeleteMigratingVm_sync", "segments": [ { @@ -1244,19 +2389,55 @@ "start": 46, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_delete_migrating_vm_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient", + "shortName": "VmMigrationAsyncClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient.delete_source", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.DeleteSource", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "DeleteSource" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.DeleteSourceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "delete_source" }, + "description": "Sample for DeleteSource", "file": "vmmigration_v1_generated_vm_migration_delete_source_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_DeleteSource_async", "segments": [ { @@ -1289,18 +2470,54 @@ "start": 46, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_delete_source_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient", + "shortName": "VmMigrationClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient.delete_source", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.DeleteSource", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "DeleteSource" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.DeleteSourceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "delete_source" }, + "description": "Sample for DeleteSource", "file": "vmmigration_v1_generated_vm_migration_delete_source_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_DeleteSource_sync", "segments": [ { @@ -1333,19 +2550,55 @@ "start": 46, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_delete_source_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient", + "shortName": "VmMigrationAsyncClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient.delete_target_project", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.DeleteTargetProject", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "DeleteTargetProject" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.DeleteTargetProjectRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "delete_target_project" }, + "description": "Sample for DeleteTargetProject", "file": "vmmigration_v1_generated_vm_migration_delete_target_project_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_DeleteTargetProject_async", "segments": [ { @@ -1378,18 +2631,54 @@ "start": 46, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_delete_target_project_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient", + "shortName": "VmMigrationClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient.delete_target_project", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.DeleteTargetProject", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "DeleteTargetProject" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.DeleteTargetProjectRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "delete_target_project" }, + "description": "Sample for DeleteTargetProject", "file": "vmmigration_v1_generated_vm_migration_delete_target_project_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_DeleteTargetProject_sync", "segments": [ { @@ -1422,19 +2711,55 @@ "start": 46, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_delete_target_project_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient", + "shortName": "VmMigrationAsyncClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient.delete_utilization_report", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.DeleteUtilizationReport", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "DeleteUtilizationReport" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.DeleteUtilizationReportRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "delete_utilization_report" }, + "description": "Sample for DeleteUtilizationReport", "file": "vmmigration_v1_generated_vm_migration_delete_utilization_report_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_DeleteUtilizationReport_async", "segments": [ { @@ -1467,18 +2792,54 @@ "start": 46, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_delete_utilization_report_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient", + "shortName": "VmMigrationClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient.delete_utilization_report", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.DeleteUtilizationReport", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "DeleteUtilizationReport" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.DeleteUtilizationReportRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "delete_utilization_report" }, + "description": "Sample for DeleteUtilizationReport", "file": "vmmigration_v1_generated_vm_migration_delete_utilization_report_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_DeleteUtilizationReport_sync", "segments": [ { @@ -1511,19 +2872,55 @@ "start": 46, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_delete_utilization_report_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient", + "shortName": "VmMigrationAsyncClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient.fetch_inventory", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.FetchInventory", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "FetchInventory" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.FetchInventoryRequest" + }, + { + "name": "source", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.vmmigration_v1.types.FetchInventoryResponse", + "shortName": "fetch_inventory" }, + "description": "Sample for FetchInventory", "file": "vmmigration_v1_generated_vm_migration_fetch_inventory_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_FetchInventory_async", "segments": [ { @@ -1556,18 +2953,54 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_fetch_inventory_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient", + "shortName": "VmMigrationClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient.fetch_inventory", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.FetchInventory", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "FetchInventory" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.FetchInventoryRequest" + }, + { + "name": "source", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.vmmigration_v1.types.FetchInventoryResponse", + "shortName": "fetch_inventory" }, + "description": "Sample for FetchInventory", "file": "vmmigration_v1_generated_vm_migration_fetch_inventory_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_FetchInventory_sync", "segments": [ { @@ -1600,19 +3033,55 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_fetch_inventory_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient", + "shortName": "VmMigrationAsyncClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient.finalize_migration", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.FinalizeMigration", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "FinalizeMigration" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.FinalizeMigrationRequest" + }, + { + "name": "migrating_vm", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "finalize_migration" }, + "description": "Sample for FinalizeMigration", "file": "vmmigration_v1_generated_vm_migration_finalize_migration_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_FinalizeMigration_async", "segments": [ { @@ -1645,18 +3114,54 @@ "start": 46, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_finalize_migration_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient", + "shortName": "VmMigrationClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient.finalize_migration", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.FinalizeMigration", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "FinalizeMigration" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.FinalizeMigrationRequest" + }, + { + "name": "migrating_vm", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "finalize_migration" }, + "description": "Sample for FinalizeMigration", "file": "vmmigration_v1_generated_vm_migration_finalize_migration_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_FinalizeMigration_sync", "segments": [ { @@ -1689,19 +3194,55 @@ "start": 46, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_finalize_migration_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient", + "shortName": "VmMigrationAsyncClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient.get_clone_job", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.GetCloneJob", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "GetCloneJob" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.GetCloneJobRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.vmmigration_v1.types.CloneJob", + "shortName": "get_clone_job" }, + "description": "Sample for GetCloneJob", "file": "vmmigration_v1_generated_vm_migration_get_clone_job_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_GetCloneJob_async", "segments": [ { @@ -1734,18 +3275,54 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_get_clone_job_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient", + "shortName": "VmMigrationClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient.get_clone_job", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.GetCloneJob", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "GetCloneJob" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.GetCloneJobRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.vmmigration_v1.types.CloneJob", + "shortName": "get_clone_job" }, + "description": "Sample for GetCloneJob", "file": "vmmigration_v1_generated_vm_migration_get_clone_job_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_GetCloneJob_sync", "segments": [ { @@ -1778,19 +3355,55 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_get_clone_job_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient", + "shortName": "VmMigrationAsyncClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient.get_cutover_job", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.GetCutoverJob", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "GetCutoverJob" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.GetCutoverJobRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.vmmigration_v1.types.CutoverJob", + "shortName": "get_cutover_job" }, + "description": "Sample for GetCutoverJob", "file": "vmmigration_v1_generated_vm_migration_get_cutover_job_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_GetCutoverJob_async", "segments": [ { @@ -1823,18 +3436,54 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_get_cutover_job_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient", + "shortName": "VmMigrationClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient.get_cutover_job", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.GetCutoverJob", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "GetCutoverJob" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.GetCutoverJobRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.vmmigration_v1.types.CutoverJob", + "shortName": "get_cutover_job" }, + "description": "Sample for GetCutoverJob", "file": "vmmigration_v1_generated_vm_migration_get_cutover_job_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_GetCutoverJob_sync", "segments": [ { @@ -1867,19 +3516,55 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_get_cutover_job_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient", + "shortName": "VmMigrationAsyncClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient.get_datacenter_connector", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.GetDatacenterConnector", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "GetDatacenterConnector" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.GetDatacenterConnectorRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.vmmigration_v1.types.DatacenterConnector", + "shortName": "get_datacenter_connector" }, + "description": "Sample for GetDatacenterConnector", "file": "vmmigration_v1_generated_vm_migration_get_datacenter_connector_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_GetDatacenterConnector_async", "segments": [ { @@ -1912,18 +3597,54 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_get_datacenter_connector_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient", + "shortName": "VmMigrationClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient.get_datacenter_connector", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.GetDatacenterConnector", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "GetDatacenterConnector" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.GetDatacenterConnectorRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.vmmigration_v1.types.DatacenterConnector", + "shortName": "get_datacenter_connector" }, + "description": "Sample for GetDatacenterConnector", "file": "vmmigration_v1_generated_vm_migration_get_datacenter_connector_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_GetDatacenterConnector_sync", "segments": [ { @@ -1956,19 +3677,55 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_get_datacenter_connector_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient", + "shortName": "VmMigrationAsyncClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient.get_group", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.GetGroup", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "GetGroup" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.GetGroupRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.vmmigration_v1.types.Group", + "shortName": "get_group" }, + "description": "Sample for GetGroup", "file": "vmmigration_v1_generated_vm_migration_get_group_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_GetGroup_async", "segments": [ { @@ -2001,18 +3758,54 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_get_group_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient", + "shortName": "VmMigrationClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient.get_group", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.GetGroup", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "GetGroup" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.GetGroupRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.vmmigration_v1.types.Group", + "shortName": "get_group" }, + "description": "Sample for GetGroup", "file": "vmmigration_v1_generated_vm_migration_get_group_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_GetGroup_sync", "segments": [ { @@ -2045,19 +3838,55 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_get_group_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient", + "shortName": "VmMigrationAsyncClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient.get_migrating_vm", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.GetMigratingVm", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "GetMigratingVm" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.GetMigratingVmRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.vmmigration_v1.types.MigratingVm", + "shortName": "get_migrating_vm" }, + "description": "Sample for GetMigratingVm", "file": "vmmigration_v1_generated_vm_migration_get_migrating_vm_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_GetMigratingVm_async", "segments": [ { @@ -2090,18 +3919,54 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_get_migrating_vm_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient", + "shortName": "VmMigrationClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient.get_migrating_vm", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.GetMigratingVm", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "GetMigratingVm" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.GetMigratingVmRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.vmmigration_v1.types.MigratingVm", + "shortName": "get_migrating_vm" }, + "description": "Sample for GetMigratingVm", "file": "vmmigration_v1_generated_vm_migration_get_migrating_vm_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_GetMigratingVm_sync", "segments": [ { @@ -2134,19 +3999,55 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_get_migrating_vm_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient", + "shortName": "VmMigrationAsyncClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient.get_source", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.GetSource", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "GetSource" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.GetSourceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.vmmigration_v1.types.Source", + "shortName": "get_source" }, + "description": "Sample for GetSource", "file": "vmmigration_v1_generated_vm_migration_get_source_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_GetSource_async", "segments": [ { @@ -2179,18 +4080,54 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_get_source_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient", + "shortName": "VmMigrationClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient.get_source", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.GetSource", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "GetSource" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.GetSourceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.vmmigration_v1.types.Source", + "shortName": "get_source" }, + "description": "Sample for GetSource", "file": "vmmigration_v1_generated_vm_migration_get_source_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_GetSource_sync", "segments": [ { @@ -2223,19 +4160,55 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_get_source_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient", + "shortName": "VmMigrationAsyncClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient.get_target_project", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.GetTargetProject", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "GetTargetProject" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.GetTargetProjectRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.vmmigration_v1.types.TargetProject", + "shortName": "get_target_project" }, + "description": "Sample for GetTargetProject", "file": "vmmigration_v1_generated_vm_migration_get_target_project_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_GetTargetProject_async", "segments": [ { @@ -2268,18 +4241,54 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_get_target_project_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient", + "shortName": "VmMigrationClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient.get_target_project", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.GetTargetProject", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "GetTargetProject" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.GetTargetProjectRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.vmmigration_v1.types.TargetProject", + "shortName": "get_target_project" }, + "description": "Sample for GetTargetProject", "file": "vmmigration_v1_generated_vm_migration_get_target_project_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_GetTargetProject_sync", "segments": [ { @@ -2312,19 +4321,55 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_get_target_project_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient", + "shortName": "VmMigrationAsyncClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient.get_utilization_report", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.GetUtilizationReport", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "GetUtilizationReport" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.GetUtilizationReportRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.vmmigration_v1.types.UtilizationReport", + "shortName": "get_utilization_report" }, + "description": "Sample for GetUtilizationReport", "file": "vmmigration_v1_generated_vm_migration_get_utilization_report_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_GetUtilizationReport_async", "segments": [ { @@ -2357,18 +4402,54 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_get_utilization_report_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient", + "shortName": "VmMigrationClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient.get_utilization_report", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.GetUtilizationReport", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "GetUtilizationReport" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.GetUtilizationReportRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.vmmigration_v1.types.UtilizationReport", + "shortName": "get_utilization_report" }, + "description": "Sample for GetUtilizationReport", "file": "vmmigration_v1_generated_vm_migration_get_utilization_report_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_GetUtilizationReport_sync", "segments": [ { @@ -2401,19 +4482,55 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_get_utilization_report_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient", + "shortName": "VmMigrationAsyncClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient.list_clone_jobs", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.ListCloneJobs", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "ListCloneJobs" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.ListCloneJobsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.vmmigration_v1.services.vm_migration.pagers.ListCloneJobsAsyncPager", + "shortName": "list_clone_jobs" }, + "description": "Sample for ListCloneJobs", "file": "vmmigration_v1_generated_vm_migration_list_clone_jobs_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_ListCloneJobs_async", "segments": [ { @@ -2446,18 +4563,54 @@ "start": 43, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_list_clone_jobs_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient", + "shortName": "VmMigrationClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient.list_clone_jobs", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.ListCloneJobs", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "ListCloneJobs" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.ListCloneJobsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.vmmigration_v1.services.vm_migration.pagers.ListCloneJobsPager", + "shortName": "list_clone_jobs" }, + "description": "Sample for ListCloneJobs", "file": "vmmigration_v1_generated_vm_migration_list_clone_jobs_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_ListCloneJobs_sync", "segments": [ { @@ -2490,19 +4643,55 @@ "start": 43, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_list_clone_jobs_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient", + "shortName": "VmMigrationAsyncClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient.list_cutover_jobs", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.ListCutoverJobs", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "ListCutoverJobs" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.ListCutoverJobsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.vmmigration_v1.services.vm_migration.pagers.ListCutoverJobsAsyncPager", + "shortName": "list_cutover_jobs" }, + "description": "Sample for ListCutoverJobs", "file": "vmmigration_v1_generated_vm_migration_list_cutover_jobs_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_ListCutoverJobs_async", "segments": [ { @@ -2535,18 +4724,54 @@ "start": 43, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_list_cutover_jobs_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient", + "shortName": "VmMigrationClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient.list_cutover_jobs", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.ListCutoverJobs", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "ListCutoverJobs" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.ListCutoverJobsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.vmmigration_v1.services.vm_migration.pagers.ListCutoverJobsPager", + "shortName": "list_cutover_jobs" }, + "description": "Sample for ListCutoverJobs", "file": "vmmigration_v1_generated_vm_migration_list_cutover_jobs_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_ListCutoverJobs_sync", "segments": [ { @@ -2579,19 +4804,55 @@ "start": 43, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_list_cutover_jobs_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient", + "shortName": "VmMigrationAsyncClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient.list_datacenter_connectors", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.ListDatacenterConnectors", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "ListDatacenterConnectors" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.ListDatacenterConnectorsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.vmmigration_v1.services.vm_migration.pagers.ListDatacenterConnectorsAsyncPager", + "shortName": "list_datacenter_connectors" }, + "description": "Sample for ListDatacenterConnectors", "file": "vmmigration_v1_generated_vm_migration_list_datacenter_connectors_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_ListDatacenterConnectors_async", "segments": [ { @@ -2624,18 +4885,54 @@ "start": 43, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_list_datacenter_connectors_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient", + "shortName": "VmMigrationClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient.list_datacenter_connectors", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.ListDatacenterConnectors", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "ListDatacenterConnectors" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.ListDatacenterConnectorsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.vmmigration_v1.services.vm_migration.pagers.ListDatacenterConnectorsPager", + "shortName": "list_datacenter_connectors" }, + "description": "Sample for ListDatacenterConnectors", "file": "vmmigration_v1_generated_vm_migration_list_datacenter_connectors_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_ListDatacenterConnectors_sync", "segments": [ { @@ -2668,19 +4965,55 @@ "start": 43, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_list_datacenter_connectors_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient", + "shortName": "VmMigrationAsyncClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient.list_groups", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.ListGroups", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "ListGroups" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.ListGroupsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.vmmigration_v1.services.vm_migration.pagers.ListGroupsAsyncPager", + "shortName": "list_groups" }, + "description": "Sample for ListGroups", "file": "vmmigration_v1_generated_vm_migration_list_groups_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_ListGroups_async", "segments": [ { @@ -2713,18 +5046,54 @@ "start": 43, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_list_groups_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient", + "shortName": "VmMigrationClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient.list_groups", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.ListGroups", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "ListGroups" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.ListGroupsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.vmmigration_v1.services.vm_migration.pagers.ListGroupsPager", + "shortName": "list_groups" }, + "description": "Sample for ListGroups", "file": "vmmigration_v1_generated_vm_migration_list_groups_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_ListGroups_sync", "segments": [ { @@ -2757,19 +5126,55 @@ "start": 43, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_list_groups_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient", + "shortName": "VmMigrationAsyncClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient.list_migrating_vms", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.ListMigratingVms", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "ListMigratingVms" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.ListMigratingVmsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.vmmigration_v1.services.vm_migration.pagers.ListMigratingVmsAsyncPager", + "shortName": "list_migrating_vms" }, + "description": "Sample for ListMigratingVms", "file": "vmmigration_v1_generated_vm_migration_list_migrating_vms_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_ListMigratingVms_async", "segments": [ { @@ -2802,18 +5207,54 @@ "start": 43, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_list_migrating_vms_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient", + "shortName": "VmMigrationClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient.list_migrating_vms", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.ListMigratingVms", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "ListMigratingVms" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.ListMigratingVmsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.vmmigration_v1.services.vm_migration.pagers.ListMigratingVmsPager", + "shortName": "list_migrating_vms" }, + "description": "Sample for ListMigratingVms", "file": "vmmigration_v1_generated_vm_migration_list_migrating_vms_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_ListMigratingVms_sync", "segments": [ { @@ -2846,19 +5287,55 @@ "start": 43, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_list_migrating_vms_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient", + "shortName": "VmMigrationAsyncClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient.list_sources", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.ListSources", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "ListSources" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.ListSourcesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.vmmigration_v1.services.vm_migration.pagers.ListSourcesAsyncPager", + "shortName": "list_sources" }, + "description": "Sample for ListSources", "file": "vmmigration_v1_generated_vm_migration_list_sources_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_ListSources_async", "segments": [ { @@ -2891,18 +5368,54 @@ "start": 43, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_list_sources_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient", + "shortName": "VmMigrationClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient.list_sources", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.ListSources", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "ListSources" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.ListSourcesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.vmmigration_v1.services.vm_migration.pagers.ListSourcesPager", + "shortName": "list_sources" }, + "description": "Sample for ListSources", "file": "vmmigration_v1_generated_vm_migration_list_sources_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_ListSources_sync", "segments": [ { @@ -2935,19 +5448,55 @@ "start": 43, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_list_sources_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient", + "shortName": "VmMigrationAsyncClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient.list_target_projects", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.ListTargetProjects", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "ListTargetProjects" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.ListTargetProjectsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.vmmigration_v1.services.vm_migration.pagers.ListTargetProjectsAsyncPager", + "shortName": "list_target_projects" }, + "description": "Sample for ListTargetProjects", "file": "vmmigration_v1_generated_vm_migration_list_target_projects_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_ListTargetProjects_async", "segments": [ { @@ -2980,18 +5529,54 @@ "start": 43, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_list_target_projects_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient", + "shortName": "VmMigrationClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient.list_target_projects", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.ListTargetProjects", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "ListTargetProjects" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.ListTargetProjectsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.vmmigration_v1.services.vm_migration.pagers.ListTargetProjectsPager", + "shortName": "list_target_projects" }, + "description": "Sample for ListTargetProjects", "file": "vmmigration_v1_generated_vm_migration_list_target_projects_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_ListTargetProjects_sync", "segments": [ { @@ -3024,19 +5609,55 @@ "start": 43, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_list_target_projects_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient", + "shortName": "VmMigrationAsyncClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient.list_utilization_reports", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.ListUtilizationReports", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "ListUtilizationReports" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.ListUtilizationReportsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.vmmigration_v1.services.vm_migration.pagers.ListUtilizationReportsAsyncPager", + "shortName": "list_utilization_reports" }, + "description": "Sample for ListUtilizationReports", "file": "vmmigration_v1_generated_vm_migration_list_utilization_reports_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_ListUtilizationReports_async", "segments": [ { @@ -3069,18 +5690,54 @@ "start": 43, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_list_utilization_reports_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient", + "shortName": "VmMigrationClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient.list_utilization_reports", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.ListUtilizationReports", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "ListUtilizationReports" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.ListUtilizationReportsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.vmmigration_v1.services.vm_migration.pagers.ListUtilizationReportsPager", + "shortName": "list_utilization_reports" }, + "description": "Sample for ListUtilizationReports", "file": "vmmigration_v1_generated_vm_migration_list_utilization_reports_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_ListUtilizationReports_sync", "segments": [ { @@ -3113,19 +5770,51 @@ "start": 43, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_list_utilization_reports_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient", + "shortName": "VmMigrationAsyncClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient.pause_migration", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.PauseMigration", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "PauseMigration" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.PauseMigrationRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "pause_migration" }, + "description": "Sample for PauseMigration", "file": "vmmigration_v1_generated_vm_migration_pause_migration_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_PauseMigration_async", "segments": [ { @@ -3158,18 +5847,50 @@ "start": 46, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_pause_migration_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient", + "shortName": "VmMigrationClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient.pause_migration", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.PauseMigration", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "PauseMigration" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.PauseMigrationRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "pause_migration" }, + "description": "Sample for PauseMigration", "file": "vmmigration_v1_generated_vm_migration_pause_migration_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_PauseMigration_sync", "segments": [ { @@ -3202,19 +5923,55 @@ "start": 46, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_pause_migration_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient", + "shortName": "VmMigrationAsyncClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient.remove_group_migration", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.RemoveGroupMigration", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "RemoveGroupMigration" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.RemoveGroupMigrationRequest" + }, + { + "name": "group", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "remove_group_migration" }, + "description": "Sample for RemoveGroupMigration", "file": "vmmigration_v1_generated_vm_migration_remove_group_migration_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_RemoveGroupMigration_async", "segments": [ { @@ -3247,18 +6004,54 @@ "start": 46, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_remove_group_migration_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient", + "shortName": "VmMigrationClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient.remove_group_migration", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.RemoveGroupMigration", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "RemoveGroupMigration" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.RemoveGroupMigrationRequest" + }, + { + "name": "group", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "remove_group_migration" }, + "description": "Sample for RemoveGroupMigration", "file": "vmmigration_v1_generated_vm_migration_remove_group_migration_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_RemoveGroupMigration_sync", "segments": [ { @@ -3291,19 +6084,51 @@ "start": 46, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_remove_group_migration_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient", + "shortName": "VmMigrationAsyncClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient.resume_migration", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.ResumeMigration", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "ResumeMigration" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.ResumeMigrationRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "resume_migration" }, + "description": "Sample for ResumeMigration", "file": "vmmigration_v1_generated_vm_migration_resume_migration_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_ResumeMigration_async", "segments": [ { @@ -3336,18 +6161,50 @@ "start": 46, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_resume_migration_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient", + "shortName": "VmMigrationClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient.resume_migration", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.ResumeMigration", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "ResumeMigration" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.ResumeMigrationRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "resume_migration" }, + "description": "Sample for ResumeMigration", "file": "vmmigration_v1_generated_vm_migration_resume_migration_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_ResumeMigration_sync", "segments": [ { @@ -3380,19 +6237,55 @@ "start": 46, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_resume_migration_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient", + "shortName": "VmMigrationAsyncClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient.start_migration", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.StartMigration", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "StartMigration" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.StartMigrationRequest" + }, + { + "name": "migrating_vm", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "start_migration" }, + "description": "Sample for StartMigration", "file": "vmmigration_v1_generated_vm_migration_start_migration_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_StartMigration_async", "segments": [ { @@ -3425,18 +6318,54 @@ "start": 46, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_start_migration_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient", + "shortName": "VmMigrationClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient.start_migration", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.StartMigration", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "StartMigration" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.StartMigrationRequest" + }, + { + "name": "migrating_vm", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "start_migration" }, + "description": "Sample for StartMigration", "file": "vmmigration_v1_generated_vm_migration_start_migration_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_StartMigration_sync", "segments": [ { @@ -3469,19 +6398,59 @@ "start": 46, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_start_migration_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient", + "shortName": "VmMigrationAsyncClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient.update_group", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.UpdateGroup", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "UpdateGroup" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.UpdateGroupRequest" + }, + { + "name": "group", + "type": "google.cloud.vmmigration_v1.types.Group" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "update_group" }, + "description": "Sample for UpdateGroup", "file": "vmmigration_v1_generated_vm_migration_update_group_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_UpdateGroup_async", "segments": [ { @@ -3514,18 +6483,58 @@ "start": 45, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_update_group_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient", + "shortName": "VmMigrationClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient.update_group", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.UpdateGroup", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "UpdateGroup" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.UpdateGroupRequest" + }, + { + "name": "group", + "type": "google.cloud.vmmigration_v1.types.Group" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "update_group" }, + "description": "Sample for UpdateGroup", "file": "vmmigration_v1_generated_vm_migration_update_group_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_UpdateGroup_sync", "segments": [ { @@ -3558,19 +6567,59 @@ "start": 45, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_update_group_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient", + "shortName": "VmMigrationAsyncClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient.update_migrating_vm", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.UpdateMigratingVm", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "UpdateMigratingVm" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.UpdateMigratingVmRequest" + }, + { + "name": "migrating_vm", + "type": "google.cloud.vmmigration_v1.types.MigratingVm" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "update_migrating_vm" }, + "description": "Sample for UpdateMigratingVm", "file": "vmmigration_v1_generated_vm_migration_update_migrating_vm_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_UpdateMigratingVm_async", "segments": [ { @@ -3603,18 +6652,58 @@ "start": 45, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_update_migrating_vm_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient", + "shortName": "VmMigrationClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient.update_migrating_vm", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.UpdateMigratingVm", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "UpdateMigratingVm" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.UpdateMigratingVmRequest" + }, + { + "name": "migrating_vm", + "type": "google.cloud.vmmigration_v1.types.MigratingVm" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "update_migrating_vm" }, + "description": "Sample for UpdateMigratingVm", "file": "vmmigration_v1_generated_vm_migration_update_migrating_vm_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_UpdateMigratingVm_sync", "segments": [ { @@ -3647,19 +6736,59 @@ "start": 45, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_update_migrating_vm_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient", + "shortName": "VmMigrationAsyncClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient.update_source", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.UpdateSource", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "UpdateSource" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.UpdateSourceRequest" + }, + { + "name": "source", + "type": "google.cloud.vmmigration_v1.types.Source" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "update_source" }, + "description": "Sample for UpdateSource", "file": "vmmigration_v1_generated_vm_migration_update_source_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_UpdateSource_async", "segments": [ { @@ -3692,18 +6821,58 @@ "start": 45, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_update_source_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient", + "shortName": "VmMigrationClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient.update_source", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.UpdateSource", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "UpdateSource" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.UpdateSourceRequest" + }, + { + "name": "source", + "type": "google.cloud.vmmigration_v1.types.Source" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "update_source" }, + "description": "Sample for UpdateSource", "file": "vmmigration_v1_generated_vm_migration_update_source_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_UpdateSource_sync", "segments": [ { @@ -3736,19 +6905,59 @@ "start": 45, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_update_source_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient", + "shortName": "VmMigrationAsyncClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationAsyncClient.update_target_project", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.UpdateTargetProject", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "UpdateTargetProject" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.UpdateTargetProjectRequest" + }, + { + "name": "target_project", + "type": "google.cloud.vmmigration_v1.types.TargetProject" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "update_target_project" }, + "description": "Sample for UpdateTargetProject", "file": "vmmigration_v1_generated_vm_migration_update_target_project_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_UpdateTargetProject_async", "segments": [ { @@ -3781,18 +6990,58 @@ "start": 45, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_update_target_project_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient", + "shortName": "VmMigrationClient" + }, + "fullName": "google.cloud.vmmigration_v1.VmMigrationClient.update_target_project", "method": { + "fullName": "google.cloud.vmmigration.v1.VmMigration.UpdateTargetProject", "service": { + "fullName": "google.cloud.vmmigration.v1.VmMigration", "shortName": "VmMigration" }, "shortName": "UpdateTargetProject" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.vmmigration_v1.types.UpdateTargetProjectRequest" + }, + { + "name": "target_project", + "type": "google.cloud.vmmigration_v1.types.TargetProject" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "update_target_project" }, + "description": "Sample for UpdateTargetProject", "file": "vmmigration_v1_generated_vm_migration_update_target_project_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "vmmigration_v1_generated_VmMigration_UpdateTargetProject_sync", "segments": [ { @@ -3825,7 +7074,8 @@ "start": 45, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "vmmigration_v1_generated_vm_migration_update_target_project_sync.py" } ] } diff --git a/tests/unit/gapic/vmmigration_v1/test_vm_migration.py b/tests/unit/gapic/vmmigration_v1/test_vm_migration.py index d2140b0..d5a93f7 100644 --- a/tests/unit/gapic/vmmigration_v1/test_vm_migration.py +++ b/tests/unit/gapic/vmmigration_v1/test_vm_migration.py @@ -92,24 +92,24 @@ def test__get_default_mtls_endpoint(): @pytest.mark.parametrize( - "client_class", + "client_class,transport_name", [ - VmMigrationClient, - VmMigrationAsyncClient, + (VmMigrationClient, "grpc"), + (VmMigrationAsyncClient, "grpc_asyncio"), ], ) -def test_vm_migration_client_from_service_account_info(client_class): +def test_vm_migration_client_from_service_account_info(client_class, transport_name): creds = ga_credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = client_class.from_service_account_info(info) + client = client_class.from_service_account_info(info, transport=transport_name) assert client.transport._credentials == creds assert isinstance(client, client_class) - assert client.transport._host == "vmmigration.googleapis.com:443" + assert client.transport._host == ("vmmigration.googleapis.com:443") @pytest.mark.parametrize( @@ -138,27 +138,31 @@ def test_vm_migration_client_service_account_always_use_jwt( @pytest.mark.parametrize( - "client_class", + "client_class,transport_name", [ - VmMigrationClient, - VmMigrationAsyncClient, + (VmMigrationClient, "grpc"), + (VmMigrationAsyncClient, "grpc_asyncio"), ], ) -def test_vm_migration_client_from_service_account_file(client_class): +def test_vm_migration_client_from_service_account_file(client_class, transport_name): creds = ga_credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_file" ) as factory: factory.return_value = creds - client = client_class.from_service_account_file("dummy/file/path.json") + client = client_class.from_service_account_file( + "dummy/file/path.json", transport=transport_name + ) assert client.transport._credentials == creds assert isinstance(client, client_class) - client = client_class.from_service_account_json("dummy/file/path.json") + client = client_class.from_service_account_json( + "dummy/file/path.json", transport=transport_name + ) assert client.transport._credentials == creds assert isinstance(client, client_class) - assert client.transport._host == "vmmigration.googleapis.com:443" + assert client.transport._host == ("vmmigration.googleapis.com:443") def test_vm_migration_client_get_transport_class(): @@ -998,7 +1002,7 @@ async def test_list_sources_async_pager(): ) assert async_pager.next_page_token == "abc" responses = [] - async for response in async_pager: + async for response in async_pager: # pragma: no branch responses.append(response) assert len(responses) == 6 @@ -1044,7 +1048,9 @@ async def test_list_sources_async_pages(): RuntimeError, ) pages = [] - async for page_ in (await client.list_sources(request={})).pages: + async for page_ in ( + await client.list_sources(request={}) + ).pages: # pragma: no branch pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -2636,7 +2642,7 @@ async def test_list_utilization_reports_async_pager(): ) assert async_pager.next_page_token == "abc" responses = [] - async for response in async_pager: + async for response in async_pager: # pragma: no branch responses.append(response) assert len(responses) == 6 @@ -2684,7 +2690,9 @@ async def test_list_utilization_reports_async_pages(): RuntimeError, ) pages = [] - async for page_ in (await client.list_utilization_reports(request={})).pages: + async for page_ in ( + await client.list_utilization_reports(request={}) + ).pages: # pragma: no branch pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -3846,7 +3854,7 @@ async def test_list_datacenter_connectors_async_pager(): ) assert async_pager.next_page_token == "abc" responses = [] - async for response in async_pager: + async for response in async_pager: # pragma: no branch responses.append(response) assert len(responses) == 6 @@ -3894,7 +3902,9 @@ async def test_list_datacenter_connectors_async_pages(): RuntimeError, ) pages = [] - async for page_ in (await client.list_datacenter_connectors(request={})).pages: + async for page_ in ( + await client.list_datacenter_connectors(request={}) + ).pages: # pragma: no branch pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -5355,7 +5365,7 @@ async def test_list_migrating_vms_async_pager(): ) assert async_pager.next_page_token == "abc" responses = [] - async for response in async_pager: + async for response in async_pager: # pragma: no branch responses.append(response) assert len(responses) == 6 @@ -5403,7 +5413,9 @@ async def test_list_migrating_vms_async_pages(): RuntimeError, ) pages = [] - async for page_ in (await client.list_migrating_vms(request={})).pages: + async for page_ in ( + await client.list_migrating_vms(request={}) + ).pages: # pragma: no branch pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -7798,7 +7810,7 @@ async def test_list_clone_jobs_async_pager(): ) assert async_pager.next_page_token == "abc" responses = [] - async for response in async_pager: + async for response in async_pager: # pragma: no branch responses.append(response) assert len(responses) == 6 @@ -7844,7 +7856,9 @@ async def test_list_clone_jobs_async_pages(): RuntimeError, ) pages = [] - async for page_ in (await client.list_clone_jobs(request={})).pages: + async for page_ in ( + await client.list_clone_jobs(request={}) + ).pages: # pragma: no branch pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -9003,7 +9017,7 @@ async def test_list_cutover_jobs_async_pager(): ) assert async_pager.next_page_token == "abc" responses = [] - async for response in async_pager: + async for response in async_pager: # pragma: no branch responses.append(response) assert len(responses) == 6 @@ -9051,7 +9065,9 @@ async def test_list_cutover_jobs_async_pages(): RuntimeError, ) pages = [] - async for page_ in (await client.list_cutover_jobs(request={})).pages: + async for page_ in ( + await client.list_cutover_jobs(request={}) + ).pages: # pragma: no branch pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -9674,7 +9690,7 @@ async def test_list_groups_async_pager(): ) assert async_pager.next_page_token == "abc" responses = [] - async for response in async_pager: + async for response in async_pager: # pragma: no branch responses.append(response) assert len(responses) == 6 @@ -9720,7 +9736,9 @@ async def test_list_groups_async_pages(): RuntimeError, ) pages = [] - async for page_ in (await client.list_groups(request={})).pages: + async for page_ in ( + await client.list_groups(request={}) + ).pages: # pragma: no branch pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -11541,7 +11559,7 @@ async def test_list_target_projects_async_pager(): ) assert async_pager.next_page_token == "abc" responses = [] - async for response in async_pager: + async for response in async_pager: # pragma: no branch responses.append(response) assert len(responses) == 6 @@ -11589,7 +11607,9 @@ async def test_list_target_projects_async_pages(): RuntimeError, ) pages = [] - async for page_ in (await client.list_target_projects(request={})).pages: + async for page_ in ( + await client.list_target_projects(request={}) + ).pages: # pragma: no branch pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -12690,6 +12710,19 @@ def test_transport_adc(transport_class): adc.assert_called_once() +@pytest.mark.parametrize( + "transport_name", + [ + "grpc", + ], +) +def test_transport_kind(transport_name): + transport = VmMigrationClient.get_transport_class(transport_name)( + credentials=ga_credentials.AnonymousCredentials(), + ) + assert transport.kind == transport_name + + def test_transport_grpc_default(): # A client should use the gRPC transport by default. client = VmMigrationClient( @@ -12779,6 +12812,14 @@ def test_vm_migration_base_transport(): with pytest.raises(NotImplementedError): transport.operations_client + # Catch all for all remaining methods and properties + remainder = [ + "kind", + ] + for r in remainder: + with pytest.raises(NotImplementedError): + getattr(transport, r)() + def test_vm_migration_base_transport_with_credentials_file(): # Instantiate the base transport with a credentials file @@ -12921,24 +12962,40 @@ def test_vm_migration_grpc_transport_client_cert_source_for_mtls(transport_class ) -def test_vm_migration_host_no_port(): +@pytest.mark.parametrize( + "transport_name", + [ + "grpc", + "grpc_asyncio", + ], +) +def test_vm_migration_host_no_port(transport_name): client = VmMigrationClient( credentials=ga_credentials.AnonymousCredentials(), client_options=client_options.ClientOptions( api_endpoint="vmmigration.googleapis.com" ), + transport=transport_name, ) - assert client.transport._host == "vmmigration.googleapis.com:443" + assert client.transport._host == ("vmmigration.googleapis.com:443") -def test_vm_migration_host_with_port(): +@pytest.mark.parametrize( + "transport_name", + [ + "grpc", + "grpc_asyncio", + ], +) +def test_vm_migration_host_with_port(transport_name): client = VmMigrationClient( credentials=ga_credentials.AnonymousCredentials(), client_options=client_options.ClientOptions( api_endpoint="vmmigration.googleapis.com:8000" ), + transport=transport_name, ) - assert client.transport._host == "vmmigration.googleapis.com:8000" + assert client.transport._host == ("vmmigration.googleapis.com:8000") def test_vm_migration_grpc_transport_channel(): From 4e39fff57b0e723c779988b2cfac40ace10761d3 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 20 Apr 2022 20:56:42 -0400 Subject: [PATCH 10/20] chore(python): add nox session to sort python imports (#40) Source-Link: https://github.com/googleapis/synthtool/commit/1b71c10e20de7ed3f97f692f99a0e3399b67049f Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:00c9d764fd1cd56265f12a5ef4b99a0c9e87cf261018099141e2ca5158890416 Co-authored-by: Owl Bot --- .github/.OwlBot.lock.yaml | 4 +- docs/conf.py | 2 +- google/cloud/vmmigration/__init__.py | 177 ++++++++--------- google/cloud/vmmigration_v1/__init__.py | 182 +++++++++--------- .../services/vm_migration/__init__.py | 2 +- .../services/vm_migration/async_client.py | 14 +- .../services/vm_migration/client.py | 12 +- .../services/vm_migration/pagers.py | 4 +- .../vm_migration/transports/__init__.py | 1 - .../services/vm_migration/transports/base.py | 9 +- .../services/vm_migration/transports/grpc.py | 12 +- .../vm_migration/transports/grpc_asyncio.py | 12 +- google/cloud/vmmigration_v1/types/__init__.py | 8 +- .../cloud/vmmigration_v1/types/vmmigration.py | 4 +- noxfile.py | 28 ++- setup.py | 1 - .../gapic/vmmigration_v1/test_vm_migration.py | 45 +++-- 17 files changed, 265 insertions(+), 252 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index bc893c9..7c454ab 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:8a5d3f6a2e43ed8293f34e06a2f56931d1e88a2694c3bb11b15df4eb256ad163 -# created: 2022-04-06T10:30:21.687684602Z + digest: sha256:00c9d764fd1cd56265f12a5ef4b99a0c9e87cf261018099141e2ca5158890416 +# created: 2022-04-20T23:42:53.970438194Z diff --git a/docs/conf.py b/docs/conf.py index 097160f..875149b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -24,9 +24,9 @@ # All configuration values have a default; values that are commented out # serve to show the default. -import sys import os import shlex +import sys # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the diff --git a/google/cloud/vmmigration/__init__.py b/google/cloud/vmmigration/__init__.py index a6065ff..d0e7a34 100644 --- a/google/cloud/vmmigration/__init__.py +++ b/google/cloud/vmmigration/__init__.py @@ -14,107 +14,100 @@ # limitations under the License. # -from google.cloud.vmmigration_v1.services.vm_migration.client import VmMigrationClient from google.cloud.vmmigration_v1.services.vm_migration.async_client import ( VmMigrationAsyncClient, ) - -from google.cloud.vmmigration_v1.types.vmmigration import AddGroupMigrationRequest -from google.cloud.vmmigration_v1.types.vmmigration import AddGroupMigrationResponse -from google.cloud.vmmigration_v1.types.vmmigration import AppliedLicense -from google.cloud.vmmigration_v1.types.vmmigration import CancelCloneJobRequest -from google.cloud.vmmigration_v1.types.vmmigration import CancelCloneJobResponse -from google.cloud.vmmigration_v1.types.vmmigration import CancelCutoverJobRequest -from google.cloud.vmmigration_v1.types.vmmigration import CancelCutoverJobResponse -from google.cloud.vmmigration_v1.types.vmmigration import CloneJob -from google.cloud.vmmigration_v1.types.vmmigration import ComputeEngineTargetDefaults -from google.cloud.vmmigration_v1.types.vmmigration import ComputeEngineTargetDetails -from google.cloud.vmmigration_v1.types.vmmigration import ComputeScheduling -from google.cloud.vmmigration_v1.types.vmmigration import CreateCloneJobRequest -from google.cloud.vmmigration_v1.types.vmmigration import CreateCutoverJobRequest +from google.cloud.vmmigration_v1.services.vm_migration.client import VmMigrationClient from google.cloud.vmmigration_v1.types.vmmigration import ( + AddGroupMigrationRequest, + AddGroupMigrationResponse, + AppliedLicense, + CancelCloneJobRequest, + CancelCloneJobResponse, + CancelCutoverJobRequest, + CancelCutoverJobResponse, + CloneJob, + ComputeEngineBootOption, + ComputeEngineDiskType, + ComputeEngineLicenseType, + ComputeEngineTargetDefaults, + ComputeEngineTargetDetails, + ComputeScheduling, + CreateCloneJobRequest, + CreateCutoverJobRequest, CreateDatacenterConnectorRequest, -) -from google.cloud.vmmigration_v1.types.vmmigration import CreateGroupRequest -from google.cloud.vmmigration_v1.types.vmmigration import CreateMigratingVmRequest -from google.cloud.vmmigration_v1.types.vmmigration import CreateSourceRequest -from google.cloud.vmmigration_v1.types.vmmigration import CreateTargetProjectRequest -from google.cloud.vmmigration_v1.types.vmmigration import CreateUtilizationReportRequest -from google.cloud.vmmigration_v1.types.vmmigration import CutoverJob -from google.cloud.vmmigration_v1.types.vmmigration import DatacenterConnector -from google.cloud.vmmigration_v1.types.vmmigration import ( + CreateGroupRequest, + CreateMigratingVmRequest, + CreateSourceRequest, + CreateTargetProjectRequest, + CreateUtilizationReportRequest, + CutoverJob, + DatacenterConnector, DeleteDatacenterConnectorRequest, -) -from google.cloud.vmmigration_v1.types.vmmigration import DeleteGroupRequest -from google.cloud.vmmigration_v1.types.vmmigration import DeleteMigratingVmRequest -from google.cloud.vmmigration_v1.types.vmmigration import DeleteSourceRequest -from google.cloud.vmmigration_v1.types.vmmigration import DeleteTargetProjectRequest -from google.cloud.vmmigration_v1.types.vmmigration import DeleteUtilizationReportRequest -from google.cloud.vmmigration_v1.types.vmmigration import FetchInventoryRequest -from google.cloud.vmmigration_v1.types.vmmigration import FetchInventoryResponse -from google.cloud.vmmigration_v1.types.vmmigration import FinalizeMigrationRequest -from google.cloud.vmmigration_v1.types.vmmigration import FinalizeMigrationResponse -from google.cloud.vmmigration_v1.types.vmmigration import GetCloneJobRequest -from google.cloud.vmmigration_v1.types.vmmigration import GetCutoverJobRequest -from google.cloud.vmmigration_v1.types.vmmigration import GetDatacenterConnectorRequest -from google.cloud.vmmigration_v1.types.vmmigration import GetGroupRequest -from google.cloud.vmmigration_v1.types.vmmigration import GetMigratingVmRequest -from google.cloud.vmmigration_v1.types.vmmigration import GetSourceRequest -from google.cloud.vmmigration_v1.types.vmmigration import GetTargetProjectRequest -from google.cloud.vmmigration_v1.types.vmmigration import GetUtilizationReportRequest -from google.cloud.vmmigration_v1.types.vmmigration import Group -from google.cloud.vmmigration_v1.types.vmmigration import ListCloneJobsRequest -from google.cloud.vmmigration_v1.types.vmmigration import ListCloneJobsResponse -from google.cloud.vmmigration_v1.types.vmmigration import ListCutoverJobsRequest -from google.cloud.vmmigration_v1.types.vmmigration import ListCutoverJobsResponse -from google.cloud.vmmigration_v1.types.vmmigration import ( + DeleteGroupRequest, + DeleteMigratingVmRequest, + DeleteSourceRequest, + DeleteTargetProjectRequest, + DeleteUtilizationReportRequest, + FetchInventoryRequest, + FetchInventoryResponse, + FinalizeMigrationRequest, + FinalizeMigrationResponse, + GetCloneJobRequest, + GetCutoverJobRequest, + GetDatacenterConnectorRequest, + GetGroupRequest, + GetMigratingVmRequest, + GetSourceRequest, + GetTargetProjectRequest, + GetUtilizationReportRequest, + Group, + ListCloneJobsRequest, + ListCloneJobsResponse, + ListCutoverJobsRequest, + ListCutoverJobsResponse, ListDatacenterConnectorsRequest, -) -from google.cloud.vmmigration_v1.types.vmmigration import ( ListDatacenterConnectorsResponse, + ListGroupsRequest, + ListGroupsResponse, + ListMigratingVmsRequest, + ListMigratingVmsResponse, + ListSourcesRequest, + ListSourcesResponse, + ListTargetProjectsRequest, + ListTargetProjectsResponse, + ListUtilizationReportsRequest, + ListUtilizationReportsResponse, + MigratingVm, + MigrationError, + NetworkInterface, + OperationMetadata, + PauseMigrationRequest, + PauseMigrationResponse, + RemoveGroupMigrationRequest, + RemoveGroupMigrationResponse, + ReplicationCycle, + ReplicationSync, + ResumeMigrationRequest, + ResumeMigrationResponse, + SchedulePolicy, + SchedulingNodeAffinity, + Source, + StartMigrationRequest, + StartMigrationResponse, + TargetProject, + UpdateGroupRequest, + UpdateMigratingVmRequest, + UpdateSourceRequest, + UpdateTargetProjectRequest, + UtilizationReport, + UtilizationReportView, + VmUtilizationInfo, + VmUtilizationMetrics, + VmwareSourceDetails, + VmwareVmDetails, + VmwareVmsDetails, ) -from google.cloud.vmmigration_v1.types.vmmigration import ListGroupsRequest -from google.cloud.vmmigration_v1.types.vmmigration import ListGroupsResponse -from google.cloud.vmmigration_v1.types.vmmigration import ListMigratingVmsRequest -from google.cloud.vmmigration_v1.types.vmmigration import ListMigratingVmsResponse -from google.cloud.vmmigration_v1.types.vmmigration import ListSourcesRequest -from google.cloud.vmmigration_v1.types.vmmigration import ListSourcesResponse -from google.cloud.vmmigration_v1.types.vmmigration import ListTargetProjectsRequest -from google.cloud.vmmigration_v1.types.vmmigration import ListTargetProjectsResponse -from google.cloud.vmmigration_v1.types.vmmigration import ListUtilizationReportsRequest -from google.cloud.vmmigration_v1.types.vmmigration import ListUtilizationReportsResponse -from google.cloud.vmmigration_v1.types.vmmigration import MigratingVm -from google.cloud.vmmigration_v1.types.vmmigration import MigrationError -from google.cloud.vmmigration_v1.types.vmmigration import NetworkInterface -from google.cloud.vmmigration_v1.types.vmmigration import OperationMetadata -from google.cloud.vmmigration_v1.types.vmmigration import PauseMigrationRequest -from google.cloud.vmmigration_v1.types.vmmigration import PauseMigrationResponse -from google.cloud.vmmigration_v1.types.vmmigration import RemoveGroupMigrationRequest -from google.cloud.vmmigration_v1.types.vmmigration import RemoveGroupMigrationResponse -from google.cloud.vmmigration_v1.types.vmmigration import ReplicationCycle -from google.cloud.vmmigration_v1.types.vmmigration import ReplicationSync -from google.cloud.vmmigration_v1.types.vmmigration import ResumeMigrationRequest -from google.cloud.vmmigration_v1.types.vmmigration import ResumeMigrationResponse -from google.cloud.vmmigration_v1.types.vmmigration import SchedulePolicy -from google.cloud.vmmigration_v1.types.vmmigration import SchedulingNodeAffinity -from google.cloud.vmmigration_v1.types.vmmigration import Source -from google.cloud.vmmigration_v1.types.vmmigration import StartMigrationRequest -from google.cloud.vmmigration_v1.types.vmmigration import StartMigrationResponse -from google.cloud.vmmigration_v1.types.vmmigration import TargetProject -from google.cloud.vmmigration_v1.types.vmmigration import UpdateGroupRequest -from google.cloud.vmmigration_v1.types.vmmigration import UpdateMigratingVmRequest -from google.cloud.vmmigration_v1.types.vmmigration import UpdateSourceRequest -from google.cloud.vmmigration_v1.types.vmmigration import UpdateTargetProjectRequest -from google.cloud.vmmigration_v1.types.vmmigration import UtilizationReport -from google.cloud.vmmigration_v1.types.vmmigration import VmUtilizationInfo -from google.cloud.vmmigration_v1.types.vmmigration import VmUtilizationMetrics -from google.cloud.vmmigration_v1.types.vmmigration import VmwareSourceDetails -from google.cloud.vmmigration_v1.types.vmmigration import VmwareVmDetails -from google.cloud.vmmigration_v1.types.vmmigration import VmwareVmsDetails -from google.cloud.vmmigration_v1.types.vmmigration import ComputeEngineBootOption -from google.cloud.vmmigration_v1.types.vmmigration import ComputeEngineDiskType -from google.cloud.vmmigration_v1.types.vmmigration import ComputeEngineLicenseType -from google.cloud.vmmigration_v1.types.vmmigration import UtilizationReportView __all__ = ( "VmMigrationClient", diff --git a/google/cloud/vmmigration_v1/__init__.py b/google/cloud/vmmigration_v1/__init__.py index 1feb518..1f5a138 100644 --- a/google/cloud/vmmigration_v1/__init__.py +++ b/google/cloud/vmmigration_v1/__init__.py @@ -14,97 +14,97 @@ # limitations under the License. # -from .services.vm_migration import VmMigrationClient -from .services.vm_migration import VmMigrationAsyncClient - -from .types.vmmigration import AddGroupMigrationRequest -from .types.vmmigration import AddGroupMigrationResponse -from .types.vmmigration import AppliedLicense -from .types.vmmigration import CancelCloneJobRequest -from .types.vmmigration import CancelCloneJobResponse -from .types.vmmigration import CancelCutoverJobRequest -from .types.vmmigration import CancelCutoverJobResponse -from .types.vmmigration import CloneJob -from .types.vmmigration import ComputeEngineTargetDefaults -from .types.vmmigration import ComputeEngineTargetDetails -from .types.vmmigration import ComputeScheduling -from .types.vmmigration import CreateCloneJobRequest -from .types.vmmigration import CreateCutoverJobRequest -from .types.vmmigration import CreateDatacenterConnectorRequest -from .types.vmmigration import CreateGroupRequest -from .types.vmmigration import CreateMigratingVmRequest -from .types.vmmigration import CreateSourceRequest -from .types.vmmigration import CreateTargetProjectRequest -from .types.vmmigration import CreateUtilizationReportRequest -from .types.vmmigration import CutoverJob -from .types.vmmigration import DatacenterConnector -from .types.vmmigration import DeleteDatacenterConnectorRequest -from .types.vmmigration import DeleteGroupRequest -from .types.vmmigration import DeleteMigratingVmRequest -from .types.vmmigration import DeleteSourceRequest -from .types.vmmigration import DeleteTargetProjectRequest -from .types.vmmigration import DeleteUtilizationReportRequest -from .types.vmmigration import FetchInventoryRequest -from .types.vmmigration import FetchInventoryResponse -from .types.vmmigration import FinalizeMigrationRequest -from .types.vmmigration import FinalizeMigrationResponse -from .types.vmmigration import GetCloneJobRequest -from .types.vmmigration import GetCutoverJobRequest -from .types.vmmigration import GetDatacenterConnectorRequest -from .types.vmmigration import GetGroupRequest -from .types.vmmigration import GetMigratingVmRequest -from .types.vmmigration import GetSourceRequest -from .types.vmmigration import GetTargetProjectRequest -from .types.vmmigration import GetUtilizationReportRequest -from .types.vmmigration import Group -from .types.vmmigration import ListCloneJobsRequest -from .types.vmmigration import ListCloneJobsResponse -from .types.vmmigration import ListCutoverJobsRequest -from .types.vmmigration import ListCutoverJobsResponse -from .types.vmmigration import ListDatacenterConnectorsRequest -from .types.vmmigration import ListDatacenterConnectorsResponse -from .types.vmmigration import ListGroupsRequest -from .types.vmmigration import ListGroupsResponse -from .types.vmmigration import ListMigratingVmsRequest -from .types.vmmigration import ListMigratingVmsResponse -from .types.vmmigration import ListSourcesRequest -from .types.vmmigration import ListSourcesResponse -from .types.vmmigration import ListTargetProjectsRequest -from .types.vmmigration import ListTargetProjectsResponse -from .types.vmmigration import ListUtilizationReportsRequest -from .types.vmmigration import ListUtilizationReportsResponse -from .types.vmmigration import MigratingVm -from .types.vmmigration import MigrationError -from .types.vmmigration import NetworkInterface -from .types.vmmigration import OperationMetadata -from .types.vmmigration import PauseMigrationRequest -from .types.vmmigration import PauseMigrationResponse -from .types.vmmigration import RemoveGroupMigrationRequest -from .types.vmmigration import RemoveGroupMigrationResponse -from .types.vmmigration import ReplicationCycle -from .types.vmmigration import ReplicationSync -from .types.vmmigration import ResumeMigrationRequest -from .types.vmmigration import ResumeMigrationResponse -from .types.vmmigration import SchedulePolicy -from .types.vmmigration import SchedulingNodeAffinity -from .types.vmmigration import Source -from .types.vmmigration import StartMigrationRequest -from .types.vmmigration import StartMigrationResponse -from .types.vmmigration import TargetProject -from .types.vmmigration import UpdateGroupRequest -from .types.vmmigration import UpdateMigratingVmRequest -from .types.vmmigration import UpdateSourceRequest -from .types.vmmigration import UpdateTargetProjectRequest -from .types.vmmigration import UtilizationReport -from .types.vmmigration import VmUtilizationInfo -from .types.vmmigration import VmUtilizationMetrics -from .types.vmmigration import VmwareSourceDetails -from .types.vmmigration import VmwareVmDetails -from .types.vmmigration import VmwareVmsDetails -from .types.vmmigration import ComputeEngineBootOption -from .types.vmmigration import ComputeEngineDiskType -from .types.vmmigration import ComputeEngineLicenseType -from .types.vmmigration import UtilizationReportView +from .services.vm_migration import VmMigrationAsyncClient, VmMigrationClient +from .types.vmmigration import ( + AddGroupMigrationRequest, + AddGroupMigrationResponse, + AppliedLicense, + CancelCloneJobRequest, + CancelCloneJobResponse, + CancelCutoverJobRequest, + CancelCutoverJobResponse, + CloneJob, + ComputeEngineBootOption, + ComputeEngineDiskType, + ComputeEngineLicenseType, + ComputeEngineTargetDefaults, + ComputeEngineTargetDetails, + ComputeScheduling, + CreateCloneJobRequest, + CreateCutoverJobRequest, + CreateDatacenterConnectorRequest, + CreateGroupRequest, + CreateMigratingVmRequest, + CreateSourceRequest, + CreateTargetProjectRequest, + CreateUtilizationReportRequest, + CutoverJob, + DatacenterConnector, + DeleteDatacenterConnectorRequest, + DeleteGroupRequest, + DeleteMigratingVmRequest, + DeleteSourceRequest, + DeleteTargetProjectRequest, + DeleteUtilizationReportRequest, + FetchInventoryRequest, + FetchInventoryResponse, + FinalizeMigrationRequest, + FinalizeMigrationResponse, + GetCloneJobRequest, + GetCutoverJobRequest, + GetDatacenterConnectorRequest, + GetGroupRequest, + GetMigratingVmRequest, + GetSourceRequest, + GetTargetProjectRequest, + GetUtilizationReportRequest, + Group, + ListCloneJobsRequest, + ListCloneJobsResponse, + ListCutoverJobsRequest, + ListCutoverJobsResponse, + ListDatacenterConnectorsRequest, + ListDatacenterConnectorsResponse, + ListGroupsRequest, + ListGroupsResponse, + ListMigratingVmsRequest, + ListMigratingVmsResponse, + ListSourcesRequest, + ListSourcesResponse, + ListTargetProjectsRequest, + ListTargetProjectsResponse, + ListUtilizationReportsRequest, + ListUtilizationReportsResponse, + MigratingVm, + MigrationError, + NetworkInterface, + OperationMetadata, + PauseMigrationRequest, + PauseMigrationResponse, + RemoveGroupMigrationRequest, + RemoveGroupMigrationResponse, + ReplicationCycle, + ReplicationSync, + ResumeMigrationRequest, + ResumeMigrationResponse, + SchedulePolicy, + SchedulingNodeAffinity, + Source, + StartMigrationRequest, + StartMigrationResponse, + TargetProject, + UpdateGroupRequest, + UpdateMigratingVmRequest, + UpdateSourceRequest, + UpdateTargetProjectRequest, + UtilizationReport, + UtilizationReportView, + VmUtilizationInfo, + VmUtilizationMetrics, + VmwareSourceDetails, + VmwareVmDetails, + VmwareVmsDetails, +) __all__ = ( "VmMigrationAsyncClient", diff --git a/google/cloud/vmmigration_v1/services/vm_migration/__init__.py b/google/cloud/vmmigration_v1/services/vm_migration/__init__.py index 6270f37..3cb4559 100644 --- a/google/cloud/vmmigration_v1/services/vm_migration/__init__.py +++ b/google/cloud/vmmigration_v1/services/vm_migration/__init__.py @@ -13,8 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # -from .client import VmMigrationClient from .async_client import VmMigrationAsyncClient +from .client import VmMigrationClient __all__ = ( "VmMigrationClient", diff --git a/google/cloud/vmmigration_v1/services/vm_migration/async_client.py b/google/cloud/vmmigration_v1/services/vm_migration/async_client.py index c37d5f4..6e30494 100644 --- a/google/cloud/vmmigration_v1/services/vm_migration/async_client.py +++ b/google/cloud/vmmigration_v1/services/vm_migration/async_client.py @@ -17,14 +17,14 @@ import functools import re from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources -from google.api_core.client_options import ClientOptions from google.api_core import exceptions as core_exceptions from google.api_core import gapic_v1 from google.api_core import retry as retries +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 try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -33,15 +33,17 @@ from google.api_core import operation # type: ignore from google.api_core import operation_async # type: ignore -from google.cloud.vmmigration_v1.services.vm_migration import pagers -from google.cloud.vmmigration_v1.types import vmmigration from google.protobuf import empty_pb2 # type: ignore from google.protobuf import field_mask_pb2 # type: ignore from google.protobuf import timestamp_pb2 # type: ignore from google.rpc import status_pb2 # type: ignore -from .transports.base import VmMigrationTransport, DEFAULT_CLIENT_INFO -from .transports.grpc_asyncio import VmMigrationGrpcAsyncIOTransport + +from google.cloud.vmmigration_v1.services.vm_migration import pagers +from google.cloud.vmmigration_v1.types import vmmigration + from .client import VmMigrationClient +from .transports.base import DEFAULT_CLIENT_INFO, VmMigrationTransport +from .transports.grpc_asyncio import VmMigrationGrpcAsyncIOTransport class VmMigrationAsyncClient: diff --git a/google/cloud/vmmigration_v1/services/vm_migration/client.py b/google/cloud/vmmigration_v1/services/vm_migration/client.py index 71e49f1..67a556a 100644 --- a/google/cloud/vmmigration_v1/services/vm_migration/client.py +++ b/google/cloud/vmmigration_v1/services/vm_migration/client.py @@ -17,17 +17,17 @@ import os import re from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources from google.api_core import client_options as client_options_lib from google.api_core import exceptions as core_exceptions from google.api_core import gapic_v1 from google.api_core import retry as retries from google.auth import credentials as ga_credentials # type: ignore +from google.auth.exceptions import MutualTLSChannelError # type: ignore from google.auth.transport import mtls # type: ignore from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -36,13 +36,15 @@ from google.api_core import operation # type: ignore from google.api_core import operation_async # type: ignore -from google.cloud.vmmigration_v1.services.vm_migration import pagers -from google.cloud.vmmigration_v1.types import vmmigration from google.protobuf import empty_pb2 # type: ignore from google.protobuf import field_mask_pb2 # type: ignore from google.protobuf import timestamp_pb2 # type: ignore from google.rpc import status_pb2 # type: ignore -from .transports.base import VmMigrationTransport, DEFAULT_CLIENT_INFO + +from google.cloud.vmmigration_v1.services.vm_migration import pagers +from google.cloud.vmmigration_v1.types import vmmigration + +from .transports.base import DEFAULT_CLIENT_INFO, VmMigrationTransport from .transports.grpc import VmMigrationGrpcTransport from .transports.grpc_asyncio import VmMigrationGrpcAsyncIOTransport diff --git a/google/cloud/vmmigration_v1/services/vm_migration/pagers.py b/google/cloud/vmmigration_v1/services/vm_migration/pagers.py index ba9ee79..4c8ab73 100644 --- a/google/cloud/vmmigration_v1/services/vm_migration/pagers.py +++ b/google/cloud/vmmigration_v1/services/vm_migration/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.vmmigration_v1.types import vmmigration diff --git a/google/cloud/vmmigration_v1/services/vm_migration/transports/__init__.py b/google/cloud/vmmigration_v1/services/vm_migration/transports/__init__.py index 5a7eb2c..ed8354d 100644 --- a/google/cloud/vmmigration_v1/services/vm_migration/transports/__init__.py +++ b/google/cloud/vmmigration_v1/services/vm_migration/transports/__init__.py @@ -20,7 +20,6 @@ from .grpc import VmMigrationGrpcTransport from .grpc_asyncio import VmMigrationGrpcAsyncIOTransport - # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[VmMigrationTransport]] _transport_registry["grpc"] = VmMigrationGrpcTransport diff --git a/google/cloud/vmmigration_v1/services/vm_migration/transports/base.py b/google/cloud/vmmigration_v1/services/vm_migration/transports/base.py index 9bf9719..a58120e 100644 --- a/google/cloud/vmmigration_v1/services/vm_migration/transports/base.py +++ b/google/cloud/vmmigration_v1/services/vm_migration/transports/base.py @@ -15,19 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore import google.api_core from google.api_core import exceptions as core_exceptions -from google.api_core import gapic_v1 +from google.api_core import gapic_v1, operations_v1 from google.api_core import retry as retries -from google.api_core import operations_v1 +import google.auth # type: ignore 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.vmmigration_v1.types import vmmigration -from google.longrunning import operations_pb2 # type: ignore try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( diff --git a/google/cloud/vmmigration_v1/services/vm_migration/transports/grpc.py b/google/cloud/vmmigration_v1/services/vm_migration/transports/grpc.py index 1a6f810..e8d3ab4 100644 --- a/google/cloud/vmmigration_v1/services/vm_migration/transports/grpc.py +++ b/google/cloud/vmmigration_v1/services/vm_migration/transports/grpc.py @@ -13,21 +13,19 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import warnings from typing import Callable, Dict, Optional, Sequence, Tuple, Union +import warnings -from google.api_core import grpc_helpers -from google.api_core import operations_v1 -from google.api_core import gapic_v1 +from google.api_core import gapic_v1, grpc_helpers, operations_v1 import google.auth # type: ignore from google.auth import credentials as ga_credentials # type: ignore from google.auth.transport.grpc import SslCredentials # type: ignore - +from google.longrunning import operations_pb2 # type: ignore import grpc # type: ignore from google.cloud.vmmigration_v1.types import vmmigration -from google.longrunning import operations_pb2 # type: ignore -from .base import VmMigrationTransport, DEFAULT_CLIENT_INFO + +from .base import DEFAULT_CLIENT_INFO, VmMigrationTransport class VmMigrationGrpcTransport(VmMigrationTransport): diff --git a/google/cloud/vmmigration_v1/services/vm_migration/transports/grpc_asyncio.py b/google/cloud/vmmigration_v1/services/vm_migration/transports/grpc_asyncio.py index 6be0785..9a7b651 100644 --- a/google/cloud/vmmigration_v1/services/vm_migration/transports/grpc_asyncio.py +++ b/google/cloud/vmmigration_v1/services/vm_migration/transports/grpc_asyncio.py @@ -13,21 +13,19 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import warnings from typing import Awaitable, Callable, Dict, Optional, Sequence, Tuple, Union +import warnings -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers_async -from google.api_core import operations_v1 +from google.api_core import gapic_v1, grpc_helpers_async, operations_v1 from google.auth import credentials as ga_credentials # type: ignore from google.auth.transport.grpc import SslCredentials # type: ignore - +from google.longrunning import operations_pb2 # type: ignore import grpc # type: ignore from grpc.experimental import aio # type: ignore from google.cloud.vmmigration_v1.types import vmmigration -from google.longrunning import operations_pb2 # type: ignore -from .base import VmMigrationTransport, DEFAULT_CLIENT_INFO + +from .base import DEFAULT_CLIENT_INFO, VmMigrationTransport from .grpc import VmMigrationGrpcTransport diff --git a/google/cloud/vmmigration_v1/types/__init__.py b/google/cloud/vmmigration_v1/types/__init__.py index b43f1c9..eaf9b43 100644 --- a/google/cloud/vmmigration_v1/types/__init__.py +++ b/google/cloud/vmmigration_v1/types/__init__.py @@ -22,6 +22,9 @@ CancelCutoverJobRequest, CancelCutoverJobResponse, CloneJob, + ComputeEngineBootOption, + ComputeEngineDiskType, + ComputeEngineLicenseType, ComputeEngineTargetDefaults, ComputeEngineTargetDetails, ComputeScheduling, @@ -93,15 +96,12 @@ UpdateSourceRequest, UpdateTargetProjectRequest, UtilizationReport, + UtilizationReportView, VmUtilizationInfo, VmUtilizationMetrics, VmwareSourceDetails, VmwareVmDetails, VmwareVmsDetails, - ComputeEngineBootOption, - ComputeEngineDiskType, - ComputeEngineLicenseType, - UtilizationReportView, ) __all__ = ( diff --git a/google/cloud/vmmigration_v1/types/vmmigration.py b/google/cloud/vmmigration_v1/types/vmmigration.py index 924d2b3..b59c695 100644 --- a/google/cloud/vmmigration_v1/types/vmmigration.py +++ b/google/cloud/vmmigration_v1/types/vmmigration.py @@ -13,14 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import proto # type: ignore - from google.protobuf import duration_pb2 # type: ignore from google.protobuf import field_mask_pb2 # type: ignore from google.protobuf import timestamp_pb2 # type: ignore from google.rpc import error_details_pb2 # type: ignore from google.rpc import status_pb2 # type: ignore - +import proto # type: ignore __protobuf__ = proto.module( package="google.cloud.vmmigration.v1", diff --git a/noxfile.py b/noxfile.py index 6ee5e8a..7c1742d 100644 --- a/noxfile.py +++ b/noxfile.py @@ -17,6 +17,7 @@ # Generated by synthtool. DO NOT EDIT! from __future__ import absolute_import + import os import pathlib import shutil @@ -25,7 +26,8 @@ import nox BLACK_VERSION = "black==22.3.0" -BLACK_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"] +ISORT_VERSION = "isort==5.10.1" +LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"] DEFAULT_PYTHON_VERSION = "3.8" @@ -83,7 +85,7 @@ def lint(session): session.run( "black", "--check", - *BLACK_PATHS, + *LINT_PATHS, ) session.run("flake8", "google", "tests") @@ -94,7 +96,27 @@ def blacken(session): session.install(BLACK_VERSION) session.run( "black", - *BLACK_PATHS, + *LINT_PATHS, + ) + + +@nox.session(python=DEFAULT_PYTHON_VERSION) +def format(session): + """ + Run isort to sort imports. Then run black + to format code to uniform standard. + """ + session.install(BLACK_VERSION, ISORT_VERSION) + # Use the --fss option to sort imports using strict alphabetical order. + # See https://pycqa.github.io/isort/docs/configuration/options.html#force-sort-within-sections + session.run( + "isort", + "--fss", + *LINT_PATHS, + ) + session.run( + "black", + *LINT_PATHS, ) diff --git a/setup.py b/setup.py index 4b8cb5c..373ed4a 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,6 @@ import setuptools - name = "google-cloud-vm-migration" description = "Cloud VM Migration API client library" version = "1.1.1" diff --git a/tests/unit/gapic/vmmigration_v1/test_vm_migration.py b/tests/unit/gapic/vmmigration_v1/test_vm_migration.py index d5a93f7..68ac10b 100644 --- a/tests/unit/gapic/vmmigration_v1/test_vm_migration.py +++ b/tests/unit/gapic/vmmigration_v1/test_vm_migration.py @@ -13,33 +13,24 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os -import mock - -import grpc -from grpc.experimental import aio import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule - +import os +from google.api_core import ( + future, + gapic_v1, + grpc_helpers, + grpc_helpers_async, + operation, + operations_v1, + path_template, +) from google.api_core import client_options from google.api_core import exceptions as core_exceptions -from google.api_core import future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import operation from google.api_core import operation_async # type: ignore -from google.api_core import operations_v1 -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.vmmigration_v1.services.vm_migration import VmMigrationAsyncClient -from google.cloud.vmmigration_v1.services.vm_migration import VmMigrationClient -from google.cloud.vmmigration_v1.services.vm_migration import pagers -from google.cloud.vmmigration_v1.services.vm_migration import transports -from google.cloud.vmmigration_v1.types import vmmigration from google.longrunning import operations_pb2 from google.oauth2 import service_account from google.protobuf import any_pb2 # type: ignore @@ -47,7 +38,19 @@ from google.protobuf import field_mask_pb2 # type: ignore from google.protobuf import timestamp_pb2 # type: ignore from google.rpc import status_pb2 # type: ignore -import google.auth +import grpc +from grpc.experimental import aio +import mock +from proto.marshal.rules.dates import DurationRule, TimestampRule +import pytest + +from google.cloud.vmmigration_v1.services.vm_migration import ( + VmMigrationAsyncClient, + VmMigrationClient, + pagers, + transports, +) +from google.cloud.vmmigration_v1.types import vmmigration def client_cert_source_callback(): From ab4ca39bb030ceeabbbce9858dfb9f77d21d2ec8 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 21 Apr 2022 17:24:15 +0000 Subject: [PATCH 11/20] chore(python): use ubuntu 22.04 in docs image (#42) Source-Link: https://github.com/googleapis/synthtool/commit/f15cc72fb401b4861cedebb10af74afe428fb1f8 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:bc5eed3804aec2f05fad42aacf973821d9500c174015341f721a984a0825b6fd --- .github/.OwlBot.lock.yaml | 4 ++-- .kokoro/docker/docs/Dockerfile | 20 ++++++++++++++++++-- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 7c454ab..64f82d6 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:00c9d764fd1cd56265f12a5ef4b99a0c9e87cf261018099141e2ca5158890416 -# created: 2022-04-20T23:42:53.970438194Z + digest: sha256:bc5eed3804aec2f05fad42aacf973821d9500c174015341f721a984a0825b6fd +# created: 2022-04-21T15:43:16.246106921Z diff --git a/.kokoro/docker/docs/Dockerfile b/.kokoro/docker/docs/Dockerfile index 4e1b1fb..238b87b 100644 --- a/.kokoro/docker/docs/Dockerfile +++ b/.kokoro/docker/docs/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from ubuntu:20.04 +from ubuntu:22.04 ENV DEBIAN_FRONTEND noninteractive @@ -60,8 +60,24 @@ RUN apt-get update \ && rm -rf /var/lib/apt/lists/* \ && rm -f /var/cache/apt/archives/*.deb +###################### Install python 3.8.11 + +# Download python 3.8.11 +RUN wget https://www.python.org/ftp/python/3.8.11/Python-3.8.11.tgz + +# Extract files +RUN tar -xvf Python-3.8.11.tgz + +# Install python 3.8.11 +RUN ./Python-3.8.11/configure --enable-optimizations +RUN make altinstall + +###################### Install pip RUN wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \ - && python3.8 /tmp/get-pip.py \ + && python3 /tmp/get-pip.py \ && rm /tmp/get-pip.py +# Test pip +RUN python3 -m pip + CMD ["python3.8"] From 10b3bfdcb945a00f082e72bfa8cbb72b95c2435d Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 28 Apr 2022 08:08:47 -0400 Subject: [PATCH 12/20] chore: use gapic-generator-python 0.65.2 (#43) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: use gapic-generator-python 0.65.2 PiperOrigin-RevId: 444333013 Source-Link: https://github.com/googleapis/googleapis/commit/f91b6cf82e929280f6562f6110957c654bd9e2e6 Source-Link: https://github.com/googleapis/googleapis-gen/commit/16eb36095c294e712c74a1bf23550817b42174e5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTZlYjM2MDk1YzI5NGU3MTJjNzRhMWJmMjM1NTA4MTdiNDIxNzRlNSJ9 * chore: use gapic-generator-python 0.65.2 PiperOrigin-RevId: 444333013 Source-Link: https://github.com/googleapis/googleapis/commit/f91b6cf82e929280f6562f6110957c654bd9e2e6 Source-Link: https://github.com/googleapis/googleapis-gen/commit/16eb36095c294e712c74a1bf23550817b42174e5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTZlYjM2MDk1YzI5NGU3MTJjNzRhMWJmMjM1NTA4MTdiNDIxNzRlNSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../services/vm_migration/async_client.py | 258 ++++++------- .../gapic/vmmigration_v1/test_vm_migration.py | 360 +++++++++--------- 2 files changed, 309 insertions(+), 309 deletions(-) diff --git a/google/cloud/vmmigration_v1/services/vm_migration/async_client.py b/google/cloud/vmmigration_v1/services/vm_migration/async_client.py index 6e30494..4c8c6ab 100644 --- a/google/cloud/vmmigration_v1/services/vm_migration/async_client.py +++ b/google/cloud/vmmigration_v1/services/vm_migration/async_client.py @@ -243,9 +243,9 @@ async def list_sources( from google.cloud import vmmigration_v1 - def sample_list_sources(): + async def sample_list_sources(): # Create a client - client = vmmigration_v1.VmMigrationClient() + client = vmmigration_v1.VmMigrationAsyncClient() # Initialize request argument(s) request = vmmigration_v1.ListSourcesRequest( @@ -257,7 +257,7 @@ def sample_list_sources(): page_result = client.list_sources(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -352,9 +352,9 @@ async def get_source( from google.cloud import vmmigration_v1 - def sample_get_source(): + async def sample_get_source(): # Create a client - client = vmmigration_v1.VmMigrationClient() + client = vmmigration_v1.VmMigrationAsyncClient() # Initialize request argument(s) request = vmmigration_v1.GetSourceRequest( @@ -362,7 +362,7 @@ def sample_get_source(): ) # Make the request - response = client.get_source(request=request) + response = await client.get_source(request=request) # Handle the response print(response) @@ -449,9 +449,9 @@ async def create_source( from google.cloud import vmmigration_v1 - def sample_create_source(): + async def sample_create_source(): # Create a client - client = vmmigration_v1.VmMigrationClient() + client = vmmigration_v1.VmMigrationAsyncClient() # Initialize request argument(s) request = vmmigration_v1.CreateSourceRequest( @@ -464,7 +464,7 @@ def sample_create_source(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -572,9 +572,9 @@ async def update_source( from google.cloud import vmmigration_v1 - def sample_update_source(): + async def sample_update_source(): # Create a client - client = vmmigration_v1.VmMigrationClient() + client = vmmigration_v1.VmMigrationAsyncClient() # Initialize request argument(s) request = vmmigration_v1.UpdateSourceRequest( @@ -585,7 +585,7 @@ def sample_update_source(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -693,9 +693,9 @@ async def delete_source( from google.cloud import vmmigration_v1 - def sample_delete_source(): + async def sample_delete_source(): # Create a client - client = vmmigration_v1.VmMigrationClient() + client = vmmigration_v1.VmMigrationAsyncClient() # Initialize request argument(s) request = vmmigration_v1.DeleteSourceRequest( @@ -707,7 +707,7 @@ def sample_delete_source(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -817,9 +817,9 @@ async def fetch_inventory( from google.cloud import vmmigration_v1 - def sample_fetch_inventory(): + async def sample_fetch_inventory(): # Create a client - client = vmmigration_v1.VmMigrationClient() + client = vmmigration_v1.VmMigrationAsyncClient() # Initialize request argument(s) request = vmmigration_v1.FetchInventoryRequest( @@ -827,7 +827,7 @@ def sample_fetch_inventory(): ) # Make the request - response = client.fetch_inventory(request=request) + response = await client.fetch_inventory(request=request) # Handle the response print(response) @@ -910,9 +910,9 @@ async def list_utilization_reports( from google.cloud import vmmigration_v1 - def sample_list_utilization_reports(): + async def sample_list_utilization_reports(): # Create a client - client = vmmigration_v1.VmMigrationClient() + client = vmmigration_v1.VmMigrationAsyncClient() # Initialize request argument(s) request = vmmigration_v1.ListUtilizationReportsRequest( @@ -924,7 +924,7 @@ def sample_list_utilization_reports(): page_result = client.list_utilization_reports(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -1019,9 +1019,9 @@ async def get_utilization_report( from google.cloud import vmmigration_v1 - def sample_get_utilization_report(): + async def sample_get_utilization_report(): # Create a client - client = vmmigration_v1.VmMigrationClient() + client = vmmigration_v1.VmMigrationAsyncClient() # Initialize request argument(s) request = vmmigration_v1.GetUtilizationReportRequest( @@ -1029,7 +1029,7 @@ def sample_get_utilization_report(): ) # Make the request - response = client.get_utilization_report(request=request) + response = await client.get_utilization_report(request=request) # Handle the response print(response) @@ -1117,9 +1117,9 @@ async def create_utilization_report( from google.cloud import vmmigration_v1 - def sample_create_utilization_report(): + async def sample_create_utilization_report(): # Create a client - client = vmmigration_v1.VmMigrationClient() + client = vmmigration_v1.VmMigrationAsyncClient() # Initialize request argument(s) request = vmmigration_v1.CreateUtilizationReportRequest( @@ -1132,7 +1132,7 @@ def sample_create_utilization_report(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -1248,9 +1248,9 @@ async def delete_utilization_report( from google.cloud import vmmigration_v1 - def sample_delete_utilization_report(): + async def sample_delete_utilization_report(): # Create a client - client = vmmigration_v1.VmMigrationClient() + client = vmmigration_v1.VmMigrationAsyncClient() # Initialize request argument(s) request = vmmigration_v1.DeleteUtilizationReportRequest( @@ -1262,7 +1262,7 @@ def sample_delete_utilization_report(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -1368,9 +1368,9 @@ async def list_datacenter_connectors( from google.cloud import vmmigration_v1 - def sample_list_datacenter_connectors(): + async def sample_list_datacenter_connectors(): # Create a client - client = vmmigration_v1.VmMigrationClient() + client = vmmigration_v1.VmMigrationAsyncClient() # Initialize request argument(s) request = vmmigration_v1.ListDatacenterConnectorsRequest( @@ -1382,7 +1382,7 @@ def sample_list_datacenter_connectors(): page_result = client.list_datacenter_connectors(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -1477,9 +1477,9 @@ async def get_datacenter_connector( from google.cloud import vmmigration_v1 - def sample_get_datacenter_connector(): + async def sample_get_datacenter_connector(): # Create a client - client = vmmigration_v1.VmMigrationClient() + client = vmmigration_v1.VmMigrationAsyncClient() # Initialize request argument(s) request = vmmigration_v1.GetDatacenterConnectorRequest( @@ -1487,7 +1487,7 @@ def sample_get_datacenter_connector(): ) # Make the request - response = client.get_datacenter_connector(request=request) + response = await client.get_datacenter_connector(request=request) # Handle the response print(response) @@ -1578,9 +1578,9 @@ async def create_datacenter_connector( from google.cloud import vmmigration_v1 - def sample_create_datacenter_connector(): + async def sample_create_datacenter_connector(): # Create a client - client = vmmigration_v1.VmMigrationClient() + client = vmmigration_v1.VmMigrationAsyncClient() # Initialize request argument(s) request = vmmigration_v1.CreateDatacenterConnectorRequest( @@ -1593,7 +1593,7 @@ def sample_create_datacenter_connector(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -1710,9 +1710,9 @@ async def delete_datacenter_connector( from google.cloud import vmmigration_v1 - def sample_delete_datacenter_connector(): + async def sample_delete_datacenter_connector(): # Create a client - client = vmmigration_v1.VmMigrationClient() + client = vmmigration_v1.VmMigrationAsyncClient() # Initialize request argument(s) request = vmmigration_v1.DeleteDatacenterConnectorRequest( @@ -1724,7 +1724,7 @@ def sample_delete_datacenter_connector(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -1832,9 +1832,9 @@ async def create_migrating_vm( from google.cloud import vmmigration_v1 - def sample_create_migrating_vm(): + async def sample_create_migrating_vm(): # Create a client - client = vmmigration_v1.VmMigrationClient() + client = vmmigration_v1.VmMigrationAsyncClient() # Initialize request argument(s) request = vmmigration_v1.CreateMigratingVmRequest( @@ -1847,7 +1847,7 @@ def sample_create_migrating_vm(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -1954,9 +1954,9 @@ async def list_migrating_vms( from google.cloud import vmmigration_v1 - def sample_list_migrating_vms(): + async def sample_list_migrating_vms(): # Create a client - client = vmmigration_v1.VmMigrationClient() + client = vmmigration_v1.VmMigrationAsyncClient() # Initialize request argument(s) request = vmmigration_v1.ListMigratingVmsRequest( @@ -1968,7 +1968,7 @@ def sample_list_migrating_vms(): page_result = client.list_migrating_vms(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -2063,9 +2063,9 @@ async def get_migrating_vm( from google.cloud import vmmigration_v1 - def sample_get_migrating_vm(): + async def sample_get_migrating_vm(): # Create a client - client = vmmigration_v1.VmMigrationClient() + client = vmmigration_v1.VmMigrationAsyncClient() # Initialize request argument(s) request = vmmigration_v1.GetMigratingVmRequest( @@ -2073,7 +2073,7 @@ def sample_get_migrating_vm(): ) # Make the request - response = client.get_migrating_vm(request=request) + response = await client.get_migrating_vm(request=request) # Handle the response print(response) @@ -2160,9 +2160,9 @@ async def update_migrating_vm( from google.cloud import vmmigration_v1 - def sample_update_migrating_vm(): + async def sample_update_migrating_vm(): # Create a client - client = vmmigration_v1.VmMigrationClient() + client = vmmigration_v1.VmMigrationAsyncClient() # Initialize request argument(s) request = vmmigration_v1.UpdateMigratingVmRequest( @@ -2173,7 +2173,7 @@ def sample_update_migrating_vm(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -2281,9 +2281,9 @@ async def delete_migrating_vm( from google.cloud import vmmigration_v1 - def sample_delete_migrating_vm(): + async def sample_delete_migrating_vm(): # Create a client - client = vmmigration_v1.VmMigrationClient() + client = vmmigration_v1.VmMigrationAsyncClient() # Initialize request argument(s) request = vmmigration_v1.DeleteMigratingVmRequest( @@ -2295,7 +2295,7 @@ def sample_delete_migrating_vm(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -2403,9 +2403,9 @@ async def start_migration( from google.cloud import vmmigration_v1 - def sample_start_migration(): + async def sample_start_migration(): # Create a client - client = vmmigration_v1.VmMigrationClient() + client = vmmigration_v1.VmMigrationAsyncClient() # Initialize request argument(s) request = vmmigration_v1.StartMigrationRequest( @@ -2417,7 +2417,7 @@ def sample_start_migration(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -2519,9 +2519,9 @@ async def resume_migration( from google.cloud import vmmigration_v1 - def sample_resume_migration(): + async def sample_resume_migration(): # Create a client - client = vmmigration_v1.VmMigrationClient() + client = vmmigration_v1.VmMigrationAsyncClient() # Initialize request argument(s) request = vmmigration_v1.ResumeMigrationRequest( @@ -2533,7 +2533,7 @@ def sample_resume_migration(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -2612,9 +2612,9 @@ async def pause_migration( from google.cloud import vmmigration_v1 - def sample_pause_migration(): + async def sample_pause_migration(): # Create a client - client = vmmigration_v1.VmMigrationClient() + client = vmmigration_v1.VmMigrationAsyncClient() # Initialize request argument(s) request = vmmigration_v1.PauseMigrationRequest( @@ -2626,7 +2626,7 @@ def sample_pause_migration(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -2705,9 +2705,9 @@ async def finalize_migration( from google.cloud import vmmigration_v1 - def sample_finalize_migration(): + async def sample_finalize_migration(): # Create a client - client = vmmigration_v1.VmMigrationClient() + client = vmmigration_v1.VmMigrationAsyncClient() # Initialize request argument(s) request = vmmigration_v1.FinalizeMigrationRequest( @@ -2719,7 +2719,7 @@ def sample_finalize_migration(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -2819,9 +2819,9 @@ async def create_clone_job( from google.cloud import vmmigration_v1 - def sample_create_clone_job(): + async def sample_create_clone_job(): # Create a client - client = vmmigration_v1.VmMigrationClient() + client = vmmigration_v1.VmMigrationAsyncClient() # Initialize request argument(s) request = vmmigration_v1.CreateCloneJobRequest( @@ -2834,7 +2834,7 @@ def sample_create_clone_job(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -2953,9 +2953,9 @@ async def cancel_clone_job( from google.cloud import vmmigration_v1 - def sample_cancel_clone_job(): + async def sample_cancel_clone_job(): # Create a client - client = vmmigration_v1.VmMigrationClient() + client = vmmigration_v1.VmMigrationAsyncClient() # Initialize request argument(s) request = vmmigration_v1.CancelCloneJobRequest( @@ -2967,7 +2967,7 @@ def sample_cancel_clone_job(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -3061,9 +3061,9 @@ async def list_clone_jobs( from google.cloud import vmmigration_v1 - def sample_list_clone_jobs(): + async def sample_list_clone_jobs(): # Create a client - client = vmmigration_v1.VmMigrationClient() + client = vmmigration_v1.VmMigrationAsyncClient() # Initialize request argument(s) request = vmmigration_v1.ListCloneJobsRequest( @@ -3075,7 +3075,7 @@ def sample_list_clone_jobs(): page_result = client.list_clone_jobs(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -3170,9 +3170,9 @@ async def get_clone_job( from google.cloud import vmmigration_v1 - def sample_get_clone_job(): + async def sample_get_clone_job(): # Create a client - client = vmmigration_v1.VmMigrationClient() + client = vmmigration_v1.VmMigrationAsyncClient() # Initialize request argument(s) request = vmmigration_v1.GetCloneJobRequest( @@ -3180,7 +3180,7 @@ def sample_get_clone_job(): ) # Make the request - response = client.get_clone_job(request=request) + response = await client.get_clone_job(request=request) # Handle the response print(response) @@ -3279,9 +3279,9 @@ async def create_cutover_job( from google.cloud import vmmigration_v1 - def sample_create_cutover_job(): + async def sample_create_cutover_job(): # Create a client - client = vmmigration_v1.VmMigrationClient() + client = vmmigration_v1.VmMigrationAsyncClient() # Initialize request argument(s) request = vmmigration_v1.CreateCutoverJobRequest( @@ -3294,7 +3294,7 @@ def sample_create_cutover_job(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -3403,9 +3403,9 @@ async def cancel_cutover_job( from google.cloud import vmmigration_v1 - def sample_cancel_cutover_job(): + async def sample_cancel_cutover_job(): # Create a client - client = vmmigration_v1.VmMigrationClient() + client = vmmigration_v1.VmMigrationAsyncClient() # Initialize request argument(s) request = vmmigration_v1.CancelCutoverJobRequest( @@ -3417,7 +3417,7 @@ def sample_cancel_cutover_job(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -3511,9 +3511,9 @@ async def list_cutover_jobs( from google.cloud import vmmigration_v1 - def sample_list_cutover_jobs(): + async def sample_list_cutover_jobs(): # Create a client - client = vmmigration_v1.VmMigrationClient() + client = vmmigration_v1.VmMigrationAsyncClient() # Initialize request argument(s) request = vmmigration_v1.ListCutoverJobsRequest( @@ -3525,7 +3525,7 @@ def sample_list_cutover_jobs(): page_result = client.list_cutover_jobs(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -3620,9 +3620,9 @@ async def get_cutover_job( from google.cloud import vmmigration_v1 - def sample_get_cutover_job(): + async def sample_get_cutover_job(): # Create a client - client = vmmigration_v1.VmMigrationClient() + client = vmmigration_v1.VmMigrationAsyncClient() # Initialize request argument(s) request = vmmigration_v1.GetCutoverJobRequest( @@ -3630,7 +3630,7 @@ def sample_get_cutover_job(): ) # Make the request - response = client.get_cutover_job(request=request) + response = await client.get_cutover_job(request=request) # Handle the response print(response) @@ -3717,9 +3717,9 @@ async def list_groups( from google.cloud import vmmigration_v1 - def sample_list_groups(): + async def sample_list_groups(): # Create a client - client = vmmigration_v1.VmMigrationClient() + client = vmmigration_v1.VmMigrationAsyncClient() # Initialize request argument(s) request = vmmigration_v1.ListGroupsRequest( @@ -3731,7 +3731,7 @@ def sample_list_groups(): page_result = client.list_groups(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -3826,9 +3826,9 @@ async def get_group( from google.cloud import vmmigration_v1 - def sample_get_group(): + async def sample_get_group(): # Create a client - client = vmmigration_v1.VmMigrationClient() + client = vmmigration_v1.VmMigrationAsyncClient() # Initialize request argument(s) request = vmmigration_v1.GetGroupRequest( @@ -3836,7 +3836,7 @@ def sample_get_group(): ) # Make the request - response = client.get_group(request=request) + response = await client.get_group(request=request) # Handle the response print(response) @@ -3922,9 +3922,9 @@ async def create_group( from google.cloud import vmmigration_v1 - def sample_create_group(): + async def sample_create_group(): # Create a client - client = vmmigration_v1.VmMigrationClient() + client = vmmigration_v1.VmMigrationAsyncClient() # Initialize request argument(s) request = vmmigration_v1.CreateGroupRequest( @@ -3937,7 +3937,7 @@ def sample_create_group(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -4045,9 +4045,9 @@ async def update_group( from google.cloud import vmmigration_v1 - def sample_update_group(): + async def sample_update_group(): # Create a client - client = vmmigration_v1.VmMigrationClient() + client = vmmigration_v1.VmMigrationAsyncClient() # Initialize request argument(s) request = vmmigration_v1.UpdateGroupRequest( @@ -4058,7 +4058,7 @@ def sample_update_group(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -4166,9 +4166,9 @@ async def delete_group( from google.cloud import vmmigration_v1 - def sample_delete_group(): + async def sample_delete_group(): # Create a client - client = vmmigration_v1.VmMigrationClient() + client = vmmigration_v1.VmMigrationAsyncClient() # Initialize request argument(s) request = vmmigration_v1.DeleteGroupRequest( @@ -4180,7 +4180,7 @@ def sample_delete_group(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -4284,9 +4284,9 @@ async def add_group_migration( from google.cloud import vmmigration_v1 - def sample_add_group_migration(): + async def sample_add_group_migration(): # Create a client - client = vmmigration_v1.VmMigrationClient() + client = vmmigration_v1.VmMigrationAsyncClient() # Initialize request argument(s) request = vmmigration_v1.AddGroupMigrationRequest( @@ -4298,7 +4298,7 @@ def sample_add_group_migration(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -4394,9 +4394,9 @@ async def remove_group_migration( from google.cloud import vmmigration_v1 - def sample_remove_group_migration(): + async def sample_remove_group_migration(): # Create a client - client = vmmigration_v1.VmMigrationClient() + client = vmmigration_v1.VmMigrationAsyncClient() # Initialize request argument(s) request = vmmigration_v1.RemoveGroupMigrationRequest( @@ -4408,7 +4408,7 @@ def sample_remove_group_migration(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -4505,9 +4505,9 @@ async def list_target_projects( from google.cloud import vmmigration_v1 - def sample_list_target_projects(): + async def sample_list_target_projects(): # Create a client - client = vmmigration_v1.VmMigrationClient() + client = vmmigration_v1.VmMigrationAsyncClient() # Initialize request argument(s) request = vmmigration_v1.ListTargetProjectsRequest( @@ -4519,7 +4519,7 @@ def sample_list_target_projects(): page_result = client.list_target_projects(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -4617,9 +4617,9 @@ async def get_target_project( from google.cloud import vmmigration_v1 - def sample_get_target_project(): + async def sample_get_target_project(): # Create a client - client = vmmigration_v1.VmMigrationClient() + client = vmmigration_v1.VmMigrationAsyncClient() # Initialize request argument(s) request = vmmigration_v1.GetTargetProjectRequest( @@ -4627,7 +4627,7 @@ def sample_get_target_project(): ) # Make the request - response = client.get_target_project(request=request) + response = await client.get_target_project(request=request) # Handle the response print(response) @@ -4716,9 +4716,9 @@ async def create_target_project( from google.cloud import vmmigration_v1 - def sample_create_target_project(): + async def sample_create_target_project(): # Create a client - client = vmmigration_v1.VmMigrationClient() + client = vmmigration_v1.VmMigrationAsyncClient() # Initialize request argument(s) request = vmmigration_v1.CreateTargetProjectRequest( @@ -4731,7 +4731,7 @@ def sample_create_target_project(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -4842,9 +4842,9 @@ async def update_target_project( from google.cloud import vmmigration_v1 - def sample_update_target_project(): + async def sample_update_target_project(): # Create a client - client = vmmigration_v1.VmMigrationClient() + client = vmmigration_v1.VmMigrationAsyncClient() # Initialize request argument(s) request = vmmigration_v1.UpdateTargetProjectRequest( @@ -4855,7 +4855,7 @@ def sample_update_target_project(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -4966,9 +4966,9 @@ async def delete_target_project( from google.cloud import vmmigration_v1 - def sample_delete_target_project(): + async def sample_delete_target_project(): # Create a client - client = vmmigration_v1.VmMigrationClient() + client = vmmigration_v1.VmMigrationAsyncClient() # Initialize request argument(s) request = vmmigration_v1.DeleteTargetProjectRequest( @@ -4980,7 +4980,7 @@ def sample_delete_target_project(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) diff --git a/tests/unit/gapic/vmmigration_v1/test_vm_migration.py b/tests/unit/gapic/vmmigration_v1/test_vm_migration.py index 68ac10b..e5fc2f0 100644 --- a/tests/unit/gapic/vmmigration_v1/test_vm_migration.py +++ b/tests/unit/gapic/vmmigration_v1/test_vm_migration.py @@ -737,7 +737,7 @@ def test_list_sources_field_headers(): # a field header. Set these to a non-empty value. request = vmmigration.ListSourcesRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_sources), "__call__") as call: @@ -753,7 +753,7 @@ def test_list_sources_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -767,7 +767,7 @@ async def test_list_sources_field_headers_async(): # a field header. Set these to a non-empty value. request = vmmigration.ListSourcesRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_sources), "__call__") as call: @@ -785,7 +785,7 @@ async def test_list_sources_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -916,7 +916,7 @@ def test_list_sources_pager(transport_name: str = "grpc"): assert pager._metadata == metadata - results = [i for i in pager] + results = list(pager) assert len(results) == 6 assert all(isinstance(i, vmmigration.Source) for i in results) @@ -1162,7 +1162,7 @@ def test_get_source_field_headers(): # a field header. Set these to a non-empty value. request = vmmigration.GetSourceRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.get_source), "__call__") as call: @@ -1178,7 +1178,7 @@ def test_get_source_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1192,7 +1192,7 @@ async def test_get_source_field_headers_async(): # a field header. Set these to a non-empty value. request = vmmigration.GetSourceRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.get_source), "__call__") as call: @@ -1208,7 +1208,7 @@ async def test_get_source_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1384,7 +1384,7 @@ def test_create_source_field_headers(): # a field header. Set these to a non-empty value. request = vmmigration.CreateSourceRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.create_source), "__call__") as call: @@ -1400,7 +1400,7 @@ def test_create_source_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1414,7 +1414,7 @@ async def test_create_source_field_headers_async(): # a field header. Set these to a non-empty value. request = vmmigration.CreateSourceRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.create_source), "__call__") as call: @@ -1432,7 +1432,7 @@ async def test_create_source_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1642,7 +1642,7 @@ def test_update_source_field_headers(): # a field header. Set these to a non-empty value. request = vmmigration.UpdateSourceRequest() - request.source.name = "source.name/value" + request.source.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.update_source), "__call__") as call: @@ -1658,7 +1658,7 @@ def test_update_source_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "source.name=source.name/value", + "source.name=name_value", ) in kw["metadata"] @@ -1672,7 +1672,7 @@ async def test_update_source_field_headers_async(): # a field header. Set these to a non-empty value. request = vmmigration.UpdateSourceRequest() - request.source.name = "source.name/value" + request.source.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.update_source), "__call__") as call: @@ -1690,7 +1690,7 @@ async def test_update_source_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "source.name=source.name/value", + "source.name=name_value", ) in kw["metadata"] @@ -1890,7 +1890,7 @@ def test_delete_source_field_headers(): # a field header. Set these to a non-empty value. request = vmmigration.DeleteSourceRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.delete_source), "__call__") as call: @@ -1906,7 +1906,7 @@ def test_delete_source_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1920,7 +1920,7 @@ async def test_delete_source_field_headers_async(): # a field header. Set these to a non-empty value. request = vmmigration.DeleteSourceRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.delete_source), "__call__") as call: @@ -1938,7 +1938,7 @@ async def test_delete_source_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2120,7 +2120,7 @@ def test_fetch_inventory_field_headers(): # a field header. Set these to a non-empty value. request = vmmigration.FetchInventoryRequest() - request.source = "source/value" + request.source = "source_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.fetch_inventory), "__call__") as call: @@ -2136,7 +2136,7 @@ def test_fetch_inventory_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "source=source/value", + "source=source_value", ) in kw["metadata"] @@ -2150,7 +2150,7 @@ async def test_fetch_inventory_field_headers_async(): # a field header. Set these to a non-empty value. request = vmmigration.FetchInventoryRequest() - request.source = "source/value" + request.source = "source_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.fetch_inventory), "__call__") as call: @@ -2168,7 +2168,7 @@ async def test_fetch_inventory_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "source=source/value", + "source=source_value", ) in kw["metadata"] @@ -2363,7 +2363,7 @@ def test_list_utilization_reports_field_headers(): # a field header. Set these to a non-empty value. request = vmmigration.ListUtilizationReportsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2381,7 +2381,7 @@ def test_list_utilization_reports_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2395,7 +2395,7 @@ async def test_list_utilization_reports_field_headers_async(): # a field header. Set these to a non-empty value. request = vmmigration.ListUtilizationReportsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2415,7 +2415,7 @@ async def test_list_utilization_reports_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2552,7 +2552,7 @@ def test_list_utilization_reports_pager(transport_name: str = "grpc"): assert pager._metadata == metadata - results = [i for i in pager] + results = list(pager) assert len(results) == 6 assert all(isinstance(i, vmmigration.UtilizationReport) for i in results) @@ -2822,7 +2822,7 @@ def test_get_utilization_report_field_headers(): # a field header. Set these to a non-empty value. request = vmmigration.GetUtilizationReportRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2840,7 +2840,7 @@ def test_get_utilization_report_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2854,7 +2854,7 @@ async def test_get_utilization_report_field_headers_async(): # a field header. Set these to a non-empty value. request = vmmigration.GetUtilizationReportRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2874,7 +2874,7 @@ async def test_get_utilization_report_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -3063,7 +3063,7 @@ def test_create_utilization_report_field_headers(): # a field header. Set these to a non-empty value. request = vmmigration.CreateUtilizationReportRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3081,7 +3081,7 @@ def test_create_utilization_report_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -3095,7 +3095,7 @@ async def test_create_utilization_report_field_headers_async(): # a field header. Set these to a non-empty value. request = vmmigration.CreateUtilizationReportRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3115,7 +3115,7 @@ async def test_create_utilization_report_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -3324,7 +3324,7 @@ def test_delete_utilization_report_field_headers(): # a field header. Set these to a non-empty value. request = vmmigration.DeleteUtilizationReportRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3342,7 +3342,7 @@ def test_delete_utilization_report_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -3356,7 +3356,7 @@ async def test_delete_utilization_report_field_headers_async(): # a field header. Set these to a non-empty value. request = vmmigration.DeleteUtilizationReportRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3376,7 +3376,7 @@ async def test_delete_utilization_report_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -3575,7 +3575,7 @@ def test_list_datacenter_connectors_field_headers(): # a field header. Set these to a non-empty value. request = vmmigration.ListDatacenterConnectorsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3593,7 +3593,7 @@ def test_list_datacenter_connectors_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -3607,7 +3607,7 @@ async def test_list_datacenter_connectors_field_headers_async(): # a field header. Set these to a non-empty value. request = vmmigration.ListDatacenterConnectorsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3627,7 +3627,7 @@ async def test_list_datacenter_connectors_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -3764,7 +3764,7 @@ def test_list_datacenter_connectors_pager(transport_name: str = "grpc"): assert pager._metadata == metadata - results = [i for i in pager] + results = list(pager) assert len(results) == 6 assert all(isinstance(i, vmmigration.DatacenterConnector) for i in results) @@ -4038,7 +4038,7 @@ def test_get_datacenter_connector_field_headers(): # a field header. Set these to a non-empty value. request = vmmigration.GetDatacenterConnectorRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -4056,7 +4056,7 @@ def test_get_datacenter_connector_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -4070,7 +4070,7 @@ async def test_get_datacenter_connector_field_headers_async(): # a field header. Set these to a non-empty value. request = vmmigration.GetDatacenterConnectorRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -4090,7 +4090,7 @@ async def test_get_datacenter_connector_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -4279,7 +4279,7 @@ def test_create_datacenter_connector_field_headers(): # a field header. Set these to a non-empty value. request = vmmigration.CreateDatacenterConnectorRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -4297,7 +4297,7 @@ def test_create_datacenter_connector_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -4311,7 +4311,7 @@ async def test_create_datacenter_connector_field_headers_async(): # a field header. Set these to a non-empty value. request = vmmigration.CreateDatacenterConnectorRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -4331,7 +4331,7 @@ async def test_create_datacenter_connector_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -4552,7 +4552,7 @@ def test_delete_datacenter_connector_field_headers(): # a field header. Set these to a non-empty value. request = vmmigration.DeleteDatacenterConnectorRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -4570,7 +4570,7 @@ def test_delete_datacenter_connector_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -4584,7 +4584,7 @@ async def test_delete_datacenter_connector_field_headers_async(): # a field header. Set these to a non-empty value. request = vmmigration.DeleteDatacenterConnectorRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -4604,7 +4604,7 @@ async def test_delete_datacenter_connector_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -4792,7 +4792,7 @@ def test_create_migrating_vm_field_headers(): # a field header. Set these to a non-empty value. request = vmmigration.CreateMigratingVmRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -4810,7 +4810,7 @@ def test_create_migrating_vm_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -4824,7 +4824,7 @@ async def test_create_migrating_vm_field_headers_async(): # a field header. Set these to a non-empty value. request = vmmigration.CreateMigratingVmRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -4844,7 +4844,7 @@ async def test_create_migrating_vm_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -5086,7 +5086,7 @@ def test_list_migrating_vms_field_headers(): # a field header. Set these to a non-empty value. request = vmmigration.ListMigratingVmsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -5104,7 +5104,7 @@ def test_list_migrating_vms_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -5118,7 +5118,7 @@ async def test_list_migrating_vms_field_headers_async(): # a field header. Set these to a non-empty value. request = vmmigration.ListMigratingVmsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -5138,7 +5138,7 @@ async def test_list_migrating_vms_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -5275,7 +5275,7 @@ def test_list_migrating_vms_pager(transport_name: str = "grpc"): assert pager._metadata == metadata - results = [i for i in pager] + results = list(pager) assert len(results) == 6 assert all(isinstance(i, vmmigration.MigratingVm) for i in results) @@ -5545,7 +5545,7 @@ def test_get_migrating_vm_field_headers(): # a field header. Set these to a non-empty value. request = vmmigration.GetMigratingVmRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.get_migrating_vm), "__call__") as call: @@ -5561,7 +5561,7 @@ def test_get_migrating_vm_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -5575,7 +5575,7 @@ async def test_get_migrating_vm_field_headers_async(): # a field header. Set these to a non-empty value. request = vmmigration.GetMigratingVmRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.get_migrating_vm), "__call__") as call: @@ -5593,7 +5593,7 @@ async def test_get_migrating_vm_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -5777,7 +5777,7 @@ def test_update_migrating_vm_field_headers(): # a field header. Set these to a non-empty value. request = vmmigration.UpdateMigratingVmRequest() - request.migrating_vm.name = "migrating_vm.name/value" + request.migrating_vm.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -5795,7 +5795,7 @@ def test_update_migrating_vm_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "migrating_vm.name=migrating_vm.name/value", + "migrating_vm.name=name_value", ) in kw["metadata"] @@ -5809,7 +5809,7 @@ async def test_update_migrating_vm_field_headers_async(): # a field header. Set these to a non-empty value. request = vmmigration.UpdateMigratingVmRequest() - request.migrating_vm.name = "migrating_vm.name/value" + request.migrating_vm.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -5829,7 +5829,7 @@ async def test_update_migrating_vm_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "migrating_vm.name=migrating_vm.name/value", + "migrating_vm.name=name_value", ) in kw["metadata"] @@ -6051,7 +6051,7 @@ def test_delete_migrating_vm_field_headers(): # a field header. Set these to a non-empty value. request = vmmigration.DeleteMigratingVmRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -6069,7 +6069,7 @@ def test_delete_migrating_vm_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -6083,7 +6083,7 @@ async def test_delete_migrating_vm_field_headers_async(): # a field header. Set these to a non-empty value. request = vmmigration.DeleteMigratingVmRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -6103,7 +6103,7 @@ async def test_delete_migrating_vm_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -6285,7 +6285,7 @@ def test_start_migration_field_headers(): # a field header. Set these to a non-empty value. request = vmmigration.StartMigrationRequest() - request.migrating_vm = "migrating_vm/value" + request.migrating_vm = "migrating_vm_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.start_migration), "__call__") as call: @@ -6301,7 +6301,7 @@ def test_start_migration_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "migrating_vm=migrating_vm/value", + "migrating_vm=migrating_vm_value", ) in kw["metadata"] @@ -6315,7 +6315,7 @@ async def test_start_migration_field_headers_async(): # a field header. Set these to a non-empty value. request = vmmigration.StartMigrationRequest() - request.migrating_vm = "migrating_vm/value" + request.migrating_vm = "migrating_vm_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.start_migration), "__call__") as call: @@ -6333,7 +6333,7 @@ async def test_start_migration_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "migrating_vm=migrating_vm/value", + "migrating_vm=migrating_vm_value", ) in kw["metadata"] @@ -6511,7 +6511,7 @@ def test_resume_migration_field_headers(): # a field header. Set these to a non-empty value. request = vmmigration.ResumeMigrationRequest() - request.migrating_vm = "migrating_vm/value" + request.migrating_vm = "migrating_vm_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.resume_migration), "__call__") as call: @@ -6527,7 +6527,7 @@ def test_resume_migration_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "migrating_vm=migrating_vm/value", + "migrating_vm=migrating_vm_value", ) in kw["metadata"] @@ -6541,7 +6541,7 @@ async def test_resume_migration_field_headers_async(): # a field header. Set these to a non-empty value. request = vmmigration.ResumeMigrationRequest() - request.migrating_vm = "migrating_vm/value" + request.migrating_vm = "migrating_vm_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.resume_migration), "__call__") as call: @@ -6559,7 +6559,7 @@ async def test_resume_migration_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "migrating_vm=migrating_vm/value", + "migrating_vm=migrating_vm_value", ) in kw["metadata"] @@ -6655,7 +6655,7 @@ def test_pause_migration_field_headers(): # a field header. Set these to a non-empty value. request = vmmigration.PauseMigrationRequest() - request.migrating_vm = "migrating_vm/value" + request.migrating_vm = "migrating_vm_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.pause_migration), "__call__") as call: @@ -6671,7 +6671,7 @@ def test_pause_migration_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "migrating_vm=migrating_vm/value", + "migrating_vm=migrating_vm_value", ) in kw["metadata"] @@ -6685,7 +6685,7 @@ async def test_pause_migration_field_headers_async(): # a field header. Set these to a non-empty value. request = vmmigration.PauseMigrationRequest() - request.migrating_vm = "migrating_vm/value" + request.migrating_vm = "migrating_vm_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.pause_migration), "__call__") as call: @@ -6703,7 +6703,7 @@ async def test_pause_migration_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "migrating_vm=migrating_vm/value", + "migrating_vm=migrating_vm_value", ) in kw["metadata"] @@ -6805,7 +6805,7 @@ def test_finalize_migration_field_headers(): # a field header. Set these to a non-empty value. request = vmmigration.FinalizeMigrationRequest() - request.migrating_vm = "migrating_vm/value" + request.migrating_vm = "migrating_vm_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -6823,7 +6823,7 @@ def test_finalize_migration_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "migrating_vm=migrating_vm/value", + "migrating_vm=migrating_vm_value", ) in kw["metadata"] @@ -6837,7 +6837,7 @@ async def test_finalize_migration_field_headers_async(): # a field header. Set these to a non-empty value. request = vmmigration.FinalizeMigrationRequest() - request.migrating_vm = "migrating_vm/value" + request.migrating_vm = "migrating_vm_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -6857,7 +6857,7 @@ async def test_finalize_migration_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "migrating_vm=migrating_vm/value", + "migrating_vm=migrating_vm_value", ) in kw["metadata"] @@ -7039,7 +7039,7 @@ def test_create_clone_job_field_headers(): # a field header. Set these to a non-empty value. request = vmmigration.CreateCloneJobRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.create_clone_job), "__call__") as call: @@ -7055,7 +7055,7 @@ def test_create_clone_job_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -7069,7 +7069,7 @@ async def test_create_clone_job_field_headers_async(): # a field header. Set these to a non-empty value. request = vmmigration.CreateCloneJobRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.create_clone_job), "__call__") as call: @@ -7087,7 +7087,7 @@ async def test_create_clone_job_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -7309,7 +7309,7 @@ def test_cancel_clone_job_field_headers(): # a field header. Set these to a non-empty value. request = vmmigration.CancelCloneJobRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.cancel_clone_job), "__call__") as call: @@ -7325,7 +7325,7 @@ def test_cancel_clone_job_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -7339,7 +7339,7 @@ async def test_cancel_clone_job_field_headers_async(): # a field header. Set these to a non-empty value. request = vmmigration.CancelCloneJobRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.cancel_clone_job), "__call__") as call: @@ -7357,7 +7357,7 @@ async def test_cancel_clone_job_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -7545,7 +7545,7 @@ def test_list_clone_jobs_field_headers(): # a field header. Set these to a non-empty value. request = vmmigration.ListCloneJobsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_clone_jobs), "__call__") as call: @@ -7561,7 +7561,7 @@ def test_list_clone_jobs_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -7575,7 +7575,7 @@ async def test_list_clone_jobs_field_headers_async(): # a field header. Set these to a non-empty value. request = vmmigration.ListCloneJobsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_clone_jobs), "__call__") as call: @@ -7593,7 +7593,7 @@ async def test_list_clone_jobs_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -7724,7 +7724,7 @@ def test_list_clone_jobs_pager(transport_name: str = "grpc"): assert pager._metadata == metadata - results = [i for i in pager] + results = list(pager) assert len(results) == 6 assert all(isinstance(i, vmmigration.CloneJob) for i in results) @@ -7972,7 +7972,7 @@ def test_get_clone_job_field_headers(): # a field header. Set these to a non-empty value. request = vmmigration.GetCloneJobRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.get_clone_job), "__call__") as call: @@ -7988,7 +7988,7 @@ def test_get_clone_job_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -8002,7 +8002,7 @@ async def test_get_clone_job_field_headers_async(): # a field header. Set these to a non-empty value. request = vmmigration.GetCloneJobRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.get_clone_job), "__call__") as call: @@ -8020,7 +8020,7 @@ async def test_get_clone_job_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -8204,7 +8204,7 @@ def test_create_cutover_job_field_headers(): # a field header. Set these to a non-empty value. request = vmmigration.CreateCutoverJobRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -8222,7 +8222,7 @@ def test_create_cutover_job_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -8236,7 +8236,7 @@ async def test_create_cutover_job_field_headers_async(): # a field header. Set these to a non-empty value. request = vmmigration.CreateCutoverJobRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -8256,7 +8256,7 @@ async def test_create_cutover_job_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -8488,7 +8488,7 @@ def test_cancel_cutover_job_field_headers(): # a field header. Set these to a non-empty value. request = vmmigration.CancelCutoverJobRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -8506,7 +8506,7 @@ def test_cancel_cutover_job_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -8520,7 +8520,7 @@ async def test_cancel_cutover_job_field_headers_async(): # a field header. Set these to a non-empty value. request = vmmigration.CancelCutoverJobRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -8540,7 +8540,7 @@ async def test_cancel_cutover_job_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -8738,7 +8738,7 @@ def test_list_cutover_jobs_field_headers(): # a field header. Set these to a non-empty value. request = vmmigration.ListCutoverJobsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -8756,7 +8756,7 @@ def test_list_cutover_jobs_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -8770,7 +8770,7 @@ async def test_list_cutover_jobs_field_headers_async(): # a field header. Set these to a non-empty value. request = vmmigration.ListCutoverJobsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -8790,7 +8790,7 @@ async def test_list_cutover_jobs_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -8927,7 +8927,7 @@ def test_list_cutover_jobs_pager(transport_name: str = "grpc"): assert pager._metadata == metadata - results = [i for i in pager] + results = list(pager) assert len(results) == 6 assert all(isinstance(i, vmmigration.CutoverJob) for i in results) @@ -9189,7 +9189,7 @@ def test_get_cutover_job_field_headers(): # a field header. Set these to a non-empty value. request = vmmigration.GetCutoverJobRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.get_cutover_job), "__call__") as call: @@ -9205,7 +9205,7 @@ def test_get_cutover_job_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -9219,7 +9219,7 @@ async def test_get_cutover_job_field_headers_async(): # a field header. Set these to a non-empty value. request = vmmigration.GetCutoverJobRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.get_cutover_job), "__call__") as call: @@ -9237,7 +9237,7 @@ async def test_get_cutover_job_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -9425,7 +9425,7 @@ def test_list_groups_field_headers(): # a field header. Set these to a non-empty value. request = vmmigration.ListGroupsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_groups), "__call__") as call: @@ -9441,7 +9441,7 @@ def test_list_groups_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -9455,7 +9455,7 @@ async def test_list_groups_field_headers_async(): # a field header. Set these to a non-empty value. request = vmmigration.ListGroupsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_groups), "__call__") as call: @@ -9473,7 +9473,7 @@ async def test_list_groups_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -9604,7 +9604,7 @@ def test_list_groups_pager(transport_name: str = "grpc"): assert pager._metadata == metadata - results = [i for i in pager] + results = list(pager) assert len(results) == 6 assert all(isinstance(i, vmmigration.Group) for i in results) @@ -9853,7 +9853,7 @@ def test_get_group_field_headers(): # a field header. Set these to a non-empty value. request = vmmigration.GetGroupRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.get_group), "__call__") as call: @@ -9869,7 +9869,7 @@ def test_get_group_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -9883,7 +9883,7 @@ async def test_get_group_field_headers_async(): # a field header. Set these to a non-empty value. request = vmmigration.GetGroupRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.get_group), "__call__") as call: @@ -9899,7 +9899,7 @@ async def test_get_group_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -10075,7 +10075,7 @@ def test_create_group_field_headers(): # a field header. Set these to a non-empty value. request = vmmigration.CreateGroupRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.create_group), "__call__") as call: @@ -10091,7 +10091,7 @@ def test_create_group_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -10105,7 +10105,7 @@ async def test_create_group_field_headers_async(): # a field header. Set these to a non-empty value. request = vmmigration.CreateGroupRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.create_group), "__call__") as call: @@ -10123,7 +10123,7 @@ async def test_create_group_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -10321,7 +10321,7 @@ def test_update_group_field_headers(): # a field header. Set these to a non-empty value. request = vmmigration.UpdateGroupRequest() - request.group.name = "group.name/value" + request.group.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.update_group), "__call__") as call: @@ -10337,7 +10337,7 @@ def test_update_group_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "group.name=group.name/value", + "group.name=name_value", ) in kw["metadata"] @@ -10351,7 +10351,7 @@ async def test_update_group_field_headers_async(): # a field header. Set these to a non-empty value. request = vmmigration.UpdateGroupRequest() - request.group.name = "group.name/value" + request.group.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.update_group), "__call__") as call: @@ -10369,7 +10369,7 @@ async def test_update_group_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "group.name=group.name/value", + "group.name=name_value", ) in kw["metadata"] @@ -10557,7 +10557,7 @@ def test_delete_group_field_headers(): # a field header. Set these to a non-empty value. request = vmmigration.DeleteGroupRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.delete_group), "__call__") as call: @@ -10573,7 +10573,7 @@ def test_delete_group_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -10587,7 +10587,7 @@ async def test_delete_group_field_headers_async(): # a field header. Set these to a non-empty value. request = vmmigration.DeleteGroupRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.delete_group), "__call__") as call: @@ -10605,7 +10605,7 @@ async def test_delete_group_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -10789,7 +10789,7 @@ def test_add_group_migration_field_headers(): # a field header. Set these to a non-empty value. request = vmmigration.AddGroupMigrationRequest() - request.group = "group/value" + request.group = "group_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -10807,7 +10807,7 @@ def test_add_group_migration_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "group=group/value", + "group=group_value", ) in kw["metadata"] @@ -10821,7 +10821,7 @@ async def test_add_group_migration_field_headers_async(): # a field header. Set these to a non-empty value. request = vmmigration.AddGroupMigrationRequest() - request.group = "group/value" + request.group = "group_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -10841,7 +10841,7 @@ async def test_add_group_migration_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "group=group/value", + "group=group_value", ) in kw["metadata"] @@ -11030,7 +11030,7 @@ def test_remove_group_migration_field_headers(): # a field header. Set these to a non-empty value. request = vmmigration.RemoveGroupMigrationRequest() - request.group = "group/value" + request.group = "group_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -11048,7 +11048,7 @@ def test_remove_group_migration_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "group=group/value", + "group=group_value", ) in kw["metadata"] @@ -11062,7 +11062,7 @@ async def test_remove_group_migration_field_headers_async(): # a field header. Set these to a non-empty value. request = vmmigration.RemoveGroupMigrationRequest() - request.group = "group/value" + request.group = "group_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -11082,7 +11082,7 @@ async def test_remove_group_migration_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "group=group/value", + "group=group_value", ) in kw["metadata"] @@ -11280,7 +11280,7 @@ def test_list_target_projects_field_headers(): # a field header. Set these to a non-empty value. request = vmmigration.ListTargetProjectsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -11298,7 +11298,7 @@ def test_list_target_projects_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -11312,7 +11312,7 @@ async def test_list_target_projects_field_headers_async(): # a field header. Set these to a non-empty value. request = vmmigration.ListTargetProjectsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -11332,7 +11332,7 @@ async def test_list_target_projects_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -11469,7 +11469,7 @@ def test_list_target_projects_pager(transport_name: str = "grpc"): assert pager._metadata == metadata - results = [i for i in pager] + results = list(pager) assert len(results) == 6 assert all(isinstance(i, vmmigration.TargetProject) for i in results) @@ -11730,7 +11730,7 @@ def test_get_target_project_field_headers(): # a field header. Set these to a non-empty value. request = vmmigration.GetTargetProjectRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -11748,7 +11748,7 @@ def test_get_target_project_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -11762,7 +11762,7 @@ async def test_get_target_project_field_headers_async(): # a field header. Set these to a non-empty value. request = vmmigration.GetTargetProjectRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -11782,7 +11782,7 @@ async def test_get_target_project_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -11970,7 +11970,7 @@ def test_create_target_project_field_headers(): # a field header. Set these to a non-empty value. request = vmmigration.CreateTargetProjectRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -11988,7 +11988,7 @@ def test_create_target_project_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -12002,7 +12002,7 @@ async def test_create_target_project_field_headers_async(): # a field header. Set these to a non-empty value. request = vmmigration.CreateTargetProjectRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -12022,7 +12022,7 @@ async def test_create_target_project_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -12230,7 +12230,7 @@ def test_update_target_project_field_headers(): # a field header. Set these to a non-empty value. request = vmmigration.UpdateTargetProjectRequest() - request.target_project.name = "target_project.name/value" + request.target_project.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -12248,7 +12248,7 @@ def test_update_target_project_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "target_project.name=target_project.name/value", + "target_project.name=name_value", ) in kw["metadata"] @@ -12262,7 +12262,7 @@ async def test_update_target_project_field_headers_async(): # a field header. Set these to a non-empty value. request = vmmigration.UpdateTargetProjectRequest() - request.target_project.name = "target_project.name/value" + request.target_project.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -12282,7 +12282,7 @@ async def test_update_target_project_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "target_project.name=target_project.name/value", + "target_project.name=name_value", ) in kw["metadata"] @@ -12480,7 +12480,7 @@ def test_delete_target_project_field_headers(): # a field header. Set these to a non-empty value. request = vmmigration.DeleteTargetProjectRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -12498,7 +12498,7 @@ def test_delete_target_project_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -12512,7 +12512,7 @@ async def test_delete_target_project_field_headers_async(): # a field header. Set these to a non-empty value. request = vmmigration.DeleteTargetProjectRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -12532,7 +12532,7 @@ async def test_delete_target_project_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] From eaaa5e31ecf329af512234880666c2e489f5320c Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 5 May 2022 11:57:07 -0400 Subject: [PATCH 13/20] chore: [autoapprove] update readme_gen.py to include autoescape True (#44) Source-Link: https://github.com/googleapis/synthtool/commit/6b4d5a6407d740beb4158b302194a62a4108a8a6 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:f792ee1320e03eda2d13a5281a2989f7ed8a9e50b73ef6da97fac7e1e850b149 Co-authored-by: Owl Bot --- .github/.OwlBot.lock.yaml | 4 ++-- scripts/readme-gen/readme_gen.py | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 64f82d6..b631901 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:bc5eed3804aec2f05fad42aacf973821d9500c174015341f721a984a0825b6fd -# created: 2022-04-21T15:43:16.246106921Z + digest: sha256:f792ee1320e03eda2d13a5281a2989f7ed8a9e50b73ef6da97fac7e1e850b149 +# created: 2022-05-05T15:17:27.599381182Z diff --git a/scripts/readme-gen/readme_gen.py b/scripts/readme-gen/readme_gen.py index d309d6e..91b5967 100644 --- a/scripts/readme-gen/readme_gen.py +++ b/scripts/readme-gen/readme_gen.py @@ -28,7 +28,10 @@ jinja_env = jinja2.Environment( trim_blocks=True, loader=jinja2.FileSystemLoader( - os.path.abspath(os.path.join(os.path.dirname(__file__), 'templates')))) + os.path.abspath(os.path.join(os.path.dirname(__file__), "templates")) + ), + autoescape=True, +) README_TMPL = jinja_env.get_template('README.tmpl.rst') From 39564b539999fcb39eac2cb88405b2b92d1ce5b7 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 5 May 2022 23:56:31 +0000 Subject: [PATCH 14/20] chore(python): auto approve template changes (#45) Source-Link: https://github.com/googleapis/synthtool/commit/453a5d9c9a55d1969240a37d36cec626d20a9024 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:81ed5ecdfc7cac5b699ba4537376f3563f6f04122c4ec9e735d3b3dc1d43dd32 --- .github/.OwlBot.lock.yaml | 4 ++-- .github/auto-approve.yml | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 .github/auto-approve.yml diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index b631901..757c9dc 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:f792ee1320e03eda2d13a5281a2989f7ed8a9e50b73ef6da97fac7e1e850b149 -# created: 2022-05-05T15:17:27.599381182Z + digest: sha256:81ed5ecdfc7cac5b699ba4537376f3563f6f04122c4ec9e735d3b3dc1d43dd32 +# created: 2022-05-05T22:08:23.383410683Z diff --git a/.github/auto-approve.yml b/.github/auto-approve.yml new file mode 100644 index 0000000..311ebbb --- /dev/null +++ b/.github/auto-approve.yml @@ -0,0 +1,3 @@ +# https://github.com/googleapis/repo-automation-bots/tree/main/packages/auto-approve +processes: + - "OwlBotTemplateChanges" From 80a2cf46a21f516899da818a7aec0f2a67222047 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 6 May 2022 14:38:11 +0000 Subject: [PATCH 15/20] chore: [autoapprove] update readme_gen.py to include autoescape True (#46) Source-Link: https://github.com/googleapis/synthtool/commit/6b4d5a6407d740beb4158b302194a62a4108a8a6 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:f792ee1320e03eda2d13a5281a2989f7ed8a9e50b73ef6da97fac7e1e850b149 --- .github/.OwlBot.lock.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 757c9dc..b631901 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:81ed5ecdfc7cac5b699ba4537376f3563f6f04122c4ec9e735d3b3dc1d43dd32 -# created: 2022-05-05T22:08:23.383410683Z + digest: sha256:f792ee1320e03eda2d13a5281a2989f7ed8a9e50b73ef6da97fac7e1e850b149 +# created: 2022-05-05T15:17:27.599381182Z From 6a75de7f35d46a8ad8fe025571cfa58a010cdf7c Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 30 May 2022 17:48:30 +0000 Subject: [PATCH 16/20] chore: use gapic-generator-python 1.0.0 (#47) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 451250442 Source-Link: https://github.com/googleapis/googleapis/commit/cca5e8181f6442b134e8d4d206fbe9e0e74684ba Source-Link: https://github.com/googleapis/googleapis-gen/commit/0b219da161a8bdcc3c6f7b2efcd82105182a30ca Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMGIyMTlkYTE2MWE4YmRjYzNjNmY3YjJlZmNkODIxMDUxODJhMzBjYSJ9 chore: use gapic-generator-python 1.0.0 PiperOrigin-RevId: 451250442 Source-Link: https://github.com/googleapis/googleapis/commit/cca5e8181f6442b134e8d4d206fbe9e0e74684ba Source-Link: https://github.com/googleapis/googleapis-gen/commit/0b219da161a8bdcc3c6f7b2efcd82105182a30ca Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMGIyMTlkYTE2MWE4YmRjYzNjNmY3YjJlZmNkODIxMDUxODJhMzBjYSJ9 --- tests/unit/gapic/vmmigration_v1/test_vm_migration.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/unit/gapic/vmmigration_v1/test_vm_migration.py b/tests/unit/gapic/vmmigration_v1/test_vm_migration.py index e5fc2f0..17493ab 100644 --- a/tests/unit/gapic/vmmigration_v1/test_vm_migration.py +++ b/tests/unit/gapic/vmmigration_v1/test_vm_migration.py @@ -13,9 +13,17 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import math import os +# try/except added for compatibility with python < 3.8 +try: + from unittest import mock + from unittest.mock import AsyncMock +except ImportError: + import mock + +import math + from google.api_core import ( future, gapic_v1, @@ -40,7 +48,6 @@ from google.rpc import status_pb2 # type: ignore import grpc from grpc.experimental import aio -import mock from proto.marshal.rules.dates import DurationRule, TimestampRule import pytest From c5c3155f62d5f46ac4f5071d68af0c448edcd93d Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Wed, 1 Jun 2022 22:31:19 -0400 Subject: [PATCH 17/20] fix(deps): require protobuf <4.0.0dev (#48) --- setup.py | 3 ++- testing/constraints-3.6.txt | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 373ed4a..7855f27 100644 --- a/setup.py +++ b/setup.py @@ -29,7 +29,8 @@ # Until this issue is closed # https://github.com/googleapis/google-cloud-python/issues/10566 "google-api-core[grpc] >= 1.31.5, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0", - "proto-plus >= 1.15.0", + "proto-plus >= 1.15.0, <2.0.0dev", + "protobuf >= 3.19.0, <4.0.0dev", ] package_root = os.path.abspath(os.path.dirname(__file__)) diff --git a/testing/constraints-3.6.txt b/testing/constraints-3.6.txt index be5a64f..786e637 100644 --- a/testing/constraints-3.6.txt +++ b/testing/constraints-3.6.txt @@ -6,3 +6,4 @@ # Then this file should have google-cloud-foo==1.14.0 google-api-core==1.31.5 proto-plus==1.15.0 +protobuf==3.19.0 From 1f5f92ab6422e9b737a9f8e597501eb0cf17b798 Mon Sep 17 00:00:00 2001 From: Dan Lee <71398022+dandhlee@users.noreply.github.com> Date: Thu, 2 Jun 2022 20:40:21 -0400 Subject: [PATCH 18/20] docs: fix changelog header to consistent size (#49) Co-authored-by: Anthonios Partheniou --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 76dfb9e..70a3cfb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -### [1.1.1](https://github.com/googleapis/python-vm-migration/compare/v1.1.0...v1.1.1) (2022-03-05) +## [1.1.1](https://github.com/googleapis/python-vm-migration/compare/v1.1.0...v1.1.1) (2022-03-05) ### Bug Fixes From c2c48966ec05fae5f11e42862887f90a405f2542 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Fri, 3 Jun 2022 10:02:21 -0400 Subject: [PATCH 19/20] chore: test minimum dependencies in python 3.7 (#52) --- testing/constraints-3.7.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/testing/constraints-3.7.txt b/testing/constraints-3.7.txt index e69de29..786e637 100644 --- a/testing/constraints-3.7.txt +++ b/testing/constraints-3.7.txt @@ -0,0 +1,9 @@ +# This constraints file is used to check that lower bounds +# are correct in setup.py +# List all library dependencies and extras in this file. +# 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.31.5 +proto-plus==1.15.0 +protobuf==3.19.0 From 07002c3e8d400279a8f6ec02938f277dc0dac6f8 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 6 Jun 2022 18:15:46 -0400 Subject: [PATCH 20/20] chore(main): release 1.1.2 (#50) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou --- CHANGELOG.md | 12 ++++++++++++ setup.py | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 70a3cfb..9a99dec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [1.1.2](https://github.com/googleapis/python-vm-migration/compare/v1.1.1...v1.1.2) (2022-06-03) + + +### Bug Fixes + +* **deps:** require protobuf <4.0.0dev ([#48](https://github.com/googleapis/python-vm-migration/issues/48)) ([c5c3155](https://github.com/googleapis/python-vm-migration/commit/c5c3155f62d5f46ac4f5071d68af0c448edcd93d)) + + +### Documentation + +* fix changelog header to consistent size ([#49](https://github.com/googleapis/python-vm-migration/issues/49)) ([1f5f92a](https://github.com/googleapis/python-vm-migration/commit/1f5f92ab6422e9b737a9f8e597501eb0cf17b798)) + ## [1.1.1](https://github.com/googleapis/python-vm-migration/compare/v1.1.0...v1.1.1) (2022-03-05) diff --git a/setup.py b/setup.py index 7855f27..e2a3c9b 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ name = "google-cloud-vm-migration" description = "Cloud VM Migration API client library" -version = "1.1.1" +version = "1.1.2" url = "https://github.com/googleapis/python-vm-migration" release_status = "Development Status :: 5 - Production/Stable" dependencies = [