diff --git a/src/vmware/azext_vmware/__init__.py b/src/vmware/azext_vmware/__init__.py index 5cdf51e3df0..cf08c2aced9 100644 --- a/src/vmware/azext_vmware/__init__.py +++ b/src/vmware/azext_vmware/__init__.py @@ -11,14 +11,22 @@ class VmwareCommandsLoader(AzCommandsLoader): def __init__(self, cli_ctx=None): from azure.cli.core.commands import CliCommandType - from azext_vmware._client_factory import cf_vmware - vmware_custom = CliCommandType( - operations_tmpl='azext_vmware.custom#{}', - client_factory=cf_vmware) + vmware_custom = CliCommandType(operations_tmpl='azext_vmware.custom#{}') super(VmwareCommandsLoader, self).__init__(cli_ctx=cli_ctx, custom_command_type=vmware_custom) # pylint: disable=super-with-arguments def load_command_table(self, args): from azext_vmware.commands import load_command_table + from azure.cli.core.aaz import load_aaz_command_table + try: + from . import aaz + except ImportError: + aaz = None + if aaz: + load_aaz_command_table( + loader=self, + aaz_pkg_name=aaz.__name__, + args=args + ) load_command_table(self, args) return self.command_table diff --git a/src/vmware/azext_vmware/_help.py b/src/vmware/azext_vmware/_help.py index f09286d1168..562e0fd5b48 100644 --- a/src/vmware/azext_vmware/_help.py +++ b/src/vmware/azext_vmware/_help.py @@ -846,7 +846,7 @@ short-summary: Create a segment by ID in a private cloud workload network. examples: - name: Create a segment by ID in a workload network. - text: az vmware workload-network segment create --resource-group group1 --private-cloud cloud1 --segment segment1 --display-name segment1 --connected-gateway /infra/tier-1s/gateway --revision 1 --dhcp-ranges 40.20.0.0 40.20.0.1 --gateway-address 40.20.20.20/16 --port-name port1 + text: az vmware workload-network segment create --resource-group group1 --private-cloud cloud1 --segment segment1 --display-name segment1 --connected-gateway /infra/tier-1s/gateway --revision 1 --dhcp-ranges 40.20.0.0 40.20.0.1 --gateway-address 40.20.20.20/16 """ helps['vmware workload-network segment update'] = """ @@ -854,7 +854,7 @@ short-summary: Update a segment by ID in a private cloud workload network. examples: - name: Update a segment by ID in a workload network. - text: az vmware workload-network segment update --resource-group group1 --private-cloud cloud1 --segment segment1 --display-name segment1 --connected-gateway /infra/tier-1s/gateway --revision 1 --dhcp-ranges 40.20.0.0 40.20.0.1 --gateway-address 40.20.20.20/16 --port-name port1 + text: az vmware workload-network segment update --resource-group group1 --private-cloud cloud1 --segment segment1 --display-name segment1 --connected-gateway /infra/tier-1s/gateway --revision 1 --dhcp-ranges 40.20.0.0 40.20.0.1 --gateway-address 40.20.20.20/16 """ helps['vmware workload-network segment delete'] = """ diff --git a/src/vmware/azext_vmware/_params.py b/src/vmware/azext_vmware/_params.py index 034b18bcc5e..487268c329b 100644 --- a/src/vmware/azext_vmware/_params.py +++ b/src/vmware/azext_vmware/_params.py @@ -6,8 +6,6 @@ from azext_vmware.action import ScriptExecutionNamedOutputAction, ScriptExecutionParameterAction -from azure.cli.core.commands.parameters import get_enum_type -from ._validators import server_addresses_length def load_arguments(self, _): @@ -26,39 +24,11 @@ def load_arguments(self, _): with self.argument_context('vmware private-cloud') as c: c.argument('cluster_size', help='Number of hosts for the default management cluster. Minimum of 3 and maximum of 16.') c.argument('internet', help='Connectivity to internet. Specify "Enabled" or "Disabled".') - c.argument('yes', help='Delete without confirmation.') - with self.argument_context('vmware cluster') as c: - c.argument('name', options_list=['--name', '-n'], help='Name of the cluster.') - c.argument('sku', help='The product SKU.') - c.argument('size', help='Number of hosts for the cluster. Minimum of 3 and a maximum of 16.') - c.argument('hosts', nargs='*', help='A cluster\'s hosts in the private cloud.') + with self.argument_context('vmware private-cloud delete-cmk-encryption') as c: c.argument('yes', help='Delete without confirmation.') - with self.argument_context('vmware private-cloud create') as c: - c.argument('name', options_list=['--name', '-n'], help='Name of the private cloud.') - c.argument('sku', help='The product SKU.') - c.argument('vcenter_password', help='vCenter admin password.') - c.argument('nsxt_password', help='NSX-T Manager password.') - c.argument('accept_eula', help='Accept the end-user license agreement without prompting.') - c.argument('network_block', help='A subnet at least of size /22. Make sure the CIDR format is conformed to (A.B.C.D/X) where A,B,C,D are between 0 and 255, and X is between 0 and 22.') - c.argument('mi_system_assigned', help='Enable a system assigned identity.') - c.argument('strategy', arg_type=get_enum_type(['SingleZone', 'DualZone']), help='The availability strategy for the private cloud.') - c.argument('zone', help='The primary availability zone for the private cloud') - c.argument('secondary_zone', help='The secondary availability zone for the private cloud.') - - with self.argument_context('vmware private-cloud show') as c: - c.argument('name', options_list=['--name', '-n'], help='Name of the private cloud.') - - with self.argument_context('vmware private-cloud update') as c: - c.argument('name', options_list=['--name', '-n'], help='Name of the private cloud.') - - with self.argument_context('vmware private-cloud delete') as c: - c.argument('name', options_list=['--name', '-n'], help='Name of the private cloud.') - - with self.argument_context('vmware authorization') as c: - c.argument('name', options_list=['--name', '-n'], help='Name of the authorization.') - c.argument('express_route_id', help='The ID of the ExpressRoute Circuit.') + with self.argument_context('vmware private-cloud disable-cmk-encryption') as c: c.argument('yes', help='Delete without confirmation.') with self.argument_context('vmware private-cloud add-cmk-encryption') as c: @@ -99,83 +69,33 @@ def load_arguments(self, _): c.argument('alias', help='The domain\'s NetBIOS name.') c.argument('domain', help='The domain\'s dns name.') c.argument('name', options_list=['--name', '-n'], help='The name of the identity source.') + c.argument('yes', help='Delete without confirmation.') with self.argument_context('vmware private-cloud deleteidentitysource') as c: c.argument('alias', help='The domain\'s NetBIOS name.') c.argument('domain', help='The domain\'s dns name.') c.argument('name', options_list=['--name', '-n'], help='The name of the identity source.') + c.argument('yes', help='Delete without confirmation.') with self.argument_context('vmware private-cloud identity assign') as c: c.argument('system_assigned', help='Enable a system assigned identity.') with self.argument_context('vmware private-cloud identity remove') as c: c.argument('system_assigned', help='Disable a system assigned identity.') - - with self.argument_context('vmware private-cloud update') as c: - c.argument('name', options_list=['--name', '-n'], help='Name of the private cloud.') - - with self.argument_context('vmware hcx-enterprise-site') as c: - c.argument('name', options_list=['--name', '-n'], help='The name of the HCX Enterprise Site.') c.argument('yes', help='Delete without confirmation.') with self.argument_context('vmware datastore') as c: c.argument('name', options_list=['--name', '-n'], help='The name of the datastore.') c.argument('cluster', help='The name of the cluster.') c.argument('lun_name', help='Name of the LUN to be used.') - c.argument('yes', help='Delete without confirmation.') with self.argument_context('vmware datastore create') as c: c.argument('nfs_provider_ip', help='IP address of the NFS provider.') c.argument('nfs_file_path', help='File path through which the NFS volume is exposed by the provider.') c.argument('endpoints', nargs='*', help='iSCSI provider target IP address list.') - with self.argument_context('vmware datastore netapp-volume create') as c: - c.argument('volume_id', help='Azure resource ID of the NetApp volume.') - - with self.argument_context('vmware datastore disk-pool-volume create') as c: - c.argument('target_id', help='Azure resource ID of the iSCSI target.') - c.argument('mount_option', arg_type=get_enum_type(['MOUNT', 'ATTACH']), default="MOUNT", help='Mode that describes whether the LUN has to be mounted as a datastore or attached as a LUN.') - - with self.argument_context('vmware addon') as c: - c.argument('name', options_list=['--name', '-n'], help='Name of the addon.') - c.argument('yes', help='Delete without confirmation.') - - with self.argument_context('vmware addon vr') as c: - c.argument('vrs_count', help='The vSphere Replication Server (VRS) count.') - - with self.argument_context('vmware addon hcx') as c: - c.argument('offer', help='The HCX offer, example "VMware MaaS Cloud Provider (Enterprise)".') - - with self.argument_context('vmware addon srm') as c: - c.argument('license_key', help='The Site Recovery Manager (SRM) license.') - - with self.argument_context('vmware addon arc') as c: - c.argument('vcenter', help='The VMware vCenter resource ID.') - - with self.argument_context('vmware global-reach-connection') as c: - c.argument('name', options_list=['--name', '-n'], help='Name of the global reach connection.') - c.argument('yes', help='Delete without confirmation.') - - with self.argument_context('vmware global-reach-connection create') as c: - c.argument('peer_express_route_circuit', help='Identifier of the ExpressRoute Circuit to peer with.') - c.argument('authorization_key', help='Authorization key from the peer express route.') - c.argument('express_route_id', help="The ID of the Private Cloud's ExpressRoute Circuit that is participating in the global reach connection.") - - with self.argument_context('vmware cloud-link') as c: - c.argument('name', options_list=['--name', '-n'], help='The name of the cloud link.') - c.argument('linked_cloud', help='Identifier of the other private cloud participating in the link.') - c.argument('yes', help='Delete without confirmation.') - - with self.argument_context('vmware script-package') as c: - c.argument('name', options_list=['--name', '-n'], help='Name of the script package.') - - with self.argument_context('vmware script-cmdlet') as c: - c.argument('script_package', options_list=['--script-package', '-p'], help='Name of the script package.') - c.argument('name', options_list=['--name', '-n'], help='Name of the script cmdlet.') - with self.argument_context('vmware script-execution') as c: c.argument('name', options_list=['--name', '-n'], help='Name of the script execution.') - c.argument('yes', help='Delete without confirmation.') with self.argument_context('vmware script-execution create') as c: c.argument('timeout', help='Time limit for execution.') @@ -183,94 +103,6 @@ def load_arguments(self, _): c.argument('hidden_parameters', options_list=['--hidden-parameter'], action=ScriptExecutionParameterAction, nargs='*', help='Parameters that will be hidden/not visible to ARM, such as passwords and credentials.') c.argument('failure_reason', help='Error message if the script was able to run, but if the script itself had errors or powershell threw an exception.') c.argument('retention', help='Time to live for the resource. If not provided, will be available for 60 days.') - c.argument('out', help='Standard output stream from the powershell execution.') + c.argument('out', nargs='*', help='Standard output stream from the powershell execution.') c.argument('named_outputs', action=ScriptExecutionNamedOutputAction, nargs='*', help='User-defined dictionary.') c.argument('script_cmdlet_id', help='A reference to the script cmdlet resource if user is running a AVS script.') - - with self.argument_context('vmware workload-network dhcp') as c: - c.argument('dhcp', help='NSX DHCP identifier. Generally the same as the DHCP display name.') - c.argument('display_name', help='Display name of the DHCP entity.') - c.argument('revision', help='NSX revision number.') - c.argument('yes', help='Delete without confirmation.') - - with self.argument_context('vmware workload-network dhcp server') as c: - c.argument('server_address', help='DHCP Server Address.') - c.argument('lease_time', help='DHCP Server Lease Time.') - - with self.argument_context('vmware workload-network dhcp relay') as c: - c.argument('server_addresses', nargs='+', validator=server_addresses_length, help='DHCP Relay Addresses. Max 3.') - - with self.argument_context('vmware workload-network dns-service') as c: - c.argument('dns_service', help="NSX DNS service identifier. Generally the same as the DNS service's display name.") - c.argument('display_name', help='Display name of the DNS service.') - c.argument('dns_service_ip', help='DNS service IP of the DNS service.') - c.argument('default_dns_zone', help='Default DNS zone of the DNS service.') - c.argument('fqdn_zones', nargs='+', help='FQDN zones of the DNS service.') - c.argument('log_level', arg_type=get_enum_type(["DEBUG", "INFO", "WARNING", "ERROR", "FATAL"]), help='DNS service log level. Possible values include: "DEBUG", "INFO", "WARNING", "ERROR", "FATAL".') - c.argument('revision', help='NSX revision number.') - c.argument('yes', help='Delete without confirmation.') - - with self.argument_context('vmware workload-network dns-zone') as c: - c.argument('dns_zone', help="NSX DNS zone identifier. Generally the same as the DNS zone's display name.") - c.argument('display_name', help='Display name of the DNS zone.') - c.argument('domain', nargs='+', help='Domain names of the DNS zone.') - c.argument('dns_server_ips', nargs='+', help='DNS Server IP array of the DNS zone.') - c.argument('source_ip', help='Source IP of the DNS zone.') - c.argument('dns_services', help='Number of DNS services using the DNS zone.') - c.argument('revision', help='NSX revision number.') - c.argument('yes', help='Delete without confirmation.') - - with self.argument_context('vmware workload-network port-mirroring') as c: - c.argument('port_mirroring', help="NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name.") - c.argument('display_name', help='Display name of the port mirroring profile.') - c.argument('direction', help='Direction of port mirroring profile. Possible values include: "INGRESS, EGRESS, BIDIRECTIONAL".') - c.argument('source', help='Source VM Group.') - c.argument('destination', help='Destination VM Group.') - c.argument('revision', help='NSX revision number.') - c.argument('yes', help='Delete without confirmation.') - - with self.argument_context('vmware workload-network segment') as c: - c.argument('segment', help="NSX Segment identifier. Generally the same as the Segment's display name.") - c.argument('display_name', help='Display name of the segment.') - c.argument('connected_gateway', help='Gateway which to connect segment to.') - c.argument('revision', help='NSX revision number.') - c.argument('dhcp_ranges', nargs='+', help='DHCP Range assigned for subnet.') - c.argument('gateway_address', help='Gateway address.') - c.argument('port_name', help='Name of port or VIF attached to segment.') - c.argument('yes', help='Delete without confirmation.') - - with self.argument_context('vmware workload-network public-ip') as c: - c.argument('public_ip', help="NSX Public IP Block identifier. Generally the same as the Public IP.") - c.argument('display_name', help='Display name of the Public IP Block.') - c.argument('number_of_public_ips', help='Number of Public IPs requested.') - c.argument('yes', help='Delete without confirmation.') - - with self.argument_context('vmware workload-network vm-group') as c: - c.argument('vm_group', help="NSX VM Group identifier. Generally the same as the VM Group's display name.") - c.argument('display_name', help='Display name of the VM group.') - c.argument('members', nargs='+', help='Virtual machine members of this group.') - c.argument('revision', help='NSX revision number.') - c.argument('yes', help='Delete without confirmation.') - - with self.argument_context('vmware workload-network vm') as c: - c.argument('virtual_machine', help="Virtual Machine identifier.") - - with self.argument_context('vmware workload-network gateway') as c: - c.argument('gateway', help="NSX Gateway identifier. Generally the same as the Gateway's display name.") - - with self.argument_context('vmware placement-policy') as c: - c.argument('cluster_name', help="Name of the cluster in the private cloud.") - c.argument('placement_policy_name', help="Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy.") - c.argument('state', arg_type=get_enum_type(['Enabled', 'Disabled']), help="Whether the placement policy is enabled or disabled.") - c.argument('display_name', help="Display name of the placement policy.") - c.argument('vm_members', nargs='+', help="Virtual machine members list.") - c.argument('affinity_type', arg_type=get_enum_type(['Affinity', 'AntiAffinity']), help="Placement policy affinity type.") - c.argument('host_members', nargs='+', help='Host members list.') - c.argument('affinity_strength', arg_type=get_enum_type(['Should', 'Must']), help='VM host placement policy affinity strength (should/must).') - c.argument('azure_hybrid_benefit', arg_type=get_enum_type(['SqlHost', 'None']), help='Placement policy azure hybrid benefit opt-in type.') - c.argument('yes', help='Delete without confirmation.') - - with self.argument_context('vmware vm') as c: - c.argument('cluster_name', help='Name of the cluster in the private cloud.') - c.argument('virtual_machine', help='Virtual Machine identifier.') - c.argument('restrict_movement', arg_type=get_enum_type(['Enabled', 'Disabled']), help='Whether VM DRS-driven movement is restricted (enabled) or not (disabled).') diff --git a/src/vmware/azext_vmware/_validators.py b/src/vmware/azext_vmware/_validators.py deleted file mode 100644 index 59f988db5fb..00000000000 --- a/src/vmware/azext_vmware/_validators.py +++ /dev/null @@ -1,29 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- -# pylint: disable=line-too-long - -from azure.cli.core.azclierror import InvalidArgumentValueError - - -def example_name_or_id_validator(cmd, namespace): - # Example of a storage account name or ID validator. - # See: https://github.com/Azure/azure-cli/blob/dev/doc/authoring_command_modules/authoring_commands.md#supporting-name-or-id-parameters - from azure.cli.core.commands.client_factory import get_subscription_id - from msrestazure.tools import is_valid_resource_id, resource_id - if namespace.storage_account: - if not is_valid_resource_id(namespace.RESOURCE): - namespace.storage_account = resource_id( - subscription=get_subscription_id(cmd.cli_ctx), - resource_group=namespace.resource_group_name, - namespace='Microsoft.Storage', - type='storageAccounts', - name=namespace.storage_account - ) - - -def server_addresses_length(namespace): - if isinstance(namespace.server_addresses, list): - if len(namespace.server_addresses) > 3: - raise InvalidArgumentValueError("Enter a maximum of 3 DHCP relay addresses") diff --git a/src/vmware/azext_vmware/aaz/__init__.py b/src/vmware/azext_vmware/aaz/__init__.py new file mode 100644 index 00000000000..5757aea3175 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- diff --git a/src/vmware/azext_vmware/aaz/latest/__init__.py b/src/vmware/azext_vmware/aaz/latest/__init__.py new file mode 100644 index 00000000000..5757aea3175 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/__cmd_group.py b/src/vmware/azext_vmware/aaz/latest/vmware/__cmd_group.py new file mode 100644 index 00000000000..a917c3fa437 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "vmware", +) +class __CMDGroup(AAZCommandGroup): + """Commands to manage Azure VMware Solution. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/vmware/azext_vmware/_client_factory.py b/src/vmware/azext_vmware/aaz/latest/vmware/__init__.py similarity index 59% rename from src/vmware/azext_vmware/_client_factory.py rename to src/vmware/azext_vmware/aaz/latest/vmware/__init__.py index aad5a6e7162..5a9d61963d6 100644 --- a/src/vmware/azext_vmware/_client_factory.py +++ b/src/vmware/azext_vmware/aaz/latest/vmware/__init__.py @@ -1,11 +1,11 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - - -def cf_vmware(cli_ctx, *_): - - from azure.cli.core.commands.client_factory import get_mgmt_service_client - from azext_vmware.vendored_sdks.avs_client import AVSClient - return get_mgmt_service_client(cli_ctx, AVSClient) +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/addon/__cmd_group.py b/src/vmware/azext_vmware/aaz/latest/vmware/addon/__cmd_group.py new file mode 100644 index 00000000000..e670614620f --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/addon/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "vmware addon", +) +class __CMDGroup(AAZCommandGroup): + """Commands to manage addons for a private cloud. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/addon/__init__.py b/src/vmware/azext_vmware/aaz/latest/vmware/addon/__init__.py new file mode 100644 index 00000000000..c401f439385 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/addon/__init__.py @@ -0,0 +1,16 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._create import * +from ._delete import * +from ._list import * +from ._show import * +from ._update import * diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/addon/_create.py b/src/vmware/azext_vmware/aaz/latest/vmware/addon/_create.py new file mode 100644 index 00000000000..75af3f21aa2 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/addon/_create.py @@ -0,0 +1,319 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +class Create(AAZCommand): + """Create a addon in a private cloud + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/addons/{}", "2022-05-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.addon_name = AAZStrArg( + options=["-n", "--name", "--addon-name"], + help="Name of the addon for the private cloud", + required=True, + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.arc = AAZObjectArg( + options=["--arc"], + arg_group="Properties", + help="an Arc addon for a private cloud.", + ) + _args_schema.hcx = AAZObjectArg( + options=["--hcx"], + arg_group="Properties", + help="a HCX addon for a private cloud.", + ) + _args_schema.srm = AAZObjectArg( + options=["--srm"], + arg_group="Properties", + help="a Site Recovery Manager (SRM) addon for a private cloud.", + ) + _args_schema.vr = AAZObjectArg( + options=["--vr"], + arg_group="Properties", + help="a vSphere Replication (VR) addon for a private cloud", + ) + + arc = cls._args_schema.arc + arc.vcenter = AAZStrArg( + options=["vcenter"], + help="The VMware vCenter resource ID", + required=True, + ) + + hcx = cls._args_schema.hcx + hcx.offer = AAZStrArg( + options=["offer"], + help="The HCX offer, example VMware MaaS Cloud Provider (Enterprise)", + required=True, + ) + + srm = cls._args_schema.srm + srm.license_key = AAZStrArg( + options=["license-key"], + help="The Site Recovery Manager (SRM) license", + required=True, + ) + + vr = cls._args_schema.vr + vr.vrs_count = AAZIntArg( + options=["vrs-count"], + help="The vSphere Replication Server (VRS) count", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.AddonsCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class AddonsCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "addonName", self.ctx.args.addon_name, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("properties", AAZObjectType) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_const("addonType", "Arc", AAZStrType, ".arc", typ_kwargs={"flags": {"required": True}}) + properties.set_const("addonType", "HCX", AAZStrType, ".hcx", typ_kwargs={"flags": {"required": True}}) + properties.set_const("addonType", "SRM", AAZStrType, ".srm", typ_kwargs={"flags": {"required": True}}) + properties.set_const("addonType", "VR", AAZStrType, ".vr", typ_kwargs={"flags": {"required": True}}) + properties.discriminate_by("addonType", "Arc") + properties.discriminate_by("addonType", "HCX") + properties.discriminate_by("addonType", "SRM") + properties.discriminate_by("addonType", "VR") + + disc_arc = _builder.get(".properties{addonType:Arc}") + if disc_arc is not None: + disc_arc.set_prop("vCenter", AAZStrType, ".arc.vcenter", typ_kwargs={"flags": {"required": True}}) + + disc_hcx = _builder.get(".properties{addonType:HCX}") + if disc_hcx is not None: + disc_hcx.set_prop("offer", AAZStrType, ".hcx.offer", typ_kwargs={"flags": {"required": True}}) + + disc_srm = _builder.get(".properties{addonType:SRM}") + if disc_srm is not None: + disc_srm.set_prop("licenseKey", AAZStrType, ".srm.license_key", typ_kwargs={"flags": {"required": True}}) + + disc_vr = _builder.get(".properties{addonType:VR}") + if disc_vr is not None: + disc_vr.set_prop("vrsCount", AAZIntType, ".vr.vrs_count", typ_kwargs={"flags": {"required": True}}) + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType() + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200_201.properties + properties.addon_type = AAZStrType( + serialized_name="addonType", + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + disc_arc = cls._schema_on_200_201.properties.discriminate_by("addon_type", "Arc") + disc_arc.v_center = AAZStrType( + serialized_name="vCenter", + flags={"required": True}, + ) + + disc_hcx = cls._schema_on_200_201.properties.discriminate_by("addon_type", "HCX") + disc_hcx.offer = AAZStrType( + flags={"required": True}, + ) + + disc_srm = cls._schema_on_200_201.properties.discriminate_by("addon_type", "SRM") + disc_srm.license_key = AAZStrType( + serialized_name="licenseKey", + flags={"required": True}, + ) + + disc_vr = cls._schema_on_200_201.properties.discriminate_by("addon_type", "VR") + disc_vr.vrs_count = AAZIntType( + serialized_name="vrsCount", + flags={"required": True}, + ) + + return cls._schema_on_200_201 + + +class _CreateHelper: + """Helper class for Create""" + + +__all__ = ["Create"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/addon/_delete.py b/src/vmware/azext_vmware/aaz/latest/vmware/addon/_delete.py new file mode 100644 index 00000000000..d5d088315ef --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/addon/_delete.py @@ -0,0 +1,166 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +class Delete(AAZCommand): + """Delete a addon in a private cloud + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/addons/{}", "2022-05-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, None) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.addon_name = AAZStrArg( + options=["-n", "--name", "--addon-name"], + help="Name of the addon for the private cloud", + required=True, + id_part="child_name_1", + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.AddonsDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class AddonsDelete(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [204]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_204, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "addonName", self.ctx.args.addon_name, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/addon/_list.py b/src/vmware/azext_vmware/aaz/latest/vmware/addon/_list.py new file mode 100644 index 00000000000..33956e3dc35 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/addon/_list.py @@ -0,0 +1,217 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware addon list", +) +class List(AAZCommand): + """List addons in a private cloud + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/addons", "2022-05-01"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.AddonsList(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class AddonsList(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + flags={"read_only": True}, + ) + _schema_on_200.value = AAZListType( + flags={"read_only": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.addon_type = AAZStrType( + serialized_name="addonType", + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + disc_arc = cls._schema_on_200.value.Element.properties.discriminate_by("addon_type", "Arc") + disc_arc.v_center = AAZStrType( + serialized_name="vCenter", + flags={"required": True}, + ) + + disc_hcx = cls._schema_on_200.value.Element.properties.discriminate_by("addon_type", "HCX") + disc_hcx.offer = AAZStrType( + flags={"required": True}, + ) + + disc_srm = cls._schema_on_200.value.Element.properties.discriminate_by("addon_type", "SRM") + disc_srm.license_key = AAZStrType( + serialized_name="licenseKey", + flags={"required": True}, + ) + + disc_vr = cls._schema_on_200.value.Element.properties.discriminate_by("addon_type", "VR") + disc_vr.vrs_count = AAZIntType( + serialized_name="vrsCount", + flags={"required": True}, + ) + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/addon/_show.py b/src/vmware/azext_vmware/aaz/latest/vmware/addon/_show.py new file mode 100644 index 00000000000..2c8ef5565a9 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/addon/_show.py @@ -0,0 +1,211 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +class Show(AAZCommand): + """Get an addon by name in a private cloud + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/addons/{}", "2022-05-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.addon_name = AAZStrArg( + options=["-n", "--name", "--addon-name"], + help="Name of the addon for the private cloud", + required=True, + id_part="child_name_1", + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.AddonsGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class AddonsGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "addonName", self.ctx.args.addon_name, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.addon_type = AAZStrType( + serialized_name="addonType", + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + disc_arc = cls._schema_on_200.properties.discriminate_by("addon_type", "Arc") + disc_arc.v_center = AAZStrType( + serialized_name="vCenter", + flags={"required": True}, + ) + + disc_hcx = cls._schema_on_200.properties.discriminate_by("addon_type", "HCX") + disc_hcx.offer = AAZStrType( + flags={"required": True}, + ) + + disc_srm = cls._schema_on_200.properties.discriminate_by("addon_type", "SRM") + disc_srm.license_key = AAZStrType( + serialized_name="licenseKey", + flags={"required": True}, + ) + + disc_vr = cls._schema_on_200.properties.discriminate_by("addon_type", "VR") + disc_vr.vrs_count = AAZIntType( + serialized_name="vrsCount", + flags={"required": True}, + ) + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/addon/_update.py b/src/vmware/azext_vmware/aaz/latest/vmware/addon/_update.py new file mode 100644 index 00000000000..a823720d1b8 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/addon/_update.py @@ -0,0 +1,459 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +class Update(AAZCommand): + """Update a addon in a private cloud + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/addons/{}", "2022-05-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + AZ_SUPPORT_GENERIC_UPDATE = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.addon_name = AAZStrArg( + options=["-n", "--name", "--addon-name"], + help="Name of the addon for the private cloud", + required=True, + id_part="child_name_1", + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.arc = AAZObjectArg( + options=["--arc"], + arg_group="Properties", + help="an Arc addon for a private cloud.", + ) + _args_schema.hcx = AAZObjectArg( + options=["--hcx"], + arg_group="Properties", + help="a HCX addon for a private cloud.", + ) + _args_schema.srm = AAZObjectArg( + options=["--srm"], + arg_group="Properties", + help="a Site Recovery Manager (SRM) addon for a private cloud.", + ) + _args_schema.vr = AAZObjectArg( + options=["--vr"], + arg_group="Properties", + help="a vSphere Replication (VR) addon for a private cloud", + ) + + arc = cls._args_schema.arc + arc.vcenter = AAZStrArg( + options=["vcenter"], + help="The VMware vCenter resource ID", + ) + + hcx = cls._args_schema.hcx + hcx.offer = AAZStrArg( + options=["offer"], + help="The HCX offer, example VMware MaaS Cloud Provider (Enterprise)", + ) + + srm = cls._args_schema.srm + srm.license_key = AAZStrArg( + options=["license-key"], + help="The Site Recovery Manager (SRM) license", + ) + + vr = cls._args_schema.vr + vr.vrs_count = AAZIntArg( + options=["vrs-count"], + help="The vSphere Replication Server (VRS) count", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.AddonsGet(ctx=self.ctx)() + self.pre_instance_update(self.ctx.vars.instance) + self.InstanceUpdateByJson(ctx=self.ctx)() + self.InstanceUpdateByGeneric(ctx=self.ctx)() + self.post_instance_update(self.ctx.vars.instance) + yield self.AddonsCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + @register_callback + def pre_instance_update(self, instance): + pass + + @register_callback + def post_instance_update(self, instance): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class AddonsGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "addonName", self.ctx.args.addon_name, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _UpdateHelper._build_schema_addon_read(cls._schema_on_200) + + return cls._schema_on_200 + + class AddonsCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "addonName", self.ctx.args.addon_name, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + value=self.ctx.vars.instance, + ) + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + _UpdateHelper._build_schema_addon_read(cls._schema_on_200_201) + + return cls._schema_on_200_201 + + class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance(self.ctx.vars.instance) + + def _update_instance(self, instance): + _instance_value, _builder = self.new_content_builder( + self.ctx.args, + value=instance, + typ=AAZObjectType + ) + _builder.set_prop("properties", AAZObjectType) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_const("addonType", "Arc", AAZStrType, ".arc", typ_kwargs={"flags": {"required": True}}) + properties.set_const("addonType", "HCX", AAZStrType, ".hcx", typ_kwargs={"flags": {"required": True}}) + properties.set_const("addonType", "SRM", AAZStrType, ".srm", typ_kwargs={"flags": {"required": True}}) + properties.set_const("addonType", "VR", AAZStrType, ".vr", typ_kwargs={"flags": {"required": True}}) + properties.discriminate_by("addonType", "Arc") + properties.discriminate_by("addonType", "HCX") + properties.discriminate_by("addonType", "SRM") + properties.discriminate_by("addonType", "VR") + + disc_arc = _builder.get(".properties{addonType:Arc}") + if disc_arc is not None: + disc_arc.set_prop("vCenter", AAZStrType, ".arc.vcenter", typ_kwargs={"flags": {"required": True}}) + + disc_hcx = _builder.get(".properties{addonType:HCX}") + if disc_hcx is not None: + disc_hcx.set_prop("offer", AAZStrType, ".hcx.offer", typ_kwargs={"flags": {"required": True}}) + + disc_srm = _builder.get(".properties{addonType:SRM}") + if disc_srm is not None: + disc_srm.set_prop("licenseKey", AAZStrType, ".srm.license_key", typ_kwargs={"flags": {"required": True}}) + + disc_vr = _builder.get(".properties{addonType:VR}") + if disc_vr is not None: + disc_vr.set_prop("vrsCount", AAZIntType, ".vr.vrs_count", typ_kwargs={"flags": {"required": True}}) + + return _instance_value + + class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance_by_generic( + self.ctx.vars.instance, + self.ctx.generic_update_args + ) + + +class _UpdateHelper: + """Helper class for Update""" + + _schema_addon_read = None + + @classmethod + def _build_schema_addon_read(cls, _schema): + if cls._schema_addon_read is not None: + _schema.id = cls._schema_addon_read.id + _schema.name = cls._schema_addon_read.name + _schema.properties = cls._schema_addon_read.properties + _schema.type = cls._schema_addon_read.type + return + + cls._schema_addon_read = _schema_addon_read = AAZObjectType() + + addon_read = _schema_addon_read + addon_read.id = AAZStrType( + flags={"read_only": True}, + ) + addon_read.name = AAZStrType( + flags={"read_only": True}, + ) + addon_read.properties = AAZObjectType() + addon_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_addon_read.properties + properties.addon_type = AAZStrType( + serialized_name="addonType", + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + disc_arc = _schema_addon_read.properties.discriminate_by("addon_type", "Arc") + disc_arc.v_center = AAZStrType( + serialized_name="vCenter", + flags={"required": True}, + ) + + disc_hcx = _schema_addon_read.properties.discriminate_by("addon_type", "HCX") + disc_hcx.offer = AAZStrType( + flags={"required": True}, + ) + + disc_srm = _schema_addon_read.properties.discriminate_by("addon_type", "SRM") + disc_srm.license_key = AAZStrType( + serialized_name="licenseKey", + flags={"required": True}, + ) + + disc_vr = _schema_addon_read.properties.discriminate_by("addon_type", "VR") + disc_vr.vrs_count = AAZIntType( + serialized_name="vrsCount", + flags={"required": True}, + ) + + _schema.id = cls._schema_addon_read.id + _schema.name = cls._schema_addon_read.name + _schema.properties = cls._schema_addon_read.properties + _schema.type = cls._schema_addon_read.type + + +__all__ = ["Update"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/authorization/__cmd_group.py b/src/vmware/azext_vmware/aaz/latest/vmware/authorization/__cmd_group.py new file mode 100644 index 00000000000..b82fbe5c35b --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/authorization/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "vmware authorization", +) +class __CMDGroup(AAZCommandGroup): + """Commands to manage the authorizations of an ExpressRoute Circuit for a private cloud. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/authorization/__init__.py b/src/vmware/azext_vmware/aaz/latest/vmware/authorization/__init__.py new file mode 100644 index 00000000000..2d1a2078686 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/authorization/__init__.py @@ -0,0 +1,16 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._create import * +from ._delete import * +from ._list import * +from ._show import * +from ._wait import * diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/authorization/_create.py b/src/vmware/azext_vmware/aaz/latest/vmware/authorization/_create.py new file mode 100644 index 00000000000..e275ddf26a2 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/authorization/_create.py @@ -0,0 +1,242 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware authorization create", +) +class Create(AAZCommand): + """Create an ExpressRoute Circuit Authorization in a private cloud + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/authorizations/{}", "2022-05-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.authorization_name = AAZStrArg( + options=["-n", "--name", "--authorization-name"], + help="Name of the ExpressRoute Circuit Authorization in the private cloud", + required=True, + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="The name of the private cloud.", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.express_route_id = AAZStrArg( + options=["--express-route-id"], + arg_group="Properties", + help="The ID of the ExpressRoute Circuit", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.AuthorizationsCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class AuthorizationsCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "authorizationName", self.ctx.args.authorization_name, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("expressRouteId", AAZStrType, ".express_route_id") + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200_201.properties + properties.express_route_authorization_id = AAZStrType( + serialized_name="expressRouteAuthorizationId", + flags={"read_only": True}, + ) + properties.express_route_authorization_key = AAZStrType( + serialized_name="expressRouteAuthorizationKey", + flags={"read_only": True}, + ) + properties.express_route_id = AAZStrType( + serialized_name="expressRouteId", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + return cls._schema_on_200_201 + + +class _CreateHelper: + """Helper class for Create""" + + +__all__ = ["Create"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/authorization/_delete.py b/src/vmware/azext_vmware/aaz/latest/vmware/authorization/_delete.py new file mode 100644 index 00000000000..425ada5fd71 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/authorization/_delete.py @@ -0,0 +1,170 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware authorization delete", + confirmation="This will delete the authorization. Are you sure?", +) +class Delete(AAZCommand): + """Delete an ExpressRoute Circuit Authorization in a private cloud + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/authorizations/{}", "2022-05-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, None) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.authorization_name = AAZStrArg( + options=["-n", "--name", "--authorization-name"], + help="Name of the ExpressRoute Circuit Authorization in the private cloud", + required=True, + id_part="child_name_1", + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="The name of the private cloud.", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.AuthorizationsDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class AuthorizationsDelete(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [204]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_204, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "authorizationName", self.ctx.args.authorization_name, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/authorization/_list.py b/src/vmware/azext_vmware/aaz/latest/vmware/authorization/_list.py new file mode 100644 index 00000000000..c28ec52d652 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/authorization/_list.py @@ -0,0 +1,203 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware authorization list", +) +class List(AAZCommand): + """List ExpressRoute Circuit Authorizations in a private cloud + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/authorizations", "2022-05-01"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="The name of the private cloud.", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.AuthorizationsList(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class AuthorizationsList(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + flags={"read_only": True}, + ) + _schema_on_200.value = AAZListType( + flags={"read_only": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.express_route_authorization_id = AAZStrType( + serialized_name="expressRouteAuthorizationId", + flags={"read_only": True}, + ) + properties.express_route_authorization_key = AAZStrType( + serialized_name="expressRouteAuthorizationKey", + flags={"read_only": True}, + ) + properties.express_route_id = AAZStrType( + serialized_name="expressRouteId", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/authorization/_show.py b/src/vmware/azext_vmware/aaz/latest/vmware/authorization/_show.py new file mode 100644 index 00000000000..f9d47b13236 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/authorization/_show.py @@ -0,0 +1,200 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware authorization show", +) +class Show(AAZCommand): + """Get an ExpressRoute Circuit Authorization by name in a private cloud + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/authorizations/{}", "2022-05-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.authorization_name = AAZStrArg( + options=["-n", "--name", "--authorization-name"], + help="Name of the ExpressRoute Circuit Authorization in the private cloud", + required=True, + id_part="child_name_1", + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="The name of the private cloud.", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.AuthorizationsGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class AuthorizationsGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "authorizationName", self.ctx.args.authorization_name, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.express_route_authorization_id = AAZStrType( + serialized_name="expressRouteAuthorizationId", + flags={"read_only": True}, + ) + properties.express_route_authorization_key = AAZStrType( + serialized_name="expressRouteAuthorizationKey", + flags={"read_only": True}, + ) + properties.express_route_id = AAZStrType( + serialized_name="expressRouteId", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/authorization/_wait.py b/src/vmware/azext_vmware/aaz/latest/vmware/authorization/_wait.py new file mode 100644 index 00000000000..f1c97b3103c --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/authorization/_wait.py @@ -0,0 +1,199 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware authorization wait", +) +class Wait(AAZWaitCommand): + """Place the CLI in a waiting state until a condition is met. + """ + + _aaz_info = { + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/authorizations/{}", "2022-05-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.authorization_name = AAZStrArg( + options=["-n", "--name", "--authorization-name"], + help="Name of the ExpressRoute Circuit Authorization in the private cloud", + required=True, + id_part="child_name_1", + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="The name of the private cloud.", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.AuthorizationsGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False) + return result + + class AuthorizationsGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "authorizationName", self.ctx.args.authorization_name, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.express_route_authorization_id = AAZStrType( + serialized_name="expressRouteAuthorizationId", + flags={"read_only": True}, + ) + properties.express_route_authorization_key = AAZStrType( + serialized_name="expressRouteAuthorizationKey", + flags={"read_only": True}, + ) + properties.express_route_id = AAZStrType( + serialized_name="expressRouteId", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + return cls._schema_on_200 + + +class _WaitHelper: + """Helper class for Wait""" + + +__all__ = ["Wait"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/cloud_link/__cmd_group.py b/src/vmware/azext_vmware/aaz/latest/vmware/cloud_link/__cmd_group.py new file mode 100644 index 00000000000..9aeb44d04f1 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/cloud_link/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "vmware cloud-link", +) +class __CMDGroup(AAZCommandGroup): + """Commands to manage cloud links in a private cloud. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/cloud_link/__init__.py b/src/vmware/azext_vmware/aaz/latest/vmware/cloud_link/__init__.py new file mode 100644 index 00000000000..c401f439385 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/cloud_link/__init__.py @@ -0,0 +1,16 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._create import * +from ._delete import * +from ._list import * +from ._show import * +from ._update import * diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/cloud_link/_create.py b/src/vmware/azext_vmware/aaz/latest/vmware/cloud_link/_create.py new file mode 100644 index 00000000000..f555e809533 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/cloud_link/_create.py @@ -0,0 +1,238 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware cloud-link create", +) +class Create(AAZCommand): + """Create a cloud link in a private cloud + + :example: Create a cloud link. + az vmware cloud-link create --resource-group group1 --private-cloud cloud1 --name cloudLink1 --linked-cloud "/subscriptions/12341234-1234-1234-1234-123412341234/resourceGroups/mygroup/providers/Microsoft.AVS/privateClouds/cloud2" + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/cloudlinks/{}", "2022-05-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.cloud_link_name = AAZStrArg( + options=["-n", "--name", "--cloud-link-name"], + help="Name of the cloud link resource", + required=True, + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="The name of the private cloud.", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.linked_cloud = AAZStrArg( + options=["--linked-cloud"], + arg_group="Properties", + help="Identifier of the other private cloud participating in the link.", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.CloudLinksCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class CloudLinksCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "cloudLinkName", self.ctx.args.cloud_link_name, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}}) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("linkedCloud", AAZStrType, ".linked_cloud", typ_kwargs={"flags": {"required": True}}) + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200_201.properties + properties.linked_cloud = AAZStrType( + serialized_name="linkedCloud", + flags={"required": True}, + ) + properties.status = AAZStrType( + flags={"read_only": True}, + ) + + return cls._schema_on_200_201 + + +class _CreateHelper: + """Helper class for Create""" + + +__all__ = ["Create"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/cloud_link/_delete.py b/src/vmware/azext_vmware/aaz/latest/vmware/cloud_link/_delete.py new file mode 100644 index 00000000000..c362c613b78 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/cloud_link/_delete.py @@ -0,0 +1,173 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware cloud-link delete", + confirmation="This will delete the cloud link. Are you sure?", +) +class Delete(AAZCommand): + """Delete a cloud link in a private cloud + + :example: Delete a cloud link. + az vmware cloud-link delete --resource-group group1 --private-cloud cloud1 --name cloudLink1 + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/cloudlinks/{}", "2022-05-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, None) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.cloud_link_name = AAZStrArg( + options=["-n", "--name", "--cloud-link-name"], + help="Name of the cloud link resource", + required=True, + id_part="child_name_1", + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="The name of the private cloud.", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.CloudLinksDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class CloudLinksDelete(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [204]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_204, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "cloudLinkName", self.ctx.args.cloud_link_name, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/cloud_link/_list.py b/src/vmware/azext_vmware/aaz/latest/vmware/cloud_link/_list.py new file mode 100644 index 00000000000..732d83ea3ef --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/cloud_link/_list.py @@ -0,0 +1,198 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware cloud-link list", +) +class List(AAZCommand): + """List cloud link in a private cloud + + :example: List cloud links. + az vmware cloud-link list --resource-group group1 --private-cloud cloud1 + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/cloudlinks", "2022-05-01"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="The name of the private cloud.", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.CloudLinksList(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class CloudLinksList(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + flags={"read_only": True}, + ) + _schema_on_200.value = AAZListType( + flags={"read_only": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.linked_cloud = AAZStrType( + serialized_name="linkedCloud", + flags={"required": True}, + ) + properties.status = AAZStrType( + flags={"read_only": True}, + ) + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/cloud_link/_show.py b/src/vmware/azext_vmware/aaz/latest/vmware/cloud_link/_show.py new file mode 100644 index 00000000000..a27a2bfc8ad --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/cloud_link/_show.py @@ -0,0 +1,195 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware cloud-link show", +) +class Show(AAZCommand): + """Show details of a cloud link in a private cloud. + + :example: Show a cloud link. + az vmware cloud-link show --resource-group group1 --private-cloud cloud1 --name cloudLink1 + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/cloudlinks/{}", "2022-05-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.cloud_link_name = AAZStrArg( + options=["-n", "--name", "--cloud-link-name"], + help="Name of the cloud link resource", + required=True, + id_part="child_name_1", + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="The name of the private cloud.", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.CloudLinksGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class CloudLinksGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "cloudLinkName", self.ctx.args.cloud_link_name, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.linked_cloud = AAZStrType( + serialized_name="linkedCloud", + flags={"required": True}, + ) + properties.status = AAZStrType( + flags={"read_only": True}, + ) + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/cloud_link/_update.py b/src/vmware/azext_vmware/aaz/latest/vmware/cloud_link/_update.py new file mode 100644 index 00000000000..f86884f4e6d --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/cloud_link/_update.py @@ -0,0 +1,378 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware cloud-link update", +) +class Update(AAZCommand): + """Update a cloud link in a private cloud + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/cloudlinks/{}", "2022-05-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + AZ_SUPPORT_GENERIC_UPDATE = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.cloud_link_name = AAZStrArg( + options=["-n", "--name", "--cloud-link-name"], + help="Name of the cloud link resource", + required=True, + id_part="child_name_1", + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="The name of the private cloud.", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.linked_cloud = AAZStrArg( + options=["--linked-cloud"], + arg_group="Properties", + help="Identifier of the other private cloud participating in the link.", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.CloudLinksGet(ctx=self.ctx)() + self.pre_instance_update(self.ctx.vars.instance) + self.InstanceUpdateByJson(ctx=self.ctx)() + self.InstanceUpdateByGeneric(ctx=self.ctx)() + self.post_instance_update(self.ctx.vars.instance) + yield self.CloudLinksCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + @register_callback + def pre_instance_update(self, instance): + pass + + @register_callback + def post_instance_update(self, instance): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class CloudLinksGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "cloudLinkName", self.ctx.args.cloud_link_name, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _UpdateHelper._build_schema_cloud_link_read(cls._schema_on_200) + + return cls._schema_on_200 + + class CloudLinksCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "cloudLinkName", self.ctx.args.cloud_link_name, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + value=self.ctx.vars.instance, + ) + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + _UpdateHelper._build_schema_cloud_link_read(cls._schema_on_200_201) + + return cls._schema_on_200_201 + + class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance(self.ctx.vars.instance) + + def _update_instance(self, instance): + _instance_value, _builder = self.new_content_builder( + self.ctx.args, + value=instance, + typ=AAZObjectType + ) + _builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}}) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("linkedCloud", AAZStrType, ".linked_cloud", typ_kwargs={"flags": {"required": True}}) + + return _instance_value + + class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance_by_generic( + self.ctx.vars.instance, + self.ctx.generic_update_args + ) + + +class _UpdateHelper: + """Helper class for Update""" + + _schema_cloud_link_read = None + + @classmethod + def _build_schema_cloud_link_read(cls, _schema): + if cls._schema_cloud_link_read is not None: + _schema.id = cls._schema_cloud_link_read.id + _schema.name = cls._schema_cloud_link_read.name + _schema.properties = cls._schema_cloud_link_read.properties + _schema.type = cls._schema_cloud_link_read.type + return + + cls._schema_cloud_link_read = _schema_cloud_link_read = AAZObjectType() + + cloud_link_read = _schema_cloud_link_read + cloud_link_read.id = AAZStrType( + flags={"read_only": True}, + ) + cloud_link_read.name = AAZStrType( + flags={"read_only": True}, + ) + cloud_link_read.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + cloud_link_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_cloud_link_read.properties + properties.linked_cloud = AAZStrType( + serialized_name="linkedCloud", + flags={"required": True}, + ) + properties.status = AAZStrType( + flags={"read_only": True}, + ) + + _schema.id = cls._schema_cloud_link_read.id + _schema.name = cls._schema_cloud_link_read.name + _schema.properties = cls._schema_cloud_link_read.properties + _schema.type = cls._schema_cloud_link_read.type + + +__all__ = ["Update"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/cluster/__cmd_group.py b/src/vmware/azext_vmware/aaz/latest/vmware/cluster/__cmd_group.py new file mode 100644 index 00000000000..5bb19f105db --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/cluster/__cmd_group.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "vmware cluster", +) +class __CMDGroup(AAZCommandGroup): + """Commands to manage all the clusters in a private cloud, excluding the first cluster which is the default management cluster. + + The default management cluster is created and managed as part of the private cloud. To view details of the management cluster, use `az vmware private-cloud show`. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/cluster/__init__.py b/src/vmware/azext_vmware/aaz/latest/vmware/cluster/__init__.py new file mode 100644 index 00000000000..e385c87e081 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/cluster/__init__.py @@ -0,0 +1,18 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._create import * +from ._delete import * +from ._list import * +from ._list_zones import * +from ._show import * +from ._update import * +from ._wait import * diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/cluster/_create.py b/src/vmware/azext_vmware/aaz/latest/vmware/cluster/_create.py new file mode 100644 index 00000000000..66d823b7e7f --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/cluster/_create.py @@ -0,0 +1,280 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware cluster create", +) +class Create(AAZCommand): + """Create a cluster in a private cloud. + + The maximum number of clusters is 4. + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/clusters/{}", "2022-05-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.cluster_name = AAZStrArg( + options=["-n", "--name", "--cluster-name"], + help="Name of the cluster in the private cloud", + required=True, + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="The name of the private cloud.", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.cluster_size = AAZIntArg( + options=["--size", "--cluster-size"], + arg_group="Properties", + help="The cluster size", + ) + _args_schema.hosts = AAZListArg( + options=["--hosts"], + arg_group="Properties", + help="The hosts", + ) + + hosts = cls._args_schema.hosts + hosts.Element = AAZStrArg() + + # define Arg Group "Sku" + + _args_schema = cls._args_schema + _args_schema.sku = AAZStrArg( + options=["--sku"], + arg_group="Sku", + help="The name of the SKU.", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.ClustersCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class ClustersCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "clusterName", self.ctx.args.cluster_name, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + _builder.set_prop("sku", AAZObjectType, ".", typ_kwargs={"flags": {"required": True}}) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("clusterSize", AAZIntType, ".cluster_size") + properties.set_prop("hosts", AAZListType, ".hosts") + + hosts = _builder.get(".properties.hosts") + if hosts is not None: + hosts.set_elements(AAZStrType, ".") + + sku = _builder.get(".sku") + if sku is not None: + sku.set_prop("name", AAZStrType, ".sku", typ_kwargs={"flags": {"required": True}}) + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200_201.sku = AAZObjectType( + flags={"required": True}, + ) + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200_201.properties + properties.cluster_id = AAZIntType( + serialized_name="clusterId", + flags={"read_only": True}, + ) + properties.cluster_size = AAZIntType( + serialized_name="clusterSize", + ) + properties.hosts = AAZListType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + hosts = cls._schema_on_200_201.properties.hosts + hosts.Element = AAZStrType() + + sku = cls._schema_on_200_201.sku + sku.name = AAZStrType( + flags={"required": True}, + ) + + return cls._schema_on_200_201 + + +class _CreateHelper: + """Helper class for Create""" + + +__all__ = ["Create"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/cluster/_delete.py b/src/vmware/azext_vmware/aaz/latest/vmware/cluster/_delete.py new file mode 100644 index 00000000000..90db10d2f79 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/cluster/_delete.py @@ -0,0 +1,172 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware cluster delete", + confirmation="Are you sure you want to perform this operation?", +) +class Delete(AAZCommand): + """Delete a cluster in a private cloud, excluding the first cluster which is the default management cluster. + + The default management cluster is created and managed as part of the private cloud. To view details of the management cluster, use `az vmware private-cloud show`. + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/clusters/{}", "2022-05-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, None) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.cluster_name = AAZStrArg( + options=["-n", "--name", "--cluster-name"], + help="Name of the cluster in the private cloud", + required=True, + id_part="child_name_1", + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="The name of the private cloud.", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.ClustersDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class ClustersDelete(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [204]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_204, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "clusterName", self.ctx.args.cluster_name, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/cluster/_list.py b/src/vmware/azext_vmware/aaz/latest/vmware/cluster/_list.py new file mode 100644 index 00000000000..c8f5a3ad679 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/cluster/_list.py @@ -0,0 +1,213 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware cluster list", +) +class List(AAZCommand): + """List clusters in a private cloud, excluding the first cluster which is the default management cluster. + + The default management cluster is created and managed as part of the private cloud. To view details of the management cluster, use `az vmware private-cloud show`. + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/clusters", "2022-05-01"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="The name of the private cloud.", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ClustersList(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class ClustersList(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + flags={"read_only": True}, + ) + _schema_on_200.value = AAZListType( + flags={"read_only": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.sku = AAZObjectType( + flags={"required": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.cluster_id = AAZIntType( + serialized_name="clusterId", + flags={"read_only": True}, + ) + properties.cluster_size = AAZIntType( + serialized_name="clusterSize", + ) + properties.hosts = AAZListType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + hosts = cls._schema_on_200.value.Element.properties.hosts + hosts.Element = AAZStrType() + + sku = cls._schema_on_200.value.Element.sku + sku.name = AAZStrType( + flags={"required": True}, + ) + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/cluster/_list_zones.py b/src/vmware/azext_vmware/aaz/latest/vmware/cluster/_list_zones.py new file mode 100644 index 00000000000..0ac8a5e4176 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/cluster/_list_zones.py @@ -0,0 +1,188 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware cluster list-zones", +) +class ListZones(AAZCommand): + """List hosts by zone in a cluster in a private cloud, including the first cluster which is the default management cluster. + + The default management cluster is created and managed as part of the private cloud. + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/clusters/{}/listzones", "2022-05-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.cluster_name = AAZStrArg( + options=["-n", "--name", "--cluster-name"], + help="Name of the cluster in the private cloud", + required=True, + id_part="child_name_1", + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="The name of the private cloud.", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ClustersListZones(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class ClustersListZones(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/listZones", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "clusterName", self.ctx.args.cluster_name, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.zones = AAZListType() + + zones = cls._schema_on_200.zones + zones.Element = AAZObjectType() + + _element = cls._schema_on_200.zones.Element + _element.hosts = AAZListType( + flags={"read_only": True}, + ) + _element.zone = AAZStrType( + flags={"read_only": True}, + ) + + hosts = cls._schema_on_200.zones.Element.hosts + hosts.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ListZonesHelper: + """Helper class for ListZones""" + + +__all__ = ["ListZones"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/cluster/_show.py b/src/vmware/azext_vmware/aaz/latest/vmware/cluster/_show.py new file mode 100644 index 00000000000..ef598a24405 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/cluster/_show.py @@ -0,0 +1,210 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware cluster show", +) +class Show(AAZCommand): + """Get a cluster by name in a private cloud, excluding the first cluster which is the default management cluster. + + The default management cluster is created and managed as part of the private cloud. To view details of the management cluster, use `az vmware private-cloud show`. + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/clusters/{}", "2022-05-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.cluster_name = AAZStrArg( + options=["-n", "--name", "--cluster-name"], + help="Name of the cluster in the private cloud", + required=True, + id_part="child_name_1", + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="The name of the private cloud.", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ClustersGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class ClustersGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "clusterName", self.ctx.args.cluster_name, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.sku = AAZObjectType( + flags={"required": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.cluster_id = AAZIntType( + serialized_name="clusterId", + flags={"read_only": True}, + ) + properties.cluster_size = AAZIntType( + serialized_name="clusterSize", + ) + properties.hosts = AAZListType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + hosts = cls._schema_on_200.properties.hosts + hosts.Element = AAZStrType() + + sku = cls._schema_on_200.sku + sku.name = AAZStrType( + flags={"required": True}, + ) + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/cluster/_update.py b/src/vmware/azext_vmware/aaz/latest/vmware/cluster/_update.py new file mode 100644 index 00000000000..79967618110 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/cluster/_update.py @@ -0,0 +1,429 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware cluster update", +) +class Update(AAZCommand): + """Update a cluster in a private cloud, excluding the first cluster which is the default management cluster. + + The default management cluster is created and managed as part of the private cloud. To view details of the management cluster, use `az vmware private-cloud show`. + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/clusters/{}", "2022-05-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + AZ_SUPPORT_GENERIC_UPDATE = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.cluster_name = AAZStrArg( + options=["-n", "--name", "--cluster-name"], + help="Name of the cluster in the private cloud", + required=True, + id_part="child_name_1", + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="The name of the private cloud.", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.cluster_size = AAZIntArg( + options=["--size", "--cluster-size"], + arg_group="Properties", + help="The cluster size", + nullable=True, + ) + _args_schema.hosts = AAZListArg( + options=["--hosts"], + arg_group="Properties", + help="The hosts", + nullable=True, + ) + + hosts = cls._args_schema.hosts + hosts.Element = AAZStrArg( + nullable=True, + ) + + # define Arg Group "Sku" + + _args_schema = cls._args_schema + _args_schema.sku = AAZStrArg( + options=["--sku"], + arg_group="Sku", + help="The name of the SKU.", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ClustersGet(ctx=self.ctx)() + self.pre_instance_update(self.ctx.vars.instance) + self.InstanceUpdateByJson(ctx=self.ctx)() + self.InstanceUpdateByGeneric(ctx=self.ctx)() + self.post_instance_update(self.ctx.vars.instance) + yield self.ClustersCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + @register_callback + def pre_instance_update(self, instance): + pass + + @register_callback + def post_instance_update(self, instance): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class ClustersGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "clusterName", self.ctx.args.cluster_name, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _UpdateHelper._build_schema_cluster_read(cls._schema_on_200) + + return cls._schema_on_200 + + class ClustersCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "clusterName", self.ctx.args.cluster_name, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + value=self.ctx.vars.instance, + ) + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + _UpdateHelper._build_schema_cluster_read(cls._schema_on_200_201) + + return cls._schema_on_200_201 + + class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance(self.ctx.vars.instance) + + def _update_instance(self, instance): + _instance_value, _builder = self.new_content_builder( + self.ctx.args, + value=instance, + typ=AAZObjectType + ) + _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + _builder.set_prop("sku", AAZObjectType, ".", typ_kwargs={"flags": {"required": True}}) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("clusterSize", AAZIntType, ".cluster_size") + properties.set_prop("hosts", AAZListType, ".hosts") + + hosts = _builder.get(".properties.hosts") + if hosts is not None: + hosts.set_elements(AAZStrType, ".") + + sku = _builder.get(".sku") + if sku is not None: + sku.set_prop("name", AAZStrType, ".sku", typ_kwargs={"flags": {"required": True}}) + + return _instance_value + + class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance_by_generic( + self.ctx.vars.instance, + self.ctx.generic_update_args + ) + + +class _UpdateHelper: + """Helper class for Update""" + + _schema_cluster_read = None + + @classmethod + def _build_schema_cluster_read(cls, _schema): + if cls._schema_cluster_read is not None: + _schema.id = cls._schema_cluster_read.id + _schema.name = cls._schema_cluster_read.name + _schema.properties = cls._schema_cluster_read.properties + _schema.sku = cls._schema_cluster_read.sku + _schema.type = cls._schema_cluster_read.type + return + + cls._schema_cluster_read = _schema_cluster_read = AAZObjectType() + + cluster_read = _schema_cluster_read + cluster_read.id = AAZStrType( + flags={"read_only": True}, + ) + cluster_read.name = AAZStrType( + flags={"read_only": True}, + ) + cluster_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + cluster_read.sku = AAZObjectType( + flags={"required": True}, + ) + cluster_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_cluster_read.properties + properties.cluster_id = AAZIntType( + serialized_name="clusterId", + flags={"read_only": True}, + ) + properties.cluster_size = AAZIntType( + serialized_name="clusterSize", + ) + properties.hosts = AAZListType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + hosts = _schema_cluster_read.properties.hosts + hosts.Element = AAZStrType() + + sku = _schema_cluster_read.sku + sku.name = AAZStrType( + flags={"required": True}, + ) + + _schema.id = cls._schema_cluster_read.id + _schema.name = cls._schema_cluster_read.name + _schema.properties = cls._schema_cluster_read.properties + _schema.sku = cls._schema_cluster_read.sku + _schema.type = cls._schema_cluster_read.type + + +__all__ = ["Update"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/cluster/_wait.py b/src/vmware/azext_vmware/aaz/latest/vmware/cluster/_wait.py new file mode 100644 index 00000000000..7468a27925c --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/cluster/_wait.py @@ -0,0 +1,207 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware cluster wait", +) +class Wait(AAZWaitCommand): + """Place the CLI in a waiting state until a condition is met. + """ + + _aaz_info = { + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/clusters/{}", "2022-05-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.cluster_name = AAZStrArg( + options=["-n", "--name", "--cluster-name"], + help="Name of the cluster in the private cloud", + required=True, + id_part="child_name_1", + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="The name of the private cloud.", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ClustersGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False) + return result + + class ClustersGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "clusterName", self.ctx.args.cluster_name, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.sku = AAZObjectType( + flags={"required": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.cluster_id = AAZIntType( + serialized_name="clusterId", + flags={"read_only": True}, + ) + properties.cluster_size = AAZIntType( + serialized_name="clusterSize", + ) + properties.hosts = AAZListType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + hosts = cls._schema_on_200.properties.hosts + hosts.Element = AAZStrType() + + sku = cls._schema_on_200.sku + sku.name = AAZStrType( + flags={"required": True}, + ) + + return cls._schema_on_200 + + +class _WaitHelper: + """Helper class for Wait""" + + +__all__ = ["Wait"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/datastore/__cmd_group.py b/src/vmware/azext_vmware/aaz/latest/vmware/datastore/__cmd_group.py new file mode 100644 index 00000000000..82078fcd813 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/datastore/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "vmware datastore", +) +class __CMDGroup(AAZCommandGroup): + """Commands to manage a datastore in a private cloud cluster. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/datastore/__init__.py b/src/vmware/azext_vmware/aaz/latest/vmware/datastore/__init__.py new file mode 100644 index 00000000000..2d1a2078686 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/datastore/__init__.py @@ -0,0 +1,16 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._create import * +from ._delete import * +from ._list import * +from ._show import * +from ._wait import * diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/datastore/_create.py b/src/vmware/azext_vmware/aaz/latest/vmware/datastore/_create.py new file mode 100644 index 00000000000..af616c61a10 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/datastore/_create.py @@ -0,0 +1,299 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +class Create(AAZCommand): + """Create a datastore in a private cloud cluster + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/clusters/{}/datastores/{}", "2022-05-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.cluster_name = AAZStrArg( + options=["--cluster", "--cluster-name"], + help="Name of the cluster in the private cloud", + required=True, + ) + _args_schema.datastore_name = AAZStrArg( + options=["-n", "--name", "--datastore-name"], + help="Name of the datastore in the private cloud cluster", + required=True, + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "DiskPoolVolume" + + _args_schema = cls._args_schema + _args_schema.lun_name = AAZStrArg( + options=["--lun-name"], + arg_group="DiskPoolVolume", + help="Name of the LUN to be used for datastore", + ) + _args_schema.mount_option = AAZStrArg( + options=["--mount-option"], + arg_group="DiskPoolVolume", + help="Mode that describes whether the LUN has to be mounted as a datastore or attached as a LUN", + default="MOUNT", + enum={"ATTACH": "ATTACH", "MOUNT": "MOUNT"}, + ) + _args_schema.target_id = AAZStrArg( + options=["--target-id"], + arg_group="DiskPoolVolume", + help="Azure resource ID of the iSCSI target", + ) + + # define Arg Group "NetAppVolume" + + _args_schema = cls._args_schema + _args_schema.net_app_volumn = AAZStrArg( + options=["--volume-id", "--net-app-volumn"], + arg_group="NetAppVolume", + help="Azure resource ID of the NetApp volume", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.DatastoresCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class DatastoresCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "clusterName", self.ctx.args.cluster_name, + required=True, + ), + **self.serialize_url_param( + "datastoreName", self.ctx.args.datastore_name, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("diskPoolVolume", AAZObjectType) + properties.set_prop("netAppVolume", AAZObjectType) + + disk_pool_volume = _builder.get(".properties.diskPoolVolume") + if disk_pool_volume is not None: + disk_pool_volume.set_prop("lunName", AAZStrType, ".lun_name", typ_kwargs={"flags": {"required": True}}) + disk_pool_volume.set_prop("mountOption", AAZStrType, ".mount_option") + disk_pool_volume.set_prop("targetId", AAZStrType, ".target_id", typ_kwargs={"flags": {"required": True}}) + + net_app_volume = _builder.get(".properties.netAppVolume") + if net_app_volume is not None: + net_app_volume.set_prop("id", AAZStrType, ".net_app_volumn", typ_kwargs={"flags": {"required": True}}) + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200_201.properties + properties.disk_pool_volume = AAZObjectType( + serialized_name="diskPoolVolume", + ) + properties.net_app_volume = AAZObjectType( + serialized_name="netAppVolume", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.status = AAZStrType( + flags={"read_only": True}, + ) + + disk_pool_volume = cls._schema_on_200_201.properties.disk_pool_volume + disk_pool_volume.lun_name = AAZStrType( + serialized_name="lunName", + flags={"required": True}, + ) + disk_pool_volume.mount_option = AAZStrType( + serialized_name="mountOption", + ) + disk_pool_volume.path = AAZStrType( + flags={"read_only": True}, + ) + disk_pool_volume.target_id = AAZStrType( + serialized_name="targetId", + flags={"required": True}, + ) + + net_app_volume = cls._schema_on_200_201.properties.net_app_volume + net_app_volume.id = AAZStrType( + flags={"required": True}, + ) + + return cls._schema_on_200_201 + + +class _CreateHelper: + """Helper class for Create""" + + +__all__ = ["Create"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/datastore/_delete.py b/src/vmware/azext_vmware/aaz/latest/vmware/datastore/_delete.py new file mode 100644 index 00000000000..1512027bdeb --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/datastore/_delete.py @@ -0,0 +1,180 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware datastore delete", + confirmation="This will delete the datastore. Are you sure?", +) +class Delete(AAZCommand): + """Delete a datastore in a private cloud cluster + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/clusters/{}/datastores/{}", "2022-05-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, None) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.cluster_name = AAZStrArg( + options=["--cluster", "--cluster-name"], + help="Name of the cluster in the private cloud", + required=True, + id_part="child_name_1", + ) + _args_schema.datastore_name = AAZStrArg( + options=["-n", "--name", "--datastore-name"], + help="Name of the datastore in the private cloud cluster", + required=True, + id_part="child_name_2", + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.DatastoresDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class DatastoresDelete(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [204]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_204, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "clusterName", self.ctx.args.cluster_name, + required=True, + ), + **self.serialize_url_param( + "datastoreName", self.ctx.args.datastore_name, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/datastore/_list.py b/src/vmware/azext_vmware/aaz/latest/vmware/datastore/_list.py new file mode 100644 index 00000000000..ab2b1de223d --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/datastore/_list.py @@ -0,0 +1,231 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware datastore list", +) +class List(AAZCommand): + """List datastores in a private cloud cluster + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/clusters/{}/datastores", "2022-05-01"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.cluster_name = AAZStrArg( + options=["--cluster", "--cluster-name"], + help="Name of the cluster in the private cloud", + required=True, + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.DatastoresList(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class DatastoresList(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "clusterName", self.ctx.args.cluster_name, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + flags={"read_only": True}, + ) + _schema_on_200.value = AAZListType( + flags={"read_only": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.disk_pool_volume = AAZObjectType( + serialized_name="diskPoolVolume", + ) + properties.net_app_volume = AAZObjectType( + serialized_name="netAppVolume", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.status = AAZStrType( + flags={"read_only": True}, + ) + + disk_pool_volume = cls._schema_on_200.value.Element.properties.disk_pool_volume + disk_pool_volume.lun_name = AAZStrType( + serialized_name="lunName", + flags={"required": True}, + ) + disk_pool_volume.mount_option = AAZStrType( + serialized_name="mountOption", + ) + disk_pool_volume.path = AAZStrType( + flags={"read_only": True}, + ) + disk_pool_volume.target_id = AAZStrType( + serialized_name="targetId", + flags={"required": True}, + ) + + net_app_volume = cls._schema_on_200.value.Element.properties.net_app_volume + net_app_volume.id = AAZStrType( + flags={"required": True}, + ) + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/datastore/_show.py b/src/vmware/azext_vmware/aaz/latest/vmware/datastore/_show.py new file mode 100644 index 00000000000..76d7e854274 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/datastore/_show.py @@ -0,0 +1,229 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware datastore show", +) +class Show(AAZCommand): + """Show details of a datastore in a private cloud cluster. + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/clusters/{}/datastores/{}", "2022-05-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.cluster_name = AAZStrArg( + options=["--cluster", "--cluster-name"], + help="Name of the cluster in the private cloud", + required=True, + id_part="child_name_1", + ) + _args_schema.datastore_name = AAZStrArg( + options=["-n", "--name", "--datastore-name"], + help="Name of the datastore in the private cloud cluster", + required=True, + id_part="child_name_2", + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.DatastoresGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class DatastoresGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "clusterName", self.ctx.args.cluster_name, + required=True, + ), + **self.serialize_url_param( + "datastoreName", self.ctx.args.datastore_name, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.disk_pool_volume = AAZObjectType( + serialized_name="diskPoolVolume", + ) + properties.net_app_volume = AAZObjectType( + serialized_name="netAppVolume", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.status = AAZStrType( + flags={"read_only": True}, + ) + + disk_pool_volume = cls._schema_on_200.properties.disk_pool_volume + disk_pool_volume.lun_name = AAZStrType( + serialized_name="lunName", + flags={"required": True}, + ) + disk_pool_volume.mount_option = AAZStrType( + serialized_name="mountOption", + ) + disk_pool_volume.path = AAZStrType( + flags={"read_only": True}, + ) + disk_pool_volume.target_id = AAZStrType( + serialized_name="targetId", + flags={"required": True}, + ) + + net_app_volume = cls._schema_on_200.properties.net_app_volume + net_app_volume.id = AAZStrType( + flags={"required": True}, + ) + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/datastore/_wait.py b/src/vmware/azext_vmware/aaz/latest/vmware/datastore/_wait.py new file mode 100644 index 00000000000..438d1e00271 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/datastore/_wait.py @@ -0,0 +1,228 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware datastore wait", +) +class Wait(AAZWaitCommand): + """Place the CLI in a waiting state until a condition is met. + """ + + _aaz_info = { + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/clusters/{}/datastores/{}", "2022-05-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.cluster_name = AAZStrArg( + options=["--cluster", "--cluster-name"], + help="Name of the cluster in the private cloud", + required=True, + id_part="child_name_1", + ) + _args_schema.datastore_name = AAZStrArg( + options=["-n", "--name", "--datastore-name"], + help="Name of the datastore in the private cloud cluster", + required=True, + id_part="child_name_2", + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.DatastoresGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False) + return result + + class DatastoresGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "clusterName", self.ctx.args.cluster_name, + required=True, + ), + **self.serialize_url_param( + "datastoreName", self.ctx.args.datastore_name, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.disk_pool_volume = AAZObjectType( + serialized_name="diskPoolVolume", + ) + properties.net_app_volume = AAZObjectType( + serialized_name="netAppVolume", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.status = AAZStrType( + flags={"read_only": True}, + ) + + disk_pool_volume = cls._schema_on_200.properties.disk_pool_volume + disk_pool_volume.lun_name = AAZStrType( + serialized_name="lunName", + flags={"required": True}, + ) + disk_pool_volume.mount_option = AAZStrType( + serialized_name="mountOption", + ) + disk_pool_volume.path = AAZStrType( + flags={"read_only": True}, + ) + disk_pool_volume.target_id = AAZStrType( + serialized_name="targetId", + flags={"required": True}, + ) + + net_app_volume = cls._schema_on_200.properties.net_app_volume + net_app_volume.id = AAZStrType( + flags={"required": True}, + ) + + return cls._schema_on_200 + + +class _WaitHelper: + """Helper class for Wait""" + + +__all__ = ["Wait"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/global_reach_connection/__cmd_group.py b/src/vmware/azext_vmware/aaz/latest/vmware/global_reach_connection/__cmd_group.py new file mode 100644 index 00000000000..cb5dfeeda5e --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/global_reach_connection/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "vmware global-reach-connection", +) +class __CMDGroup(AAZCommandGroup): + """Commands to manage global reach connections in a private cloud. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/global_reach_connection/__init__.py b/src/vmware/azext_vmware/aaz/latest/vmware/global_reach_connection/__init__.py new file mode 100644 index 00000000000..2d1a2078686 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/global_reach_connection/__init__.py @@ -0,0 +1,16 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._create import * +from ._delete import * +from ._list import * +from ._show import * +from ._wait import * diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/global_reach_connection/_create.py b/src/vmware/azext_vmware/aaz/latest/vmware/global_reach_connection/_create.py new file mode 100644 index 00000000000..b869a38d5c0 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/global_reach_connection/_create.py @@ -0,0 +1,260 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware global-reach-connection create", +) +class Create(AAZCommand): + """Create a global reach connection in a private cloud + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/globalreachconnections/{}", "2022-05-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.global_reach_connection_name = AAZStrArg( + options=["-n", "--name", "--global-reach-connection-name"], + help="Name of the global reach connection in the private cloud", + required=True, + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="The name of the private cloud.", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.authorization_key = AAZStrArg( + options=["--authorization-key"], + arg_group="Properties", + help="Authorization key from the peer express route used for the global reach connection", + ) + _args_schema.express_route_id = AAZStrArg( + options=["--express-route-id"], + arg_group="Properties", + help="The ID of the Private Cloud's ExpressRoute Circuit that is participating in the global reach connection", + ) + _args_schema.peer_express_route_circuit = AAZStrArg( + options=["--peer-express-route-circuit"], + arg_group="Properties", + help="Identifier of the ExpressRoute Circuit to peer with in the global reach connection", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.GlobalReachConnectionsCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class GlobalReachConnectionsCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "globalReachConnectionName", self.ctx.args.global_reach_connection_name, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("authorizationKey", AAZStrType, ".authorization_key") + properties.set_prop("expressRouteId", AAZStrType, ".express_route_id") + properties.set_prop("peerExpressRouteCircuit", AAZStrType, ".peer_express_route_circuit") + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200_201.properties + properties.address_prefix = AAZStrType( + serialized_name="addressPrefix", + flags={"read_only": True}, + ) + properties.authorization_key = AAZStrType( + serialized_name="authorizationKey", + ) + properties.circuit_connection_status = AAZStrType( + serialized_name="circuitConnectionStatus", + flags={"read_only": True}, + ) + properties.express_route_id = AAZStrType( + serialized_name="expressRouteId", + ) + properties.peer_express_route_circuit = AAZStrType( + serialized_name="peerExpressRouteCircuit", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + return cls._schema_on_200_201 + + +class _CreateHelper: + """Helper class for Create""" + + +__all__ = ["Create"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/global_reach_connection/_delete.py b/src/vmware/azext_vmware/aaz/latest/vmware/global_reach_connection/_delete.py new file mode 100644 index 00000000000..8f7b88879a4 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/global_reach_connection/_delete.py @@ -0,0 +1,170 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware global-reach-connection delete", + confirmation="This will delete the global reach connection. Are you sure?", +) +class Delete(AAZCommand): + """Delete a global reach connection in a private cloud + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/globalreachconnections/{}", "2022-05-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, None) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.global_reach_connection_name = AAZStrArg( + options=["-n", "--name", "--global-reach-connection-name"], + help="Name of the global reach connection in the private cloud", + required=True, + id_part="child_name_1", + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="The name of the private cloud.", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.GlobalReachConnectionsDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class GlobalReachConnectionsDelete(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [204]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_204, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "globalReachConnectionName", self.ctx.args.global_reach_connection_name, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/global_reach_connection/_list.py b/src/vmware/azext_vmware/aaz/latest/vmware/global_reach_connection/_list.py new file mode 100644 index 00000000000..3513e755691 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/global_reach_connection/_list.py @@ -0,0 +1,209 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware global-reach-connection list", +) +class List(AAZCommand): + """List global reach connections in a private cloud + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/globalreachconnections", "2022-05-01"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="The name of the private cloud.", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.GlobalReachConnectionsList(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class GlobalReachConnectionsList(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + flags={"read_only": True}, + ) + _schema_on_200.value = AAZListType( + flags={"read_only": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.address_prefix = AAZStrType( + serialized_name="addressPrefix", + flags={"read_only": True}, + ) + properties.authorization_key = AAZStrType( + serialized_name="authorizationKey", + ) + properties.circuit_connection_status = AAZStrType( + serialized_name="circuitConnectionStatus", + flags={"read_only": True}, + ) + properties.express_route_id = AAZStrType( + serialized_name="expressRouteId", + ) + properties.peer_express_route_circuit = AAZStrType( + serialized_name="peerExpressRouteCircuit", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/global_reach_connection/_show.py b/src/vmware/azext_vmware/aaz/latest/vmware/global_reach_connection/_show.py new file mode 100644 index 00000000000..469be96107c --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/global_reach_connection/_show.py @@ -0,0 +1,206 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware global-reach-connection show", +) +class Show(AAZCommand): + """Get a global reach connection by name in a private cloud + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/globalreachconnections/{}", "2022-05-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.global_reach_connection_name = AAZStrArg( + options=["-n", "--name", "--global-reach-connection-name"], + help="Name of the global reach connection in the private cloud", + required=True, + id_part="child_name_1", + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="The name of the private cloud.", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.GlobalReachConnectionsGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class GlobalReachConnectionsGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "globalReachConnectionName", self.ctx.args.global_reach_connection_name, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.address_prefix = AAZStrType( + serialized_name="addressPrefix", + flags={"read_only": True}, + ) + properties.authorization_key = AAZStrType( + serialized_name="authorizationKey", + ) + properties.circuit_connection_status = AAZStrType( + serialized_name="circuitConnectionStatus", + flags={"read_only": True}, + ) + properties.express_route_id = AAZStrType( + serialized_name="expressRouteId", + ) + properties.peer_express_route_circuit = AAZStrType( + serialized_name="peerExpressRouteCircuit", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/global_reach_connection/_wait.py b/src/vmware/azext_vmware/aaz/latest/vmware/global_reach_connection/_wait.py new file mode 100644 index 00000000000..99cab39ae76 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/global_reach_connection/_wait.py @@ -0,0 +1,205 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware global-reach-connection wait", +) +class Wait(AAZWaitCommand): + """Place the CLI in a waiting state until a condition is met. + """ + + _aaz_info = { + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/globalreachconnections/{}", "2022-05-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.global_reach_connection_name = AAZStrArg( + options=["-n", "--name", "--global-reach-connection-name"], + help="Name of the global reach connection in the private cloud", + required=True, + id_part="child_name_1", + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="The name of the private cloud.", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.GlobalReachConnectionsGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False) + return result + + class GlobalReachConnectionsGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "globalReachConnectionName", self.ctx.args.global_reach_connection_name, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.address_prefix = AAZStrType( + serialized_name="addressPrefix", + flags={"read_only": True}, + ) + properties.authorization_key = AAZStrType( + serialized_name="authorizationKey", + ) + properties.circuit_connection_status = AAZStrType( + serialized_name="circuitConnectionStatus", + flags={"read_only": True}, + ) + properties.express_route_id = AAZStrType( + serialized_name="expressRouteId", + ) + properties.peer_express_route_circuit = AAZStrType( + serialized_name="peerExpressRouteCircuit", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + return cls._schema_on_200 + + +class _WaitHelper: + """Helper class for Wait""" + + +__all__ = ["Wait"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/hcx_enterprise_site/__cmd_group.py b/src/vmware/azext_vmware/aaz/latest/vmware/hcx_enterprise_site/__cmd_group.py new file mode 100644 index 00000000000..407d74f6b61 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/hcx_enterprise_site/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "vmware hcx-enterprise-site", +) +class __CMDGroup(AAZCommandGroup): + """Commands to manage HCX Enterprise Sites in a private cloud. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/hcx_enterprise_site/__init__.py b/src/vmware/azext_vmware/aaz/latest/vmware/hcx_enterprise_site/__init__.py new file mode 100644 index 00000000000..efc3964e3fb --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/hcx_enterprise_site/__init__.py @@ -0,0 +1,15 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._create import * +from ._delete import * +from ._list import * +from ._show import * diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/hcx_enterprise_site/_create.py b/src/vmware/azext_vmware/aaz/latest/vmware/hcx_enterprise_site/_create.py new file mode 100644 index 00000000000..c7df3e36e20 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/hcx_enterprise_site/_create.py @@ -0,0 +1,190 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware hcx-enterprise-site create", +) +class Create(AAZCommand): + """Create an HCX Enterprise Site in a private cloud + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/hcxenterprisesites/{}", "2022-05-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.hcx_enterprise_site_name = AAZStrArg( + options=["-n", "--name", "--hcx-enterprise-site-name"], + help="Name of the HCX Enterprise Site in the private cloud", + required=True, + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="The name of the private cloud.", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.HcxEnterpriseSitesCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class HcxEnterpriseSitesCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200, 201]: + return self.on_200_201(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites/{hcxEnterpriseSiteName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "hcxEnterpriseSiteName", self.ctx.args.hcx_enterprise_site_name, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200_201.properties + properties.activation_key = AAZStrType( + serialized_name="activationKey", + flags={"read_only": True}, + ) + properties.status = AAZStrType( + flags={"read_only": True}, + ) + + return cls._schema_on_200_201 + + +class _CreateHelper: + """Helper class for Create""" + + +__all__ = ["Create"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/hcx_enterprise_site/_delete.py b/src/vmware/azext_vmware/aaz/latest/vmware/hcx_enterprise_site/_delete.py new file mode 100644 index 00000000000..84cf170364a --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/hcx_enterprise_site/_delete.py @@ -0,0 +1,146 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware hcx-enterprise-site delete", + confirmation="This will delete the HCX enterprise site. Are you sure?", +) +class Delete(AAZCommand): + """Delete an HCX Enterprise Site in a private cloud + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/hcxenterprisesites/{}", "2022-05-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return None + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.hcx_enterprise_site_name = AAZStrArg( + options=["-n", "--name", "--hcx-enterprise-site-name"], + help="Name of the HCX Enterprise Site in the private cloud", + required=True, + id_part="child_name_1", + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="The name of the private cloud.", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.HcxEnterpriseSitesDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class HcxEnterpriseSitesDelete(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + if session.http_response.status_code in [204]: + return self.on_204(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites/{hcxEnterpriseSiteName}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "hcxEnterpriseSiteName", self.ctx.args.hcx_enterprise_site_name, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/hcx_enterprise_site/_list.py b/src/vmware/azext_vmware/aaz/latest/vmware/hcx_enterprise_site/_list.py new file mode 100644 index 00000000000..3f244efc067 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/hcx_enterprise_site/_list.py @@ -0,0 +1,195 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware hcx-enterprise-site list", +) +class List(AAZCommand): + """List HCX Enterprise Sites in a private cloud + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/hcxenterprisesites", "2022-05-01"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="The name of the private cloud.", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.HcxEnterpriseSitesList(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class HcxEnterpriseSitesList(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + flags={"read_only": True}, + ) + _schema_on_200.value = AAZListType( + flags={"read_only": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.activation_key = AAZStrType( + serialized_name="activationKey", + flags={"read_only": True}, + ) + properties.status = AAZStrType( + flags={"read_only": True}, + ) + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/hcx_enterprise_site/_show.py b/src/vmware/azext_vmware/aaz/latest/vmware/hcx_enterprise_site/_show.py new file mode 100644 index 00000000000..765b843bcac --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/hcx_enterprise_site/_show.py @@ -0,0 +1,192 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware hcx-enterprise-site show", +) +class Show(AAZCommand): + """Get an HCX Enterprise Site by name in a private cloud + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/hcxenterprisesites/{}", "2022-05-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.hcx_enterprise_site_name = AAZStrArg( + options=["-n", "--name", "--hcx-enterprise-site-name"], + help="Name of the HCX Enterprise Site in the private cloud", + required=True, + id_part="child_name_1", + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="The name of the private cloud.", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.HcxEnterpriseSitesGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class HcxEnterpriseSitesGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites/{hcxEnterpriseSiteName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "hcxEnterpriseSiteName", self.ctx.args.hcx_enterprise_site_name, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.activation_key = AAZStrType( + serialized_name="activationKey", + flags={"read_only": True}, + ) + properties.status = AAZStrType( + flags={"read_only": True}, + ) + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/location/__cmd_group.py b/src/vmware/azext_vmware/aaz/latest/vmware/location/__cmd_group.py new file mode 100644 index 00000000000..2cd7ee0e8ba --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/location/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "vmware location", +) +class __CMDGroup(AAZCommandGroup): + """Commands to check availability by location. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/__init__.py b/src/vmware/azext_vmware/aaz/latest/vmware/location/__init__.py similarity index 53% rename from src/vmware/azext_vmware/vendored_sdks/avs_client/aio/__init__.py rename to src/vmware/azext_vmware/aaz/latest/vmware/location/__init__.py index 7cbca6ac278..6209a12810e 100644 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/__init__.py +++ b/src/vmware/azext_vmware/aaz/latest/vmware/location/__init__.py @@ -1,10 +1,13 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- +# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- -from ._avs_client import AVSClient -__all__ = ['AVSClient'] +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._check_quota_availability import * +from ._check_trial_availability import * diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/location/_check_quota_availability.py b/src/vmware/azext_vmware/aaz/latest/vmware/location/_check_quota_availability.py new file mode 100644 index 00000000000..d3bfa49a0fa --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/location/_check_quota_availability.py @@ -0,0 +1,165 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware location check-quota-availability", +) +class CheckQuotaAvailability(AAZCommand): + """Return quota for subscription by region + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/microsoft.avs/locations/{}/checkquotaavailability", "2022-05-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.location = AAZResourceLocationArg( + required=True, + id_part="name", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.LocationsCheckQuotaAvailability(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class LocationsCheckQuotaAvailability(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/checkQuotaAvailability", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "location", self.ctx.args.location, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.hosts_remaining = AAZDictType( + serialized_name="hostsRemaining", + flags={"read_only": True}, + ) + _schema_on_200.quota_enabled = AAZStrType( + serialized_name="quotaEnabled", + flags={"read_only": True}, + ) + + hosts_remaining = cls._schema_on_200.hosts_remaining + hosts_remaining.Element = AAZIntType( + flags={"read_only": True}, + ) + + return cls._schema_on_200 + + +class _CheckQuotaAvailabilityHelper: + """Helper class for CheckQuotaAvailability""" + + +__all__ = ["CheckQuotaAvailability"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/location/_check_trial_availability.py b/src/vmware/azext_vmware/aaz/latest/vmware/location/_check_trial_availability.py new file mode 100644 index 00000000000..cb64e618468 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/location/_check_trial_availability.py @@ -0,0 +1,182 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware location check-trial-availability", +) +class CheckTrialAvailability(AAZCommand): + """Return trial status for subscription by region + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/microsoft.avs/locations/{}/checktrialavailability", "2022-05-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.location = AAZResourceLocationArg( + required=True, + id_part="name", + ) + + # define Arg Group "Sku" + + _args_schema = cls._args_schema + _args_schema.sku = AAZStrArg( + options=["--sku"], + arg_group="Sku", + help="The name of the SKU.", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.LocationsCheckTrialAvailability(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class LocationsCheckTrialAvailability(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/checkTrialAvailability", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "location", self.ctx.args.location, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"client_flatten": True}} + ) + _builder.set_prop("name", AAZStrType, ".sku", typ_kwargs={"flags": {"required": True}}) + + return self.serialize_content(_content_value) + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.available_hosts = AAZIntType( + serialized_name="availableHosts", + flags={"read_only": True}, + ) + _schema_on_200.status = AAZStrType( + flags={"read_only": True}, + ) + + return cls._schema_on_200 + + +class _CheckTrialAvailabilityHelper: + """Helper class for CheckTrialAvailability""" + + +__all__ = ["CheckTrialAvailability"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/placement_policy/__cmd_group.py b/src/vmware/azext_vmware/aaz/latest/vmware/placement_policy/__cmd_group.py new file mode 100644 index 00000000000..44a4f337d0c --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/placement_policy/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "vmware placement-policy", +) +class __CMDGroup(AAZCommandGroup): + """Commands to manage placement policies. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/placement_policy/__init__.py b/src/vmware/azext_vmware/aaz/latest/vmware/placement_policy/__init__.py new file mode 100644 index 00000000000..c401f439385 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/placement_policy/__init__.py @@ -0,0 +1,16 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._create import * +from ._delete import * +from ._list import * +from ._show import * +from ._update import * diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/placement_policy/_create.py b/src/vmware/azext_vmware/aaz/latest/vmware/placement_policy/_create.py new file mode 100644 index 00000000000..120de2be8f2 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/placement_policy/_create.py @@ -0,0 +1,377 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +class Create(AAZCommand): + """Create a placement policy in a private cloud cluster + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/clusters/{}/placementpolicies/{}", "2022-05-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.cluster_name = AAZStrArg( + options=["--cluster-name"], + help="Name of the cluster in the private cloud", + required=True, + ) + _args_schema.placement_policy_name = AAZStrArg( + options=["-n", "--name", "--placement-policy-name"], + help="Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy", + required=True, + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.vm_host = AAZObjectArg( + options=["--vm-host"], + arg_group="Properties", + help="VM-Host placement policy properties", + ) + _args_schema.vm_vm = AAZObjectArg( + options=["--vm-vm"], + arg_group="Properties", + help="vm-vm placement policy properties", + ) + _args_schema.display_name = AAZStrArg( + options=["--display-name"], + arg_group="Properties", + help="Display name of the placement policy", + ) + _args_schema.state = AAZStrArg( + options=["--state"], + arg_group="Properties", + help="Whether the placement policy is enabled or disabled", + enum={"Disabled": "Disabled", "Enabled": "Enabled"}, + ) + + vm_host = cls._args_schema.vm_host + vm_host.affinity_strength = AAZStrArg( + options=["affinity-strength"], + help="vm-host placement policy affinity strength (should/must)", + enum={"Must": "Must", "Should": "Should"}, + ) + vm_host.affinity_type = AAZStrArg( + options=["affinity-type"], + help="placement policy affinity type", + required=True, + enum={"Affinity": "Affinity", "AntiAffinity": "AntiAffinity"}, + ) + vm_host.azure_hybrid_benefit = AAZStrArg( + options=["azure-hybrid-benefit"], + help="placement policy azure hybrid benefit opt-in type", + enum={"None": "None", "SqlHost": "SqlHost"}, + ) + vm_host.host_members = AAZListArg( + options=["host-members"], + help="Host members list", + required=True, + ) + vm_host.vm_members = AAZListArg( + options=["vm-members"], + help="Virtual machine members list", + required=True, + ) + + host_members = cls._args_schema.vm_host.host_members + host_members.Element = AAZStrArg() + + vm_members = cls._args_schema.vm_host.vm_members + vm_members.Element = AAZStrArg() + + vm_vm = cls._args_schema.vm_vm + vm_vm.affinity_type = AAZStrArg( + options=["affinity-type"], + help="placement policy affinity type", + required=True, + enum={"Affinity": "Affinity", "AntiAffinity": "AntiAffinity"}, + ) + vm_vm.vm_members = AAZListArg( + options=["vm-members"], + help="Virtual machine members list", + required=True, + ) + + vm_members = cls._args_schema.vm_vm.vm_members + vm_members.Element = AAZStrArg() + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.PlacementPoliciesCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class PlacementPoliciesCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "clusterName", self.ctx.args.cluster_name, + required=True, + ), + **self.serialize_url_param( + "placementPolicyName", self.ctx.args.placement_policy_name, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("properties", AAZObjectType) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("displayName", AAZStrType, ".display_name") + properties.set_prop("state", AAZStrType, ".state") + properties.set_const("type", "VmHost", AAZStrType, ".vm_host", typ_kwargs={"flags": {"required": True}}) + properties.set_const("type", "VmVm", AAZStrType, ".vm_vm", typ_kwargs={"flags": {"required": True}}) + properties.discriminate_by("type", "VmHost") + properties.discriminate_by("type", "VmVm") + + disc_vm_host = _builder.get(".properties{type:VmHost}") + if disc_vm_host is not None: + disc_vm_host.set_prop("affinityStrength", AAZStrType, ".vm_host.affinity_strength") + disc_vm_host.set_prop("affinityType", AAZStrType, ".vm_host.affinity_type", typ_kwargs={"flags": {"required": True}}) + disc_vm_host.set_prop("azureHybridBenefitType", AAZStrType, ".vm_host.azure_hybrid_benefit") + disc_vm_host.set_prop("hostMembers", AAZListType, ".vm_host.host_members", typ_kwargs={"flags": {"required": True}}) + disc_vm_host.set_prop("vmMembers", AAZListType, ".vm_host.vm_members", typ_kwargs={"flags": {"required": True}}) + + host_members = _builder.get(".properties{type:VmHost}.hostMembers") + if host_members is not None: + host_members.set_elements(AAZStrType, ".") + + vm_members = _builder.get(".properties{type:VmHost}.vmMembers") + if vm_members is not None: + vm_members.set_elements(AAZStrType, ".") + + disc_vm_vm = _builder.get(".properties{type:VmVm}") + if disc_vm_vm is not None: + disc_vm_vm.set_prop("affinityType", AAZStrType, ".vm_vm.affinity_type", typ_kwargs={"flags": {"required": True}}) + disc_vm_vm.set_prop("vmMembers", AAZListType, ".vm_vm.vm_members", typ_kwargs={"flags": {"required": True}}) + + vm_members = _builder.get(".properties{type:VmVm}.vmMembers") + if vm_members is not None: + vm_members.set_elements(AAZStrType, ".") + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType() + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200_201.properties + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.state = AAZStrType() + properties.type = AAZStrType( + flags={"required": True}, + ) + + disc_vm_host = cls._schema_on_200_201.properties.discriminate_by("type", "VmHost") + disc_vm_host.affinity_strength = AAZStrType( + serialized_name="affinityStrength", + ) + disc_vm_host.affinity_type = AAZStrType( + serialized_name="affinityType", + flags={"required": True}, + ) + disc_vm_host.azure_hybrid_benefit_type = AAZStrType( + serialized_name="azureHybridBenefitType", + ) + disc_vm_host.host_members = AAZListType( + serialized_name="hostMembers", + flags={"required": True}, + ) + disc_vm_host.vm_members = AAZListType( + serialized_name="vmMembers", + flags={"required": True}, + ) + + host_members = cls._schema_on_200_201.properties.discriminate_by("type", "VmHost").host_members + host_members.Element = AAZStrType() + + vm_members = cls._schema_on_200_201.properties.discriminate_by("type", "VmHost").vm_members + vm_members.Element = AAZStrType() + + disc_vm_vm = cls._schema_on_200_201.properties.discriminate_by("type", "VmVm") + disc_vm_vm.affinity_type = AAZStrType( + serialized_name="affinityType", + flags={"required": True}, + ) + disc_vm_vm.vm_members = AAZListType( + serialized_name="vmMembers", + flags={"required": True}, + ) + + vm_members = cls._schema_on_200_201.properties.discriminate_by("type", "VmVm").vm_members + vm_members.Element = AAZStrType() + + return cls._schema_on_200_201 + + +class _CreateHelper: + """Helper class for Create""" + + +__all__ = ["Create"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/placement_policy/_delete.py b/src/vmware/azext_vmware/aaz/latest/vmware/placement_policy/_delete.py new file mode 100644 index 00000000000..e306f254766 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/placement_policy/_delete.py @@ -0,0 +1,176 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +class Delete(AAZCommand): + """Delete a placement policy in a private cloud cluster + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/clusters/{}/placementpolicies/{}", "2022-05-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, None) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.cluster_name = AAZStrArg( + options=["--cluster-name"], + help="Name of the cluster in the private cloud", + required=True, + id_part="child_name_1", + ) + _args_schema.placement_policy_name = AAZStrArg( + options=["-n", "--name", "--placement-policy-name"], + help="Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy", + required=True, + id_part="child_name_2", + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.PlacementPoliciesDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class PlacementPoliciesDelete(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [204]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_204, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "clusterName", self.ctx.args.cluster_name, + required=True, + ), + **self.serialize_url_param( + "placementPolicyName", self.ctx.args.placement_policy_name, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/placement_policy/_list.py b/src/vmware/azext_vmware/aaz/latest/vmware/placement_policy/_list.py new file mode 100644 index 00000000000..ce1ca0130be --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/placement_policy/_list.py @@ -0,0 +1,248 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware placement-policy list", +) +class List(AAZCommand): + """List placement policies in a private cloud cluster + + :example: List placement policies. + az vmware placement-policy list --resource-group group1 --private-cloud cloud1 --cluster-name cluster1 + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/clusters/{}/placementpolicies", "2022-05-01"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.cluster_name = AAZStrArg( + options=["--cluster-name"], + help="Name of the cluster in the private cloud", + required=True, + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.PlacementPoliciesList(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class PlacementPoliciesList(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "clusterName", self.ctx.args.cluster_name, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + flags={"read_only": True}, + ) + _schema_on_200.value = AAZListType( + flags={"read_only": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.state = AAZStrType() + properties.type = AAZStrType( + flags={"required": True}, + ) + + disc_vm_host = cls._schema_on_200.value.Element.properties.discriminate_by("type", "VmHost") + disc_vm_host.affinity_strength = AAZStrType( + serialized_name="affinityStrength", + ) + disc_vm_host.affinity_type = AAZStrType( + serialized_name="affinityType", + flags={"required": True}, + ) + disc_vm_host.azure_hybrid_benefit_type = AAZStrType( + serialized_name="azureHybridBenefitType", + ) + disc_vm_host.host_members = AAZListType( + serialized_name="hostMembers", + flags={"required": True}, + ) + disc_vm_host.vm_members = AAZListType( + serialized_name="vmMembers", + flags={"required": True}, + ) + + host_members = cls._schema_on_200.value.Element.properties.discriminate_by("type", "VmHost").host_members + host_members.Element = AAZStrType() + + vm_members = cls._schema_on_200.value.Element.properties.discriminate_by("type", "VmHost").vm_members + vm_members.Element = AAZStrType() + + disc_vm_vm = cls._schema_on_200.value.Element.properties.discriminate_by("type", "VmVm") + disc_vm_vm.affinity_type = AAZStrType( + serialized_name="affinityType", + flags={"required": True}, + ) + disc_vm_vm.vm_members = AAZListType( + serialized_name="vmMembers", + flags={"required": True}, + ) + + vm_members = cls._schema_on_200.value.Element.properties.discriminate_by("type", "VmVm").vm_members + vm_members.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/placement_policy/_show.py b/src/vmware/azext_vmware/aaz/latest/vmware/placement_policy/_show.py new file mode 100644 index 00000000000..f7501f7c56d --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/placement_policy/_show.py @@ -0,0 +1,246 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware placement-policy show", +) +class Show(AAZCommand): + """Get a placement policy by name in a private cloud cluster + + :example: Get a placement policy by name. + az vmware placement-policy show --resource-group group1 --private-cloud cloud1 --cluster-name cluster1 --placement-policy-name policy1 + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/clusters/{}/placementpolicies/{}", "2022-05-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.cluster_name = AAZStrArg( + options=["--cluster-name"], + help="Name of the cluster in the private cloud", + required=True, + id_part="child_name_1", + ) + _args_schema.placement_policy_name = AAZStrArg( + options=["-n", "--name", "--placement-policy-name"], + help="Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy", + required=True, + id_part="child_name_2", + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.PlacementPoliciesGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class PlacementPoliciesGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "clusterName", self.ctx.args.cluster_name, + required=True, + ), + **self.serialize_url_param( + "placementPolicyName", self.ctx.args.placement_policy_name, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.state = AAZStrType() + properties.type = AAZStrType( + flags={"required": True}, + ) + + disc_vm_host = cls._schema_on_200.properties.discriminate_by("type", "VmHost") + disc_vm_host.affinity_strength = AAZStrType( + serialized_name="affinityStrength", + ) + disc_vm_host.affinity_type = AAZStrType( + serialized_name="affinityType", + flags={"required": True}, + ) + disc_vm_host.azure_hybrid_benefit_type = AAZStrType( + serialized_name="azureHybridBenefitType", + ) + disc_vm_host.host_members = AAZListType( + serialized_name="hostMembers", + flags={"required": True}, + ) + disc_vm_host.vm_members = AAZListType( + serialized_name="vmMembers", + flags={"required": True}, + ) + + host_members = cls._schema_on_200.properties.discriminate_by("type", "VmHost").host_members + host_members.Element = AAZStrType() + + vm_members = cls._schema_on_200.properties.discriminate_by("type", "VmHost").vm_members + vm_members.Element = AAZStrType() + + disc_vm_vm = cls._schema_on_200.properties.discriminate_by("type", "VmVm") + disc_vm_vm.affinity_type = AAZStrType( + serialized_name="affinityType", + flags={"required": True}, + ) + disc_vm_vm.vm_members = AAZListType( + serialized_name="vmMembers", + flags={"required": True}, + ) + + vm_members = cls._schema_on_200.properties.discriminate_by("type", "VmVm").vm_members + vm_members.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/placement_policy/_update.py b/src/vmware/azext_vmware/aaz/latest/vmware/placement_policy/_update.py new file mode 100644 index 00000000000..b0a54a4c711 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/placement_policy/_update.py @@ -0,0 +1,519 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +class Update(AAZCommand): + """Update a placement policy in a private cloud cluster + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/clusters/{}/placementpolicies/{}", "2022-05-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + AZ_SUPPORT_GENERIC_UPDATE = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.cluster_name = AAZStrArg( + options=["--cluster-name"], + help="Name of the cluster in the private cloud", + required=True, + id_part="child_name_1", + ) + _args_schema.placement_policy_name = AAZStrArg( + options=["-n", "--name", "--placement-policy-name"], + help="Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy", + required=True, + id_part="child_name_2", + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.vm_host = AAZObjectArg( + options=["--vm-host"], + arg_group="Properties", + help="VM-Host placement policy properties", + ) + _args_schema.vm_vm = AAZObjectArg( + options=["--vm-vm"], + arg_group="Properties", + help="vm-vm placement policy properties", + ) + _args_schema.display_name = AAZStrArg( + options=["--display-name"], + arg_group="Properties", + help="Display name of the placement policy", + nullable=True, + ) + _args_schema.state = AAZStrArg( + options=["--state"], + arg_group="Properties", + help="Whether the placement policy is enabled or disabled", + nullable=True, + enum={"Disabled": "Disabled", "Enabled": "Enabled"}, + ) + + vm_host = cls._args_schema.vm_host + vm_host.affinity_strength = AAZStrArg( + options=["affinity-strength"], + help="vm-host placement policy affinity strength (should/must)", + nullable=True, + enum={"Must": "Must", "Should": "Should"}, + ) + vm_host.azure_hybrid_benefit = AAZStrArg( + options=["azure-hybrid-benefit"], + help="placement policy azure hybrid benefit opt-in type", + nullable=True, + enum={"None": "None", "SqlHost": "SqlHost"}, + ) + vm_host.host_members = AAZListArg( + options=["host-members"], + help="Host members list", + ) + vm_host.vm_members = AAZListArg( + options=["vm-members"], + help="Virtual machine members list", + ) + + host_members = cls._args_schema.vm_host.host_members + host_members.Element = AAZStrArg( + nullable=True, + ) + + vm_members = cls._args_schema.vm_host.vm_members + vm_members.Element = AAZStrArg( + nullable=True, + ) + + vm_vm = cls._args_schema.vm_vm + vm_vm.vm_members = AAZListArg( + options=["vm-members"], + help="Virtual machine members list", + ) + + vm_members = cls._args_schema.vm_vm.vm_members + vm_members.Element = AAZStrArg( + nullable=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.PlacementPoliciesGet(ctx=self.ctx)() + self.pre_instance_update(self.ctx.vars.instance) + self.InstanceUpdateByJson(ctx=self.ctx)() + self.InstanceUpdateByGeneric(ctx=self.ctx)() + self.post_instance_update(self.ctx.vars.instance) + yield self.PlacementPoliciesCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + @register_callback + def pre_instance_update(self, instance): + pass + + @register_callback + def post_instance_update(self, instance): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class PlacementPoliciesGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "clusterName", self.ctx.args.cluster_name, + required=True, + ), + **self.serialize_url_param( + "placementPolicyName", self.ctx.args.placement_policy_name, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _UpdateHelper._build_schema_placement_policy_read(cls._schema_on_200) + + return cls._schema_on_200 + + class PlacementPoliciesCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "clusterName", self.ctx.args.cluster_name, + required=True, + ), + **self.serialize_url_param( + "placementPolicyName", self.ctx.args.placement_policy_name, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + value=self.ctx.vars.instance, + ) + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + _UpdateHelper._build_schema_placement_policy_read(cls._schema_on_200_201) + + return cls._schema_on_200_201 + + class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance(self.ctx.vars.instance) + + def _update_instance(self, instance): + _instance_value, _builder = self.new_content_builder( + self.ctx.args, + value=instance, + typ=AAZObjectType + ) + _builder.set_prop("properties", AAZObjectType) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("displayName", AAZStrType, ".display_name") + properties.set_prop("state", AAZStrType, ".state") + properties.set_const("type", "VmHost", AAZStrType, ".vm_host", typ_kwargs={"flags": {"required": True}}) + properties.set_const("type", "VmVm", AAZStrType, ".vm_vm", typ_kwargs={"flags": {"required": True}}) + properties.discriminate_by("type", "VmHost") + properties.discriminate_by("type", "VmVm") + + disc_vm_host = _builder.get(".properties{type:VmHost}") + if disc_vm_host is not None: + disc_vm_host.set_prop("affinityStrength", AAZStrType, ".vm_host.affinity_strength") + disc_vm_host.set_prop("azureHybridBenefitType", AAZStrType, ".vm_host.azure_hybrid_benefit") + disc_vm_host.set_prop("hostMembers", AAZListType, ".vm_host.host_members", typ_kwargs={"flags": {"required": True}}) + disc_vm_host.set_prop("vmMembers", AAZListType, ".vm_host.vm_members", typ_kwargs={"flags": {"required": True}}) + + host_members = _builder.get(".properties{type:VmHost}.hostMembers") + if host_members is not None: + host_members.set_elements(AAZStrType, ".") + + vm_members = _builder.get(".properties{type:VmHost}.vmMembers") + if vm_members is not None: + vm_members.set_elements(AAZStrType, ".") + + disc_vm_vm = _builder.get(".properties{type:VmVm}") + if disc_vm_vm is not None: + disc_vm_vm.set_prop("vmMembers", AAZListType, ".vm_vm.vm_members", typ_kwargs={"flags": {"required": True}}) + + vm_members = _builder.get(".properties{type:VmVm}.vmMembers") + if vm_members is not None: + vm_members.set_elements(AAZStrType, ".") + + return _instance_value + + class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance_by_generic( + self.ctx.vars.instance, + self.ctx.generic_update_args + ) + + +class _UpdateHelper: + """Helper class for Update""" + + _schema_placement_policy_read = None + + @classmethod + def _build_schema_placement_policy_read(cls, _schema): + if cls._schema_placement_policy_read is not None: + _schema.id = cls._schema_placement_policy_read.id + _schema.name = cls._schema_placement_policy_read.name + _schema.properties = cls._schema_placement_policy_read.properties + _schema.type = cls._schema_placement_policy_read.type + return + + cls._schema_placement_policy_read = _schema_placement_policy_read = AAZObjectType() + + placement_policy_read = _schema_placement_policy_read + placement_policy_read.id = AAZStrType( + flags={"read_only": True}, + ) + placement_policy_read.name = AAZStrType( + flags={"read_only": True}, + ) + placement_policy_read.properties = AAZObjectType() + placement_policy_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_placement_policy_read.properties + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.state = AAZStrType() + properties.type = AAZStrType( + flags={"required": True}, + ) + + disc_vm_host = _schema_placement_policy_read.properties.discriminate_by("type", "VmHost") + disc_vm_host.affinity_strength = AAZStrType( + serialized_name="affinityStrength", + ) + disc_vm_host.affinity_type = AAZStrType( + serialized_name="affinityType", + flags={"required": True}, + ) + disc_vm_host.azure_hybrid_benefit_type = AAZStrType( + serialized_name="azureHybridBenefitType", + ) + disc_vm_host.host_members = AAZListType( + serialized_name="hostMembers", + flags={"required": True}, + ) + disc_vm_host.vm_members = AAZListType( + serialized_name="vmMembers", + flags={"required": True}, + ) + + host_members = _schema_placement_policy_read.properties.discriminate_by("type", "VmHost").host_members + host_members.Element = AAZStrType() + + vm_members = _schema_placement_policy_read.properties.discriminate_by("type", "VmHost").vm_members + vm_members.Element = AAZStrType() + + disc_vm_vm = _schema_placement_policy_read.properties.discriminate_by("type", "VmVm") + disc_vm_vm.affinity_type = AAZStrType( + serialized_name="affinityType", + flags={"required": True}, + ) + disc_vm_vm.vm_members = AAZListType( + serialized_name="vmMembers", + flags={"required": True}, + ) + + vm_members = _schema_placement_policy_read.properties.discriminate_by("type", "VmVm").vm_members + vm_members.Element = AAZStrType() + + _schema.id = cls._schema_placement_policy_read.id + _schema.name = cls._schema_placement_policy_read.name + _schema.properties = cls._schema_placement_policy_read.properties + _schema.type = cls._schema_placement_policy_read.type + + +__all__ = ["Update"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/__cmd_group.py b/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/__cmd_group.py new file mode 100644 index 00000000000..49813623647 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "vmware private-cloud", +) +class __CMDGroup(AAZCommandGroup): + """Commands to manage private clouds. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/__init__.py b/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/__init__.py new file mode 100644 index 00000000000..b76f7caa1f9 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/__init__.py @@ -0,0 +1,19 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._create import * +from ._delete import * +from ._list import * +from ._list_admin_credentials import * +from ._rotate_vcenter_password import * +from ._show import * +from ._update import * +from ._wait import * diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/_create.py b/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/_create.py new file mode 100644 index 00000000000..dce1f1a2112 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/_create.py @@ -0,0 +1,578 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware private-cloud create", + confirmation="LEGAL TERMS\n\nAzure VMware Solution (\"AVS\") is an Azure Service licensed to you as part of your Azure subscription and subject to the terms and conditions of the agreement under which you obtained your Azure subscription (https://azure.microsoft.com/support/legal/). The following additional terms also apply to your use of AVS:\n\nDATA RETENTION. AVS does not currently support retention or extraction of data stored in AVS Clusters. Once an AVS Cluster is deleted, the data cannot be recovered as it terminates all running workloads, components, and destroys all Cluster data and configuration settings, including public IP addresses.\n\nPROFESSIONAL SERVICES DATA TRANSFER TO VMWARE. In the event that you contact Microsoft for technical support relating to Azure VMware Solution and Microsoft must engage VMware for assistance with the issue, Microsoft will transfer the Professional Services Data and the Personal Data contained in the support case to VMware. The transfer is made subject to the terms of the Support Transfer Agreement between VMware and Microsoft, which establishes Microsoft and VMware as independent processors of the Professional Services Data. Before any transfer of Professional Services Data to VMware will occur, Microsoft will obtain and record consent from you for the transfer.\n\nVMWARE DATA PROCESSING AGREEMENT. Once Professional Services Data is transferred to VMware (pursuant to the above section), the processing of Professional Services Data, including the Personal Data contained the support case, by VMware as an independent processor will be governed by the VMware Data Processing Agreement for Microsoft AVS Customers Transferred for L3 Support (the \"VMware Data Processing Agreement\") between you and VMware (located at https://www.vmware.com/content/dam/digitalmarketing/vmware/en/pdf/privacy/vmware-data-processing-agreement.pdf). You also give authorization to allow your representative(s) who request technical support for Azure VMware Solution to provide consent on your behalf to Microsoft for the transfer of the Professional Services Data to VMware.\n\nACCEPTANCE OF LEGAL TERMS. By continuing, you agree to the above additional Legal Terms for AVS. If you are an individual accepting these terms on behalf of an entity, you also represent that you have the legal authority to enter into these additional terms on that entity's behalf.\n\nDo you agree to the above additional terms for AVS?", +) +class Create(AAZCommand): + """Create a private cloud + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}", "2022-05-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.private_cloud_name = AAZStrArg( + options=["-n", "--name", "--private-cloud-name"], + help="Name of the private cloud", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Availability" + + _args_schema = cls._args_schema + _args_schema.secondary_zone = AAZIntArg( + options=["--secondary-zone"], + arg_group="Availability", + help="The secondary availability zone for the private cloud", + ) + _args_schema.strategy = AAZStrArg( + options=["--strategy"], + arg_group="Availability", + help="The availability strategy for the private cloud", + enum={"DualZone": "DualZone", "SingleZone": "SingleZone"}, + ) + _args_schema.zone = AAZIntArg( + options=["--zone"], + arg_group="Availability", + help="The primary availability zone for the private cloud", + ) + + # define Arg Group "ManagementCluster" + + _args_schema = cls._args_schema + _args_schema.cluster_size = AAZIntArg( + options=["--cluster-size"], + arg_group="ManagementCluster", + help="Number of hosts for the default management cluster. Minimum of 3 and maximum of 16.", + required=True, + ) + + # define Arg Group "PrivateCloud" + + _args_schema = cls._args_schema + _args_schema.identity = AAZObjectArg( + options=["--identity"], + arg_group="PrivateCloud", + help="The identity of the private cloud, if configured.", + ) + _args_schema.location = AAZResourceLocationArg( + arg_group="PrivateCloud", + help="Resource location", + required=True, + fmt=AAZResourceLocationArgFormat( + resource_group_arg="resource_group", + ), + ) + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="PrivateCloud", + help="Resource tags", + ) + + identity = cls._args_schema.identity + identity.type = AAZStrArg( + options=["type"], + help="The type of identity used for the private cloud. The type 'SystemAssigned' refers to an implicitly created identity. The type 'None' will remove any identities from the Private Cloud.", + enum={"None": "None", "SystemAssigned": "SystemAssigned"}, + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg() + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.internet = AAZStrArg( + options=["--internet"], + arg_group="Properties", + help="Connectivity to internet is enabled or disabled", + default="Disabled", + enum={"Disabled": "Disabled", "Enabled": "Enabled"}, + ) + _args_schema.network_block = AAZStrArg( + options=["--network-block"], + arg_group="Properties", + help="The block of addresses should be unique across VNet in your subscription as well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where A,B,C,D are between 0 and 255, and X is between 0 and 22", + required=True, + ) + _args_schema.nsxt_password = AAZPasswordArg( + options=["--nsxt-password"], + arg_group="Properties", + help="NSX-T Manager password when the private cloud is created", + blank=AAZPromptPasswordInput( + msg="NSX-T Manager Password:", + confirm=True, + ), + ) + _args_schema.vcenter_password = AAZPasswordArg( + options=["--vcenter-password"], + arg_group="Properties", + help="vCenter admin password when the private cloud is created", + blank=AAZPromptPasswordInput( + msg="vCenter Admin Password:", + confirm=True, + ), + ) + + # define Arg Group "Sku" + + _args_schema = cls._args_schema + _args_schema.sku = AAZStrArg( + options=["--sku"], + arg_group="Sku", + help="The name of the SKU.", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.PrivateCloudsCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class PrivateCloudsCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("identity", AAZObjectType, ".identity") + _builder.set_prop("location", AAZStrType, ".location", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}}) + _builder.set_prop("sku", AAZObjectType, ".", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("tags", AAZDictType, ".tags") + + identity = _builder.get(".identity") + if identity is not None: + identity.set_prop("type", AAZStrType, ".type") + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("availability", AAZObjectType) + properties.set_prop("internet", AAZStrType, ".internet") + properties.set_prop("managementCluster", AAZObjectType, ".", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("networkBlock", AAZStrType, ".network_block", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("nsxtPassword", AAZStrType, ".nsxt_password", typ_kwargs={"flags": {"secret": True}}) + properties.set_prop("vcenterPassword", AAZStrType, ".vcenter_password", typ_kwargs={"flags": {"secret": True}}) + + availability = _builder.get(".properties.availability") + if availability is not None: + availability.set_prop("secondaryZone", AAZIntType, ".secondary_zone") + availability.set_prop("strategy", AAZStrType, ".strategy") + availability.set_prop("zone", AAZIntType, ".zone") + + management_cluster = _builder.get(".properties.managementCluster") + if management_cluster is not None: + management_cluster.set_prop("clusterSize", AAZIntType, ".cluster_size", typ_kwargs={"flags": {"required": True}}) + + sku = _builder.get(".sku") + if sku is not None: + sku.set_prop("name", AAZStrType, ".sku", typ_kwargs={"flags": {"required": True}}) + + tags = _builder.get(".tags") + if tags is not None: + tags.set_elements(AAZStrType, ".") + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.identity = AAZObjectType() + _schema_on_200_201.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200_201.sku = AAZObjectType( + flags={"required": True}, + ) + _schema_on_200_201.tags = AAZDictType() + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + identity = cls._schema_on_200_201.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType() + + properties = cls._schema_on_200_201.properties + properties.availability = AAZObjectType() + properties.circuit = AAZObjectType() + _CreateHelper._build_schema_circuit_read(properties.circuit) + properties.encryption = AAZObjectType() + properties.endpoints = AAZObjectType() + properties.external_cloud_links = AAZListType( + serialized_name="externalCloudLinks", + flags={"read_only": True}, + ) + properties.identity_sources = AAZListType( + serialized_name="identitySources", + ) + properties.internet = AAZStrType() + properties.management_cluster = AAZObjectType( + serialized_name="managementCluster", + flags={"required": True}, + ) + properties.management_network = AAZStrType( + serialized_name="managementNetwork", + flags={"read_only": True}, + ) + properties.network_block = AAZStrType( + serialized_name="networkBlock", + flags={"required": True}, + ) + properties.nsx_public_ip_quota_raised = AAZStrType( + serialized_name="nsxPublicIpQuotaRaised", + flags={"read_only": True}, + ) + properties.nsxt_certificate_thumbprint = AAZStrType( + serialized_name="nsxtCertificateThumbprint", + flags={"read_only": True}, + ) + properties.nsxt_password = AAZStrType( + serialized_name="nsxtPassword", + flags={"secret": True}, + ) + properties.provisioning_network = AAZStrType( + serialized_name="provisioningNetwork", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.secondary_circuit = AAZObjectType( + serialized_name="secondaryCircuit", + ) + _CreateHelper._build_schema_circuit_read(properties.secondary_circuit) + properties.vcenter_certificate_thumbprint = AAZStrType( + serialized_name="vcenterCertificateThumbprint", + flags={"read_only": True}, + ) + properties.vcenter_password = AAZStrType( + serialized_name="vcenterPassword", + flags={"secret": True}, + ) + properties.vmotion_network = AAZStrType( + serialized_name="vmotionNetwork", + flags={"read_only": True}, + ) + + availability = cls._schema_on_200_201.properties.availability + availability.secondary_zone = AAZIntType( + serialized_name="secondaryZone", + ) + availability.strategy = AAZStrType() + availability.zone = AAZIntType() + + encryption = cls._schema_on_200_201.properties.encryption + encryption.key_vault_properties = AAZObjectType( + serialized_name="keyVaultProperties", + ) + encryption.status = AAZStrType() + + key_vault_properties = cls._schema_on_200_201.properties.encryption.key_vault_properties + key_vault_properties.auto_detected_key_version = AAZStrType( + serialized_name="autoDetectedKeyVersion", + flags={"read_only": True}, + ) + key_vault_properties.key_name = AAZStrType( + serialized_name="keyName", + ) + key_vault_properties.key_state = AAZStrType( + serialized_name="keyState", + flags={"read_only": True}, + ) + key_vault_properties.key_vault_url = AAZStrType( + serialized_name="keyVaultUrl", + ) + key_vault_properties.key_version = AAZStrType( + serialized_name="keyVersion", + ) + key_vault_properties.version_type = AAZStrType( + serialized_name="versionType", + flags={"read_only": True}, + ) + + endpoints = cls._schema_on_200_201.properties.endpoints + endpoints.hcx_cloud_manager = AAZStrType( + serialized_name="hcxCloudManager", + flags={"read_only": True}, + ) + endpoints.nsxt_manager = AAZStrType( + serialized_name="nsxtManager", + flags={"read_only": True}, + ) + endpoints.vcsa = AAZStrType( + flags={"read_only": True}, + ) + + external_cloud_links = cls._schema_on_200_201.properties.external_cloud_links + external_cloud_links.Element = AAZStrType() + + identity_sources = cls._schema_on_200_201.properties.identity_sources + identity_sources.Element = AAZObjectType() + + _element = cls._schema_on_200_201.properties.identity_sources.Element + _element.alias = AAZStrType( + flags={"required": True}, + ) + _element.base_group_dn = AAZStrType( + serialized_name="baseGroupDN", + flags={"required": True}, + ) + _element.base_user_dn = AAZStrType( + serialized_name="baseUserDN", + flags={"required": True}, + ) + _element.domain = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"required": True}, + ) + _element.password = AAZStrType( + flags={"secret": True}, + ) + _element.primary_server = AAZStrType( + serialized_name="primaryServer", + flags={"required": True}, + ) + _element.secondary_server = AAZStrType( + serialized_name="secondaryServer", + ) + _element.ssl = AAZStrType() + _element.username = AAZStrType( + flags={"secret": True}, + ) + + management_cluster = cls._schema_on_200_201.properties.management_cluster + management_cluster.cluster_id = AAZIntType( + serialized_name="clusterId", + flags={"read_only": True}, + ) + management_cluster.cluster_size = AAZIntType( + serialized_name="clusterSize", + flags={"required": True}, + ) + management_cluster.hosts = AAZListType() + management_cluster.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + hosts = cls._schema_on_200_201.properties.management_cluster.hosts + hosts.Element = AAZStrType() + + sku = cls._schema_on_200_201.sku + sku.name = AAZStrType( + flags={"required": True}, + ) + + tags = cls._schema_on_200_201.tags + tags.Element = AAZStrType() + + return cls._schema_on_200_201 + + +class _CreateHelper: + """Helper class for Create""" + + _schema_circuit_read = None + + @classmethod + def _build_schema_circuit_read(cls, _schema): + if cls._schema_circuit_read is not None: + _schema.express_route_id = cls._schema_circuit_read.express_route_id + _schema.express_route_private_peering_id = cls._schema_circuit_read.express_route_private_peering_id + _schema.primary_subnet = cls._schema_circuit_read.primary_subnet + _schema.secondary_subnet = cls._schema_circuit_read.secondary_subnet + return + + cls._schema_circuit_read = _schema_circuit_read = AAZObjectType() + + circuit_read = _schema_circuit_read + circuit_read.express_route_id = AAZStrType( + serialized_name="expressRouteID", + flags={"read_only": True}, + ) + circuit_read.express_route_private_peering_id = AAZStrType( + serialized_name="expressRoutePrivatePeeringID", + flags={"read_only": True}, + ) + circuit_read.primary_subnet = AAZStrType( + serialized_name="primarySubnet", + flags={"read_only": True}, + ) + circuit_read.secondary_subnet = AAZStrType( + serialized_name="secondarySubnet", + flags={"read_only": True}, + ) + + _schema.express_route_id = cls._schema_circuit_read.express_route_id + _schema.express_route_private_peering_id = cls._schema_circuit_read.express_route_private_peering_id + _schema.primary_subnet = cls._schema_circuit_read.primary_subnet + _schema.secondary_subnet = cls._schema_circuit_read.secondary_subnet + + +__all__ = ["Create"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/_delete.py b/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/_delete.py new file mode 100644 index 00000000000..20d139b6611 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/_delete.py @@ -0,0 +1,160 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware private-cloud delete", + confirmation="This will delete the private cloud. Are you sure?", +) +class Delete(AAZCommand): + """Delete a private cloud + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}", "2022-05-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, None) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.private_cloud_name = AAZStrArg( + options=["-n", "--name", "--private-cloud-name"], + help="Name of the private cloud", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.PrivateCloudsDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class PrivateCloudsDelete(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [204]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_204, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/_list.py b/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/_list.py new file mode 100644 index 00000000000..d7df854c9c7 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/_list.py @@ -0,0 +1,709 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware private-cloud list", +) +class List(AAZCommand): + """List the private clouds. + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/microsoft.avs/privateclouds", "2022-05-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds", "2022-05-01"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_group = AAZResourceGroupNameArg() + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + condition_0 = has_value(self.ctx.args.resource_group) and has_value(self.ctx.subscription_id) + condition_1 = has_value(self.ctx.subscription_id) and has_value(self.ctx.args.resource_group) is not True + if condition_0: + self.PrivateCloudsList(ctx=self.ctx)() + if condition_1: + self.PrivateCloudsListInSubscription(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class PrivateCloudsList(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + flags={"read_only": True}, + ) + _schema_on_200.value = AAZListType( + flags={"read_only": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.identity = AAZObjectType() + _element.location = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _element.sku = AAZObjectType( + flags={"required": True}, + ) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + identity = cls._schema_on_200.value.Element.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType() + + properties = cls._schema_on_200.value.Element.properties + properties.availability = AAZObjectType() + properties.circuit = AAZObjectType() + _ListHelper._build_schema_circuit_read(properties.circuit) + properties.encryption = AAZObjectType() + properties.endpoints = AAZObjectType() + properties.external_cloud_links = AAZListType( + serialized_name="externalCloudLinks", + flags={"read_only": True}, + ) + properties.identity_sources = AAZListType( + serialized_name="identitySources", + ) + properties.internet = AAZStrType() + properties.management_cluster = AAZObjectType( + serialized_name="managementCluster", + flags={"required": True}, + ) + properties.management_network = AAZStrType( + serialized_name="managementNetwork", + flags={"read_only": True}, + ) + properties.network_block = AAZStrType( + serialized_name="networkBlock", + flags={"required": True}, + ) + properties.nsx_public_ip_quota_raised = AAZStrType( + serialized_name="nsxPublicIpQuotaRaised", + flags={"read_only": True}, + ) + properties.nsxt_certificate_thumbprint = AAZStrType( + serialized_name="nsxtCertificateThumbprint", + flags={"read_only": True}, + ) + properties.nsxt_password = AAZStrType( + serialized_name="nsxtPassword", + flags={"secret": True}, + ) + properties.provisioning_network = AAZStrType( + serialized_name="provisioningNetwork", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.secondary_circuit = AAZObjectType( + serialized_name="secondaryCircuit", + ) + _ListHelper._build_schema_circuit_read(properties.secondary_circuit) + properties.vcenter_certificate_thumbprint = AAZStrType( + serialized_name="vcenterCertificateThumbprint", + flags={"read_only": True}, + ) + properties.vcenter_password = AAZStrType( + serialized_name="vcenterPassword", + flags={"secret": True}, + ) + properties.vmotion_network = AAZStrType( + serialized_name="vmotionNetwork", + flags={"read_only": True}, + ) + + availability = cls._schema_on_200.value.Element.properties.availability + availability.secondary_zone = AAZIntType( + serialized_name="secondaryZone", + ) + availability.strategy = AAZStrType() + availability.zone = AAZIntType() + + encryption = cls._schema_on_200.value.Element.properties.encryption + encryption.key_vault_properties = AAZObjectType( + serialized_name="keyVaultProperties", + ) + encryption.status = AAZStrType() + + key_vault_properties = cls._schema_on_200.value.Element.properties.encryption.key_vault_properties + key_vault_properties.auto_detected_key_version = AAZStrType( + serialized_name="autoDetectedKeyVersion", + flags={"read_only": True}, + ) + key_vault_properties.key_name = AAZStrType( + serialized_name="keyName", + ) + key_vault_properties.key_state = AAZStrType( + serialized_name="keyState", + flags={"read_only": True}, + ) + key_vault_properties.key_vault_url = AAZStrType( + serialized_name="keyVaultUrl", + ) + key_vault_properties.key_version = AAZStrType( + serialized_name="keyVersion", + ) + key_vault_properties.version_type = AAZStrType( + serialized_name="versionType", + flags={"read_only": True}, + ) + + endpoints = cls._schema_on_200.value.Element.properties.endpoints + endpoints.hcx_cloud_manager = AAZStrType( + serialized_name="hcxCloudManager", + flags={"read_only": True}, + ) + endpoints.nsxt_manager = AAZStrType( + serialized_name="nsxtManager", + flags={"read_only": True}, + ) + endpoints.vcsa = AAZStrType( + flags={"read_only": True}, + ) + + external_cloud_links = cls._schema_on_200.value.Element.properties.external_cloud_links + external_cloud_links.Element = AAZStrType() + + identity_sources = cls._schema_on_200.value.Element.properties.identity_sources + identity_sources.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.properties.identity_sources.Element + _element.alias = AAZStrType( + flags={"required": True}, + ) + _element.base_group_dn = AAZStrType( + serialized_name="baseGroupDN", + flags={"required": True}, + ) + _element.base_user_dn = AAZStrType( + serialized_name="baseUserDN", + flags={"required": True}, + ) + _element.domain = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"required": True}, + ) + _element.password = AAZStrType( + flags={"secret": True}, + ) + _element.primary_server = AAZStrType( + serialized_name="primaryServer", + flags={"required": True}, + ) + _element.secondary_server = AAZStrType( + serialized_name="secondaryServer", + ) + _element.ssl = AAZStrType() + _element.username = AAZStrType( + flags={"secret": True}, + ) + + management_cluster = cls._schema_on_200.value.Element.properties.management_cluster + management_cluster.cluster_id = AAZIntType( + serialized_name="clusterId", + flags={"read_only": True}, + ) + management_cluster.cluster_size = AAZIntType( + serialized_name="clusterSize", + flags={"required": True}, + ) + management_cluster.hosts = AAZListType() + management_cluster.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + hosts = cls._schema_on_200.value.Element.properties.management_cluster.hosts + hosts.Element = AAZStrType() + + sku = cls._schema_on_200.value.Element.sku + sku.name = AAZStrType( + flags={"required": True}, + ) + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + class PrivateCloudsListInSubscription(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/providers/Microsoft.AVS/privateClouds", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + flags={"read_only": True}, + ) + _schema_on_200.value = AAZListType( + flags={"read_only": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.identity = AAZObjectType() + _element.location = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _element.sku = AAZObjectType( + flags={"required": True}, + ) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + identity = cls._schema_on_200.value.Element.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType() + + properties = cls._schema_on_200.value.Element.properties + properties.availability = AAZObjectType() + properties.circuit = AAZObjectType() + _ListHelper._build_schema_circuit_read(properties.circuit) + properties.encryption = AAZObjectType() + properties.endpoints = AAZObjectType() + properties.external_cloud_links = AAZListType( + serialized_name="externalCloudLinks", + flags={"read_only": True}, + ) + properties.identity_sources = AAZListType( + serialized_name="identitySources", + ) + properties.internet = AAZStrType() + properties.management_cluster = AAZObjectType( + serialized_name="managementCluster", + flags={"required": True}, + ) + properties.management_network = AAZStrType( + serialized_name="managementNetwork", + flags={"read_only": True}, + ) + properties.network_block = AAZStrType( + serialized_name="networkBlock", + flags={"required": True}, + ) + properties.nsx_public_ip_quota_raised = AAZStrType( + serialized_name="nsxPublicIpQuotaRaised", + flags={"read_only": True}, + ) + properties.nsxt_certificate_thumbprint = AAZStrType( + serialized_name="nsxtCertificateThumbprint", + flags={"read_only": True}, + ) + properties.nsxt_password = AAZStrType( + serialized_name="nsxtPassword", + flags={"secret": True}, + ) + properties.provisioning_network = AAZStrType( + serialized_name="provisioningNetwork", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.secondary_circuit = AAZObjectType( + serialized_name="secondaryCircuit", + ) + _ListHelper._build_schema_circuit_read(properties.secondary_circuit) + properties.vcenter_certificate_thumbprint = AAZStrType( + serialized_name="vcenterCertificateThumbprint", + flags={"read_only": True}, + ) + properties.vcenter_password = AAZStrType( + serialized_name="vcenterPassword", + flags={"secret": True}, + ) + properties.vmotion_network = AAZStrType( + serialized_name="vmotionNetwork", + flags={"read_only": True}, + ) + + availability = cls._schema_on_200.value.Element.properties.availability + availability.secondary_zone = AAZIntType( + serialized_name="secondaryZone", + ) + availability.strategy = AAZStrType() + availability.zone = AAZIntType() + + encryption = cls._schema_on_200.value.Element.properties.encryption + encryption.key_vault_properties = AAZObjectType( + serialized_name="keyVaultProperties", + ) + encryption.status = AAZStrType() + + key_vault_properties = cls._schema_on_200.value.Element.properties.encryption.key_vault_properties + key_vault_properties.auto_detected_key_version = AAZStrType( + serialized_name="autoDetectedKeyVersion", + flags={"read_only": True}, + ) + key_vault_properties.key_name = AAZStrType( + serialized_name="keyName", + ) + key_vault_properties.key_state = AAZStrType( + serialized_name="keyState", + flags={"read_only": True}, + ) + key_vault_properties.key_vault_url = AAZStrType( + serialized_name="keyVaultUrl", + ) + key_vault_properties.key_version = AAZStrType( + serialized_name="keyVersion", + ) + key_vault_properties.version_type = AAZStrType( + serialized_name="versionType", + flags={"read_only": True}, + ) + + endpoints = cls._schema_on_200.value.Element.properties.endpoints + endpoints.hcx_cloud_manager = AAZStrType( + serialized_name="hcxCloudManager", + flags={"read_only": True}, + ) + endpoints.nsxt_manager = AAZStrType( + serialized_name="nsxtManager", + flags={"read_only": True}, + ) + endpoints.vcsa = AAZStrType( + flags={"read_only": True}, + ) + + external_cloud_links = cls._schema_on_200.value.Element.properties.external_cloud_links + external_cloud_links.Element = AAZStrType() + + identity_sources = cls._schema_on_200.value.Element.properties.identity_sources + identity_sources.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.properties.identity_sources.Element + _element.alias = AAZStrType( + flags={"required": True}, + ) + _element.base_group_dn = AAZStrType( + serialized_name="baseGroupDN", + flags={"required": True}, + ) + _element.base_user_dn = AAZStrType( + serialized_name="baseUserDN", + flags={"required": True}, + ) + _element.domain = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"required": True}, + ) + _element.password = AAZStrType( + flags={"secret": True}, + ) + _element.primary_server = AAZStrType( + serialized_name="primaryServer", + flags={"required": True}, + ) + _element.secondary_server = AAZStrType( + serialized_name="secondaryServer", + ) + _element.ssl = AAZStrType() + _element.username = AAZStrType( + flags={"secret": True}, + ) + + management_cluster = cls._schema_on_200.value.Element.properties.management_cluster + management_cluster.cluster_id = AAZIntType( + serialized_name="clusterId", + flags={"read_only": True}, + ) + management_cluster.cluster_size = AAZIntType( + serialized_name="clusterSize", + flags={"required": True}, + ) + management_cluster.hosts = AAZListType() + management_cluster.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + hosts = cls._schema_on_200.value.Element.properties.management_cluster.hosts + hosts.Element = AAZStrType() + + sku = cls._schema_on_200.value.Element.sku + sku.name = AAZStrType( + flags={"required": True}, + ) + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + _schema_circuit_read = None + + @classmethod + def _build_schema_circuit_read(cls, _schema): + if cls._schema_circuit_read is not None: + _schema.express_route_id = cls._schema_circuit_read.express_route_id + _schema.express_route_private_peering_id = cls._schema_circuit_read.express_route_private_peering_id + _schema.primary_subnet = cls._schema_circuit_read.primary_subnet + _schema.secondary_subnet = cls._schema_circuit_read.secondary_subnet + return + + cls._schema_circuit_read = _schema_circuit_read = AAZObjectType() + + circuit_read = _schema_circuit_read + circuit_read.express_route_id = AAZStrType( + serialized_name="expressRouteID", + flags={"read_only": True}, + ) + circuit_read.express_route_private_peering_id = AAZStrType( + serialized_name="expressRoutePrivatePeeringID", + flags={"read_only": True}, + ) + circuit_read.primary_subnet = AAZStrType( + serialized_name="primarySubnet", + flags={"read_only": True}, + ) + circuit_read.secondary_subnet = AAZStrType( + serialized_name="secondarySubnet", + flags={"read_only": True}, + ) + + _schema.express_route_id = cls._schema_circuit_read.express_route_id + _schema.express_route_private_peering_id = cls._schema_circuit_read.express_route_private_peering_id + _schema.primary_subnet = cls._schema_circuit_read.primary_subnet + _schema.secondary_subnet = cls._schema_circuit_read.secondary_subnet + + +__all__ = ["List"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/_list_admin_credentials.py b/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/_list_admin_credentials.py new file mode 100644 index 00000000000..35bce6be866 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/_list_admin_credentials.py @@ -0,0 +1,177 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware private-cloud list-admin-credentials", +) +class ListAdminCredentials(AAZCommand): + """List the admin credentials for the private cloud + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/listadmincredentials", "2022-05-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.PrivateCloudsListAdminCredentials(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class PrivateCloudsListAdminCredentials(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/listAdminCredentials", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.nsxt_password = AAZStrType( + serialized_name="nsxtPassword", + flags={"secret": True, "read_only": True}, + ) + _schema_on_200.nsxt_username = AAZStrType( + serialized_name="nsxtUsername", + flags={"read_only": True}, + ) + _schema_on_200.vcenter_password = AAZStrType( + serialized_name="vcenterPassword", + flags={"secret": True, "read_only": True}, + ) + _schema_on_200.vcenter_username = AAZStrType( + serialized_name="vcenterUsername", + flags={"read_only": True}, + ) + + return cls._schema_on_200 + + +class _ListAdminCredentialsHelper: + """Helper class for ListAdminCredentials""" + + +__all__ = ["ListAdminCredentials"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/_rotate_vcenter_password.py b/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/_rotate_vcenter_password.py new file mode 100644 index 00000000000..8885777b373 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/_rotate_vcenter_password.py @@ -0,0 +1,151 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware private-cloud rotate-vcenter-password", + confirmation="Any services connected using these credentials will stop working and may cause you to be locked out of your account.\n\nCheck if you're using your cloudadmin credentials for any connected services like backup and disaster recovery appliances, VMware HCX, or any vRealize suite products. Verify you're not using cloudadmin credentials for connected services before generating a new password.\n\nIf you are using cloudadmin for connected services, learn how you can setup a connection to an external identity source to create and manage new credentials for your connected services: https://docs.microsoft.com/en-us/azure/azure-vmware/configure-identity-source-vcenter\n\nPress Y to confirm no services are using my cloudadmin credentials to connect to vCenter", +) +class RotateVcenterPassword(AAZCommand): + """Rotate the vCenter password + + :example: Rotate the vCenter password. + az vmware private-cloud rotate-vcenter-password --resource-group MyResourceGroup --private-cloud MyPrivateCloud + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/rotatevcenterpassword", "2022-05-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, None) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.PrivateCloudsRotateVcenterPassword(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class PrivateCloudsRotateVcenterPassword(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + None, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [204]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_204, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/rotateVcenterPassword", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + def on_204(self, session): + pass + + +class _RotateVcenterPasswordHelper: + """Helper class for RotateVcenterPassword""" + + +__all__ = ["RotateVcenterPassword"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/_show.py b/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/_show.py new file mode 100644 index 00000000000..d4e043997d7 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/_show.py @@ -0,0 +1,405 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware private-cloud show", +) +class Show(AAZCommand): + """Get a private cloud + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}", "2022-05-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.private_cloud_name = AAZStrArg( + options=["-n", "--name", "--private-cloud-name"], + help="Name of the private cloud", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.PrivateCloudsGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class PrivateCloudsGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.identity = AAZObjectType() + _schema_on_200.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200.sku = AAZObjectType( + flags={"required": True}, + ) + _schema_on_200.tags = AAZDictType() + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + identity = cls._schema_on_200.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType() + + properties = cls._schema_on_200.properties + properties.availability = AAZObjectType() + properties.circuit = AAZObjectType() + _ShowHelper._build_schema_circuit_read(properties.circuit) + properties.encryption = AAZObjectType() + properties.endpoints = AAZObjectType() + properties.external_cloud_links = AAZListType( + serialized_name="externalCloudLinks", + flags={"read_only": True}, + ) + properties.identity_sources = AAZListType( + serialized_name="identitySources", + ) + properties.internet = AAZStrType() + properties.management_cluster = AAZObjectType( + serialized_name="managementCluster", + flags={"required": True}, + ) + properties.management_network = AAZStrType( + serialized_name="managementNetwork", + flags={"read_only": True}, + ) + properties.network_block = AAZStrType( + serialized_name="networkBlock", + flags={"required": True}, + ) + properties.nsx_public_ip_quota_raised = AAZStrType( + serialized_name="nsxPublicIpQuotaRaised", + flags={"read_only": True}, + ) + properties.nsxt_certificate_thumbprint = AAZStrType( + serialized_name="nsxtCertificateThumbprint", + flags={"read_only": True}, + ) + properties.nsxt_password = AAZStrType( + serialized_name="nsxtPassword", + flags={"secret": True}, + ) + properties.provisioning_network = AAZStrType( + serialized_name="provisioningNetwork", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.secondary_circuit = AAZObjectType( + serialized_name="secondaryCircuit", + ) + _ShowHelper._build_schema_circuit_read(properties.secondary_circuit) + properties.vcenter_certificate_thumbprint = AAZStrType( + serialized_name="vcenterCertificateThumbprint", + flags={"read_only": True}, + ) + properties.vcenter_password = AAZStrType( + serialized_name="vcenterPassword", + flags={"secret": True}, + ) + properties.vmotion_network = AAZStrType( + serialized_name="vmotionNetwork", + flags={"read_only": True}, + ) + + availability = cls._schema_on_200.properties.availability + availability.secondary_zone = AAZIntType( + serialized_name="secondaryZone", + ) + availability.strategy = AAZStrType() + availability.zone = AAZIntType() + + encryption = cls._schema_on_200.properties.encryption + encryption.key_vault_properties = AAZObjectType( + serialized_name="keyVaultProperties", + ) + encryption.status = AAZStrType() + + key_vault_properties = cls._schema_on_200.properties.encryption.key_vault_properties + key_vault_properties.auto_detected_key_version = AAZStrType( + serialized_name="autoDetectedKeyVersion", + flags={"read_only": True}, + ) + key_vault_properties.key_name = AAZStrType( + serialized_name="keyName", + ) + key_vault_properties.key_state = AAZStrType( + serialized_name="keyState", + flags={"read_only": True}, + ) + key_vault_properties.key_vault_url = AAZStrType( + serialized_name="keyVaultUrl", + ) + key_vault_properties.key_version = AAZStrType( + serialized_name="keyVersion", + ) + key_vault_properties.version_type = AAZStrType( + serialized_name="versionType", + flags={"read_only": True}, + ) + + endpoints = cls._schema_on_200.properties.endpoints + endpoints.hcx_cloud_manager = AAZStrType( + serialized_name="hcxCloudManager", + flags={"read_only": True}, + ) + endpoints.nsxt_manager = AAZStrType( + serialized_name="nsxtManager", + flags={"read_only": True}, + ) + endpoints.vcsa = AAZStrType( + flags={"read_only": True}, + ) + + external_cloud_links = cls._schema_on_200.properties.external_cloud_links + external_cloud_links.Element = AAZStrType() + + identity_sources = cls._schema_on_200.properties.identity_sources + identity_sources.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.identity_sources.Element + _element.alias = AAZStrType( + flags={"required": True}, + ) + _element.base_group_dn = AAZStrType( + serialized_name="baseGroupDN", + flags={"required": True}, + ) + _element.base_user_dn = AAZStrType( + serialized_name="baseUserDN", + flags={"required": True}, + ) + _element.domain = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"required": True}, + ) + _element.password = AAZStrType( + flags={"secret": True}, + ) + _element.primary_server = AAZStrType( + serialized_name="primaryServer", + flags={"required": True}, + ) + _element.secondary_server = AAZStrType( + serialized_name="secondaryServer", + ) + _element.ssl = AAZStrType() + _element.username = AAZStrType( + flags={"secret": True}, + ) + + management_cluster = cls._schema_on_200.properties.management_cluster + management_cluster.cluster_id = AAZIntType( + serialized_name="clusterId", + flags={"read_only": True}, + ) + management_cluster.cluster_size = AAZIntType( + serialized_name="clusterSize", + flags={"required": True}, + ) + management_cluster.hosts = AAZListType() + management_cluster.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + hosts = cls._schema_on_200.properties.management_cluster.hosts + hosts.Element = AAZStrType() + + sku = cls._schema_on_200.sku + sku.name = AAZStrType( + flags={"required": True}, + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + _schema_circuit_read = None + + @classmethod + def _build_schema_circuit_read(cls, _schema): + if cls._schema_circuit_read is not None: + _schema.express_route_id = cls._schema_circuit_read.express_route_id + _schema.express_route_private_peering_id = cls._schema_circuit_read.express_route_private_peering_id + _schema.primary_subnet = cls._schema_circuit_read.primary_subnet + _schema.secondary_subnet = cls._schema_circuit_read.secondary_subnet + return + + cls._schema_circuit_read = _schema_circuit_read = AAZObjectType() + + circuit_read = _schema_circuit_read + circuit_read.express_route_id = AAZStrType( + serialized_name="expressRouteID", + flags={"read_only": True}, + ) + circuit_read.express_route_private_peering_id = AAZStrType( + serialized_name="expressRoutePrivatePeeringID", + flags={"read_only": True}, + ) + circuit_read.primary_subnet = AAZStrType( + serialized_name="primarySubnet", + flags={"read_only": True}, + ) + circuit_read.secondary_subnet = AAZStrType( + serialized_name="secondarySubnet", + flags={"read_only": True}, + ) + + _schema.express_route_id = cls._schema_circuit_read.express_route_id + _schema.express_route_private_peering_id = cls._schema_circuit_read.express_route_private_peering_id + _schema.primary_subnet = cls._schema_circuit_read.primary_subnet + _schema.secondary_subnet = cls._schema_circuit_read.secondary_subnet + + +__all__ = ["Show"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/_update.py b/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/_update.py new file mode 100644 index 00000000000..7c332e5f676 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/_update.py @@ -0,0 +1,795 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware private-cloud update", +) +class Update(AAZCommand): + """Update a private cloud + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}", "2022-05-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + AZ_SUPPORT_GENERIC_UPDATE = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.private_cloud_name = AAZStrArg( + options=["-n", "--name", "--private-cloud-name"], + help="Name of the private cloud", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "ManagementCluster" + + _args_schema = cls._args_schema + _args_schema.cluster_size = AAZIntArg( + options=["--cluster-size"], + arg_group="ManagementCluster", + help="The cluster size", + ) + + # define Arg Group "PrivateCloud" + + _args_schema = cls._args_schema + _args_schema.identity = AAZObjectArg( + options=["--identity"], + arg_group="PrivateCloud", + help="The identity of the private cloud, if configured.", + nullable=True, + ) + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="PrivateCloud", + help="Resource tags", + nullable=True, + ) + + identity = cls._args_schema.identity + identity.type = AAZStrArg( + options=["type"], + help="The type of identity used for the private cloud. The type 'SystemAssigned' refers to an implicitly created identity. The type 'None' will remove any identities from the Private Cloud.", + nullable=True, + enum={"None": "None", "SystemAssigned": "SystemAssigned"}, + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg( + nullable=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.encryption = AAZObjectArg( + options=["--encryption"], + arg_group="Properties", + help="Customer managed key encryption, can be enabled or disabled", + nullable=True, + ) + _args_schema.identity_sources = AAZListArg( + options=["--identity-sources"], + arg_group="Properties", + help="vCenter Single Sign On Identity Sources", + nullable=True, + ) + _args_schema.internet = AAZStrArg( + options=["--internet"], + arg_group="Properties", + help="Connectivity to internet is enabled or disabled", + nullable=True, + enum={"Disabled": "Disabled", "Enabled": "Enabled"}, + ) + _args_schema.nsxt_password = AAZPasswordArg( + options=["--nsxt-password"], + arg_group="Properties", + help="Optionally, set the NSX-T Manager password when the private cloud is created", + nullable=True, + blank=AAZPromptPasswordInput( + msg="Password:", + ), + ) + _args_schema.vcenter_password = AAZPasswordArg( + options=["--vcenter-password"], + arg_group="Properties", + help="Optionally, set the vCenter admin password when the private cloud is created", + nullable=True, + blank=AAZPromptPasswordInput( + msg="Password:", + ), + ) + + encryption = cls._args_schema.encryption + encryption.key_vault_properties = AAZObjectArg( + options=["key-vault-properties"], + help="The key vault where the encryption key is stored", + nullable=True, + ) + encryption.status = AAZStrArg( + options=["status"], + help="Status of customer managed encryption key", + nullable=True, + enum={"Disabled": "Disabled", "Enabled": "Enabled"}, + ) + + key_vault_properties = cls._args_schema.encryption.key_vault_properties + key_vault_properties.key_name = AAZStrArg( + options=["key-name"], + help="The name of the key.", + nullable=True, + ) + key_vault_properties.key_vault_url = AAZStrArg( + options=["key-vault-url"], + help="The URL of the vault.", + nullable=True, + ) + key_vault_properties.key_version = AAZStrArg( + options=["key-version"], + help="The version of the key.", + nullable=True, + ) + + identity_sources = cls._args_schema.identity_sources + identity_sources.Element = AAZObjectArg( + nullable=True, + ) + + _element = cls._args_schema.identity_sources.Element + _element.alias = AAZStrArg( + options=["alias"], + help="The domain's NetBIOS name", + ) + _element.base_group_dn = AAZStrArg( + options=["base-group-dn"], + help="The base distinguished name for groups", + ) + _element.base_user_dn = AAZStrArg( + options=["base-user-dn"], + help="The base distinguished name for users", + ) + _element.domain = AAZStrArg( + options=["domain"], + help="The domain's dns name", + ) + _element.name = AAZStrArg( + options=["name"], + help="The name of the identity source", + ) + _element.password = AAZStrArg( + options=["password"], + help="The password of the Active Directory user with a minimum of read-only access to Base DN for users and groups.", + ) + _element.primary_server = AAZStrArg( + options=["primary-server"], + help="Primary server URL", + ) + _element.secondary_server = AAZStrArg( + options=["secondary-server"], + help="Secondary server URL", + nullable=True, + ) + _element.ssl = AAZStrArg( + options=["ssl"], + help="Protect LDAP communication using SSL certificate (LDAPS)", + nullable=True, + enum={"Disabled": "Disabled", "Enabled": "Enabled"}, + ) + _element.username = AAZStrArg( + options=["username"], + help="The ID of an Active Directory user with a minimum of read-only access to Base DN for users and group", + ) + + # define Arg Group "Sku" + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.PrivateCloudsGet(ctx=self.ctx)() + self.pre_instance_update(self.ctx.vars.instance) + self.InstanceUpdateByJson(ctx=self.ctx)() + self.InstanceUpdateByGeneric(ctx=self.ctx)() + self.post_instance_update(self.ctx.vars.instance) + yield self.PrivateCloudsCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + @register_callback + def pre_instance_update(self, instance): + pass + + @register_callback + def post_instance_update(self, instance): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class PrivateCloudsGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _UpdateHelper._build_schema_private_cloud_read(cls._schema_on_200) + + return cls._schema_on_200 + + class PrivateCloudsCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + value=self.ctx.vars.instance, + ) + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + _UpdateHelper._build_schema_private_cloud_read(cls._schema_on_200_201) + + return cls._schema_on_200_201 + + class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance(self.ctx.vars.instance) + + def _update_instance(self, instance): + _instance_value, _builder = self.new_content_builder( + self.ctx.args, + value=instance, + typ=AAZObjectType + ) + _builder.set_prop("identity", AAZObjectType, ".identity") + _builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}}) + _builder.set_prop("sku", AAZObjectType, ".", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("tags", AAZDictType, ".tags") + + identity = _builder.get(".identity") + if identity is not None: + identity.set_prop("type", AAZStrType, ".type") + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("encryption", AAZObjectType, ".encryption") + properties.set_prop("identitySources", AAZListType, ".identity_sources") + properties.set_prop("internet", AAZStrType, ".internet") + properties.set_prop("managementCluster", AAZObjectType, ".", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("nsxtPassword", AAZStrType, ".nsxt_password", typ_kwargs={"flags": {"secret": True}}) + properties.set_prop("vcenterPassword", AAZStrType, ".vcenter_password", typ_kwargs={"flags": {"secret": True}}) + + encryption = _builder.get(".properties.encryption") + if encryption is not None: + encryption.set_prop("keyVaultProperties", AAZObjectType, ".key_vault_properties") + encryption.set_prop("status", AAZStrType, ".status") + + key_vault_properties = _builder.get(".properties.encryption.keyVaultProperties") + if key_vault_properties is not None: + key_vault_properties.set_prop("keyName", AAZStrType, ".key_name") + key_vault_properties.set_prop("keyVaultUrl", AAZStrType, ".key_vault_url") + key_vault_properties.set_prop("keyVersion", AAZStrType, ".key_version") + + identity_sources = _builder.get(".properties.identitySources") + if identity_sources is not None: + identity_sources.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.identitySources[]") + if _elements is not None: + _elements.set_prop("alias", AAZStrType, ".alias", typ_kwargs={"flags": {"required": True}}) + _elements.set_prop("baseGroupDN", AAZStrType, ".base_group_dn", typ_kwargs={"flags": {"required": True}}) + _elements.set_prop("baseUserDN", AAZStrType, ".base_user_dn", typ_kwargs={"flags": {"required": True}}) + _elements.set_prop("domain", AAZStrType, ".domain", typ_kwargs={"flags": {"required": True}}) + _elements.set_prop("name", AAZStrType, ".name", typ_kwargs={"flags": {"required": True}}) + _elements.set_prop("password", AAZStrType, ".password", typ_kwargs={"flags": {"secret": True}}) + _elements.set_prop("primaryServer", AAZStrType, ".primary_server", typ_kwargs={"flags": {"required": True}}) + _elements.set_prop("secondaryServer", AAZStrType, ".secondary_server") + _elements.set_prop("ssl", AAZStrType, ".ssl") + _elements.set_prop("username", AAZStrType, ".username", typ_kwargs={"flags": {"secret": True}}) + + management_cluster = _builder.get(".properties.managementCluster") + if management_cluster is not None: + management_cluster.set_prop("clusterSize", AAZIntType, ".cluster_size", typ_kwargs={"flags": {"required": True}}) + + tags = _builder.get(".tags") + if tags is not None: + tags.set_elements(AAZStrType, ".") + + return _instance_value + + class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance_by_generic( + self.ctx.vars.instance, + self.ctx.generic_update_args + ) + + +class _UpdateHelper: + """Helper class for Update""" + + _schema_circuit_read = None + + @classmethod + def _build_schema_circuit_read(cls, _schema): + if cls._schema_circuit_read is not None: + _schema.express_route_id = cls._schema_circuit_read.express_route_id + _schema.express_route_private_peering_id = cls._schema_circuit_read.express_route_private_peering_id + _schema.primary_subnet = cls._schema_circuit_read.primary_subnet + _schema.secondary_subnet = cls._schema_circuit_read.secondary_subnet + return + + cls._schema_circuit_read = _schema_circuit_read = AAZObjectType() + + circuit_read = _schema_circuit_read + circuit_read.express_route_id = AAZStrType( + serialized_name="expressRouteID", + flags={"read_only": True}, + ) + circuit_read.express_route_private_peering_id = AAZStrType( + serialized_name="expressRoutePrivatePeeringID", + flags={"read_only": True}, + ) + circuit_read.primary_subnet = AAZStrType( + serialized_name="primarySubnet", + flags={"read_only": True}, + ) + circuit_read.secondary_subnet = AAZStrType( + serialized_name="secondarySubnet", + flags={"read_only": True}, + ) + + _schema.express_route_id = cls._schema_circuit_read.express_route_id + _schema.express_route_private_peering_id = cls._schema_circuit_read.express_route_private_peering_id + _schema.primary_subnet = cls._schema_circuit_read.primary_subnet + _schema.secondary_subnet = cls._schema_circuit_read.secondary_subnet + + _schema_private_cloud_read = None + + @classmethod + def _build_schema_private_cloud_read(cls, _schema): + if cls._schema_private_cloud_read is not None: + _schema.id = cls._schema_private_cloud_read.id + _schema.identity = cls._schema_private_cloud_read.identity + _schema.location = cls._schema_private_cloud_read.location + _schema.name = cls._schema_private_cloud_read.name + _schema.properties = cls._schema_private_cloud_read.properties + _schema.sku = cls._schema_private_cloud_read.sku + _schema.tags = cls._schema_private_cloud_read.tags + _schema.type = cls._schema_private_cloud_read.type + return + + cls._schema_private_cloud_read = _schema_private_cloud_read = AAZObjectType() + + private_cloud_read = _schema_private_cloud_read + private_cloud_read.id = AAZStrType( + flags={"read_only": True}, + ) + private_cloud_read.identity = AAZObjectType() + private_cloud_read.location = AAZStrType( + flags={"required": True}, + ) + private_cloud_read.name = AAZStrType( + flags={"read_only": True}, + ) + private_cloud_read.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + private_cloud_read.sku = AAZObjectType( + flags={"required": True}, + ) + private_cloud_read.tags = AAZDictType() + private_cloud_read.type = AAZStrType( + flags={"read_only": True}, + ) + + identity = _schema_private_cloud_read.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType() + + properties = _schema_private_cloud_read.properties + properties.availability = AAZObjectType() + properties.circuit = AAZObjectType() + cls._build_schema_circuit_read(properties.circuit) + properties.encryption = AAZObjectType() + properties.endpoints = AAZObjectType() + properties.external_cloud_links = AAZListType( + serialized_name="externalCloudLinks", + flags={"read_only": True}, + ) + properties.identity_sources = AAZListType( + serialized_name="identitySources", + ) + properties.internet = AAZStrType() + properties.management_cluster = AAZObjectType( + serialized_name="managementCluster", + flags={"required": True}, + ) + properties.management_network = AAZStrType( + serialized_name="managementNetwork", + flags={"read_only": True}, + ) + properties.network_block = AAZStrType( + serialized_name="networkBlock", + flags={"required": True}, + ) + properties.nsx_public_ip_quota_raised = AAZStrType( + serialized_name="nsxPublicIpQuotaRaised", + flags={"read_only": True}, + ) + properties.nsxt_certificate_thumbprint = AAZStrType( + serialized_name="nsxtCertificateThumbprint", + flags={"read_only": True}, + ) + properties.nsxt_password = AAZStrType( + serialized_name="nsxtPassword", + flags={"secret": True}, + ) + properties.provisioning_network = AAZStrType( + serialized_name="provisioningNetwork", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.secondary_circuit = AAZObjectType( + serialized_name="secondaryCircuit", + ) + cls._build_schema_circuit_read(properties.secondary_circuit) + properties.vcenter_certificate_thumbprint = AAZStrType( + serialized_name="vcenterCertificateThumbprint", + flags={"read_only": True}, + ) + properties.vcenter_password = AAZStrType( + serialized_name="vcenterPassword", + flags={"secret": True}, + ) + properties.vmotion_network = AAZStrType( + serialized_name="vmotionNetwork", + flags={"read_only": True}, + ) + + availability = _schema_private_cloud_read.properties.availability + availability.secondary_zone = AAZIntType( + serialized_name="secondaryZone", + ) + availability.strategy = AAZStrType() + availability.zone = AAZIntType() + + encryption = _schema_private_cloud_read.properties.encryption + encryption.key_vault_properties = AAZObjectType( + serialized_name="keyVaultProperties", + ) + encryption.status = AAZStrType() + + key_vault_properties = _schema_private_cloud_read.properties.encryption.key_vault_properties + key_vault_properties.auto_detected_key_version = AAZStrType( + serialized_name="autoDetectedKeyVersion", + flags={"read_only": True}, + ) + key_vault_properties.key_name = AAZStrType( + serialized_name="keyName", + ) + key_vault_properties.key_state = AAZStrType( + serialized_name="keyState", + flags={"read_only": True}, + ) + key_vault_properties.key_vault_url = AAZStrType( + serialized_name="keyVaultUrl", + ) + key_vault_properties.key_version = AAZStrType( + serialized_name="keyVersion", + ) + key_vault_properties.version_type = AAZStrType( + serialized_name="versionType", + flags={"read_only": True}, + ) + + endpoints = _schema_private_cloud_read.properties.endpoints + endpoints.hcx_cloud_manager = AAZStrType( + serialized_name="hcxCloudManager", + flags={"read_only": True}, + ) + endpoints.nsxt_manager = AAZStrType( + serialized_name="nsxtManager", + flags={"read_only": True}, + ) + endpoints.vcsa = AAZStrType( + flags={"read_only": True}, + ) + + external_cloud_links = _schema_private_cloud_read.properties.external_cloud_links + external_cloud_links.Element = AAZStrType() + + identity_sources = _schema_private_cloud_read.properties.identity_sources + identity_sources.Element = AAZObjectType() + + _element = _schema_private_cloud_read.properties.identity_sources.Element + _element.alias = AAZStrType( + flags={"required": True}, + ) + _element.base_group_dn = AAZStrType( + serialized_name="baseGroupDN", + flags={"required": True}, + ) + _element.base_user_dn = AAZStrType( + serialized_name="baseUserDN", + flags={"required": True}, + ) + _element.domain = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"required": True}, + ) + _element.password = AAZStrType( + flags={"secret": True}, + ) + _element.primary_server = AAZStrType( + serialized_name="primaryServer", + flags={"required": True}, + ) + _element.secondary_server = AAZStrType( + serialized_name="secondaryServer", + ) + _element.ssl = AAZStrType() + _element.username = AAZStrType( + flags={"secret": True}, + ) + + management_cluster = _schema_private_cloud_read.properties.management_cluster + management_cluster.cluster_id = AAZIntType( + serialized_name="clusterId", + flags={"read_only": True}, + ) + management_cluster.cluster_size = AAZIntType( + serialized_name="clusterSize", + flags={"required": True}, + ) + management_cluster.hosts = AAZListType() + management_cluster.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + hosts = _schema_private_cloud_read.properties.management_cluster.hosts + hosts.Element = AAZStrType() + + sku = _schema_private_cloud_read.sku + sku.name = AAZStrType( + flags={"required": True}, + ) + + tags = _schema_private_cloud_read.tags + tags.Element = AAZStrType() + + _schema.id = cls._schema_private_cloud_read.id + _schema.identity = cls._schema_private_cloud_read.identity + _schema.location = cls._schema_private_cloud_read.location + _schema.name = cls._schema_private_cloud_read.name + _schema.properties = cls._schema_private_cloud_read.properties + _schema.sku = cls._schema_private_cloud_read.sku + _schema.tags = cls._schema_private_cloud_read.tags + _schema.type = cls._schema_private_cloud_read.type + + +__all__ = ["Update"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/_wait.py b/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/_wait.py new file mode 100644 index 00000000000..c0aa22586e6 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/_wait.py @@ -0,0 +1,404 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware private-cloud wait", +) +class Wait(AAZWaitCommand): + """Place the CLI in a waiting state until a condition is met. + """ + + _aaz_info = { + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}", "2022-05-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.private_cloud_name = AAZStrArg( + options=["-n", "--name", "--private-cloud-name"], + help="Name of the private cloud", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.PrivateCloudsGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False) + return result + + class PrivateCloudsGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.identity = AAZObjectType() + _schema_on_200.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200.sku = AAZObjectType( + flags={"required": True}, + ) + _schema_on_200.tags = AAZDictType() + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + identity = cls._schema_on_200.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType() + + properties = cls._schema_on_200.properties + properties.availability = AAZObjectType() + properties.circuit = AAZObjectType() + _WaitHelper._build_schema_circuit_read(properties.circuit) + properties.encryption = AAZObjectType() + properties.endpoints = AAZObjectType() + properties.external_cloud_links = AAZListType( + serialized_name="externalCloudLinks", + flags={"read_only": True}, + ) + properties.identity_sources = AAZListType( + serialized_name="identitySources", + ) + properties.internet = AAZStrType() + properties.management_cluster = AAZObjectType( + serialized_name="managementCluster", + flags={"required": True}, + ) + properties.management_network = AAZStrType( + serialized_name="managementNetwork", + flags={"read_only": True}, + ) + properties.network_block = AAZStrType( + serialized_name="networkBlock", + flags={"required": True}, + ) + properties.nsx_public_ip_quota_raised = AAZStrType( + serialized_name="nsxPublicIpQuotaRaised", + flags={"read_only": True}, + ) + properties.nsxt_certificate_thumbprint = AAZStrType( + serialized_name="nsxtCertificateThumbprint", + flags={"read_only": True}, + ) + properties.nsxt_password = AAZStrType( + serialized_name="nsxtPassword", + flags={"secret": True}, + ) + properties.provisioning_network = AAZStrType( + serialized_name="provisioningNetwork", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.secondary_circuit = AAZObjectType( + serialized_name="secondaryCircuit", + ) + _WaitHelper._build_schema_circuit_read(properties.secondary_circuit) + properties.vcenter_certificate_thumbprint = AAZStrType( + serialized_name="vcenterCertificateThumbprint", + flags={"read_only": True}, + ) + properties.vcenter_password = AAZStrType( + serialized_name="vcenterPassword", + flags={"secret": True}, + ) + properties.vmotion_network = AAZStrType( + serialized_name="vmotionNetwork", + flags={"read_only": True}, + ) + + availability = cls._schema_on_200.properties.availability + availability.secondary_zone = AAZIntType( + serialized_name="secondaryZone", + ) + availability.strategy = AAZStrType() + availability.zone = AAZIntType() + + encryption = cls._schema_on_200.properties.encryption + encryption.key_vault_properties = AAZObjectType( + serialized_name="keyVaultProperties", + ) + encryption.status = AAZStrType() + + key_vault_properties = cls._schema_on_200.properties.encryption.key_vault_properties + key_vault_properties.auto_detected_key_version = AAZStrType( + serialized_name="autoDetectedKeyVersion", + flags={"read_only": True}, + ) + key_vault_properties.key_name = AAZStrType( + serialized_name="keyName", + ) + key_vault_properties.key_state = AAZStrType( + serialized_name="keyState", + flags={"read_only": True}, + ) + key_vault_properties.key_vault_url = AAZStrType( + serialized_name="keyVaultUrl", + ) + key_vault_properties.key_version = AAZStrType( + serialized_name="keyVersion", + ) + key_vault_properties.version_type = AAZStrType( + serialized_name="versionType", + flags={"read_only": True}, + ) + + endpoints = cls._schema_on_200.properties.endpoints + endpoints.hcx_cloud_manager = AAZStrType( + serialized_name="hcxCloudManager", + flags={"read_only": True}, + ) + endpoints.nsxt_manager = AAZStrType( + serialized_name="nsxtManager", + flags={"read_only": True}, + ) + endpoints.vcsa = AAZStrType( + flags={"read_only": True}, + ) + + external_cloud_links = cls._schema_on_200.properties.external_cloud_links + external_cloud_links.Element = AAZStrType() + + identity_sources = cls._schema_on_200.properties.identity_sources + identity_sources.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.identity_sources.Element + _element.alias = AAZStrType( + flags={"required": True}, + ) + _element.base_group_dn = AAZStrType( + serialized_name="baseGroupDN", + flags={"required": True}, + ) + _element.base_user_dn = AAZStrType( + serialized_name="baseUserDN", + flags={"required": True}, + ) + _element.domain = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"required": True}, + ) + _element.password = AAZStrType( + flags={"secret": True}, + ) + _element.primary_server = AAZStrType( + serialized_name="primaryServer", + flags={"required": True}, + ) + _element.secondary_server = AAZStrType( + serialized_name="secondaryServer", + ) + _element.ssl = AAZStrType() + _element.username = AAZStrType( + flags={"secret": True}, + ) + + management_cluster = cls._schema_on_200.properties.management_cluster + management_cluster.cluster_id = AAZIntType( + serialized_name="clusterId", + flags={"read_only": True}, + ) + management_cluster.cluster_size = AAZIntType( + serialized_name="clusterSize", + flags={"required": True}, + ) + management_cluster.hosts = AAZListType() + management_cluster.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + hosts = cls._schema_on_200.properties.management_cluster.hosts + hosts.Element = AAZStrType() + + sku = cls._schema_on_200.sku + sku.name = AAZStrType( + flags={"required": True}, + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _WaitHelper: + """Helper class for Wait""" + + _schema_circuit_read = None + + @classmethod + def _build_schema_circuit_read(cls, _schema): + if cls._schema_circuit_read is not None: + _schema.express_route_id = cls._schema_circuit_read.express_route_id + _schema.express_route_private_peering_id = cls._schema_circuit_read.express_route_private_peering_id + _schema.primary_subnet = cls._schema_circuit_read.primary_subnet + _schema.secondary_subnet = cls._schema_circuit_read.secondary_subnet + return + + cls._schema_circuit_read = _schema_circuit_read = AAZObjectType() + + circuit_read = _schema_circuit_read + circuit_read.express_route_id = AAZStrType( + serialized_name="expressRouteID", + flags={"read_only": True}, + ) + circuit_read.express_route_private_peering_id = AAZStrType( + serialized_name="expressRoutePrivatePeeringID", + flags={"read_only": True}, + ) + circuit_read.primary_subnet = AAZStrType( + serialized_name="primarySubnet", + flags={"read_only": True}, + ) + circuit_read.secondary_subnet = AAZStrType( + serialized_name="secondarySubnet", + flags={"read_only": True}, + ) + + _schema.express_route_id = cls._schema_circuit_read.express_route_id + _schema.express_route_private_peering_id = cls._schema_circuit_read.express_route_private_peering_id + _schema.primary_subnet = cls._schema_circuit_read.primary_subnet + _schema.secondary_subnet = cls._schema_circuit_read.secondary_subnet + + +__all__ = ["Wait"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/identity_source/__cmd_group.py b/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/identity_source/__cmd_group.py new file mode 100644 index 00000000000..f8781b52cd2 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/identity_source/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "vmware private-cloud identity-source", +) +class __CMDGroup(AAZCommandGroup): + """Manage a vCenter Single Sign On Identity Source of a private cloud. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/identity_source/__init__.py b/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/identity_source/__init__.py new file mode 100644 index 00000000000..db73033039b --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/identity_source/__init__.py @@ -0,0 +1,17 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._create import * +from ._delete import * +from ._list import * +from ._show import * +from ._update import * +from ._wait import * diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/identity_source/_create.py b/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/identity_source/_create.py new file mode 100644 index 00000000000..51af8fd2b78 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/identity_source/_create.py @@ -0,0 +1,667 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware private-cloud identity-source create", +) +class Create(AAZCommand): + """Create a vCenter Single Sign On Identity Source to a private cloud. + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}", "2022-05-01", "properties.identitySources[]"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + self.SubresourceSelector(ctx=self.ctx, name="subresource") + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="The name of the identity source", + required=True, + ) + + # define Arg Group "PrivateCloud.properties.identitySources[]" + + _args_schema = cls._args_schema + _args_schema.alias = AAZStrArg( + options=["--alias"], + arg_group="PrivateCloud.properties.identitySources[]", + help="The domain's NetBIOS name", + required=True, + ) + _args_schema.base_group_dn = AAZStrArg( + options=["--base-group-dn"], + arg_group="PrivateCloud.properties.identitySources[]", + help="The base distinguished name for groups", + required=True, + ) + _args_schema.base_user_dn = AAZStrArg( + options=["--base-user-dn"], + arg_group="PrivateCloud.properties.identitySources[]", + help="The base distinguished name for users", + required=True, + ) + _args_schema.domain = AAZStrArg( + options=["--domain"], + arg_group="PrivateCloud.properties.identitySources[]", + help="The domain's dns name", + required=True, + ) + _args_schema.password = AAZStrArg( + options=["--password"], + arg_group="PrivateCloud.properties.identitySources[]", + help="The password of the Active Directory user with a minimum of read-only access to Base DN for users and groups.", + required=True, + ) + _args_schema.primary_server = AAZStrArg( + options=["--primary-server"], + arg_group="PrivateCloud.properties.identitySources[]", + help="Primary server URL", + required=True, + ) + _args_schema.secondary_server = AAZStrArg( + options=["--secondary-server"], + arg_group="PrivateCloud.properties.identitySources[]", + help="Secondary server URL", + ) + _args_schema.ssl = AAZStrArg( + options=["--ssl"], + arg_group="PrivateCloud.properties.identitySources[]", + help="Protect LDAP communication using SSL certificate (LDAPS)", + default="Disabled", + enum={"Disabled": "Disabled", "Enabled": "Enabled"}, + ) + _args_schema.username = AAZStrArg( + options=["--username"], + arg_group="PrivateCloud.properties.identitySources[]", + help="The ID of an Active Directory user with a minimum of read-only access to Base DN for users and group", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.PrivateCloudsGet(ctx=self.ctx)() + self.pre_instance_create() + self.InstanceCreateByJson(ctx=self.ctx)() + self.post_instance_create(self.ctx.selectors.subresource.required()) + yield self.PrivateCloudsCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + @register_callback + def pre_instance_create(self): + pass + + @register_callback + def post_instance_create(self, instance): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.selectors.subresource.required(), client_flatten=True) + return result + + class SubresourceSelector(AAZJsonSelector): + + def _get(self): + result = self.ctx.vars.instance + result = result.properties.identitySources + filters = enumerate(result) + filters = filter( + lambda e: e[1].name == self.ctx.args.name, + filters + ) + idx = next(filters)[0] + return result[idx] + + def _set(self, value): + result = self.ctx.vars.instance + result = result.properties.identitySources + filters = enumerate(result) + filters = filter( + lambda e: e[1].name == self.ctx.args.name, + filters + ) + idx = next(filters, [len(result)])[0] + result[idx] = value + return + + class PrivateCloudsGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _CreateHelper._build_schema_private_cloud_read(cls._schema_on_200) + + return cls._schema_on_200 + + class PrivateCloudsCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + value=self.ctx.vars.instance, + ) + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + _CreateHelper._build_schema_private_cloud_read(cls._schema_on_200_201) + + return cls._schema_on_200_201 + + class InstanceCreateByJson(AAZJsonInstanceCreateOperation): + + def __call__(self, *args, **kwargs): + self.ctx.selectors.subresource.set(self._create_instance()) + + def _create_instance(self): + _instance_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType + ) + _builder.set_prop("alias", AAZStrType, ".alias", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("baseGroupDN", AAZStrType, ".base_group_dn", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("baseUserDN", AAZStrType, ".base_user_dn", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("domain", AAZStrType, ".domain", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("name", AAZStrType, ".name", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("password", AAZStrType, ".password", typ_kwargs={"flags": {"secret": True}}) + _builder.set_prop("primaryServer", AAZStrType, ".primary_server", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("secondaryServer", AAZStrType, ".secondary_server") + _builder.set_prop("ssl", AAZStrType, ".ssl") + _builder.set_prop("username", AAZStrType, ".username", typ_kwargs={"flags": {"secret": True}}) + + return _instance_value + + +class _CreateHelper: + """Helper class for Create""" + + _schema_circuit_read = None + + @classmethod + def _build_schema_circuit_read(cls, _schema): + if cls._schema_circuit_read is not None: + _schema.express_route_id = cls._schema_circuit_read.express_route_id + _schema.express_route_private_peering_id = cls._schema_circuit_read.express_route_private_peering_id + _schema.primary_subnet = cls._schema_circuit_read.primary_subnet + _schema.secondary_subnet = cls._schema_circuit_read.secondary_subnet + return + + cls._schema_circuit_read = _schema_circuit_read = AAZObjectType() + + circuit_read = _schema_circuit_read + circuit_read.express_route_id = AAZStrType( + serialized_name="expressRouteID", + flags={"read_only": True}, + ) + circuit_read.express_route_private_peering_id = AAZStrType( + serialized_name="expressRoutePrivatePeeringID", + flags={"read_only": True}, + ) + circuit_read.primary_subnet = AAZStrType( + serialized_name="primarySubnet", + flags={"read_only": True}, + ) + circuit_read.secondary_subnet = AAZStrType( + serialized_name="secondarySubnet", + flags={"read_only": True}, + ) + + _schema.express_route_id = cls._schema_circuit_read.express_route_id + _schema.express_route_private_peering_id = cls._schema_circuit_read.express_route_private_peering_id + _schema.primary_subnet = cls._schema_circuit_read.primary_subnet + _schema.secondary_subnet = cls._schema_circuit_read.secondary_subnet + + _schema_private_cloud_read = None + + @classmethod + def _build_schema_private_cloud_read(cls, _schema): + if cls._schema_private_cloud_read is not None: + _schema.id = cls._schema_private_cloud_read.id + _schema.identity = cls._schema_private_cloud_read.identity + _schema.location = cls._schema_private_cloud_read.location + _schema.name = cls._schema_private_cloud_read.name + _schema.properties = cls._schema_private_cloud_read.properties + _schema.sku = cls._schema_private_cloud_read.sku + _schema.tags = cls._schema_private_cloud_read.tags + _schema.type = cls._schema_private_cloud_read.type + return + + cls._schema_private_cloud_read = _schema_private_cloud_read = AAZObjectType() + + private_cloud_read = _schema_private_cloud_read + private_cloud_read.id = AAZStrType( + flags={"read_only": True}, + ) + private_cloud_read.identity = AAZObjectType() + private_cloud_read.location = AAZStrType( + flags={"required": True}, + ) + private_cloud_read.name = AAZStrType( + flags={"read_only": True}, + ) + private_cloud_read.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + private_cloud_read.sku = AAZObjectType( + flags={"required": True}, + ) + private_cloud_read.tags = AAZDictType() + private_cloud_read.type = AAZStrType( + flags={"read_only": True}, + ) + + identity = _schema_private_cloud_read.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType() + + properties = _schema_private_cloud_read.properties + properties.availability = AAZObjectType() + properties.circuit = AAZObjectType() + cls._build_schema_circuit_read(properties.circuit) + properties.encryption = AAZObjectType() + properties.endpoints = AAZObjectType() + properties.external_cloud_links = AAZListType( + serialized_name="externalCloudLinks", + flags={"read_only": True}, + ) + properties.identity_sources = AAZListType( + serialized_name="identitySources", + ) + properties.internet = AAZStrType() + properties.management_cluster = AAZObjectType( + serialized_name="managementCluster", + flags={"required": True}, + ) + properties.management_network = AAZStrType( + serialized_name="managementNetwork", + flags={"read_only": True}, + ) + properties.network_block = AAZStrType( + serialized_name="networkBlock", + flags={"required": True}, + ) + properties.nsx_public_ip_quota_raised = AAZStrType( + serialized_name="nsxPublicIpQuotaRaised", + flags={"read_only": True}, + ) + properties.nsxt_certificate_thumbprint = AAZStrType( + serialized_name="nsxtCertificateThumbprint", + flags={"read_only": True}, + ) + properties.nsxt_password = AAZStrType( + serialized_name="nsxtPassword", + flags={"secret": True}, + ) + properties.provisioning_network = AAZStrType( + serialized_name="provisioningNetwork", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.secondary_circuit = AAZObjectType( + serialized_name="secondaryCircuit", + ) + cls._build_schema_circuit_read(properties.secondary_circuit) + properties.vcenter_certificate_thumbprint = AAZStrType( + serialized_name="vcenterCertificateThumbprint", + flags={"read_only": True}, + ) + properties.vcenter_password = AAZStrType( + serialized_name="vcenterPassword", + flags={"secret": True}, + ) + properties.vmotion_network = AAZStrType( + serialized_name="vmotionNetwork", + flags={"read_only": True}, + ) + + availability = _schema_private_cloud_read.properties.availability + availability.secondary_zone = AAZIntType( + serialized_name="secondaryZone", + ) + availability.strategy = AAZStrType() + availability.zone = AAZIntType() + + encryption = _schema_private_cloud_read.properties.encryption + encryption.key_vault_properties = AAZObjectType( + serialized_name="keyVaultProperties", + ) + encryption.status = AAZStrType() + + key_vault_properties = _schema_private_cloud_read.properties.encryption.key_vault_properties + key_vault_properties.auto_detected_key_version = AAZStrType( + serialized_name="autoDetectedKeyVersion", + flags={"read_only": True}, + ) + key_vault_properties.key_name = AAZStrType( + serialized_name="keyName", + ) + key_vault_properties.key_state = AAZStrType( + serialized_name="keyState", + flags={"read_only": True}, + ) + key_vault_properties.key_vault_url = AAZStrType( + serialized_name="keyVaultUrl", + ) + key_vault_properties.key_version = AAZStrType( + serialized_name="keyVersion", + ) + key_vault_properties.version_type = AAZStrType( + serialized_name="versionType", + flags={"read_only": True}, + ) + + endpoints = _schema_private_cloud_read.properties.endpoints + endpoints.hcx_cloud_manager = AAZStrType( + serialized_name="hcxCloudManager", + flags={"read_only": True}, + ) + endpoints.nsxt_manager = AAZStrType( + serialized_name="nsxtManager", + flags={"read_only": True}, + ) + endpoints.vcsa = AAZStrType( + flags={"read_only": True}, + ) + + external_cloud_links = _schema_private_cloud_read.properties.external_cloud_links + external_cloud_links.Element = AAZStrType() + + identity_sources = _schema_private_cloud_read.properties.identity_sources + identity_sources.Element = AAZObjectType() + + _element = _schema_private_cloud_read.properties.identity_sources.Element + _element.alias = AAZStrType( + flags={"required": True}, + ) + _element.base_group_dn = AAZStrType( + serialized_name="baseGroupDN", + flags={"required": True}, + ) + _element.base_user_dn = AAZStrType( + serialized_name="baseUserDN", + flags={"required": True}, + ) + _element.domain = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"required": True}, + ) + _element.password = AAZStrType( + flags={"secret": True}, + ) + _element.primary_server = AAZStrType( + serialized_name="primaryServer", + flags={"required": True}, + ) + _element.secondary_server = AAZStrType( + serialized_name="secondaryServer", + ) + _element.ssl = AAZStrType() + _element.username = AAZStrType( + flags={"secret": True}, + ) + + management_cluster = _schema_private_cloud_read.properties.management_cluster + management_cluster.cluster_id = AAZIntType( + serialized_name="clusterId", + flags={"read_only": True}, + ) + management_cluster.cluster_size = AAZIntType( + serialized_name="clusterSize", + flags={"required": True}, + ) + management_cluster.hosts = AAZListType() + management_cluster.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + hosts = _schema_private_cloud_read.properties.management_cluster.hosts + hosts.Element = AAZStrType() + + sku = _schema_private_cloud_read.sku + sku.name = AAZStrType( + flags={"required": True}, + ) + + tags = _schema_private_cloud_read.tags + tags.Element = AAZStrType() + + _schema.id = cls._schema_private_cloud_read.id + _schema.identity = cls._schema_private_cloud_read.identity + _schema.location = cls._schema_private_cloud_read.location + _schema.name = cls._schema_private_cloud_read.name + _schema.properties = cls._schema_private_cloud_read.properties + _schema.sku = cls._schema_private_cloud_read.sku + _schema.tags = cls._schema_private_cloud_read.tags + _schema.type = cls._schema_private_cloud_read.type + + +__all__ = ["Create"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/identity_source/_delete.py b/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/identity_source/_delete.py new file mode 100644 index 00000000000..74bc7a4872e --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/identity_source/_delete.py @@ -0,0 +1,588 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware private-cloud identity-source delete", + confirmation="This will delete the identity source. Are you sure?", +) +class Delete(AAZCommand): + """Delete a vCenter Single Sign On Identity Source of a private cloud. + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}", "2022-05-01", "properties.identitySources[]"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + self.SubresourceSelector(ctx=self.ctx, name="subresource") + return self.build_lro_poller(self._execute_operations, None) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="The name of the identity source", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.PrivateCloudsGet(ctx=self.ctx)() + self.pre_instance_delete() + self.InstanceDeleteByJson(ctx=self.ctx)() + self.post_instance_delete() + yield self.PrivateCloudsCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + @register_callback + def pre_instance_delete(self): + pass + + @register_callback + def post_instance_delete(self): + pass + + class SubresourceSelector(AAZJsonSelector): + + def _get(self): + result = self.ctx.vars.instance + result = result.properties.identitySources + filters = enumerate(result) + filters = filter( + lambda e: e[1].name == self.ctx.args.name, + filters + ) + idx = next(filters)[0] + return result[idx] + + def _set(self, value): + result = self.ctx.vars.instance + result = result.properties.identitySources + filters = enumerate(result) + filters = filter( + lambda e: e[1].name == self.ctx.args.name, + filters + ) + idx = next(filters, [len(result)])[0] + result[idx] = value + return + + class PrivateCloudsGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _DeleteHelper._build_schema_private_cloud_read(cls._schema_on_200) + + return cls._schema_on_200 + + class PrivateCloudsCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + value=self.ctx.vars.instance, + ) + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + _DeleteHelper._build_schema_private_cloud_read(cls._schema_on_200_201) + + return cls._schema_on_200_201 + + class InstanceDeleteByJson(AAZJsonInstanceDeleteOperation): + + def __call__(self, *args, **kwargs): + self.ctx.selectors.subresource.set(self._delete_instance()) + + +class _DeleteHelper: + """Helper class for Delete""" + + _schema_circuit_read = None + + @classmethod + def _build_schema_circuit_read(cls, _schema): + if cls._schema_circuit_read is not None: + _schema.express_route_id = cls._schema_circuit_read.express_route_id + _schema.express_route_private_peering_id = cls._schema_circuit_read.express_route_private_peering_id + _schema.primary_subnet = cls._schema_circuit_read.primary_subnet + _schema.secondary_subnet = cls._schema_circuit_read.secondary_subnet + return + + cls._schema_circuit_read = _schema_circuit_read = AAZObjectType() + + circuit_read = _schema_circuit_read + circuit_read.express_route_id = AAZStrType( + serialized_name="expressRouteID", + flags={"read_only": True}, + ) + circuit_read.express_route_private_peering_id = AAZStrType( + serialized_name="expressRoutePrivatePeeringID", + flags={"read_only": True}, + ) + circuit_read.primary_subnet = AAZStrType( + serialized_name="primarySubnet", + flags={"read_only": True}, + ) + circuit_read.secondary_subnet = AAZStrType( + serialized_name="secondarySubnet", + flags={"read_only": True}, + ) + + _schema.express_route_id = cls._schema_circuit_read.express_route_id + _schema.express_route_private_peering_id = cls._schema_circuit_read.express_route_private_peering_id + _schema.primary_subnet = cls._schema_circuit_read.primary_subnet + _schema.secondary_subnet = cls._schema_circuit_read.secondary_subnet + + _schema_private_cloud_read = None + + @classmethod + def _build_schema_private_cloud_read(cls, _schema): + if cls._schema_private_cloud_read is not None: + _schema.id = cls._schema_private_cloud_read.id + _schema.identity = cls._schema_private_cloud_read.identity + _schema.location = cls._schema_private_cloud_read.location + _schema.name = cls._schema_private_cloud_read.name + _schema.properties = cls._schema_private_cloud_read.properties + _schema.sku = cls._schema_private_cloud_read.sku + _schema.tags = cls._schema_private_cloud_read.tags + _schema.type = cls._schema_private_cloud_read.type + return + + cls._schema_private_cloud_read = _schema_private_cloud_read = AAZObjectType() + + private_cloud_read = _schema_private_cloud_read + private_cloud_read.id = AAZStrType( + flags={"read_only": True}, + ) + private_cloud_read.identity = AAZObjectType() + private_cloud_read.location = AAZStrType( + flags={"required": True}, + ) + private_cloud_read.name = AAZStrType( + flags={"read_only": True}, + ) + private_cloud_read.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + private_cloud_read.sku = AAZObjectType( + flags={"required": True}, + ) + private_cloud_read.tags = AAZDictType() + private_cloud_read.type = AAZStrType( + flags={"read_only": True}, + ) + + identity = _schema_private_cloud_read.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType() + + properties = _schema_private_cloud_read.properties + properties.availability = AAZObjectType() + properties.circuit = AAZObjectType() + cls._build_schema_circuit_read(properties.circuit) + properties.encryption = AAZObjectType() + properties.endpoints = AAZObjectType() + properties.external_cloud_links = AAZListType( + serialized_name="externalCloudLinks", + flags={"read_only": True}, + ) + properties.identity_sources = AAZListType( + serialized_name="identitySources", + ) + properties.internet = AAZStrType() + properties.management_cluster = AAZObjectType( + serialized_name="managementCluster", + flags={"required": True}, + ) + properties.management_network = AAZStrType( + serialized_name="managementNetwork", + flags={"read_only": True}, + ) + properties.network_block = AAZStrType( + serialized_name="networkBlock", + flags={"required": True}, + ) + properties.nsx_public_ip_quota_raised = AAZStrType( + serialized_name="nsxPublicIpQuotaRaised", + flags={"read_only": True}, + ) + properties.nsxt_certificate_thumbprint = AAZStrType( + serialized_name="nsxtCertificateThumbprint", + flags={"read_only": True}, + ) + properties.nsxt_password = AAZStrType( + serialized_name="nsxtPassword", + flags={"secret": True}, + ) + properties.provisioning_network = AAZStrType( + serialized_name="provisioningNetwork", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.secondary_circuit = AAZObjectType( + serialized_name="secondaryCircuit", + ) + cls._build_schema_circuit_read(properties.secondary_circuit) + properties.vcenter_certificate_thumbprint = AAZStrType( + serialized_name="vcenterCertificateThumbprint", + flags={"read_only": True}, + ) + properties.vcenter_password = AAZStrType( + serialized_name="vcenterPassword", + flags={"secret": True}, + ) + properties.vmotion_network = AAZStrType( + serialized_name="vmotionNetwork", + flags={"read_only": True}, + ) + + availability = _schema_private_cloud_read.properties.availability + availability.secondary_zone = AAZIntType( + serialized_name="secondaryZone", + ) + availability.strategy = AAZStrType() + availability.zone = AAZIntType() + + encryption = _schema_private_cloud_read.properties.encryption + encryption.key_vault_properties = AAZObjectType( + serialized_name="keyVaultProperties", + ) + encryption.status = AAZStrType() + + key_vault_properties = _schema_private_cloud_read.properties.encryption.key_vault_properties + key_vault_properties.auto_detected_key_version = AAZStrType( + serialized_name="autoDetectedKeyVersion", + flags={"read_only": True}, + ) + key_vault_properties.key_name = AAZStrType( + serialized_name="keyName", + ) + key_vault_properties.key_state = AAZStrType( + serialized_name="keyState", + flags={"read_only": True}, + ) + key_vault_properties.key_vault_url = AAZStrType( + serialized_name="keyVaultUrl", + ) + key_vault_properties.key_version = AAZStrType( + serialized_name="keyVersion", + ) + key_vault_properties.version_type = AAZStrType( + serialized_name="versionType", + flags={"read_only": True}, + ) + + endpoints = _schema_private_cloud_read.properties.endpoints + endpoints.hcx_cloud_manager = AAZStrType( + serialized_name="hcxCloudManager", + flags={"read_only": True}, + ) + endpoints.nsxt_manager = AAZStrType( + serialized_name="nsxtManager", + flags={"read_only": True}, + ) + endpoints.vcsa = AAZStrType( + flags={"read_only": True}, + ) + + external_cloud_links = _schema_private_cloud_read.properties.external_cloud_links + external_cloud_links.Element = AAZStrType() + + identity_sources = _schema_private_cloud_read.properties.identity_sources + identity_sources.Element = AAZObjectType() + + _element = _schema_private_cloud_read.properties.identity_sources.Element + _element.alias = AAZStrType( + flags={"required": True}, + ) + _element.base_group_dn = AAZStrType( + serialized_name="baseGroupDN", + flags={"required": True}, + ) + _element.base_user_dn = AAZStrType( + serialized_name="baseUserDN", + flags={"required": True}, + ) + _element.domain = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"required": True}, + ) + _element.password = AAZStrType( + flags={"secret": True}, + ) + _element.primary_server = AAZStrType( + serialized_name="primaryServer", + flags={"required": True}, + ) + _element.secondary_server = AAZStrType( + serialized_name="secondaryServer", + ) + _element.ssl = AAZStrType() + _element.username = AAZStrType( + flags={"secret": True}, + ) + + management_cluster = _schema_private_cloud_read.properties.management_cluster + management_cluster.cluster_id = AAZIntType( + serialized_name="clusterId", + flags={"read_only": True}, + ) + management_cluster.cluster_size = AAZIntType( + serialized_name="clusterSize", + flags={"required": True}, + ) + management_cluster.hosts = AAZListType() + management_cluster.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + hosts = _schema_private_cloud_read.properties.management_cluster.hosts + hosts.Element = AAZStrType() + + sku = _schema_private_cloud_read.sku + sku.name = AAZStrType( + flags={"required": True}, + ) + + tags = _schema_private_cloud_read.tags + tags.Element = AAZStrType() + + _schema.id = cls._schema_private_cloud_read.id + _schema.identity = cls._schema_private_cloud_read.identity + _schema.location = cls._schema_private_cloud_read.location + _schema.name = cls._schema_private_cloud_read.name + _schema.properties = cls._schema_private_cloud_read.properties + _schema.sku = cls._schema_private_cloud_read.sku + _schema.tags = cls._schema_private_cloud_read.tags + _schema.type = cls._schema_private_cloud_read.type + + +__all__ = ["Delete"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/identity_source/_list.py b/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/identity_source/_list.py new file mode 100644 index 00000000000..da0d11300c1 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/identity_source/_list.py @@ -0,0 +1,443 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware private-cloud identity-source list", +) +class List(AAZCommand): + """List vCenter Single Sign On Identity Sources of a private cloud. + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}", "2022-05-01", "properties.identitySources"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self.SubresourceSelector(ctx=self.ctx, name="subresource") + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.PrivateCloudsGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.selectors.subresource.required(), client_flatten=True) + return result + + class SubresourceSelector(AAZJsonSelector): + + def _get(self): + result = self.ctx.vars.instance + return result.properties.identitySources + + def _set(self, value): + result = self.ctx.vars.instance + result.properties.identitySources = value + return + + class PrivateCloudsGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _ListHelper._build_schema_private_cloud_read(cls._schema_on_200) + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + _schema_circuit_read = None + + @classmethod + def _build_schema_circuit_read(cls, _schema): + if cls._schema_circuit_read is not None: + _schema.express_route_id = cls._schema_circuit_read.express_route_id + _schema.express_route_private_peering_id = cls._schema_circuit_read.express_route_private_peering_id + _schema.primary_subnet = cls._schema_circuit_read.primary_subnet + _schema.secondary_subnet = cls._schema_circuit_read.secondary_subnet + return + + cls._schema_circuit_read = _schema_circuit_read = AAZObjectType() + + circuit_read = _schema_circuit_read + circuit_read.express_route_id = AAZStrType( + serialized_name="expressRouteID", + flags={"read_only": True}, + ) + circuit_read.express_route_private_peering_id = AAZStrType( + serialized_name="expressRoutePrivatePeeringID", + flags={"read_only": True}, + ) + circuit_read.primary_subnet = AAZStrType( + serialized_name="primarySubnet", + flags={"read_only": True}, + ) + circuit_read.secondary_subnet = AAZStrType( + serialized_name="secondarySubnet", + flags={"read_only": True}, + ) + + _schema.express_route_id = cls._schema_circuit_read.express_route_id + _schema.express_route_private_peering_id = cls._schema_circuit_read.express_route_private_peering_id + _schema.primary_subnet = cls._schema_circuit_read.primary_subnet + _schema.secondary_subnet = cls._schema_circuit_read.secondary_subnet + + _schema_private_cloud_read = None + + @classmethod + def _build_schema_private_cloud_read(cls, _schema): + if cls._schema_private_cloud_read is not None: + _schema.id = cls._schema_private_cloud_read.id + _schema.identity = cls._schema_private_cloud_read.identity + _schema.location = cls._schema_private_cloud_read.location + _schema.name = cls._schema_private_cloud_read.name + _schema.properties = cls._schema_private_cloud_read.properties + _schema.sku = cls._schema_private_cloud_read.sku + _schema.tags = cls._schema_private_cloud_read.tags + _schema.type = cls._schema_private_cloud_read.type + return + + cls._schema_private_cloud_read = _schema_private_cloud_read = AAZObjectType() + + private_cloud_read = _schema_private_cloud_read + private_cloud_read.id = AAZStrType( + flags={"read_only": True}, + ) + private_cloud_read.identity = AAZObjectType() + private_cloud_read.location = AAZStrType( + flags={"required": True}, + ) + private_cloud_read.name = AAZStrType( + flags={"read_only": True}, + ) + private_cloud_read.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + private_cloud_read.sku = AAZObjectType( + flags={"required": True}, + ) + private_cloud_read.tags = AAZDictType() + private_cloud_read.type = AAZStrType( + flags={"read_only": True}, + ) + + identity = _schema_private_cloud_read.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType() + + properties = _schema_private_cloud_read.properties + properties.availability = AAZObjectType() + properties.circuit = AAZObjectType() + cls._build_schema_circuit_read(properties.circuit) + properties.encryption = AAZObjectType() + properties.endpoints = AAZObjectType() + properties.external_cloud_links = AAZListType( + serialized_name="externalCloudLinks", + flags={"read_only": True}, + ) + properties.identity_sources = AAZListType( + serialized_name="identitySources", + ) + properties.internet = AAZStrType() + properties.management_cluster = AAZObjectType( + serialized_name="managementCluster", + flags={"required": True}, + ) + properties.management_network = AAZStrType( + serialized_name="managementNetwork", + flags={"read_only": True}, + ) + properties.network_block = AAZStrType( + serialized_name="networkBlock", + flags={"required": True}, + ) + properties.nsx_public_ip_quota_raised = AAZStrType( + serialized_name="nsxPublicIpQuotaRaised", + flags={"read_only": True}, + ) + properties.nsxt_certificate_thumbprint = AAZStrType( + serialized_name="nsxtCertificateThumbprint", + flags={"read_only": True}, + ) + properties.nsxt_password = AAZStrType( + serialized_name="nsxtPassword", + flags={"secret": True}, + ) + properties.provisioning_network = AAZStrType( + serialized_name="provisioningNetwork", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.secondary_circuit = AAZObjectType( + serialized_name="secondaryCircuit", + ) + cls._build_schema_circuit_read(properties.secondary_circuit) + properties.vcenter_certificate_thumbprint = AAZStrType( + serialized_name="vcenterCertificateThumbprint", + flags={"read_only": True}, + ) + properties.vcenter_password = AAZStrType( + serialized_name="vcenterPassword", + flags={"secret": True}, + ) + properties.vmotion_network = AAZStrType( + serialized_name="vmotionNetwork", + flags={"read_only": True}, + ) + + availability = _schema_private_cloud_read.properties.availability + availability.secondary_zone = AAZIntType( + serialized_name="secondaryZone", + ) + availability.strategy = AAZStrType() + availability.zone = AAZIntType() + + encryption = _schema_private_cloud_read.properties.encryption + encryption.key_vault_properties = AAZObjectType( + serialized_name="keyVaultProperties", + ) + encryption.status = AAZStrType() + + key_vault_properties = _schema_private_cloud_read.properties.encryption.key_vault_properties + key_vault_properties.auto_detected_key_version = AAZStrType( + serialized_name="autoDetectedKeyVersion", + flags={"read_only": True}, + ) + key_vault_properties.key_name = AAZStrType( + serialized_name="keyName", + ) + key_vault_properties.key_state = AAZStrType( + serialized_name="keyState", + flags={"read_only": True}, + ) + key_vault_properties.key_vault_url = AAZStrType( + serialized_name="keyVaultUrl", + ) + key_vault_properties.key_version = AAZStrType( + serialized_name="keyVersion", + ) + key_vault_properties.version_type = AAZStrType( + serialized_name="versionType", + flags={"read_only": True}, + ) + + endpoints = _schema_private_cloud_read.properties.endpoints + endpoints.hcx_cloud_manager = AAZStrType( + serialized_name="hcxCloudManager", + flags={"read_only": True}, + ) + endpoints.nsxt_manager = AAZStrType( + serialized_name="nsxtManager", + flags={"read_only": True}, + ) + endpoints.vcsa = AAZStrType( + flags={"read_only": True}, + ) + + external_cloud_links = _schema_private_cloud_read.properties.external_cloud_links + external_cloud_links.Element = AAZStrType() + + identity_sources = _schema_private_cloud_read.properties.identity_sources + identity_sources.Element = AAZObjectType() + + _element = _schema_private_cloud_read.properties.identity_sources.Element + _element.alias = AAZStrType( + flags={"required": True}, + ) + _element.base_group_dn = AAZStrType( + serialized_name="baseGroupDN", + flags={"required": True}, + ) + _element.base_user_dn = AAZStrType( + serialized_name="baseUserDN", + flags={"required": True}, + ) + _element.domain = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"required": True}, + ) + _element.password = AAZStrType( + flags={"secret": True}, + ) + _element.primary_server = AAZStrType( + serialized_name="primaryServer", + flags={"required": True}, + ) + _element.secondary_server = AAZStrType( + serialized_name="secondaryServer", + ) + _element.ssl = AAZStrType() + _element.username = AAZStrType( + flags={"secret": True}, + ) + + management_cluster = _schema_private_cloud_read.properties.management_cluster + management_cluster.cluster_id = AAZIntType( + serialized_name="clusterId", + flags={"read_only": True}, + ) + management_cluster.cluster_size = AAZIntType( + serialized_name="clusterSize", + flags={"required": True}, + ) + management_cluster.hosts = AAZListType() + management_cluster.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + hosts = _schema_private_cloud_read.properties.management_cluster.hosts + hosts.Element = AAZStrType() + + sku = _schema_private_cloud_read.sku + sku.name = AAZStrType( + flags={"required": True}, + ) + + tags = _schema_private_cloud_read.tags + tags.Element = AAZStrType() + + _schema.id = cls._schema_private_cloud_read.id + _schema.identity = cls._schema_private_cloud_read.identity + _schema.location = cls._schema_private_cloud_read.location + _schema.name = cls._schema_private_cloud_read.name + _schema.properties = cls._schema_private_cloud_read.properties + _schema.sku = cls._schema_private_cloud_read.sku + _schema.tags = cls._schema_private_cloud_read.tags + _schema.type = cls._schema_private_cloud_read.type + + +__all__ = ["List"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/identity_source/_show.py b/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/identity_source/_show.py new file mode 100644 index 00000000000..006b55b27d9 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/identity_source/_show.py @@ -0,0 +1,462 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware private-cloud identity-source show", +) +class Show(AAZCommand): + """Show a vCenter Single Sign On Identity Source of a private cloud. + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}", "2022-05-01", "properties.identitySources[]"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self.SubresourceSelector(ctx=self.ctx, name="subresource") + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="The name of the identity source", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.PrivateCloudsGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.selectors.subresource.required(), client_flatten=True) + return result + + class SubresourceSelector(AAZJsonSelector): + + def _get(self): + result = self.ctx.vars.instance + result = result.properties.identitySources + filters = enumerate(result) + filters = filter( + lambda e: e[1].name == self.ctx.args.name, + filters + ) + idx = next(filters)[0] + return result[idx] + + def _set(self, value): + result = self.ctx.vars.instance + result = result.properties.identitySources + filters = enumerate(result) + filters = filter( + lambda e: e[1].name == self.ctx.args.name, + filters + ) + idx = next(filters, [len(result)])[0] + result[idx] = value + return + + class PrivateCloudsGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _ShowHelper._build_schema_private_cloud_read(cls._schema_on_200) + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + _schema_circuit_read = None + + @classmethod + def _build_schema_circuit_read(cls, _schema): + if cls._schema_circuit_read is not None: + _schema.express_route_id = cls._schema_circuit_read.express_route_id + _schema.express_route_private_peering_id = cls._schema_circuit_read.express_route_private_peering_id + _schema.primary_subnet = cls._schema_circuit_read.primary_subnet + _schema.secondary_subnet = cls._schema_circuit_read.secondary_subnet + return + + cls._schema_circuit_read = _schema_circuit_read = AAZObjectType() + + circuit_read = _schema_circuit_read + circuit_read.express_route_id = AAZStrType( + serialized_name="expressRouteID", + flags={"read_only": True}, + ) + circuit_read.express_route_private_peering_id = AAZStrType( + serialized_name="expressRoutePrivatePeeringID", + flags={"read_only": True}, + ) + circuit_read.primary_subnet = AAZStrType( + serialized_name="primarySubnet", + flags={"read_only": True}, + ) + circuit_read.secondary_subnet = AAZStrType( + serialized_name="secondarySubnet", + flags={"read_only": True}, + ) + + _schema.express_route_id = cls._schema_circuit_read.express_route_id + _schema.express_route_private_peering_id = cls._schema_circuit_read.express_route_private_peering_id + _schema.primary_subnet = cls._schema_circuit_read.primary_subnet + _schema.secondary_subnet = cls._schema_circuit_read.secondary_subnet + + _schema_private_cloud_read = None + + @classmethod + def _build_schema_private_cloud_read(cls, _schema): + if cls._schema_private_cloud_read is not None: + _schema.id = cls._schema_private_cloud_read.id + _schema.identity = cls._schema_private_cloud_read.identity + _schema.location = cls._schema_private_cloud_read.location + _schema.name = cls._schema_private_cloud_read.name + _schema.properties = cls._schema_private_cloud_read.properties + _schema.sku = cls._schema_private_cloud_read.sku + _schema.tags = cls._schema_private_cloud_read.tags + _schema.type = cls._schema_private_cloud_read.type + return + + cls._schema_private_cloud_read = _schema_private_cloud_read = AAZObjectType() + + private_cloud_read = _schema_private_cloud_read + private_cloud_read.id = AAZStrType( + flags={"read_only": True}, + ) + private_cloud_read.identity = AAZObjectType() + private_cloud_read.location = AAZStrType( + flags={"required": True}, + ) + private_cloud_read.name = AAZStrType( + flags={"read_only": True}, + ) + private_cloud_read.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + private_cloud_read.sku = AAZObjectType( + flags={"required": True}, + ) + private_cloud_read.tags = AAZDictType() + private_cloud_read.type = AAZStrType( + flags={"read_only": True}, + ) + + identity = _schema_private_cloud_read.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType() + + properties = _schema_private_cloud_read.properties + properties.availability = AAZObjectType() + properties.circuit = AAZObjectType() + cls._build_schema_circuit_read(properties.circuit) + properties.encryption = AAZObjectType() + properties.endpoints = AAZObjectType() + properties.external_cloud_links = AAZListType( + serialized_name="externalCloudLinks", + flags={"read_only": True}, + ) + properties.identity_sources = AAZListType( + serialized_name="identitySources", + ) + properties.internet = AAZStrType() + properties.management_cluster = AAZObjectType( + serialized_name="managementCluster", + flags={"required": True}, + ) + properties.management_network = AAZStrType( + serialized_name="managementNetwork", + flags={"read_only": True}, + ) + properties.network_block = AAZStrType( + serialized_name="networkBlock", + flags={"required": True}, + ) + properties.nsx_public_ip_quota_raised = AAZStrType( + serialized_name="nsxPublicIpQuotaRaised", + flags={"read_only": True}, + ) + properties.nsxt_certificate_thumbprint = AAZStrType( + serialized_name="nsxtCertificateThumbprint", + flags={"read_only": True}, + ) + properties.nsxt_password = AAZStrType( + serialized_name="nsxtPassword", + flags={"secret": True}, + ) + properties.provisioning_network = AAZStrType( + serialized_name="provisioningNetwork", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.secondary_circuit = AAZObjectType( + serialized_name="secondaryCircuit", + ) + cls._build_schema_circuit_read(properties.secondary_circuit) + properties.vcenter_certificate_thumbprint = AAZStrType( + serialized_name="vcenterCertificateThumbprint", + flags={"read_only": True}, + ) + properties.vcenter_password = AAZStrType( + serialized_name="vcenterPassword", + flags={"secret": True}, + ) + properties.vmotion_network = AAZStrType( + serialized_name="vmotionNetwork", + flags={"read_only": True}, + ) + + availability = _schema_private_cloud_read.properties.availability + availability.secondary_zone = AAZIntType( + serialized_name="secondaryZone", + ) + availability.strategy = AAZStrType() + availability.zone = AAZIntType() + + encryption = _schema_private_cloud_read.properties.encryption + encryption.key_vault_properties = AAZObjectType( + serialized_name="keyVaultProperties", + ) + encryption.status = AAZStrType() + + key_vault_properties = _schema_private_cloud_read.properties.encryption.key_vault_properties + key_vault_properties.auto_detected_key_version = AAZStrType( + serialized_name="autoDetectedKeyVersion", + flags={"read_only": True}, + ) + key_vault_properties.key_name = AAZStrType( + serialized_name="keyName", + ) + key_vault_properties.key_state = AAZStrType( + serialized_name="keyState", + flags={"read_only": True}, + ) + key_vault_properties.key_vault_url = AAZStrType( + serialized_name="keyVaultUrl", + ) + key_vault_properties.key_version = AAZStrType( + serialized_name="keyVersion", + ) + key_vault_properties.version_type = AAZStrType( + serialized_name="versionType", + flags={"read_only": True}, + ) + + endpoints = _schema_private_cloud_read.properties.endpoints + endpoints.hcx_cloud_manager = AAZStrType( + serialized_name="hcxCloudManager", + flags={"read_only": True}, + ) + endpoints.nsxt_manager = AAZStrType( + serialized_name="nsxtManager", + flags={"read_only": True}, + ) + endpoints.vcsa = AAZStrType( + flags={"read_only": True}, + ) + + external_cloud_links = _schema_private_cloud_read.properties.external_cloud_links + external_cloud_links.Element = AAZStrType() + + identity_sources = _schema_private_cloud_read.properties.identity_sources + identity_sources.Element = AAZObjectType() + + _element = _schema_private_cloud_read.properties.identity_sources.Element + _element.alias = AAZStrType( + flags={"required": True}, + ) + _element.base_group_dn = AAZStrType( + serialized_name="baseGroupDN", + flags={"required": True}, + ) + _element.base_user_dn = AAZStrType( + serialized_name="baseUserDN", + flags={"required": True}, + ) + _element.domain = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"required": True}, + ) + _element.password = AAZStrType( + flags={"secret": True}, + ) + _element.primary_server = AAZStrType( + serialized_name="primaryServer", + flags={"required": True}, + ) + _element.secondary_server = AAZStrType( + serialized_name="secondaryServer", + ) + _element.ssl = AAZStrType() + _element.username = AAZStrType( + flags={"secret": True}, + ) + + management_cluster = _schema_private_cloud_read.properties.management_cluster + management_cluster.cluster_id = AAZIntType( + serialized_name="clusterId", + flags={"read_only": True}, + ) + management_cluster.cluster_size = AAZIntType( + serialized_name="clusterSize", + flags={"required": True}, + ) + management_cluster.hosts = AAZListType() + management_cluster.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + hosts = _schema_private_cloud_read.properties.management_cluster.hosts + hosts.Element = AAZStrType() + + sku = _schema_private_cloud_read.sku + sku.name = AAZStrType( + flags={"required": True}, + ) + + tags = _schema_private_cloud_read.tags + tags.Element = AAZStrType() + + _schema.id = cls._schema_private_cloud_read.id + _schema.identity = cls._schema_private_cloud_read.identity + _schema.location = cls._schema_private_cloud_read.location + _schema.name = cls._schema_private_cloud_read.name + _schema.properties = cls._schema_private_cloud_read.properties + _schema.sku = cls._schema_private_cloud_read.sku + _schema.tags = cls._schema_private_cloud_read.tags + _schema.type = cls._schema_private_cloud_read.type + + +__all__ = ["Show"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/identity_source/_update.py b/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/identity_source/_update.py new file mode 100644 index 00000000000..c55d47af0a7 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/identity_source/_update.py @@ -0,0 +1,673 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware private-cloud identity-source update", +) +class Update(AAZCommand): + """Update a vCenter Single Sign On Identity Source of a private cloud. + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}", "2022-05-01", "properties.identitySources[]"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + AZ_SUPPORT_GENERIC_UPDATE = True + + def _handler(self, command_args): + super()._handler(command_args) + self.SubresourceSelector(ctx=self.ctx, name="subresource") + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="The name of the identity source", + required=True, + ) + + # define Arg Group "PrivateCloud.properties.identitySources[]" + + _args_schema = cls._args_schema + _args_schema.alias = AAZStrArg( + options=["--alias"], + arg_group="PrivateCloud.properties.identitySources[]", + help="The domain's NetBIOS name", + ) + _args_schema.base_group_dn = AAZStrArg( + options=["--base-group-dn"], + arg_group="PrivateCloud.properties.identitySources[]", + help="The base distinguished name for groups", + ) + _args_schema.base_user_dn = AAZStrArg( + options=["--base-user-dn"], + arg_group="PrivateCloud.properties.identitySources[]", + help="The base distinguished name for users", + ) + _args_schema.domain = AAZStrArg( + options=["--domain"], + arg_group="PrivateCloud.properties.identitySources[]", + help="The domain's dns name", + ) + _args_schema.password = AAZStrArg( + options=["--password"], + arg_group="PrivateCloud.properties.identitySources[]", + help="The password of the Active Directory user with a minimum of read-only access to Base DN for users and groups.", + ) + _args_schema.primary_server = AAZStrArg( + options=["--primary-server"], + arg_group="PrivateCloud.properties.identitySources[]", + help="Primary server URL", + ) + _args_schema.secondary_server = AAZStrArg( + options=["--secondary-server"], + arg_group="PrivateCloud.properties.identitySources[]", + help="Secondary server URL", + nullable=True, + ) + _args_schema.ssl = AAZStrArg( + options=["--ssl"], + arg_group="PrivateCloud.properties.identitySources[]", + help="Protect LDAP communication using SSL certificate (LDAPS)", + nullable=True, + enum={"Disabled": "Disabled", "Enabled": "Enabled"}, + ) + _args_schema.username = AAZStrArg( + options=["--username"], + arg_group="PrivateCloud.properties.identitySources[]", + help="The ID of an Active Directory user with a minimum of read-only access to Base DN for users and group", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.PrivateCloudsGet(ctx=self.ctx)() + self.pre_instance_update(self.ctx.selectors.subresource.required()) + self.InstanceUpdateByJson(ctx=self.ctx)() + self.InstanceUpdateByGeneric(ctx=self.ctx)() + self.post_instance_update(self.ctx.selectors.subresource.required()) + yield self.PrivateCloudsCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + @register_callback + def pre_instance_update(self, instance): + pass + + @register_callback + def post_instance_update(self, instance): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.selectors.subresource.required(), client_flatten=True) + return result + + class SubresourceSelector(AAZJsonSelector): + + def _get(self): + result = self.ctx.vars.instance + result = result.properties.identitySources + filters = enumerate(result) + filters = filter( + lambda e: e[1].name == self.ctx.args.name, + filters + ) + idx = next(filters)[0] + return result[idx] + + def _set(self, value): + result = self.ctx.vars.instance + result = result.properties.identitySources + filters = enumerate(result) + filters = filter( + lambda e: e[1].name == self.ctx.args.name, + filters + ) + idx = next(filters, [len(result)])[0] + result[idx] = value + return + + class PrivateCloudsGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _UpdateHelper._build_schema_private_cloud_read(cls._schema_on_200) + + return cls._schema_on_200 + + class PrivateCloudsCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + value=self.ctx.vars.instance, + ) + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + _UpdateHelper._build_schema_private_cloud_read(cls._schema_on_200_201) + + return cls._schema_on_200_201 + + class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance(self.ctx.selectors.subresource.required()) + + def _update_instance(self, instance): + _instance_value, _builder = self.new_content_builder( + self.ctx.args, + value=instance, + typ=AAZObjectType + ) + _builder.set_prop("alias", AAZStrType, ".alias", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("baseGroupDN", AAZStrType, ".base_group_dn", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("baseUserDN", AAZStrType, ".base_user_dn", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("domain", AAZStrType, ".domain", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("name", AAZStrType, ".name", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("password", AAZStrType, ".password", typ_kwargs={"flags": {"secret": True}}) + _builder.set_prop("primaryServer", AAZStrType, ".primary_server", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("secondaryServer", AAZStrType, ".secondary_server") + _builder.set_prop("ssl", AAZStrType, ".ssl") + _builder.set_prop("username", AAZStrType, ".username", typ_kwargs={"flags": {"secret": True}}) + + return _instance_value + + class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance_by_generic( + self.ctx.selectors.subresource.required(), + self.ctx.generic_update_args + ) + + +class _UpdateHelper: + """Helper class for Update""" + + _schema_circuit_read = None + + @classmethod + def _build_schema_circuit_read(cls, _schema): + if cls._schema_circuit_read is not None: + _schema.express_route_id = cls._schema_circuit_read.express_route_id + _schema.express_route_private_peering_id = cls._schema_circuit_read.express_route_private_peering_id + _schema.primary_subnet = cls._schema_circuit_read.primary_subnet + _schema.secondary_subnet = cls._schema_circuit_read.secondary_subnet + return + + cls._schema_circuit_read = _schema_circuit_read = AAZObjectType() + + circuit_read = _schema_circuit_read + circuit_read.express_route_id = AAZStrType( + serialized_name="expressRouteID", + flags={"read_only": True}, + ) + circuit_read.express_route_private_peering_id = AAZStrType( + serialized_name="expressRoutePrivatePeeringID", + flags={"read_only": True}, + ) + circuit_read.primary_subnet = AAZStrType( + serialized_name="primarySubnet", + flags={"read_only": True}, + ) + circuit_read.secondary_subnet = AAZStrType( + serialized_name="secondarySubnet", + flags={"read_only": True}, + ) + + _schema.express_route_id = cls._schema_circuit_read.express_route_id + _schema.express_route_private_peering_id = cls._schema_circuit_read.express_route_private_peering_id + _schema.primary_subnet = cls._schema_circuit_read.primary_subnet + _schema.secondary_subnet = cls._schema_circuit_read.secondary_subnet + + _schema_private_cloud_read = None + + @classmethod + def _build_schema_private_cloud_read(cls, _schema): + if cls._schema_private_cloud_read is not None: + _schema.id = cls._schema_private_cloud_read.id + _schema.identity = cls._schema_private_cloud_read.identity + _schema.location = cls._schema_private_cloud_read.location + _schema.name = cls._schema_private_cloud_read.name + _schema.properties = cls._schema_private_cloud_read.properties + _schema.sku = cls._schema_private_cloud_read.sku + _schema.tags = cls._schema_private_cloud_read.tags + _schema.type = cls._schema_private_cloud_read.type + return + + cls._schema_private_cloud_read = _schema_private_cloud_read = AAZObjectType() + + private_cloud_read = _schema_private_cloud_read + private_cloud_read.id = AAZStrType( + flags={"read_only": True}, + ) + private_cloud_read.identity = AAZObjectType() + private_cloud_read.location = AAZStrType( + flags={"required": True}, + ) + private_cloud_read.name = AAZStrType( + flags={"read_only": True}, + ) + private_cloud_read.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + private_cloud_read.sku = AAZObjectType( + flags={"required": True}, + ) + private_cloud_read.tags = AAZDictType() + private_cloud_read.type = AAZStrType( + flags={"read_only": True}, + ) + + identity = _schema_private_cloud_read.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType() + + properties = _schema_private_cloud_read.properties + properties.availability = AAZObjectType() + properties.circuit = AAZObjectType() + cls._build_schema_circuit_read(properties.circuit) + properties.encryption = AAZObjectType() + properties.endpoints = AAZObjectType() + properties.external_cloud_links = AAZListType( + serialized_name="externalCloudLinks", + flags={"read_only": True}, + ) + properties.identity_sources = AAZListType( + serialized_name="identitySources", + ) + properties.internet = AAZStrType() + properties.management_cluster = AAZObjectType( + serialized_name="managementCluster", + flags={"required": True}, + ) + properties.management_network = AAZStrType( + serialized_name="managementNetwork", + flags={"read_only": True}, + ) + properties.network_block = AAZStrType( + serialized_name="networkBlock", + flags={"required": True}, + ) + properties.nsx_public_ip_quota_raised = AAZStrType( + serialized_name="nsxPublicIpQuotaRaised", + flags={"read_only": True}, + ) + properties.nsxt_certificate_thumbprint = AAZStrType( + serialized_name="nsxtCertificateThumbprint", + flags={"read_only": True}, + ) + properties.nsxt_password = AAZStrType( + serialized_name="nsxtPassword", + flags={"secret": True}, + ) + properties.provisioning_network = AAZStrType( + serialized_name="provisioningNetwork", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.secondary_circuit = AAZObjectType( + serialized_name="secondaryCircuit", + ) + cls._build_schema_circuit_read(properties.secondary_circuit) + properties.vcenter_certificate_thumbprint = AAZStrType( + serialized_name="vcenterCertificateThumbprint", + flags={"read_only": True}, + ) + properties.vcenter_password = AAZStrType( + serialized_name="vcenterPassword", + flags={"secret": True}, + ) + properties.vmotion_network = AAZStrType( + serialized_name="vmotionNetwork", + flags={"read_only": True}, + ) + + availability = _schema_private_cloud_read.properties.availability + availability.secondary_zone = AAZIntType( + serialized_name="secondaryZone", + ) + availability.strategy = AAZStrType() + availability.zone = AAZIntType() + + encryption = _schema_private_cloud_read.properties.encryption + encryption.key_vault_properties = AAZObjectType( + serialized_name="keyVaultProperties", + ) + encryption.status = AAZStrType() + + key_vault_properties = _schema_private_cloud_read.properties.encryption.key_vault_properties + key_vault_properties.auto_detected_key_version = AAZStrType( + serialized_name="autoDetectedKeyVersion", + flags={"read_only": True}, + ) + key_vault_properties.key_name = AAZStrType( + serialized_name="keyName", + ) + key_vault_properties.key_state = AAZStrType( + serialized_name="keyState", + flags={"read_only": True}, + ) + key_vault_properties.key_vault_url = AAZStrType( + serialized_name="keyVaultUrl", + ) + key_vault_properties.key_version = AAZStrType( + serialized_name="keyVersion", + ) + key_vault_properties.version_type = AAZStrType( + serialized_name="versionType", + flags={"read_only": True}, + ) + + endpoints = _schema_private_cloud_read.properties.endpoints + endpoints.hcx_cloud_manager = AAZStrType( + serialized_name="hcxCloudManager", + flags={"read_only": True}, + ) + endpoints.nsxt_manager = AAZStrType( + serialized_name="nsxtManager", + flags={"read_only": True}, + ) + endpoints.vcsa = AAZStrType( + flags={"read_only": True}, + ) + + external_cloud_links = _schema_private_cloud_read.properties.external_cloud_links + external_cloud_links.Element = AAZStrType() + + identity_sources = _schema_private_cloud_read.properties.identity_sources + identity_sources.Element = AAZObjectType() + + _element = _schema_private_cloud_read.properties.identity_sources.Element + _element.alias = AAZStrType( + flags={"required": True}, + ) + _element.base_group_dn = AAZStrType( + serialized_name="baseGroupDN", + flags={"required": True}, + ) + _element.base_user_dn = AAZStrType( + serialized_name="baseUserDN", + flags={"required": True}, + ) + _element.domain = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"required": True}, + ) + _element.password = AAZStrType( + flags={"secret": True}, + ) + _element.primary_server = AAZStrType( + serialized_name="primaryServer", + flags={"required": True}, + ) + _element.secondary_server = AAZStrType( + serialized_name="secondaryServer", + ) + _element.ssl = AAZStrType() + _element.username = AAZStrType( + flags={"secret": True}, + ) + + management_cluster = _schema_private_cloud_read.properties.management_cluster + management_cluster.cluster_id = AAZIntType( + serialized_name="clusterId", + flags={"read_only": True}, + ) + management_cluster.cluster_size = AAZIntType( + serialized_name="clusterSize", + flags={"required": True}, + ) + management_cluster.hosts = AAZListType() + management_cluster.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + hosts = _schema_private_cloud_read.properties.management_cluster.hosts + hosts.Element = AAZStrType() + + sku = _schema_private_cloud_read.sku + sku.name = AAZStrType( + flags={"required": True}, + ) + + tags = _schema_private_cloud_read.tags + tags.Element = AAZStrType() + + _schema.id = cls._schema_private_cloud_read.id + _schema.identity = cls._schema_private_cloud_read.identity + _schema.location = cls._schema_private_cloud_read.location + _schema.name = cls._schema_private_cloud_read.name + _schema.properties = cls._schema_private_cloud_read.properties + _schema.sku = cls._schema_private_cloud_read.sku + _schema.tags = cls._schema_private_cloud_read.tags + _schema.type = cls._schema_private_cloud_read.type + + +__all__ = ["Update"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/identity_source/_wait.py b/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/identity_source/_wait.py new file mode 100644 index 00000000000..061f61866ea --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/private_cloud/identity_source/_wait.py @@ -0,0 +1,431 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware private-cloud identity-source wait", +) +class Wait(AAZWaitCommand): + """Place the CLI in a waiting state until a condition is met. + """ + + _aaz_info = { + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}", "2022-05-01", "properties.identitySources[]"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.PrivateCloudsGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False) + return result + + class PrivateCloudsGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _WaitHelper._build_schema_private_cloud_read(cls._schema_on_200) + + return cls._schema_on_200 + + +class _WaitHelper: + """Helper class for Wait""" + + _schema_circuit_read = None + + @classmethod + def _build_schema_circuit_read(cls, _schema): + if cls._schema_circuit_read is not None: + _schema.express_route_id = cls._schema_circuit_read.express_route_id + _schema.express_route_private_peering_id = cls._schema_circuit_read.express_route_private_peering_id + _schema.primary_subnet = cls._schema_circuit_read.primary_subnet + _schema.secondary_subnet = cls._schema_circuit_read.secondary_subnet + return + + cls._schema_circuit_read = _schema_circuit_read = AAZObjectType() + + circuit_read = _schema_circuit_read + circuit_read.express_route_id = AAZStrType( + serialized_name="expressRouteID", + flags={"read_only": True}, + ) + circuit_read.express_route_private_peering_id = AAZStrType( + serialized_name="expressRoutePrivatePeeringID", + flags={"read_only": True}, + ) + circuit_read.primary_subnet = AAZStrType( + serialized_name="primarySubnet", + flags={"read_only": True}, + ) + circuit_read.secondary_subnet = AAZStrType( + serialized_name="secondarySubnet", + flags={"read_only": True}, + ) + + _schema.express_route_id = cls._schema_circuit_read.express_route_id + _schema.express_route_private_peering_id = cls._schema_circuit_read.express_route_private_peering_id + _schema.primary_subnet = cls._schema_circuit_read.primary_subnet + _schema.secondary_subnet = cls._schema_circuit_read.secondary_subnet + + _schema_private_cloud_read = None + + @classmethod + def _build_schema_private_cloud_read(cls, _schema): + if cls._schema_private_cloud_read is not None: + _schema.id = cls._schema_private_cloud_read.id + _schema.identity = cls._schema_private_cloud_read.identity + _schema.location = cls._schema_private_cloud_read.location + _schema.name = cls._schema_private_cloud_read.name + _schema.properties = cls._schema_private_cloud_read.properties + _schema.sku = cls._schema_private_cloud_read.sku + _schema.tags = cls._schema_private_cloud_read.tags + _schema.type = cls._schema_private_cloud_read.type + return + + cls._schema_private_cloud_read = _schema_private_cloud_read = AAZObjectType() + + private_cloud_read = _schema_private_cloud_read + private_cloud_read.id = AAZStrType( + flags={"read_only": True}, + ) + private_cloud_read.identity = AAZObjectType() + private_cloud_read.location = AAZStrType( + flags={"required": True}, + ) + private_cloud_read.name = AAZStrType( + flags={"read_only": True}, + ) + private_cloud_read.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + private_cloud_read.sku = AAZObjectType( + flags={"required": True}, + ) + private_cloud_read.tags = AAZDictType() + private_cloud_read.type = AAZStrType( + flags={"read_only": True}, + ) + + identity = _schema_private_cloud_read.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType() + + properties = _schema_private_cloud_read.properties + properties.availability = AAZObjectType() + properties.circuit = AAZObjectType() + cls._build_schema_circuit_read(properties.circuit) + properties.encryption = AAZObjectType() + properties.endpoints = AAZObjectType() + properties.external_cloud_links = AAZListType( + serialized_name="externalCloudLinks", + flags={"read_only": True}, + ) + properties.identity_sources = AAZListType( + serialized_name="identitySources", + ) + properties.internet = AAZStrType() + properties.management_cluster = AAZObjectType( + serialized_name="managementCluster", + flags={"required": True}, + ) + properties.management_network = AAZStrType( + serialized_name="managementNetwork", + flags={"read_only": True}, + ) + properties.network_block = AAZStrType( + serialized_name="networkBlock", + flags={"required": True}, + ) + properties.nsx_public_ip_quota_raised = AAZStrType( + serialized_name="nsxPublicIpQuotaRaised", + flags={"read_only": True}, + ) + properties.nsxt_certificate_thumbprint = AAZStrType( + serialized_name="nsxtCertificateThumbprint", + flags={"read_only": True}, + ) + properties.nsxt_password = AAZStrType( + serialized_name="nsxtPassword", + flags={"secret": True}, + ) + properties.provisioning_network = AAZStrType( + serialized_name="provisioningNetwork", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.secondary_circuit = AAZObjectType( + serialized_name="secondaryCircuit", + ) + cls._build_schema_circuit_read(properties.secondary_circuit) + properties.vcenter_certificate_thumbprint = AAZStrType( + serialized_name="vcenterCertificateThumbprint", + flags={"read_only": True}, + ) + properties.vcenter_password = AAZStrType( + serialized_name="vcenterPassword", + flags={"secret": True}, + ) + properties.vmotion_network = AAZStrType( + serialized_name="vmotionNetwork", + flags={"read_only": True}, + ) + + availability = _schema_private_cloud_read.properties.availability + availability.secondary_zone = AAZIntType( + serialized_name="secondaryZone", + ) + availability.strategy = AAZStrType() + availability.zone = AAZIntType() + + encryption = _schema_private_cloud_read.properties.encryption + encryption.key_vault_properties = AAZObjectType( + serialized_name="keyVaultProperties", + ) + encryption.status = AAZStrType() + + key_vault_properties = _schema_private_cloud_read.properties.encryption.key_vault_properties + key_vault_properties.auto_detected_key_version = AAZStrType( + serialized_name="autoDetectedKeyVersion", + flags={"read_only": True}, + ) + key_vault_properties.key_name = AAZStrType( + serialized_name="keyName", + ) + key_vault_properties.key_state = AAZStrType( + serialized_name="keyState", + flags={"read_only": True}, + ) + key_vault_properties.key_vault_url = AAZStrType( + serialized_name="keyVaultUrl", + ) + key_vault_properties.key_version = AAZStrType( + serialized_name="keyVersion", + ) + key_vault_properties.version_type = AAZStrType( + serialized_name="versionType", + flags={"read_only": True}, + ) + + endpoints = _schema_private_cloud_read.properties.endpoints + endpoints.hcx_cloud_manager = AAZStrType( + serialized_name="hcxCloudManager", + flags={"read_only": True}, + ) + endpoints.nsxt_manager = AAZStrType( + serialized_name="nsxtManager", + flags={"read_only": True}, + ) + endpoints.vcsa = AAZStrType( + flags={"read_only": True}, + ) + + external_cloud_links = _schema_private_cloud_read.properties.external_cloud_links + external_cloud_links.Element = AAZStrType() + + identity_sources = _schema_private_cloud_read.properties.identity_sources + identity_sources.Element = AAZObjectType() + + _element = _schema_private_cloud_read.properties.identity_sources.Element + _element.alias = AAZStrType( + flags={"required": True}, + ) + _element.base_group_dn = AAZStrType( + serialized_name="baseGroupDN", + flags={"required": True}, + ) + _element.base_user_dn = AAZStrType( + serialized_name="baseUserDN", + flags={"required": True}, + ) + _element.domain = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"required": True}, + ) + _element.password = AAZStrType( + flags={"secret": True}, + ) + _element.primary_server = AAZStrType( + serialized_name="primaryServer", + flags={"required": True}, + ) + _element.secondary_server = AAZStrType( + serialized_name="secondaryServer", + ) + _element.ssl = AAZStrType() + _element.username = AAZStrType( + flags={"secret": True}, + ) + + management_cluster = _schema_private_cloud_read.properties.management_cluster + management_cluster.cluster_id = AAZIntType( + serialized_name="clusterId", + flags={"read_only": True}, + ) + management_cluster.cluster_size = AAZIntType( + serialized_name="clusterSize", + flags={"required": True}, + ) + management_cluster.hosts = AAZListType() + management_cluster.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + hosts = _schema_private_cloud_read.properties.management_cluster.hosts + hosts.Element = AAZStrType() + + sku = _schema_private_cloud_read.sku + sku.name = AAZStrType( + flags={"required": True}, + ) + + tags = _schema_private_cloud_read.tags + tags.Element = AAZStrType() + + _schema.id = cls._schema_private_cloud_read.id + _schema.identity = cls._schema_private_cloud_read.identity + _schema.location = cls._schema_private_cloud_read.location + _schema.name = cls._schema_private_cloud_read.name + _schema.properties = cls._schema_private_cloud_read.properties + _schema.sku = cls._schema_private_cloud_read.sku + _schema.tags = cls._schema_private_cloud_read.tags + _schema.type = cls._schema_private_cloud_read.type + + +__all__ = ["Wait"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/script_cmdlet/__cmd_group.py b/src/vmware/azext_vmware/aaz/latest/vmware/script_cmdlet/__cmd_group.py new file mode 100644 index 00000000000..6bda0e040f0 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/script_cmdlet/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "vmware script-cmdlet", +) +class __CMDGroup(AAZCommandGroup): + """Commands to list and show script cmdlet resources. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/_version.py b/src/vmware/azext_vmware/aaz/latest/vmware/script_cmdlet/__init__.py similarity index 58% rename from src/vmware/azext_vmware/vendored_sdks/avs_client/_version.py rename to src/vmware/azext_vmware/aaz/latest/vmware/script_cmdlet/__init__.py index e5754a47ce6..2df85698253 100644 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/_version.py +++ b/src/vmware/azext_vmware/aaz/latest/vmware/script_cmdlet/__init__.py @@ -1,9 +1,13 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- +# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- -VERSION = "1.0.0b1" +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._list import * +from ._show import * diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/script_cmdlet/_list.py b/src/vmware/azext_vmware/aaz/latest/vmware/script_cmdlet/_list.py new file mode 100644 index 00000000000..32331313145 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/script_cmdlet/_list.py @@ -0,0 +1,227 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware script-cmdlet list", +) +class List(AAZCommand): + """List script cmdlet resources available for a private cloud to create a script execution resource on a private cloud + + :example: List script cmdlet resources. + az vmware script-cmdlet list --resource-group group1 --private-cloud cloud1 --script-package package1 + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/scriptpackages/{}/scriptcmdlets", "2022-05-01"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.script_package = AAZStrArg( + options=["-p", "--script-package"], + help="Name of the script package in the private cloud", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ScriptCmdletsList(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class ScriptCmdletsList(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}/scriptCmdlets", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "scriptPackageName", self.ctx.args.script_package, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + flags={"read_only": True}, + ) + _schema_on_200.value = AAZListType( + flags={"read_only": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.description = AAZStrType( + flags={"read_only": True}, + ) + properties.parameters = AAZListType( + flags={"read_only": True}, + ) + properties.timeout = AAZStrType( + flags={"read_only": True}, + ) + + parameters = cls._schema_on_200.value.Element.properties.parameters + parameters.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.properties.parameters.Element + _element.description = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType() + _element.optional = AAZStrType( + flags={"read_only": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + _element.visibility = AAZStrType( + flags={"read_only": True}, + ) + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/script_cmdlet/_show.py b/src/vmware/azext_vmware/aaz/latest/vmware/script_cmdlet/_show.py new file mode 100644 index 00000000000..8b14900afcb --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/script_cmdlet/_show.py @@ -0,0 +1,225 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware script-cmdlet show", +) +class Show(AAZCommand): + """Get information about a script cmdlet resource in a specific package on a private cloud + + :example: Show a script cmdlet. + az vmware script-cmdlet show --resource-group group1 --private-cloud cloud1 --script-package package1 --name cmdlet1 + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/scriptpackages/{}/scriptcmdlets/{}", "2022-05-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.script_cmdlet_name = AAZStrArg( + options=["-n", "--name", "--script-cmdlet-name"], + help="Name of the script cmdlet resource in the script package in the private cloud", + required=True, + id_part="child_name_2", + ) + _args_schema.script_package = AAZStrArg( + options=["-p", "--script-package"], + help="Name of the script package in the private cloud", + required=True, + id_part="child_name_1", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ScriptCmdletsGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class ScriptCmdletsGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}/scriptCmdlets/{scriptCmdletName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "scriptCmdletName", self.ctx.args.script_cmdlet_name, + required=True, + ), + **self.serialize_url_param( + "scriptPackageName", self.ctx.args.script_package, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.description = AAZStrType( + flags={"read_only": True}, + ) + properties.parameters = AAZListType( + flags={"read_only": True}, + ) + properties.timeout = AAZStrType( + flags={"read_only": True}, + ) + + parameters = cls._schema_on_200.properties.parameters + parameters.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.parameters.Element + _element.description = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType() + _element.optional = AAZStrType( + flags={"read_only": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + _element.visibility = AAZStrType( + flags={"read_only": True}, + ) + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/script_execution/__cmd_group.py b/src/vmware/azext_vmware/aaz/latest/vmware/script_execution/__cmd_group.py new file mode 100644 index 00000000000..b6a500fc840 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/script_execution/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "vmware script-execution", +) +class __CMDGroup(AAZCommandGroup): + """Commands to manage script executions in a private cloud. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/script_execution/__init__.py b/src/vmware/azext_vmware/aaz/latest/vmware/script_execution/__init__.py new file mode 100644 index 00000000000..2d1a2078686 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/script_execution/__init__.py @@ -0,0 +1,16 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._create import * +from ._delete import * +from ._list import * +from ._show import * +from ._wait import * diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/script_execution/_create.py b/src/vmware/azext_vmware/aaz/latest/vmware/script_execution/_create.py new file mode 100644 index 00000000000..5e47ea7f400 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/script_execution/_create.py @@ -0,0 +1,523 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +class Create(AAZCommand): + """Create a script execution in a private cloud + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/scriptexecutions/{}", "2022-05-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.script_execution_name = AAZStrArg( + options=["-n", "--name", "--script-execution-name"], + help="Name of the user-invoked script execution resource", + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.failure_reason = AAZStrArg( + options=["--failure-reason"], + arg_group="Properties", + help="Error message if the script was able to run, but if the script itself had errors or powershell threw an exception", + ) + _args_schema.hidden_parameters = AAZListArg( + options=["--hidden-parameters"], + singular_options=["--hidden-parameter"], + arg_group="Properties", + help="Parameters that will be hidden/not visible to ARM, such as passwords and credentials", + ) + _args_schema.named_outputs = AAZFreeFormDictArg( + options=["--named-outputs"], + arg_group="Properties", + help="User-defined dictionary.", + ) + _args_schema.output = AAZListArg( + options=["--out", "--output"], + arg_group="Properties", + help="Standard output stream from the powershell execution", + ) + _args_schema.parameters = AAZListArg( + options=["--parameters"], + singular_options=["-p", "--parameter"], + arg_group="Properties", + help="Parameters the script will accept", + ) + _args_schema.retention = AAZStrArg( + options=["--retention"], + arg_group="Properties", + help="Time to live for the resource. If not provided, will be available for 60 days", + ) + _args_schema.script_cmdlet_id = AAZStrArg( + options=["--script-cmdlet-id"], + arg_group="Properties", + help="A reference to the script cmdlet resource if user is running a AVS script", + ) + _args_schema.timeout = AAZStrArg( + options=["--timeout"], + arg_group="Properties", + help="Time limit for execution", + required=True, + ) + + hidden_parameters = cls._args_schema.hidden_parameters + hidden_parameters.Element = AAZObjectArg() + cls._build_args_script_execution_parameter_create(hidden_parameters.Element) + + output = cls._args_schema.output + output.Element = AAZStrArg() + + parameters = cls._args_schema.parameters + parameters.Element = AAZObjectArg() + cls._build_args_script_execution_parameter_create(parameters.Element) + return cls._args_schema + + _args_script_execution_parameter_create = None + + @classmethod + def _build_args_script_execution_parameter_create(cls, _schema): + if cls._args_script_execution_parameter_create is not None: + _schema.credential = cls._args_script_execution_parameter_create.credential + _schema.name = cls._args_script_execution_parameter_create.name + _schema.secure_value = cls._args_script_execution_parameter_create.secure_value + _schema.value = cls._args_script_execution_parameter_create.value + return + + cls._args_script_execution_parameter_create = AAZObjectArg() + + script_execution_parameter_create = cls._args_script_execution_parameter_create + script_execution_parameter_create.credential = AAZObjectArg( + options=["credential"], + ) + script_execution_parameter_create.secure_value = AAZObjectArg( + options=["secure-value"], + ) + script_execution_parameter_create.value = AAZObjectArg( + options=["value"], + ) + script_execution_parameter_create.name = AAZStrArg( + options=["name"], + help="The parameter name", + required=True, + ) + + credential = cls._args_script_execution_parameter_create.credential + credential.password = AAZStrArg( + options=["password"], + help="password for login", + ) + credential.username = AAZStrArg( + options=["username"], + help="username for login", + ) + + secure_value = cls._args_script_execution_parameter_create.secure_value + secure_value.secure_value = AAZStrArg( + options=["secure-value"], + help="A secure value for the passed parameter, not to be stored in logs", + ) + + value = cls._args_script_execution_parameter_create.value + value.value = AAZStrArg( + options=["value"], + help="The value for the passed parameter", + ) + + _schema.credential = cls._args_script_execution_parameter_create.credential + _schema.name = cls._args_script_execution_parameter_create.name + _schema.secure_value = cls._args_script_execution_parameter_create.secure_value + _schema.value = cls._args_script_execution_parameter_create.value + + def _execute_operations(self): + self.pre_operations() + yield self.ScriptExecutionsCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class ScriptExecutionsCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "scriptExecutionName", self.ctx.args.script_execution_name, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}}) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("failureReason", AAZStrType, ".failure_reason") + properties.set_prop("hiddenParameters", AAZListType, ".hidden_parameters") + properties.set_prop("namedOutputs", AAZFreeFormDictType, ".named_outputs") + properties.set_prop("output", AAZListType, ".output") + properties.set_prop("parameters", AAZListType, ".parameters") + properties.set_prop("retention", AAZStrType, ".retention") + properties.set_prop("scriptCmdletId", AAZStrType, ".script_cmdlet_id") + properties.set_prop("timeout", AAZStrType, ".timeout", typ_kwargs={"flags": {"required": True}}) + + hidden_parameters = _builder.get(".properties.hiddenParameters") + if hidden_parameters is not None: + _CreateHelper._build_schema_script_execution_parameter_create(hidden_parameters.set_elements(AAZObjectType, ".")) + + named_outputs = _builder.get(".properties.namedOutputs") + if named_outputs is not None: + named_outputs.set_anytype_elements(".") + + output = _builder.get(".properties.output") + if output is not None: + output.set_elements(AAZStrType, ".") + + parameters = _builder.get(".properties.parameters") + if parameters is not None: + _CreateHelper._build_schema_script_execution_parameter_create(parameters.set_elements(AAZObjectType, ".")) + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200_201.properties + properties.errors = AAZListType( + flags={"read_only": True}, + ) + properties.failure_reason = AAZStrType( + serialized_name="failureReason", + ) + properties.finished_at = AAZStrType( + serialized_name="finishedAt", + flags={"read_only": True}, + ) + properties.hidden_parameters = AAZListType( + serialized_name="hiddenParameters", + ) + properties.information = AAZListType( + flags={"read_only": True}, + ) + properties.named_outputs = AAZFreeFormDictType( + serialized_name="namedOutputs", + ) + properties.output = AAZListType() + properties.parameters = AAZListType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.retention = AAZStrType() + properties.script_cmdlet_id = AAZStrType( + serialized_name="scriptCmdletId", + ) + properties.started_at = AAZStrType( + serialized_name="startedAt", + flags={"read_only": True}, + ) + properties.submitted_at = AAZStrType( + serialized_name="submittedAt", + flags={"read_only": True}, + ) + properties.timeout = AAZStrType( + flags={"required": True}, + ) + properties.warnings = AAZListType( + flags={"read_only": True}, + ) + + errors = cls._schema_on_200_201.properties.errors + errors.Element = AAZStrType() + + hidden_parameters = cls._schema_on_200_201.properties.hidden_parameters + hidden_parameters.Element = AAZObjectType() + _CreateHelper._build_schema_script_execution_parameter_read(hidden_parameters.Element) + + information = cls._schema_on_200_201.properties.information + information.Element = AAZStrType() + + output = cls._schema_on_200_201.properties.output + output.Element = AAZStrType() + + parameters = cls._schema_on_200_201.properties.parameters + parameters.Element = AAZObjectType() + _CreateHelper._build_schema_script_execution_parameter_read(parameters.Element) + + warnings = cls._schema_on_200_201.properties.warnings + warnings.Element = AAZStrType() + + return cls._schema_on_200_201 + + +class _CreateHelper: + """Helper class for Create""" + + @classmethod + def _build_schema_script_execution_parameter_create(cls, _builder): + if _builder is None: + return + _builder.set_prop("name", AAZStrType, ".name", typ_kwargs={"flags": {"required": True}}) + _builder.set_const("type", "Credential", AAZStrType, ".credential", typ_kwargs={"flags": {"required": True}}) + _builder.set_const("type", "SecureValue", AAZStrType, ".secure_value", typ_kwargs={"flags": {"required": True}}) + _builder.set_const("type", "Value", AAZStrType, ".value", typ_kwargs={"flags": {"required": True}}) + _builder.discriminate_by("type", "Credential") + _builder.discriminate_by("type", "SecureValue") + _builder.discriminate_by("type", "Value") + + disc_credential = _builder.get("{type:Credential}") + if disc_credential is not None: + disc_credential.set_prop("password", AAZStrType, ".credential.password") + disc_credential.set_prop("username", AAZStrType, ".credential.username") + + disc_secure_value = _builder.get("{type:SecureValue}") + if disc_secure_value is not None: + disc_secure_value.set_prop("secureValue", AAZStrType, ".secure_value.secure_value", typ_kwargs={"flags": {"secret": True}}) + + disc_value = _builder.get("{type:Value}") + if disc_value is not None: + disc_value.set_prop("value", AAZStrType, ".value.value") + + _schema_script_execution_parameter_read = None + + @classmethod + def _build_schema_script_execution_parameter_read(cls, _schema): + if cls._schema_script_execution_parameter_read is not None: + _schema.name = cls._schema_script_execution_parameter_read.name + _schema.type = cls._schema_script_execution_parameter_read.type + _schema.discriminate_by( + "type", + "Credential", + cls._schema_script_execution_parameter_read.discriminate_by( + "type", + "Credential", + ) + ) + _schema.discriminate_by( + "type", + "SecureValue", + cls._schema_script_execution_parameter_read.discriminate_by( + "type", + "SecureValue", + ) + ) + _schema.discriminate_by( + "type", + "Value", + cls._schema_script_execution_parameter_read.discriminate_by( + "type", + "Value", + ) + ) + return + + cls._schema_script_execution_parameter_read = _schema_script_execution_parameter_read = AAZObjectType() + + script_execution_parameter_read = _schema_script_execution_parameter_read + script_execution_parameter_read.name = AAZStrType( + flags={"required": True}, + ) + script_execution_parameter_read.type = AAZStrType( + flags={"required": True}, + ) + + disc_credential = _schema_script_execution_parameter_read.discriminate_by("type", "Credential") + disc_credential.password = AAZStrType() + disc_credential.username = AAZStrType() + + disc_secure_value = _schema_script_execution_parameter_read.discriminate_by("type", "SecureValue") + disc_secure_value.secure_value = AAZStrType( + serialized_name="secureValue", + flags={"secret": True}, + ) + + disc_value = _schema_script_execution_parameter_read.discriminate_by("type", "Value") + disc_value.value = AAZStrType() + + _schema.name = cls._schema_script_execution_parameter_read.name + _schema.type = cls._schema_script_execution_parameter_read.type + _schema.discriminate_by( + "type", + "Credential", + cls._schema_script_execution_parameter_read.discriminate_by( + "type", + "Credential", + ) + ) + _schema.discriminate_by( + "type", + "SecureValue", + cls._schema_script_execution_parameter_read.discriminate_by( + "type", + "SecureValue", + ) + ) + _schema.discriminate_by( + "type", + "Value", + cls._schema_script_execution_parameter_read.discriminate_by( + "type", + "Value", + ) + ) + + +__all__ = ["Create"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/script_execution/_delete.py b/src/vmware/azext_vmware/aaz/latest/vmware/script_execution/_delete.py new file mode 100644 index 00000000000..c8ffb961f29 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/script_execution/_delete.py @@ -0,0 +1,173 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware script-execution delete", + confirmation="This will delete the script execution. Are you sure?", +) +class Delete(AAZCommand): + """Delete a ScriptExecution in a private cloud + + :example: Delete a script execution. + az vmware script-execution delete --resource-group group1 --private-cloud cloud1 --name addSsoServer + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/scriptexecutions/{}", "2022-05-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, None) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.script_execution_name = AAZStrArg( + options=["-n", "--name", "--script-execution-name"], + help="Name of the user-invoked script execution resource", + required=True, + id_part="child_name_1", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.ScriptExecutionsDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class ScriptExecutionsDelete(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [204]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_204, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "scriptExecutionName", self.ctx.args.script_execution_name, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/script_execution/_list.py b/src/vmware/azext_vmware/aaz/latest/vmware/script_execution/_list.py new file mode 100644 index 00000000000..f78004167f8 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/script_execution/_list.py @@ -0,0 +1,337 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware script-execution list", +) +class List(AAZCommand): + """List script executions in a private cloud + + :example: List script executions. + az vmware script-execution list --resource-group group1 --private-cloud cloud1 + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/scriptexecutions", "2022-05-01"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ScriptExecutionsList(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class ScriptExecutionsList(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + flags={"read_only": True}, + ) + _schema_on_200.value = AAZListType( + flags={"read_only": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.errors = AAZListType( + flags={"read_only": True}, + ) + properties.failure_reason = AAZStrType( + serialized_name="failureReason", + ) + properties.finished_at = AAZStrType( + serialized_name="finishedAt", + flags={"read_only": True}, + ) + properties.hidden_parameters = AAZListType( + serialized_name="hiddenParameters", + ) + properties.information = AAZListType( + flags={"read_only": True}, + ) + properties.named_outputs = AAZFreeFormDictType( + serialized_name="namedOutputs", + ) + properties.output = AAZListType() + properties.parameters = AAZListType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.retention = AAZStrType() + properties.script_cmdlet_id = AAZStrType( + serialized_name="scriptCmdletId", + ) + properties.started_at = AAZStrType( + serialized_name="startedAt", + flags={"read_only": True}, + ) + properties.submitted_at = AAZStrType( + serialized_name="submittedAt", + flags={"read_only": True}, + ) + properties.timeout = AAZStrType( + flags={"required": True}, + ) + properties.warnings = AAZListType( + flags={"read_only": True}, + ) + + errors = cls._schema_on_200.value.Element.properties.errors + errors.Element = AAZStrType() + + hidden_parameters = cls._schema_on_200.value.Element.properties.hidden_parameters + hidden_parameters.Element = AAZObjectType() + _ListHelper._build_schema_script_execution_parameter_read(hidden_parameters.Element) + + information = cls._schema_on_200.value.Element.properties.information + information.Element = AAZStrType() + + output = cls._schema_on_200.value.Element.properties.output + output.Element = AAZStrType() + + parameters = cls._schema_on_200.value.Element.properties.parameters + parameters.Element = AAZObjectType() + _ListHelper._build_schema_script_execution_parameter_read(parameters.Element) + + warnings = cls._schema_on_200.value.Element.properties.warnings + warnings.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + _schema_script_execution_parameter_read = None + + @classmethod + def _build_schema_script_execution_parameter_read(cls, _schema): + if cls._schema_script_execution_parameter_read is not None: + _schema.name = cls._schema_script_execution_parameter_read.name + _schema.type = cls._schema_script_execution_parameter_read.type + _schema.discriminate_by( + "type", + "Credential", + cls._schema_script_execution_parameter_read.discriminate_by( + "type", + "Credential", + ) + ) + _schema.discriminate_by( + "type", + "SecureValue", + cls._schema_script_execution_parameter_read.discriminate_by( + "type", + "SecureValue", + ) + ) + _schema.discriminate_by( + "type", + "Value", + cls._schema_script_execution_parameter_read.discriminate_by( + "type", + "Value", + ) + ) + return + + cls._schema_script_execution_parameter_read = _schema_script_execution_parameter_read = AAZObjectType() + + script_execution_parameter_read = _schema_script_execution_parameter_read + script_execution_parameter_read.name = AAZStrType( + flags={"required": True}, + ) + script_execution_parameter_read.type = AAZStrType( + flags={"required": True}, + ) + + disc_credential = _schema_script_execution_parameter_read.discriminate_by("type", "Credential") + disc_credential.password = AAZStrType() + disc_credential.username = AAZStrType() + + disc_secure_value = _schema_script_execution_parameter_read.discriminate_by("type", "SecureValue") + disc_secure_value.secure_value = AAZStrType( + serialized_name="secureValue", + flags={"secret": True}, + ) + + disc_value = _schema_script_execution_parameter_read.discriminate_by("type", "Value") + disc_value.value = AAZStrType() + + _schema.name = cls._schema_script_execution_parameter_read.name + _schema.type = cls._schema_script_execution_parameter_read.type + _schema.discriminate_by( + "type", + "Credential", + cls._schema_script_execution_parameter_read.discriminate_by( + "type", + "Credential", + ) + ) + _schema.discriminate_by( + "type", + "SecureValue", + cls._schema_script_execution_parameter_read.discriminate_by( + "type", + "SecureValue", + ) + ) + _schema.discriminate_by( + "type", + "Value", + cls._schema_script_execution_parameter_read.discriminate_by( + "type", + "Value", + ) + ) + + +__all__ = ["List"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/script_execution/_show.py b/src/vmware/azext_vmware/aaz/latest/vmware/script_execution/_show.py new file mode 100644 index 00000000000..e315d7b4978 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/script_execution/_show.py @@ -0,0 +1,334 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware script-execution show", +) +class Show(AAZCommand): + """Get an script execution by name in a private cloud + + :example: Show a script execution. + az vmware script-execution show --resource-group group1 --private-cloud cloud1 --name addSsoServer + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/scriptexecutions/{}", "2022-05-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.script_execution_name = AAZStrArg( + options=["-n", "--name", "--script-execution-name"], + help="Name of the user-invoked script execution resource", + required=True, + id_part="child_name_1", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ScriptExecutionsGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class ScriptExecutionsGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "scriptExecutionName", self.ctx.args.script_execution_name, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.errors = AAZListType( + flags={"read_only": True}, + ) + properties.failure_reason = AAZStrType( + serialized_name="failureReason", + ) + properties.finished_at = AAZStrType( + serialized_name="finishedAt", + flags={"read_only": True}, + ) + properties.hidden_parameters = AAZListType( + serialized_name="hiddenParameters", + ) + properties.information = AAZListType( + flags={"read_only": True}, + ) + properties.named_outputs = AAZFreeFormDictType( + serialized_name="namedOutputs", + ) + properties.output = AAZListType() + properties.parameters = AAZListType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.retention = AAZStrType() + properties.script_cmdlet_id = AAZStrType( + serialized_name="scriptCmdletId", + ) + properties.started_at = AAZStrType( + serialized_name="startedAt", + flags={"read_only": True}, + ) + properties.submitted_at = AAZStrType( + serialized_name="submittedAt", + flags={"read_only": True}, + ) + properties.timeout = AAZStrType( + flags={"required": True}, + ) + properties.warnings = AAZListType( + flags={"read_only": True}, + ) + + errors = cls._schema_on_200.properties.errors + errors.Element = AAZStrType() + + hidden_parameters = cls._schema_on_200.properties.hidden_parameters + hidden_parameters.Element = AAZObjectType() + _ShowHelper._build_schema_script_execution_parameter_read(hidden_parameters.Element) + + information = cls._schema_on_200.properties.information + information.Element = AAZStrType() + + output = cls._schema_on_200.properties.output + output.Element = AAZStrType() + + parameters = cls._schema_on_200.properties.parameters + parameters.Element = AAZObjectType() + _ShowHelper._build_schema_script_execution_parameter_read(parameters.Element) + + warnings = cls._schema_on_200.properties.warnings + warnings.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + _schema_script_execution_parameter_read = None + + @classmethod + def _build_schema_script_execution_parameter_read(cls, _schema): + if cls._schema_script_execution_parameter_read is not None: + _schema.name = cls._schema_script_execution_parameter_read.name + _schema.type = cls._schema_script_execution_parameter_read.type + _schema.discriminate_by( + "type", + "Credential", + cls._schema_script_execution_parameter_read.discriminate_by( + "type", + "Credential", + ) + ) + _schema.discriminate_by( + "type", + "SecureValue", + cls._schema_script_execution_parameter_read.discriminate_by( + "type", + "SecureValue", + ) + ) + _schema.discriminate_by( + "type", + "Value", + cls._schema_script_execution_parameter_read.discriminate_by( + "type", + "Value", + ) + ) + return + + cls._schema_script_execution_parameter_read = _schema_script_execution_parameter_read = AAZObjectType() + + script_execution_parameter_read = _schema_script_execution_parameter_read + script_execution_parameter_read.name = AAZStrType( + flags={"required": True}, + ) + script_execution_parameter_read.type = AAZStrType( + flags={"required": True}, + ) + + disc_credential = _schema_script_execution_parameter_read.discriminate_by("type", "Credential") + disc_credential.password = AAZStrType() + disc_credential.username = AAZStrType() + + disc_secure_value = _schema_script_execution_parameter_read.discriminate_by("type", "SecureValue") + disc_secure_value.secure_value = AAZStrType( + serialized_name="secureValue", + flags={"secret": True}, + ) + + disc_value = _schema_script_execution_parameter_read.discriminate_by("type", "Value") + disc_value.value = AAZStrType() + + _schema.name = cls._schema_script_execution_parameter_read.name + _schema.type = cls._schema_script_execution_parameter_read.type + _schema.discriminate_by( + "type", + "Credential", + cls._schema_script_execution_parameter_read.discriminate_by( + "type", + "Credential", + ) + ) + _schema.discriminate_by( + "type", + "SecureValue", + cls._schema_script_execution_parameter_read.discriminate_by( + "type", + "SecureValue", + ) + ) + _schema.discriminate_by( + "type", + "Value", + cls._schema_script_execution_parameter_read.discriminate_by( + "type", + "Value", + ) + ) + + +__all__ = ["Show"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/script_execution/_wait.py b/src/vmware/azext_vmware/aaz/latest/vmware/script_execution/_wait.py new file mode 100644 index 00000000000..a05ac250753 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/script_execution/_wait.py @@ -0,0 +1,330 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware script-execution wait", +) +class Wait(AAZWaitCommand): + """Place the CLI in a waiting state until a condition is met. + """ + + _aaz_info = { + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/scriptexecutions/{}", "2022-05-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.script_execution_name = AAZStrArg( + options=["-n", "--name", "--script-execution-name"], + help="Name of the user-invoked script execution resource", + required=True, + id_part="child_name_1", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ScriptExecutionsGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False) + return result + + class ScriptExecutionsGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "scriptExecutionName", self.ctx.args.script_execution_name, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.errors = AAZListType( + flags={"read_only": True}, + ) + properties.failure_reason = AAZStrType( + serialized_name="failureReason", + ) + properties.finished_at = AAZStrType( + serialized_name="finishedAt", + flags={"read_only": True}, + ) + properties.hidden_parameters = AAZListType( + serialized_name="hiddenParameters", + ) + properties.information = AAZListType( + flags={"read_only": True}, + ) + properties.named_outputs = AAZFreeFormDictType( + serialized_name="namedOutputs", + ) + properties.output = AAZListType() + properties.parameters = AAZListType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.retention = AAZStrType() + properties.script_cmdlet_id = AAZStrType( + serialized_name="scriptCmdletId", + ) + properties.started_at = AAZStrType( + serialized_name="startedAt", + flags={"read_only": True}, + ) + properties.submitted_at = AAZStrType( + serialized_name="submittedAt", + flags={"read_only": True}, + ) + properties.timeout = AAZStrType( + flags={"required": True}, + ) + properties.warnings = AAZListType( + flags={"read_only": True}, + ) + + errors = cls._schema_on_200.properties.errors + errors.Element = AAZStrType() + + hidden_parameters = cls._schema_on_200.properties.hidden_parameters + hidden_parameters.Element = AAZObjectType() + _WaitHelper._build_schema_script_execution_parameter_read(hidden_parameters.Element) + + information = cls._schema_on_200.properties.information + information.Element = AAZStrType() + + output = cls._schema_on_200.properties.output + output.Element = AAZStrType() + + parameters = cls._schema_on_200.properties.parameters + parameters.Element = AAZObjectType() + _WaitHelper._build_schema_script_execution_parameter_read(parameters.Element) + + warnings = cls._schema_on_200.properties.warnings + warnings.Element = AAZStrType() + + return cls._schema_on_200 + + +class _WaitHelper: + """Helper class for Wait""" + + _schema_script_execution_parameter_read = None + + @classmethod + def _build_schema_script_execution_parameter_read(cls, _schema): + if cls._schema_script_execution_parameter_read is not None: + _schema.name = cls._schema_script_execution_parameter_read.name + _schema.type = cls._schema_script_execution_parameter_read.type + _schema.discriminate_by( + "type", + "Credential", + cls._schema_script_execution_parameter_read.discriminate_by( + "type", + "Credential", + ) + ) + _schema.discriminate_by( + "type", + "SecureValue", + cls._schema_script_execution_parameter_read.discriminate_by( + "type", + "SecureValue", + ) + ) + _schema.discriminate_by( + "type", + "Value", + cls._schema_script_execution_parameter_read.discriminate_by( + "type", + "Value", + ) + ) + return + + cls._schema_script_execution_parameter_read = _schema_script_execution_parameter_read = AAZObjectType() + + script_execution_parameter_read = _schema_script_execution_parameter_read + script_execution_parameter_read.name = AAZStrType( + flags={"required": True}, + ) + script_execution_parameter_read.type = AAZStrType( + flags={"required": True}, + ) + + disc_credential = _schema_script_execution_parameter_read.discriminate_by("type", "Credential") + disc_credential.password = AAZStrType() + disc_credential.username = AAZStrType() + + disc_secure_value = _schema_script_execution_parameter_read.discriminate_by("type", "SecureValue") + disc_secure_value.secure_value = AAZStrType( + serialized_name="secureValue", + flags={"secret": True}, + ) + + disc_value = _schema_script_execution_parameter_read.discriminate_by("type", "Value") + disc_value.value = AAZStrType() + + _schema.name = cls._schema_script_execution_parameter_read.name + _schema.type = cls._schema_script_execution_parameter_read.type + _schema.discriminate_by( + "type", + "Credential", + cls._schema_script_execution_parameter_read.discriminate_by( + "type", + "Credential", + ) + ) + _schema.discriminate_by( + "type", + "SecureValue", + cls._schema_script_execution_parameter_read.discriminate_by( + "type", + "SecureValue", + ) + ) + _schema.discriminate_by( + "type", + "Value", + cls._schema_script_execution_parameter_read.discriminate_by( + "type", + "Value", + ) + ) + + +__all__ = ["Wait"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/script_package/__cmd_group.py b/src/vmware/azext_vmware/aaz/latest/vmware/script_package/__cmd_group.py new file mode 100644 index 00000000000..223de4a31c0 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/script_package/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "vmware script-package", +) +class __CMDGroup(AAZCommandGroup): + """Commands to list and show script packages available to run on the private cloud. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/script_package/__init__.py b/src/vmware/azext_vmware/aaz/latest/vmware/script_package/__init__.py new file mode 100644 index 00000000000..2df85698253 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/script_package/__init__.py @@ -0,0 +1,13 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._list import * +from ._show import * diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/script_package/_list.py b/src/vmware/azext_vmware/aaz/latest/vmware/script_package/_list.py new file mode 100644 index 00000000000..67be5bc66fa --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/script_package/_list.py @@ -0,0 +1,203 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware script-package list", +) +class List(AAZCommand): + """List script packages available to run on the private cloud + + :example: List script packages. + az vmware script-package list --resource-group group1 --private-cloud cloud1 + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/scriptpackages", "2022-05-01"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ScriptPackagesList(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class ScriptPackagesList(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + flags={"read_only": True}, + ) + _schema_on_200.value = AAZListType( + flags={"read_only": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.company = AAZStrType( + flags={"read_only": True}, + ) + properties.description = AAZStrType( + flags={"read_only": True}, + ) + properties.uri = AAZStrType( + flags={"read_only": True}, + ) + properties.version = AAZStrType( + flags={"read_only": True}, + ) + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/script_package/_show.py b/src/vmware/azext_vmware/aaz/latest/vmware/script_package/_show.py new file mode 100644 index 00000000000..516cbe1853d --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/script_package/_show.py @@ -0,0 +1,200 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware script-package show", +) +class Show(AAZCommand): + """Get a script package available to run on a private cloud + + :example: Show a script package. + az vmware script-package show --resource-group group1 --private-cloud cloud1 --name package1 + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/scriptpackages/{}", "2022-05-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.script_package_name = AAZStrArg( + options=["-n", "--name", "--script-package-name"], + help="Name of the script package in the private cloud", + required=True, + id_part="child_name_1", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ScriptPackagesGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class ScriptPackagesGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "scriptPackageName", self.ctx.args.script_package_name, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.company = AAZStrType( + flags={"read_only": True}, + ) + properties.description = AAZStrType( + flags={"read_only": True}, + ) + properties.uri = AAZStrType( + flags={"read_only": True}, + ) + properties.version = AAZStrType( + flags={"read_only": True}, + ) + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/vm/__cmd_group.py b/src/vmware/azext_vmware/aaz/latest/vmware/vm/__cmd_group.py new file mode 100644 index 00000000000..e1fc962279f --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/vm/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "vmware vm", +) +class __CMDGroup(AAZCommandGroup): + """Commands to manage Virtual Machines. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/vm/__init__.py b/src/vmware/azext_vmware/aaz/latest/vmware/vm/__init__.py new file mode 100644 index 00000000000..f04b8cfd8e6 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/vm/__init__.py @@ -0,0 +1,14 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._list import * +from ._restrict_movement import * +from ._show import * diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/vm/_list.py b/src/vmware/azext_vmware/aaz/latest/vmware/vm/_list.py new file mode 100644 index 00000000000..42ca76e0b43 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/vm/_list.py @@ -0,0 +1,215 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware vm list", +) +class List(AAZCommand): + """List of virtual machines in a private cloud cluster + + :example: List of virtual machines. + az vmware vm list --resource-group group1 --private-cloud cloud1 --cluster-name cluster1 + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/clusters/{}/virtualmachines", "2022-05-01"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.cluster_name = AAZStrArg( + options=["--cluster-name"], + help="Name of the cluster in the private cloud", + required=True, + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.VirtualMachinesList(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class VirtualMachinesList(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "clusterName", self.ctx.args.cluster_name, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + flags={"read_only": True}, + ) + _schema_on_200.value = AAZListType( + flags={"read_only": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.display_name = AAZStrType( + serialized_name="displayName", + flags={"read_only": True}, + ) + properties.folder_path = AAZStrType( + serialized_name="folderPath", + flags={"read_only": True}, + ) + properties.mo_ref_id = AAZStrType( + serialized_name="moRefId", + flags={"read_only": True}, + ) + properties.restrict_movement = AAZStrType( + serialized_name="restrictMovement", + ) + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/vm/_restrict_movement.py b/src/vmware/azext_vmware/aaz/latest/vmware/vm/_restrict_movement.py new file mode 100644 index 00000000000..a4aa6de3d74 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/vm/_restrict_movement.py @@ -0,0 +1,188 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware vm restrict-movement", +) +class RestrictMovement(AAZCommand): + """Enable or disable DRS-driven VM movement restriction + + :example: Enable or disable DRS-driven VM movement restriction. + az vmware vm restrict-movement --resource-group group1 --private-cloud cloud1 --cluster-name cluster1 --virtual-machine vm-209 --restrict-movement Enabled + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/clusters/{}/virtualmachines/{}/restrictmovement", "2022-05-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, None) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.cluster_name = AAZStrArg( + options=["--cluster-name"], + help="Name of the cluster in the private cloud", + required=True, + id_part="child_name_1", + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.virtual_machine = AAZStrArg( + options=["--virtual-machine"], + help="Virtual Machine identifier", + required=True, + id_part="child_name_2", + ) + + # define Arg Group "RestrictMovement" + + _args_schema = cls._args_schema + _args_schema.restrict_movement = AAZStrArg( + options=["--restrict-movement"], + arg_group="RestrictMovement", + help="Whether VM DRS-driven movement is restricted (enabled) or not (disabled)", + enum={"Disabled": "Disabled", "Enabled": "Enabled"}, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.VirtualMachinesRestrictMovement(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class VirtualMachinesRestrictMovement(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + None, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines/{virtualMachineId}/restrictMovement", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "clusterName", self.ctx.args.cluster_name, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "virtualMachineId", self.ctx.args.virtual_machine, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("restrictMovement", AAZStrType, ".restrict_movement") + + return self.serialize_content(_content_value) + + +class _RestrictMovementHelper: + """Helper class for RestrictMovement""" + + +__all__ = ["RestrictMovement"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/vm/_show.py b/src/vmware/azext_vmware/aaz/latest/vmware/vm/_show.py new file mode 100644 index 00000000000..3030fb5479d --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/vm/_show.py @@ -0,0 +1,213 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware vm show", +) +class Show(AAZCommand): + """Get a virtual machine by id in a private cloud cluster + + :example: Get a virtual machine by ID. + az vmware vm show --resource-group group1 --private-cloud cloud1 --cluster-name cluster1 --virtual-machine vm-209 + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/clusters/{}/virtualmachines/{}", "2022-05-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.cluster_name = AAZStrArg( + options=["--cluster-name"], + help="Name of the cluster in the private cloud", + required=True, + id_part="child_name_1", + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.virtual_machine = AAZStrArg( + options=["-n", "--name", "--virtual-machine"], + help="Virtual Machine identifier", + required=True, + id_part="child_name_2", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.VirtualMachinesGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class VirtualMachinesGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines/{virtualMachineId}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "clusterName", self.ctx.args.cluster_name, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "virtualMachineId", self.ctx.args.virtual_machine, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.display_name = AAZStrType( + serialized_name="displayName", + flags={"read_only": True}, + ) + properties.folder_path = AAZStrType( + serialized_name="folderPath", + flags={"read_only": True}, + ) + properties.mo_ref_id = AAZStrType( + serialized_name="moRefId", + flags={"read_only": True}, + ) + properties.restrict_movement = AAZStrType( + serialized_name="restrictMovement", + ) + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/__cmd_group.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/__cmd_group.py new file mode 100644 index 00000000000..e79995672e2 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "vmware workload-network", +) +class __CMDGroup(AAZCommandGroup): + """Commands to manage workload-networks in a private cloud. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/__init__.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/__init__.py new file mode 100644 index 00000000000..5a9d61963d6 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/__init__.py @@ -0,0 +1,11 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dhcp/__cmd_group.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dhcp/__cmd_group.py new file mode 100644 index 00000000000..25488d98439 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dhcp/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "vmware workload-network dhcp", +) +class __CMDGroup(AAZCommandGroup): + """Commands to manage a DHCP (Data Host Configuration Protocol) workload network. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dhcp/__init__.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dhcp/__init__.py new file mode 100644 index 00000000000..c401f439385 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dhcp/__init__.py @@ -0,0 +1,16 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._create import * +from ._delete import * +from ._list import * +from ._show import * +from ._update import * diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dhcp/_create.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dhcp/_create.py new file mode 100644 index 00000000000..98d408955eb --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dhcp/_create.py @@ -0,0 +1,306 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +class Create(AAZCommand): + """Create dhcp by id in a private cloud workload network. + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/workloadnetworks/default/dhcpconfigurations/{}", "2022-05-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.dhcp = AAZStrArg( + options=["-n", "--dhcp", "--name"], + help="NSX DHCP identifier. Generally the same as the DHCP display name", + required=True, + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.relay = AAZObjectArg( + options=["--relay"], + arg_group="Properties", + ) + _args_schema.server = AAZObjectArg( + options=["--server"], + arg_group="Properties", + ) + _args_schema.display_name = AAZStrArg( + options=["--display-name"], + arg_group="Properties", + help="Display name of the DHCP entity.", + ) + _args_schema.revision = AAZIntArg( + options=["--revision"], + arg_group="Properties", + help="NSX revision number.", + ) + + relay = cls._args_schema.relay + relay.server_addresses = AAZListArg( + options=["server-addresses"], + help="DHCP Relay Addresses. Max 3.", + ) + + server_addresses = cls._args_schema.relay.server_addresses + server_addresses.Element = AAZStrArg() + + server = cls._args_schema.server + server.lease_time = AAZIntArg( + options=["lease-time"], + help="DHCP Server Lease Time.", + ) + server.server_address = AAZStrArg( + options=["server-address"], + help="DHCP Server Address.", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.WorkloadNetworksCreateDhcp(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class WorkloadNetworksCreateDhcp(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "dhcpId", self.ctx.args.dhcp, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("properties", AAZObjectType) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_const("dhcpType", "RELAY", AAZStrType, ".relay", typ_kwargs={"flags": {"required": True}}) + properties.set_const("dhcpType", "SERVER", AAZStrType, ".server", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("displayName", AAZStrType, ".display_name") + properties.set_prop("revision", AAZIntType, ".revision") + properties.discriminate_by("dhcpType", "RELAY") + properties.discriminate_by("dhcpType", "SERVER") + + disc_relay = _builder.get(".properties{dhcpType:RELAY}") + if disc_relay is not None: + disc_relay.set_prop("serverAddresses", AAZListType, ".relay.server_addresses") + + server_addresses = _builder.get(".properties{dhcpType:RELAY}.serverAddresses") + if server_addresses is not None: + server_addresses.set_elements(AAZStrType, ".") + + disc_server = _builder.get(".properties{dhcpType:SERVER}") + if disc_server is not None: + disc_server.set_prop("leaseTime", AAZIntType, ".server.lease_time") + disc_server.set_prop("serverAddress", AAZStrType, ".server.server_address") + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType() + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200_201.properties + properties.dhcp_type = AAZStrType( + serialized_name="dhcpType", + flags={"required": True}, + ) + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.revision = AAZIntType() + properties.segments = AAZListType( + flags={"read_only": True}, + ) + + segments = cls._schema_on_200_201.properties.segments + segments.Element = AAZStrType() + + disc_relay = cls._schema_on_200_201.properties.discriminate_by("dhcp_type", "RELAY") + disc_relay.server_addresses = AAZListType( + serialized_name="serverAddresses", + ) + + server_addresses = cls._schema_on_200_201.properties.discriminate_by("dhcp_type", "RELAY").server_addresses + server_addresses.Element = AAZStrType() + + disc_server = cls._schema_on_200_201.properties.discriminate_by("dhcp_type", "SERVER") + disc_server.lease_time = AAZIntType( + serialized_name="leaseTime", + ) + disc_server.server_address = AAZStrType( + serialized_name="serverAddress", + ) + + return cls._schema_on_200_201 + + +class _CreateHelper: + """Helper class for Create""" + + +__all__ = ["Create"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dhcp/_delete.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dhcp/_delete.py new file mode 100644 index 00000000000..ac3f20d4531 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dhcp/_delete.py @@ -0,0 +1,166 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +class Delete(AAZCommand): + """Delete dhcp by id in a private cloud workload network. + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/workloadnetworks/default/dhcpconfigurations/{}", "2022-05-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, None) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.dhcp = AAZStrArg( + options=["-n", "--dhcp", "--name"], + help="NSX DHCP identifier. Generally the same as the DHCP display name", + required=True, + id_part="child_name_2", + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.WorkloadNetworksDeleteDhcp(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class WorkloadNetworksDeleteDhcp(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [204]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_204, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "dhcpId", self.ctx.args.dhcp, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dhcp/_list.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dhcp/_list.py new file mode 100644 index 00000000000..82d939152b4 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dhcp/_list.py @@ -0,0 +1,223 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware workload-network dhcp list", +) +class List(AAZCommand): + """List dhcp in a private cloud workload network. + + :example: List DHCP in a workload network. + az vmware workload-network dhcp list --resource-group group1 --private-cloud cloud1 + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/workloadnetworks/default/dhcpconfigurations", "2022-05-01"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WorkloadNetworksListDhcp(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class WorkloadNetworksListDhcp(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + flags={"read_only": True}, + ) + _schema_on_200.value = AAZListType( + flags={"read_only": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.dhcp_type = AAZStrType( + serialized_name="dhcpType", + flags={"required": True}, + ) + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.revision = AAZIntType() + properties.segments = AAZListType( + flags={"read_only": True}, + ) + + segments = cls._schema_on_200.value.Element.properties.segments + segments.Element = AAZStrType() + + disc_relay = cls._schema_on_200.value.Element.properties.discriminate_by("dhcp_type", "RELAY") + disc_relay.server_addresses = AAZListType( + serialized_name="serverAddresses", + ) + + server_addresses = cls._schema_on_200.value.Element.properties.discriminate_by("dhcp_type", "RELAY").server_addresses + server_addresses.Element = AAZStrType() + + disc_server = cls._schema_on_200.value.Element.properties.discriminate_by("dhcp_type", "SERVER") + disc_server.lease_time = AAZIntType( + serialized_name="leaseTime", + ) + disc_server.server_address = AAZStrType( + serialized_name="serverAddress", + ) + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dhcp/_show.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dhcp/_show.py new file mode 100644 index 00000000000..c2162013ca9 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dhcp/_show.py @@ -0,0 +1,220 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware workload-network dhcp show", +) +class Show(AAZCommand): + """Get dhcp by id in a private cloud workload network. + + :example: Get DHCP by ID in a workload network. + az vmware workload-network dhcp show --resource-group group1 --private-cloud cloud1 --dhcp dhcp1 + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/workloadnetworks/default/dhcpconfigurations/{}", "2022-05-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.dhcp = AAZStrArg( + options=["-n", "--dhcp", "--name"], + help="NSX DHCP identifier. Generally the same as the DHCP display name", + required=True, + id_part="child_name_2", + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WorkloadNetworksGetDhcp(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class WorkloadNetworksGetDhcp(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "dhcpId", self.ctx.args.dhcp, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.dhcp_type = AAZStrType( + serialized_name="dhcpType", + flags={"required": True}, + ) + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.revision = AAZIntType() + properties.segments = AAZListType( + flags={"read_only": True}, + ) + + segments = cls._schema_on_200.properties.segments + segments.Element = AAZStrType() + + disc_relay = cls._schema_on_200.properties.discriminate_by("dhcp_type", "RELAY") + disc_relay.server_addresses = AAZListType( + serialized_name="serverAddresses", + ) + + server_addresses = cls._schema_on_200.properties.discriminate_by("dhcp_type", "RELAY").server_addresses + server_addresses.Element = AAZStrType() + + disc_server = cls._schema_on_200.properties.discriminate_by("dhcp_type", "SERVER") + disc_server.lease_time = AAZIntType( + serialized_name="leaseTime", + ) + disc_server.server_address = AAZStrType( + serialized_name="serverAddress", + ) + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dhcp/_update.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dhcp/_update.py new file mode 100644 index 00000000000..6da083e4645 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dhcp/_update.py @@ -0,0 +1,457 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +class Update(AAZCommand): + """Update dhcp by id in a private cloud workload network. + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/workloadnetworks/default/dhcpconfigurations/{}", "2022-05-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + AZ_SUPPORT_GENERIC_UPDATE = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.dhcp = AAZStrArg( + options=["-n", "--dhcp", "--name"], + help="NSX DHCP identifier. Generally the same as the DHCP display name", + required=True, + id_part="child_name_2", + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.relay = AAZObjectArg( + options=["--relay"], + arg_group="Properties", + ) + _args_schema.server = AAZObjectArg( + options=["--server"], + arg_group="Properties", + ) + _args_schema.display_name = AAZStrArg( + options=["--display-name"], + arg_group="Properties", + help="Display name of the DHCP entity.", + nullable=True, + ) + _args_schema.revision = AAZIntArg( + options=["--revision"], + arg_group="Properties", + help="NSX revision number.", + nullable=True, + ) + + relay = cls._args_schema.relay + relay.server_addresses = AAZListArg( + options=["server-addresses"], + help="DHCP Relay Addresses. Max 3.", + nullable=True, + ) + + server_addresses = cls._args_schema.relay.server_addresses + server_addresses.Element = AAZStrArg( + nullable=True, + ) + + server = cls._args_schema.server + server.lease_time = AAZIntArg( + options=["lease-time"], + help="DHCP Server Lease Time.", + nullable=True, + ) + server.server_address = AAZStrArg( + options=["server-address"], + help="DHCP Server Address.", + nullable=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WorkloadNetworksGetDhcp(ctx=self.ctx)() + self.pre_instance_update(self.ctx.vars.instance) + self.InstanceUpdateByJson(ctx=self.ctx)() + self.InstanceUpdateByGeneric(ctx=self.ctx)() + self.post_instance_update(self.ctx.vars.instance) + yield self.WorkloadNetworksCreateDhcp(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + @register_callback + def pre_instance_update(self, instance): + pass + + @register_callback + def post_instance_update(self, instance): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class WorkloadNetworksGetDhcp(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "dhcpId", self.ctx.args.dhcp, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _UpdateHelper._build_schema_workload_network_dhcp_read(cls._schema_on_200) + + return cls._schema_on_200 + + class WorkloadNetworksCreateDhcp(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "dhcpId", self.ctx.args.dhcp, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + value=self.ctx.vars.instance, + ) + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + _UpdateHelper._build_schema_workload_network_dhcp_read(cls._schema_on_200_201) + + return cls._schema_on_200_201 + + class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance(self.ctx.vars.instance) + + def _update_instance(self, instance): + _instance_value, _builder = self.new_content_builder( + self.ctx.args, + value=instance, + typ=AAZObjectType + ) + _builder.set_prop("properties", AAZObjectType) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_const("dhcpType", "RELAY", AAZStrType, ".relay", typ_kwargs={"flags": {"required": True}}) + properties.set_const("dhcpType", "SERVER", AAZStrType, ".server", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("displayName", AAZStrType, ".display_name") + properties.set_prop("revision", AAZIntType, ".revision") + properties.discriminate_by("dhcpType", "RELAY") + properties.discriminate_by("dhcpType", "SERVER") + + disc_relay = _builder.get(".properties{dhcpType:RELAY}") + if disc_relay is not None: + disc_relay.set_prop("serverAddresses", AAZListType, ".relay.server_addresses") + + server_addresses = _builder.get(".properties{dhcpType:RELAY}.serverAddresses") + if server_addresses is not None: + server_addresses.set_elements(AAZStrType, ".") + + disc_server = _builder.get(".properties{dhcpType:SERVER}") + if disc_server is not None: + disc_server.set_prop("leaseTime", AAZIntType, ".server.lease_time") + disc_server.set_prop("serverAddress", AAZStrType, ".server.server_address") + + return _instance_value + + class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance_by_generic( + self.ctx.vars.instance, + self.ctx.generic_update_args + ) + + +class _UpdateHelper: + """Helper class for Update""" + + _schema_workload_network_dhcp_read = None + + @classmethod + def _build_schema_workload_network_dhcp_read(cls, _schema): + if cls._schema_workload_network_dhcp_read is not None: + _schema.id = cls._schema_workload_network_dhcp_read.id + _schema.name = cls._schema_workload_network_dhcp_read.name + _schema.properties = cls._schema_workload_network_dhcp_read.properties + _schema.type = cls._schema_workload_network_dhcp_read.type + return + + cls._schema_workload_network_dhcp_read = _schema_workload_network_dhcp_read = AAZObjectType() + + workload_network_dhcp_read = _schema_workload_network_dhcp_read + workload_network_dhcp_read.id = AAZStrType( + flags={"read_only": True}, + ) + workload_network_dhcp_read.name = AAZStrType( + flags={"read_only": True}, + ) + workload_network_dhcp_read.properties = AAZObjectType() + workload_network_dhcp_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_workload_network_dhcp_read.properties + properties.dhcp_type = AAZStrType( + serialized_name="dhcpType", + flags={"required": True}, + ) + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.revision = AAZIntType() + properties.segments = AAZListType( + flags={"read_only": True}, + ) + + segments = _schema_workload_network_dhcp_read.properties.segments + segments.Element = AAZStrType() + + disc_relay = _schema_workload_network_dhcp_read.properties.discriminate_by("dhcp_type", "RELAY") + disc_relay.server_addresses = AAZListType( + serialized_name="serverAddresses", + ) + + server_addresses = _schema_workload_network_dhcp_read.properties.discriminate_by("dhcp_type", "RELAY").server_addresses + server_addresses.Element = AAZStrType() + + disc_server = _schema_workload_network_dhcp_read.properties.discriminate_by("dhcp_type", "SERVER") + disc_server.lease_time = AAZIntType( + serialized_name="leaseTime", + ) + disc_server.server_address = AAZStrType( + serialized_name="serverAddress", + ) + + _schema.id = cls._schema_workload_network_dhcp_read.id + _schema.name = cls._schema_workload_network_dhcp_read.name + _schema.properties = cls._schema_workload_network_dhcp_read.properties + _schema.type = cls._schema_workload_network_dhcp_read.type + + +__all__ = ["Update"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dns_service/__cmd_group.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dns_service/__cmd_group.py new file mode 100644 index 00000000000..f9974f90d3b --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dns_service/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "vmware workload-network dns-service", +) +class __CMDGroup(AAZCommandGroup): + """Commands to manage a DNS Service workload network. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dns_service/__init__.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dns_service/__init__.py new file mode 100644 index 00000000000..db73033039b --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dns_service/__init__.py @@ -0,0 +1,17 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._create import * +from ._delete import * +from ._list import * +from ._show import * +from ._update import * +from ._wait import * diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dns_service/_create.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dns_service/_create.py new file mode 100644 index 00000000000..3a38a92bb1d --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dns_service/_create.py @@ -0,0 +1,294 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware workload-network dns-service create", +) +class Create(AAZCommand): + """Create a DNS service by id in a private cloud workload network. + + :example: Create a DNS service by ID in a workload network. + az vmware workload-network dns-service create --resource-group group1 --private-cloud cloud1 --dns-service dnsService1 --display-name dnsService1 --dns-service-ip 5.5.5.5 --default-dns-zone defaultDnsZone1 --fqdn-zones fqdnZone1 --log-level INFO --revision 1 + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/workloadnetworks/default/dnsservices/{}", "2022-05-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.dns_service = AAZStrArg( + options=["-n", "--name", "--dns-service"], + help="NSX DNS Service identifier. Generally the same as the DNS Service's display name", + required=True, + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.default_dns_zone = AAZStrArg( + options=["--default-dns-zone"], + arg_group="Properties", + help="Default DNS zone of the DNS Service.", + ) + _args_schema.display_name = AAZStrArg( + options=["--display-name"], + arg_group="Properties", + help="Display name of the DNS Service.", + ) + _args_schema.dns_service_ip = AAZStrArg( + options=["--dns-service-ip"], + arg_group="Properties", + help="DNS service IP of the DNS Service.", + ) + _args_schema.fqdn_zones = AAZListArg( + options=["--fqdn-zones"], + arg_group="Properties", + help="FQDN zones of the DNS Service.", + ) + _args_schema.log_level = AAZStrArg( + options=["--log-level"], + arg_group="Properties", + help="DNS Service log level.", + enum={"DEBUG": "DEBUG", "ERROR": "ERROR", "FATAL": "FATAL", "INFO": "INFO", "WARNING": "WARNING"}, + ) + _args_schema.revision = AAZIntArg( + options=["--revision"], + arg_group="Properties", + help="NSX revision number.", + ) + + fqdn_zones = cls._args_schema.fqdn_zones + fqdn_zones.Element = AAZStrArg() + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.WorkloadNetworksCreateDnsService(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class WorkloadNetworksCreateDnsService(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "dnsServiceId", self.ctx.args.dns_service, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("defaultDnsZone", AAZStrType, ".default_dns_zone") + properties.set_prop("displayName", AAZStrType, ".display_name") + properties.set_prop("dnsServiceIp", AAZStrType, ".dns_service_ip") + properties.set_prop("fqdnZones", AAZListType, ".fqdn_zones") + properties.set_prop("logLevel", AAZStrType, ".log_level") + properties.set_prop("revision", AAZIntType, ".revision") + + fqdn_zones = _builder.get(".properties.fqdnZones") + if fqdn_zones is not None: + fqdn_zones.set_elements(AAZStrType, ".") + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200_201.properties + properties.default_dns_zone = AAZStrType( + serialized_name="defaultDnsZone", + ) + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.dns_service_ip = AAZStrType( + serialized_name="dnsServiceIp", + ) + properties.fqdn_zones = AAZListType( + serialized_name="fqdnZones", + ) + properties.log_level = AAZStrType( + serialized_name="logLevel", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.revision = AAZIntType() + properties.status = AAZStrType( + flags={"read_only": True}, + ) + + fqdn_zones = cls._schema_on_200_201.properties.fqdn_zones + fqdn_zones.Element = AAZStrType() + + return cls._schema_on_200_201 + + +class _CreateHelper: + """Helper class for Create""" + + +__all__ = ["Create"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dns_service/_delete.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dns_service/_delete.py new file mode 100644 index 00000000000..c3716f8aa84 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dns_service/_delete.py @@ -0,0 +1,173 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware workload-network dns-service delete", + confirmation="This will delete the workload network DNS services. Are you sure?", +) +class Delete(AAZCommand): + """Delete a DNS service by id in a private cloud workload network. + + :example: Delete a DNS service by ID in a workload network. + az vmware workload-network dns-service delete --resource-group group1 --private-cloud cloud1 --dns-service dnsService1 + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/workloadnetworks/default/dnsservices/{}", "2022-05-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, None) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.dns_service = AAZStrArg( + options=["-n", "--name", "--dns-service"], + help="NSX DNS Service identifier. Generally the same as the DNS Service's display name", + required=True, + id_part="child_name_2", + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.WorkloadNetworksDeleteDnsService(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class WorkloadNetworksDeleteDnsService(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [204]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_204, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "dnsServiceId", self.ctx.args.dns_service, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dns_service/_list.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dns_service/_list.py new file mode 100644 index 00000000000..00b0d37a7a4 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dns_service/_list.py @@ -0,0 +1,217 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware workload-network dns-service list", +) +class List(AAZCommand): + """List of DNS services in a private cloud workload network. + + :example: List of DNS services in a workload network. + az vmware workload-network dns-service list --resource-group group1 --private-cloud cloud1 + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/workloadnetworks/default/dnsservices", "2022-05-01"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WorkloadNetworksListDnsServices(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class WorkloadNetworksListDnsServices(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + flags={"read_only": True}, + ) + _schema_on_200.value = AAZListType( + flags={"read_only": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.default_dns_zone = AAZStrType( + serialized_name="defaultDnsZone", + ) + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.dns_service_ip = AAZStrType( + serialized_name="dnsServiceIp", + ) + properties.fqdn_zones = AAZListType( + serialized_name="fqdnZones", + ) + properties.log_level = AAZStrType( + serialized_name="logLevel", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.revision = AAZIntType() + properties.status = AAZStrType( + flags={"read_only": True}, + ) + + fqdn_zones = cls._schema_on_200.value.Element.properties.fqdn_zones + fqdn_zones.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dns_service/_show.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dns_service/_show.py new file mode 100644 index 00000000000..5c14b94dfd3 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dns_service/_show.py @@ -0,0 +1,214 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware workload-network dns-service show", +) +class Show(AAZCommand): + """Get a DNS service by id in a private cloud workload network. + + :example: Get a DNS service by ID in a workload network. + az vmware workload-network dns-service show --resource-group group1 --private-cloud cloud1 --dns-service dnsService1 + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/workloadnetworks/default/dnsservices/{}", "2022-05-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.dns_service = AAZStrArg( + options=["-n", "--name", "--dns-service"], + help="NSX DNS Service identifier. Generally the same as the DNS Service's display name", + required=True, + id_part="child_name_2", + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WorkloadNetworksGetDnsService(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class WorkloadNetworksGetDnsService(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "dnsServiceId", self.ctx.args.dns_service, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.default_dns_zone = AAZStrType( + serialized_name="defaultDnsZone", + ) + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.dns_service_ip = AAZStrType( + serialized_name="dnsServiceIp", + ) + properties.fqdn_zones = AAZListType( + serialized_name="fqdnZones", + ) + properties.log_level = AAZStrType( + serialized_name="logLevel", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.revision = AAZIntType() + properties.status = AAZStrType( + flags={"read_only": True}, + ) + + fqdn_zones = cls._schema_on_200.properties.fqdn_zones + fqdn_zones.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dns_service/_update.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dns_service/_update.py new file mode 100644 index 00000000000..61aeb986f03 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dns_service/_update.py @@ -0,0 +1,446 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware workload-network dns-service update", +) +class Update(AAZCommand): + """Update a DNS service by id in a private cloud workload network. + + :example: Update a DNS service by ID in a workload network. + az vmware workload-network dns-service update --resource-group group1 --private-cloud cloud1 --dns-service dnsService1 --display-name dnsService1 --dns-service-ip 5.5.5.5 --default-dns-zone defaultDnsZone1 --fqdn-zones fqdnZone1 --log-level INFO --revision 1 + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/workloadnetworks/default/dnsservices/{}", "2022-05-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + AZ_SUPPORT_GENERIC_UPDATE = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.dns_service = AAZStrArg( + options=["-n", "--name", "--dns-service"], + help="NSX DNS Service identifier. Generally the same as the DNS Service's display name", + required=True, + id_part="child_name_2", + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.default_dns_zone = AAZStrArg( + options=["--default-dns-zone"], + arg_group="Properties", + help="Default DNS zone of the DNS Service.", + nullable=True, + ) + _args_schema.display_name = AAZStrArg( + options=["--display-name"], + arg_group="Properties", + help="Display name of the DNS Service.", + nullable=True, + ) + _args_schema.dns_service_ip = AAZStrArg( + options=["--dns-service-ip"], + arg_group="Properties", + help="DNS service IP of the DNS Service.", + nullable=True, + ) + _args_schema.fqdn_zones = AAZListArg( + options=["--fqdn-zones"], + arg_group="Properties", + help="FQDN zones of the DNS Service.", + nullable=True, + ) + _args_schema.log_level = AAZStrArg( + options=["--log-level"], + arg_group="Properties", + help="DNS Service log level.", + nullable=True, + enum={"DEBUG": "DEBUG", "ERROR": "ERROR", "FATAL": "FATAL", "INFO": "INFO", "WARNING": "WARNING"}, + ) + _args_schema.revision = AAZIntArg( + options=["--revision"], + arg_group="Properties", + help="NSX revision number.", + nullable=True, + ) + + fqdn_zones = cls._args_schema.fqdn_zones + fqdn_zones.Element = AAZStrArg( + nullable=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WorkloadNetworksGetDnsService(ctx=self.ctx)() + self.pre_instance_update(self.ctx.vars.instance) + self.InstanceUpdateByJson(ctx=self.ctx)() + self.InstanceUpdateByGeneric(ctx=self.ctx)() + self.post_instance_update(self.ctx.vars.instance) + yield self.WorkloadNetworksCreateDnsService(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + @register_callback + def pre_instance_update(self, instance): + pass + + @register_callback + def post_instance_update(self, instance): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class WorkloadNetworksGetDnsService(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "dnsServiceId", self.ctx.args.dns_service, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _UpdateHelper._build_schema_workload_network_dns_service_read(cls._schema_on_200) + + return cls._schema_on_200 + + class WorkloadNetworksCreateDnsService(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "dnsServiceId", self.ctx.args.dns_service, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + value=self.ctx.vars.instance, + ) + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + _UpdateHelper._build_schema_workload_network_dns_service_read(cls._schema_on_200_201) + + return cls._schema_on_200_201 + + class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance(self.ctx.vars.instance) + + def _update_instance(self, instance): + _instance_value, _builder = self.new_content_builder( + self.ctx.args, + value=instance, + typ=AAZObjectType + ) + _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("defaultDnsZone", AAZStrType, ".default_dns_zone") + properties.set_prop("displayName", AAZStrType, ".display_name") + properties.set_prop("dnsServiceIp", AAZStrType, ".dns_service_ip") + properties.set_prop("fqdnZones", AAZListType, ".fqdn_zones") + properties.set_prop("logLevel", AAZStrType, ".log_level") + properties.set_prop("revision", AAZIntType, ".revision") + + fqdn_zones = _builder.get(".properties.fqdnZones") + if fqdn_zones is not None: + fqdn_zones.set_elements(AAZStrType, ".") + + return _instance_value + + class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance_by_generic( + self.ctx.vars.instance, + self.ctx.generic_update_args + ) + + +class _UpdateHelper: + """Helper class for Update""" + + _schema_workload_network_dns_service_read = None + + @classmethod + def _build_schema_workload_network_dns_service_read(cls, _schema): + if cls._schema_workload_network_dns_service_read is not None: + _schema.id = cls._schema_workload_network_dns_service_read.id + _schema.name = cls._schema_workload_network_dns_service_read.name + _schema.properties = cls._schema_workload_network_dns_service_read.properties + _schema.type = cls._schema_workload_network_dns_service_read.type + return + + cls._schema_workload_network_dns_service_read = _schema_workload_network_dns_service_read = AAZObjectType() + + workload_network_dns_service_read = _schema_workload_network_dns_service_read + workload_network_dns_service_read.id = AAZStrType( + flags={"read_only": True}, + ) + workload_network_dns_service_read.name = AAZStrType( + flags={"read_only": True}, + ) + workload_network_dns_service_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + workload_network_dns_service_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_workload_network_dns_service_read.properties + properties.default_dns_zone = AAZStrType( + serialized_name="defaultDnsZone", + ) + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.dns_service_ip = AAZStrType( + serialized_name="dnsServiceIp", + ) + properties.fqdn_zones = AAZListType( + serialized_name="fqdnZones", + ) + properties.log_level = AAZStrType( + serialized_name="logLevel", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.revision = AAZIntType() + properties.status = AAZStrType( + flags={"read_only": True}, + ) + + fqdn_zones = _schema_workload_network_dns_service_read.properties.fqdn_zones + fqdn_zones.Element = AAZStrType() + + _schema.id = cls._schema_workload_network_dns_service_read.id + _schema.name = cls._schema_workload_network_dns_service_read.name + _schema.properties = cls._schema_workload_network_dns_service_read.properties + _schema.type = cls._schema_workload_network_dns_service_read.type + + +__all__ = ["Update"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dns_service/_wait.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dns_service/_wait.py new file mode 100644 index 00000000000..a1110f5fa0e --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dns_service/_wait.py @@ -0,0 +1,210 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware workload-network dns-service wait", +) +class Wait(AAZWaitCommand): + """Place the CLI in a waiting state until a condition is met. + """ + + _aaz_info = { + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/workloadnetworks/default/dnsservices/{}", "2022-05-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.dns_service = AAZStrArg( + options=["-n", "--name", "--dns-service"], + help="NSX DNS Service identifier. Generally the same as the DNS Service's display name", + required=True, + id_part="child_name_2", + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WorkloadNetworksGetDnsService(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False) + return result + + class WorkloadNetworksGetDnsService(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "dnsServiceId", self.ctx.args.dns_service, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.default_dns_zone = AAZStrType( + serialized_name="defaultDnsZone", + ) + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.dns_service_ip = AAZStrType( + serialized_name="dnsServiceIp", + ) + properties.fqdn_zones = AAZListType( + serialized_name="fqdnZones", + ) + properties.log_level = AAZStrType( + serialized_name="logLevel", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.revision = AAZIntType() + properties.status = AAZStrType( + flags={"read_only": True}, + ) + + fqdn_zones = cls._schema_on_200.properties.fqdn_zones + fqdn_zones.Element = AAZStrType() + + return cls._schema_on_200 + + +class _WaitHelper: + """Helper class for Wait""" + + +__all__ = ["Wait"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dns_zone/__cmd_group.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dns_zone/__cmd_group.py new file mode 100644 index 00000000000..4e5195586ed --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dns_zone/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "vmware workload-network dns-zone", +) +class __CMDGroup(AAZCommandGroup): + """Commands to manage a DNS Zone workload network. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dns_zone/__init__.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dns_zone/__init__.py new file mode 100644 index 00000000000..db73033039b --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dns_zone/__init__.py @@ -0,0 +1,17 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._create import * +from ._delete import * +from ._list import * +from ._show import * +from ._update import * +from ._wait import * diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dns_zone/_create.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dns_zone/_create.py new file mode 100644 index 00000000000..42bfbd71065 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dns_zone/_create.py @@ -0,0 +1,298 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware workload-network dns-zone create", +) +class Create(AAZCommand): + """Create a DNS zone by id in a private cloud workload network. + + :example: Create a DNS zone by ID in a workload network. + az vmware workload-network dns-zone create --resource-group group1 --private-cloud cloud1 --dns-zone dnsZone1 --display-name dnsZone1 --domain domain1 --dns-server-ips 1.1.1.1 --source-ip 8.8.8.8 --dns-services 1 --revision 1 + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/workloadnetworks/default/dnszones/{}", "2022-05-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.dns_zone = AAZStrArg( + options=["-n", "--name", "--dns-zone"], + help="NSX DNS Zone identifier. Generally the same as the DNS Zone's display name", + required=True, + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.display_name = AAZStrArg( + options=["--display-name"], + arg_group="Properties", + help="Display name of the DNS Zone.", + ) + _args_schema.dns_server_ips = AAZListArg( + options=["--dns-server-ips"], + arg_group="Properties", + help="DNS Server IP array of the DNS Zone.", + ) + _args_schema.dns_services = AAZIntArg( + options=["--dns-services"], + arg_group="Properties", + help="Number of DNS Services using the DNS zone.", + ) + _args_schema.domain = AAZListArg( + options=["--domain"], + arg_group="Properties", + help="Domain names of the DNS Zone.", + ) + _args_schema.revision = AAZIntArg( + options=["--revision"], + arg_group="Properties", + help="NSX revision number.", + ) + _args_schema.source_ip = AAZStrArg( + options=["--source-ip"], + arg_group="Properties", + help="Source IP of the DNS Zone.", + ) + + dns_server_ips = cls._args_schema.dns_server_ips + dns_server_ips.Element = AAZStrArg() + + domain = cls._args_schema.domain + domain.Element = AAZStrArg() + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.WorkloadNetworksCreateDnsZone(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class WorkloadNetworksCreateDnsZone(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "dnsZoneId", self.ctx.args.dns_zone, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("displayName", AAZStrType, ".display_name") + properties.set_prop("dnsServerIps", AAZListType, ".dns_server_ips") + properties.set_prop("dnsServices", AAZIntType, ".dns_services") + properties.set_prop("domain", AAZListType, ".domain") + properties.set_prop("revision", AAZIntType, ".revision") + properties.set_prop("sourceIp", AAZStrType, ".source_ip") + + dns_server_ips = _builder.get(".properties.dnsServerIps") + if dns_server_ips is not None: + dns_server_ips.set_elements(AAZStrType, ".") + + domain = _builder.get(".properties.domain") + if domain is not None: + domain.set_elements(AAZStrType, ".") + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200_201.properties + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.dns_server_ips = AAZListType( + serialized_name="dnsServerIps", + ) + properties.dns_services = AAZIntType( + serialized_name="dnsServices", + ) + properties.domain = AAZListType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.revision = AAZIntType() + properties.source_ip = AAZStrType( + serialized_name="sourceIp", + ) + + dns_server_ips = cls._schema_on_200_201.properties.dns_server_ips + dns_server_ips.Element = AAZStrType() + + domain = cls._schema_on_200_201.properties.domain + domain.Element = AAZStrType() + + return cls._schema_on_200_201 + + +class _CreateHelper: + """Helper class for Create""" + + +__all__ = ["Create"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dns_zone/_delete.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dns_zone/_delete.py new file mode 100644 index 00000000000..e5143476621 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dns_zone/_delete.py @@ -0,0 +1,173 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware workload-network dns-zone delete", + confirmation="This will delete the workload network DNS zone. Are you sure?", +) +class Delete(AAZCommand): + """Delete a DNS zone by id in a private cloud workload network. + + :example: Delete a DNS zone by ID in a workload network. + az vmware workload-network dns-zone delete --resource-group group1 --private-cloud cloud1 --dns-zone dnsZone1 + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/workloadnetworks/default/dnszones/{}", "2022-05-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, None) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.dns_zone = AAZStrArg( + options=["-n", "--name", "--dns-zone"], + help="NSX DNS Zone identifier. Generally the same as the DNS Zone's display name", + required=True, + id_part="child_name_2", + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.WorkloadNetworksDeleteDnsZone(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class WorkloadNetworksDeleteDnsZone(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [204]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_204, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "dnsZoneId", self.ctx.args.dns_zone, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dns_zone/_list.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dns_zone/_list.py new file mode 100644 index 00000000000..30b1db575a2 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dns_zone/_list.py @@ -0,0 +1,215 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware workload-network dns-zone list", +) +class List(AAZCommand): + """List of DNS zones in a private cloud workload network. + + :example: List of DNS zones in a workload network. + az vmware workload-network dns-zone list --resource-group group1 --private-cloud cloud1 + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/workloadnetworks/default/dnszones", "2022-05-01"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WorkloadNetworksListDnsZones(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class WorkloadNetworksListDnsZones(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + flags={"read_only": True}, + ) + _schema_on_200.value = AAZListType( + flags={"read_only": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.dns_server_ips = AAZListType( + serialized_name="dnsServerIps", + ) + properties.dns_services = AAZIntType( + serialized_name="dnsServices", + ) + properties.domain = AAZListType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.revision = AAZIntType() + properties.source_ip = AAZStrType( + serialized_name="sourceIp", + ) + + dns_server_ips = cls._schema_on_200.value.Element.properties.dns_server_ips + dns_server_ips.Element = AAZStrType() + + domain = cls._schema_on_200.value.Element.properties.domain + domain.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dns_zone/_show.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dns_zone/_show.py new file mode 100644 index 00000000000..b2fdf4d013a --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dns_zone/_show.py @@ -0,0 +1,212 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware workload-network dns-zone show", +) +class Show(AAZCommand): + """Get a DNS zone by id in a private cloud workload network. + + :example: Get a DNS zone by ID in a workload network. + az vmware workload-network dns-zone show --resource-group group1 --private-cloud cloud1 --dns-zone dnsZone1 + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/workloadnetworks/default/dnszones/{}", "2022-05-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.dns_zone = AAZStrArg( + options=["-n", "--name", "--dns-zone"], + help="NSX DNS Zone identifier. Generally the same as the DNS Zone's display name", + required=True, + id_part="child_name_2", + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WorkloadNetworksGetDnsZone(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class WorkloadNetworksGetDnsZone(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "dnsZoneId", self.ctx.args.dns_zone, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.dns_server_ips = AAZListType( + serialized_name="dnsServerIps", + ) + properties.dns_services = AAZIntType( + serialized_name="dnsServices", + ) + properties.domain = AAZListType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.revision = AAZIntType() + properties.source_ip = AAZStrType( + serialized_name="sourceIp", + ) + + dns_server_ips = cls._schema_on_200.properties.dns_server_ips + dns_server_ips.Element = AAZStrType() + + domain = cls._schema_on_200.properties.domain + domain.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dns_zone/_update.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dns_zone/_update.py new file mode 100644 index 00000000000..c13b8e571ed --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dns_zone/_update.py @@ -0,0 +1,452 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware workload-network dns-zone update", +) +class Update(AAZCommand): + """Update a DNS zone by id in a private cloud workload network. + + :example: Update a DNS zone by ID in a workload network. + az vmware workload-network dns-zone update --resource-group group1 --private-cloud cloud1 --dns-zone dnsZone1 --display-name dnsZone1 --domain domain1 --dns-server-ips 1.1.1.1 --source-ip 8.8.8.8 --dns-services 1 --revision 1 + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/workloadnetworks/default/dnszones/{}", "2022-05-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + AZ_SUPPORT_GENERIC_UPDATE = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.dns_zone = AAZStrArg( + options=["-n", "--name", "--dns-zone"], + help="NSX DNS Zone identifier. Generally the same as the DNS Zone's display name", + required=True, + id_part="child_name_2", + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.display_name = AAZStrArg( + options=["--display-name"], + arg_group="Properties", + help="Display name of the DNS Zone.", + nullable=True, + ) + _args_schema.dns_server_ips = AAZListArg( + options=["--dns-server-ips"], + arg_group="Properties", + help="DNS Server IP array of the DNS Zone.", + nullable=True, + ) + _args_schema.dns_services = AAZIntArg( + options=["--dns-services"], + arg_group="Properties", + help="Number of DNS Services using the DNS zone.", + nullable=True, + ) + _args_schema.domain = AAZListArg( + options=["--domain"], + arg_group="Properties", + help="Domain names of the DNS Zone.", + nullable=True, + ) + _args_schema.revision = AAZIntArg( + options=["--revision"], + arg_group="Properties", + help="NSX revision number.", + nullable=True, + ) + _args_schema.source_ip = AAZStrArg( + options=["--source-ip"], + arg_group="Properties", + help="Source IP of the DNS Zone.", + nullable=True, + ) + + dns_server_ips = cls._args_schema.dns_server_ips + dns_server_ips.Element = AAZStrArg( + nullable=True, + ) + + domain = cls._args_schema.domain + domain.Element = AAZStrArg( + nullable=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WorkloadNetworksGetDnsZone(ctx=self.ctx)() + self.pre_instance_update(self.ctx.vars.instance) + self.InstanceUpdateByJson(ctx=self.ctx)() + self.InstanceUpdateByGeneric(ctx=self.ctx)() + self.post_instance_update(self.ctx.vars.instance) + yield self.WorkloadNetworksCreateDnsZone(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + @register_callback + def pre_instance_update(self, instance): + pass + + @register_callback + def post_instance_update(self, instance): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class WorkloadNetworksGetDnsZone(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "dnsZoneId", self.ctx.args.dns_zone, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _UpdateHelper._build_schema_workload_network_dns_zone_read(cls._schema_on_200) + + return cls._schema_on_200 + + class WorkloadNetworksCreateDnsZone(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "dnsZoneId", self.ctx.args.dns_zone, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + value=self.ctx.vars.instance, + ) + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + _UpdateHelper._build_schema_workload_network_dns_zone_read(cls._schema_on_200_201) + + return cls._schema_on_200_201 + + class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance(self.ctx.vars.instance) + + def _update_instance(self, instance): + _instance_value, _builder = self.new_content_builder( + self.ctx.args, + value=instance, + typ=AAZObjectType + ) + _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("displayName", AAZStrType, ".display_name") + properties.set_prop("dnsServerIps", AAZListType, ".dns_server_ips") + properties.set_prop("dnsServices", AAZIntType, ".dns_services") + properties.set_prop("domain", AAZListType, ".domain") + properties.set_prop("revision", AAZIntType, ".revision") + properties.set_prop("sourceIp", AAZStrType, ".source_ip") + + dns_server_ips = _builder.get(".properties.dnsServerIps") + if dns_server_ips is not None: + dns_server_ips.set_elements(AAZStrType, ".") + + domain = _builder.get(".properties.domain") + if domain is not None: + domain.set_elements(AAZStrType, ".") + + return _instance_value + + class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance_by_generic( + self.ctx.vars.instance, + self.ctx.generic_update_args + ) + + +class _UpdateHelper: + """Helper class for Update""" + + _schema_workload_network_dns_zone_read = None + + @classmethod + def _build_schema_workload_network_dns_zone_read(cls, _schema): + if cls._schema_workload_network_dns_zone_read is not None: + _schema.id = cls._schema_workload_network_dns_zone_read.id + _schema.name = cls._schema_workload_network_dns_zone_read.name + _schema.properties = cls._schema_workload_network_dns_zone_read.properties + _schema.type = cls._schema_workload_network_dns_zone_read.type + return + + cls._schema_workload_network_dns_zone_read = _schema_workload_network_dns_zone_read = AAZObjectType() + + workload_network_dns_zone_read = _schema_workload_network_dns_zone_read + workload_network_dns_zone_read.id = AAZStrType( + flags={"read_only": True}, + ) + workload_network_dns_zone_read.name = AAZStrType( + flags={"read_only": True}, + ) + workload_network_dns_zone_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + workload_network_dns_zone_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_workload_network_dns_zone_read.properties + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.dns_server_ips = AAZListType( + serialized_name="dnsServerIps", + ) + properties.dns_services = AAZIntType( + serialized_name="dnsServices", + ) + properties.domain = AAZListType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.revision = AAZIntType() + properties.source_ip = AAZStrType( + serialized_name="sourceIp", + ) + + dns_server_ips = _schema_workload_network_dns_zone_read.properties.dns_server_ips + dns_server_ips.Element = AAZStrType() + + domain = _schema_workload_network_dns_zone_read.properties.domain + domain.Element = AAZStrType() + + _schema.id = cls._schema_workload_network_dns_zone_read.id + _schema.name = cls._schema_workload_network_dns_zone_read.name + _schema.properties = cls._schema_workload_network_dns_zone_read.properties + _schema.type = cls._schema_workload_network_dns_zone_read.type + + +__all__ = ["Update"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dns_zone/_wait.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dns_zone/_wait.py new file mode 100644 index 00000000000..599c71fb4e9 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/dns_zone/_wait.py @@ -0,0 +1,208 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware workload-network dns-zone wait", +) +class Wait(AAZWaitCommand): + """Place the CLI in a waiting state until a condition is met. + """ + + _aaz_info = { + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/workloadnetworks/default/dnszones/{}", "2022-05-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.dns_zone = AAZStrArg( + options=["-n", "--name", "--dns-zone"], + help="NSX DNS Zone identifier. Generally the same as the DNS Zone's display name", + required=True, + id_part="child_name_2", + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WorkloadNetworksGetDnsZone(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False) + return result + + class WorkloadNetworksGetDnsZone(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "dnsZoneId", self.ctx.args.dns_zone, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.dns_server_ips = AAZListType( + serialized_name="dnsServerIps", + ) + properties.dns_services = AAZIntType( + serialized_name="dnsServices", + ) + properties.domain = AAZListType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.revision = AAZIntType() + properties.source_ip = AAZStrType( + serialized_name="sourceIp", + ) + + dns_server_ips = cls._schema_on_200.properties.dns_server_ips + dns_server_ips.Element = AAZStrType() + + domain = cls._schema_on_200.properties.domain + domain.Element = AAZStrType() + + return cls._schema_on_200 + + +class _WaitHelper: + """Helper class for Wait""" + + +__all__ = ["Wait"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/gateway/__cmd_group.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/gateway/__cmd_group.py new file mode 100644 index 00000000000..85f7d0f007f --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/gateway/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "vmware workload-network gateway", +) +class __CMDGroup(AAZCommandGroup): + """Commands to manage a Gateway workload network. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/gateway/__init__.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/gateway/__init__.py new file mode 100644 index 00000000000..2df85698253 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/gateway/__init__.py @@ -0,0 +1,13 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._list import * +from ._show import * diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/gateway/_list.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/gateway/_list.py new file mode 100644 index 00000000000..9b7c72aac22 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/gateway/_list.py @@ -0,0 +1,197 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware workload-network gateway list", +) +class List(AAZCommand): + """List of gateways in a private cloud workload network. + + :example: List of Gateways in a workload network. + az vmware workload-network gateway list --resource-group group1 --private-cloud cloud1 + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/workloadnetworks/default/gateways", "2022-05-01"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WorkloadNetworksListGateways(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class WorkloadNetworksListGateways(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/gateways", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + flags={"read_only": True}, + ) + _schema_on_200.value = AAZListType( + flags={"read_only": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.path = AAZStrType( + flags={"read_only": True}, + ) + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/gateway/_show.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/gateway/_show.py new file mode 100644 index 00000000000..50429fbdf6e --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/gateway/_show.py @@ -0,0 +1,194 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware workload-network gateway show", +) +class Show(AAZCommand): + """Get a gateway by id in a private cloud workload network. + + :example: Get a Gateway by ID in a workload network. + az vmware workload-network gateway show --resource-group group1 --private-cloud cloud1 --gateway gateway1 + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/workloadnetworks/default/gateways/{}", "2022-05-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.gateway = AAZStrArg( + options=["-n", "--name", "--gateway"], + help="NSX Gateway identifier. Generally the same as the Gateway's display name", + required=True, + id_part="child_name_2", + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WorkloadNetworksGetGateway(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class WorkloadNetworksGetGateway(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/gateways/{gatewayId}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "gatewayId", self.ctx.args.gateway, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.path = AAZStrType( + flags={"read_only": True}, + ) + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/port_mirroring/__cmd_group.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/port_mirroring/__cmd_group.py new file mode 100644 index 00000000000..30728117712 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/port_mirroring/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "vmware workload-network port-mirroring", +) +class __CMDGroup(AAZCommandGroup): + """Commands to manage a Port Mirroring workload network. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/port_mirroring/__init__.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/port_mirroring/__init__.py new file mode 100644 index 00000000000..db73033039b --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/port_mirroring/__init__.py @@ -0,0 +1,17 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._create import * +from ._delete import * +from ._list import * +from ._show import * +from ._update import * +from ._wait import * diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/port_mirroring/_create.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/port_mirroring/_create.py new file mode 100644 index 00000000000..30b91ed26ab --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/port_mirroring/_create.py @@ -0,0 +1,269 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware workload-network port-mirroring create", +) +class Create(AAZCommand): + """Create a port mirroring profile by id in a private cloud workload network. + + :example: Create a port mirroring profile by ID in a workload network. + az vmware workload-network port-mirroring create --resource-group group1 --private-cloud cloud1 --port-mirroring portMirroring1 --display-name portMirroring1 --direction BIDIRECTIONAL --source vmGroup1 --destination vmGroup2 --revision 1 + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/workloadnetworks/default/portmirroringprofiles/{}", "2022-05-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.port_mirroring = AAZStrArg( + options=["-n", "--name", "--port-mirroring"], + help="NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name", + required=True, + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.destination = AAZStrArg( + options=["--destination"], + arg_group="Properties", + help="Destination VM Group.", + ) + _args_schema.direction = AAZStrArg( + options=["--direction"], + arg_group="Properties", + help="Direction of port mirroring profile.", + enum={"BIDIRECTIONAL": "BIDIRECTIONAL", "EGRESS": "EGRESS", "INGRESS": "INGRESS"}, + ) + _args_schema.display_name = AAZStrArg( + options=["--display-name"], + arg_group="Properties", + help="Display name of the port mirroring profile.", + ) + _args_schema.revision = AAZIntArg( + options=["--revision"], + arg_group="Properties", + help="NSX revision number.", + ) + _args_schema.source = AAZStrArg( + options=["--source"], + arg_group="Properties", + help="Source VM Group.", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.WorkloadNetworksCreatePortMirroring(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class WorkloadNetworksCreatePortMirroring(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "portMirroringId", self.ctx.args.port_mirroring, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("destination", AAZStrType, ".destination") + properties.set_prop("direction", AAZStrType, ".direction") + properties.set_prop("displayName", AAZStrType, ".display_name") + properties.set_prop("revision", AAZIntType, ".revision") + properties.set_prop("source", AAZStrType, ".source") + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200_201.properties + properties.destination = AAZStrType() + properties.direction = AAZStrType() + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.revision = AAZIntType() + properties.source = AAZStrType() + properties.status = AAZStrType( + flags={"read_only": True}, + ) + + return cls._schema_on_200_201 + + +class _CreateHelper: + """Helper class for Create""" + + +__all__ = ["Create"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/port_mirroring/_delete.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/port_mirroring/_delete.py new file mode 100644 index 00000000000..3da71d43cc9 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/port_mirroring/_delete.py @@ -0,0 +1,173 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware workload-network port-mirroring delete", + confirmation="This will delete the workload network port mirroring. Are you sure?", +) +class Delete(AAZCommand): + """Delete a port mirroring profile by id in a private cloud workload network. + + :example: Delete a port mirroring profile by ID in a workload network. + az vmware workload-network port-mirroring delete --resource-group group1 --private-cloud cloud1 --port-mirroring portMirroring1 + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/workloadnetworks/default/portmirroringprofiles/{}", "2022-05-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, None) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.port_mirroring = AAZStrArg( + options=["-n", "--name", "--port-mirroring"], + help="NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name", + required=True, + id_part="child_name_2", + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.WorkloadNetworksDeletePortMirroring(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class WorkloadNetworksDeletePortMirroring(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [204]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_204, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "portMirroringId", self.ctx.args.port_mirroring, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/port_mirroring/_list.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/port_mirroring/_list.py new file mode 100644 index 00000000000..992544094dc --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/port_mirroring/_list.py @@ -0,0 +1,205 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware workload-network port-mirroring list", +) +class List(AAZCommand): + """List of port mirroring profiles in a private cloud workload network. + + :example: List of port mirroring profiles in a workload network. + az vmware workload-network port-mirroring list --resource-group group1 --private-cloud cloud1 + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/workloadnetworks/default/portmirroringprofiles", "2022-05-01"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WorkloadNetworksListPortMirroring(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class WorkloadNetworksListPortMirroring(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + flags={"read_only": True}, + ) + _schema_on_200.value = AAZListType( + flags={"read_only": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.destination = AAZStrType() + properties.direction = AAZStrType() + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.revision = AAZIntType() + properties.source = AAZStrType() + properties.status = AAZStrType( + flags={"read_only": True}, + ) + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/port_mirroring/_show.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/port_mirroring/_show.py new file mode 100644 index 00000000000..9e7bb8eb326 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/port_mirroring/_show.py @@ -0,0 +1,202 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware workload-network port-mirroring show", +) +class Show(AAZCommand): + """Get a port mirroring profile by id in a private cloud workload network. + + :example: Get a port mirroring profile by ID in a workload network. + az vmware workload-network port-mirroring show --resource-group group1 --private-cloud cloud1 --port-mirroring portMirroring1 + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/workloadnetworks/default/portmirroringprofiles/{}", "2022-05-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.port_mirroring = AAZStrArg( + options=["-n", "--name", "--port-mirroring"], + help="NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name", + required=True, + id_part="child_name_2", + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WorkloadNetworksGetPortMirroring(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class WorkloadNetworksGetPortMirroring(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "portMirroringId", self.ctx.args.port_mirroring, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.destination = AAZStrType() + properties.direction = AAZStrType() + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.revision = AAZIntType() + properties.source = AAZStrType() + properties.status = AAZStrType( + flags={"read_only": True}, + ) + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/port_mirroring/_update.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/port_mirroring/_update.py new file mode 100644 index 00000000000..8935840bf3c --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/port_mirroring/_update.py @@ -0,0 +1,418 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware workload-network port-mirroring update", +) +class Update(AAZCommand): + """Update a port mirroring profile by id in a private cloud workload network. + + :example: Update a port mirroring profile by ID in a workload network. + az vmware workload-network port-mirroring update --resource-group group1 --private-cloud cloud1 --port-mirroring portMirroring1 --display-name portMirroring1 --direction BIDIRECTIONAL --source vmGroup1 --destination vmGroup2 --revision 1 + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/workloadnetworks/default/portmirroringprofiles/{}", "2022-05-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + AZ_SUPPORT_GENERIC_UPDATE = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.port_mirroring = AAZStrArg( + options=["-n", "--name", "--port-mirroring"], + help="NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name", + required=True, + id_part="child_name_2", + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.destination = AAZStrArg( + options=["--destination"], + arg_group="Properties", + help="Destination VM Group.", + nullable=True, + ) + _args_schema.direction = AAZStrArg( + options=["--direction"], + arg_group="Properties", + help="Direction of port mirroring profile.", + nullable=True, + enum={"BIDIRECTIONAL": "BIDIRECTIONAL", "EGRESS": "EGRESS", "INGRESS": "INGRESS"}, + ) + _args_schema.display_name = AAZStrArg( + options=["--display-name"], + arg_group="Properties", + help="Display name of the port mirroring profile.", + nullable=True, + ) + _args_schema.revision = AAZIntArg( + options=["--revision"], + arg_group="Properties", + help="NSX revision number.", + nullable=True, + ) + _args_schema.source = AAZStrArg( + options=["--source"], + arg_group="Properties", + help="Source VM Group.", + nullable=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WorkloadNetworksGetPortMirroring(ctx=self.ctx)() + self.pre_instance_update(self.ctx.vars.instance) + self.InstanceUpdateByJson(ctx=self.ctx)() + self.InstanceUpdateByGeneric(ctx=self.ctx)() + self.post_instance_update(self.ctx.vars.instance) + yield self.WorkloadNetworksCreatePortMirroring(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + @register_callback + def pre_instance_update(self, instance): + pass + + @register_callback + def post_instance_update(self, instance): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class WorkloadNetworksGetPortMirroring(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "portMirroringId", self.ctx.args.port_mirroring, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _UpdateHelper._build_schema_workload_network_port_mirroring_read(cls._schema_on_200) + + return cls._schema_on_200 + + class WorkloadNetworksCreatePortMirroring(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "portMirroringId", self.ctx.args.port_mirroring, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + value=self.ctx.vars.instance, + ) + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + _UpdateHelper._build_schema_workload_network_port_mirroring_read(cls._schema_on_200_201) + + return cls._schema_on_200_201 + + class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance(self.ctx.vars.instance) + + def _update_instance(self, instance): + _instance_value, _builder = self.new_content_builder( + self.ctx.args, + value=instance, + typ=AAZObjectType + ) + _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("destination", AAZStrType, ".destination") + properties.set_prop("direction", AAZStrType, ".direction") + properties.set_prop("displayName", AAZStrType, ".display_name") + properties.set_prop("revision", AAZIntType, ".revision") + properties.set_prop("source", AAZStrType, ".source") + + return _instance_value + + class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance_by_generic( + self.ctx.vars.instance, + self.ctx.generic_update_args + ) + + +class _UpdateHelper: + """Helper class for Update""" + + _schema_workload_network_port_mirroring_read = None + + @classmethod + def _build_schema_workload_network_port_mirroring_read(cls, _schema): + if cls._schema_workload_network_port_mirroring_read is not None: + _schema.id = cls._schema_workload_network_port_mirroring_read.id + _schema.name = cls._schema_workload_network_port_mirroring_read.name + _schema.properties = cls._schema_workload_network_port_mirroring_read.properties + _schema.type = cls._schema_workload_network_port_mirroring_read.type + return + + cls._schema_workload_network_port_mirroring_read = _schema_workload_network_port_mirroring_read = AAZObjectType() + + workload_network_port_mirroring_read = _schema_workload_network_port_mirroring_read + workload_network_port_mirroring_read.id = AAZStrType( + flags={"read_only": True}, + ) + workload_network_port_mirroring_read.name = AAZStrType( + flags={"read_only": True}, + ) + workload_network_port_mirroring_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + workload_network_port_mirroring_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_workload_network_port_mirroring_read.properties + properties.destination = AAZStrType() + properties.direction = AAZStrType() + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.revision = AAZIntType() + properties.source = AAZStrType() + properties.status = AAZStrType( + flags={"read_only": True}, + ) + + _schema.id = cls._schema_workload_network_port_mirroring_read.id + _schema.name = cls._schema_workload_network_port_mirroring_read.name + _schema.properties = cls._schema_workload_network_port_mirroring_read.properties + _schema.type = cls._schema_workload_network_port_mirroring_read.type + + +__all__ = ["Update"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/port_mirroring/_wait.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/port_mirroring/_wait.py new file mode 100644 index 00000000000..7a482011f9c --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/port_mirroring/_wait.py @@ -0,0 +1,198 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware workload-network port-mirroring wait", +) +class Wait(AAZWaitCommand): + """Place the CLI in a waiting state until a condition is met. + """ + + _aaz_info = { + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/workloadnetworks/default/portmirroringprofiles/{}", "2022-05-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.port_mirroring = AAZStrArg( + options=["-n", "--name", "--port-mirroring"], + help="NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name", + required=True, + id_part="child_name_2", + ) + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WorkloadNetworksGetPortMirroring(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False) + return result + + class WorkloadNetworksGetPortMirroring(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "portMirroringId", self.ctx.args.port_mirroring, + required=True, + ), + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.destination = AAZStrType() + properties.direction = AAZStrType() + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.revision = AAZIntType() + properties.source = AAZStrType() + properties.status = AAZStrType( + flags={"read_only": True}, + ) + + return cls._schema_on_200 + + +class _WaitHelper: + """Helper class for Wait""" + + +__all__ = ["Wait"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/public_ip/__cmd_group.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/public_ip/__cmd_group.py new file mode 100644 index 00000000000..fa00b1a171a --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/public_ip/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "vmware workload-network public-ip", +) +class __CMDGroup(AAZCommandGroup): + """Commands to manage a Public-IP workload network. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/public_ip/__init__.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/public_ip/__init__.py new file mode 100644 index 00000000000..2d1a2078686 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/public_ip/__init__.py @@ -0,0 +1,16 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._create import * +from ._delete import * +from ._list import * +from ._show import * +from ._wait import * diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/public_ip/_create.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/public_ip/_create.py new file mode 100644 index 00000000000..4d51a9a8812 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/public_ip/_create.py @@ -0,0 +1,250 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware workload-network public-ip create", +) +class Create(AAZCommand): + """Create a Public IP Block by id in a private cloud workload network. + + :example: Create a Public IP Block by ID in a workload network. + az vmware workload-network public-ip create --resource-group group1 --private-cloud cloud1 --public-ip publicIP1 --display-name publicIP1 --number-of-public-ips 32 + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/workloadnetworks/default/publicips/{}", "2022-05-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + ) + _args_schema.public_ip = AAZStrArg( + options=["-n", "--name", "--public-ip"], + help="NSX Public IP Block identifier. Generally the same as the Public IP Block's display name", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.display_name = AAZStrArg( + options=["--display-name"], + arg_group="Properties", + help="Display name of the Public IP Block.", + ) + _args_schema.number_of_public_ips = AAZIntArg( + options=["--number-of-public-ips"], + arg_group="Properties", + help="Number of Public IPs requested.", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.WorkloadNetworksCreatePublicIP(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class WorkloadNetworksCreatePublicIP(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "publicIPId", self.ctx.args.public_ip, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("displayName", AAZStrType, ".display_name") + properties.set_prop("numberOfPublicIPs", AAZIntType, ".number_of_public_ips") + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200_201.properties + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.number_of_public_i_ps = AAZIntType( + serialized_name="numberOfPublicIPs", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.public_ip_block = AAZStrType( + serialized_name="publicIPBlock", + flags={"read_only": True}, + ) + + return cls._schema_on_200_201 + + +class _CreateHelper: + """Helper class for Create""" + + +__all__ = ["Create"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/public_ip/_delete.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/public_ip/_delete.py new file mode 100644 index 00000000000..473909ac763 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/public_ip/_delete.py @@ -0,0 +1,173 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware workload-network public-ip delete", + confirmation="This will delete the workload network public IP. Are you sure?", +) +class Delete(AAZCommand): + """Delete a Public IP Block by id in a private cloud workload network. + + :example: Delete a Public IP Block by ID in a workload network. + az vmware workload-network public-ip delete --resource-group group1 --private-cloud cloud1 --public-ip publicIP1 + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/workloadnetworks/default/publicips/{}", "2022-05-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, None) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + id_part="name", + ) + _args_schema.public_ip = AAZStrArg( + options=["-n", "--name", "--public-ip"], + help="NSX Public IP Block identifier. Generally the same as the Public IP Block's display name", + required=True, + id_part="child_name_2", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.WorkloadNetworksDeletePublicIP(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class WorkloadNetworksDeletePublicIP(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [204]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_204, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "publicIPId", self.ctx.args.public_ip, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/public_ip/_list.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/public_ip/_list.py new file mode 100644 index 00000000000..6a95938e7ef --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/public_ip/_list.py @@ -0,0 +1,205 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware workload-network public-ip list", +) +class List(AAZCommand): + """List of Public IP Blocks in a private cloud workload network. + + :example: List of Public IP Blocks in a workload network. + az vmware workload-network public-ip list --resource-group group1 --private-cloud cloud1 + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/workloadnetworks/default/publicips", "2022-05-01"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WorkloadNetworksListPublicIPs(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class WorkloadNetworksListPublicIPs(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + flags={"read_only": True}, + ) + _schema_on_200.value = AAZListType( + flags={"read_only": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.number_of_public_i_ps = AAZIntType( + serialized_name="numberOfPublicIPs", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.public_ip_block = AAZStrType( + serialized_name="publicIPBlock", + flags={"read_only": True}, + ) + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/public_ip/_show.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/public_ip/_show.py new file mode 100644 index 00000000000..6aa96d0d548 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/public_ip/_show.py @@ -0,0 +1,202 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware workload-network public-ip show", +) +class Show(AAZCommand): + """Get a Public IP Block by id in a private cloud workload network. + + :example: Get a Public IP Block by ID in a workload network. + az vmware workload-network public-ip show --resource-group group1 --private-cloud cloud1 --public-ip publicIP1 + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/workloadnetworks/default/publicips/{}", "2022-05-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + id_part="name", + ) + _args_schema.public_ip = AAZStrArg( + options=["-n", "--name", "--public-ip"], + help="NSX Public IP Block identifier. Generally the same as the Public IP Block's display name", + required=True, + id_part="child_name_2", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WorkloadNetworksGetPublicIP(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class WorkloadNetworksGetPublicIP(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "publicIPId", self.ctx.args.public_ip, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.number_of_public_i_ps = AAZIntType( + serialized_name="numberOfPublicIPs", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.public_ip_block = AAZStrType( + serialized_name="publicIPBlock", + flags={"read_only": True}, + ) + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/public_ip/_wait.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/public_ip/_wait.py new file mode 100644 index 00000000000..bc48c781860 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/public_ip/_wait.py @@ -0,0 +1,198 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware workload-network public-ip wait", +) +class Wait(AAZWaitCommand): + """Place the CLI in a waiting state until a condition is met. + """ + + _aaz_info = { + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/workloadnetworks/default/publicips/{}", "2022-05-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + id_part="name", + ) + _args_schema.public_ip = AAZStrArg( + options=["-n", "--name", "--public-ip"], + help="NSX Public IP Block identifier. Generally the same as the Public IP Block's display name", + required=True, + id_part="child_name_2", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WorkloadNetworksGetPublicIP(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False) + return result + + class WorkloadNetworksGetPublicIP(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "publicIPId", self.ctx.args.public_ip, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.number_of_public_i_ps = AAZIntType( + serialized_name="numberOfPublicIPs", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.public_ip_block = AAZStrType( + serialized_name="publicIPBlock", + flags={"read_only": True}, + ) + + return cls._schema_on_200 + + +class _WaitHelper: + """Helper class for Wait""" + + +__all__ = ["Wait"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/segment/__cmd_group.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/segment/__cmd_group.py new file mode 100644 index 00000000000..1e81290564a --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/segment/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "vmware workload-network segment", +) +class __CMDGroup(AAZCommandGroup): + """Commands to manage a Segment workload network. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/segment/__init__.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/segment/__init__.py new file mode 100644 index 00000000000..db73033039b --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/segment/__init__.py @@ -0,0 +1,17 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._create import * +from ._delete import * +from ._list import * +from ._show import * +from ._update import * +from ._wait import * diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/segment/_create.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/segment/_create.py new file mode 100644 index 00000000000..770ae52e732 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/segment/_create.py @@ -0,0 +1,307 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware workload-network segment create", +) +class Create(AAZCommand): + """Create a segment by id in a private cloud workload network. + + :example: Create a segment by ID in a workload network. + az vmware workload-network segment create --resource-group group1 --private-cloud cloud1 --segment segment1 --display-name segment1 --connected-gateway /infra/tier-1s/gateway --revision 1 --dhcp-ranges 40.20.0.0 40.20.0.1 --gateway-address 40.20.20.20/16 + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/workloadnetworks/default/segments/{}", "2022-05-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.segment = AAZStrArg( + options=["-n", "--name", "--segment"], + help="NSX Segment identifier. Generally the same as the Segment's display name", + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.connected_gateway = AAZStrArg( + options=["--connected-gateway"], + arg_group="Properties", + help="Gateway which to connect segment to.", + ) + _args_schema.display_name = AAZStrArg( + options=["--display-name"], + arg_group="Properties", + help="Display name of the segment.", + ) + _args_schema.revision = AAZIntArg( + options=["--revision"], + arg_group="Properties", + help="NSX revision number.", + ) + + # define Arg Group "Subnet" + + _args_schema = cls._args_schema + _args_schema.dhcp_ranges = AAZListArg( + options=["--dhcp-ranges"], + arg_group="Subnet", + help="DHCP Range assigned for subnet.", + ) + _args_schema.gateway_address = AAZStrArg( + options=["--gateway-address"], + arg_group="Subnet", + help="Gateway address.", + ) + + dhcp_ranges = cls._args_schema.dhcp_ranges + dhcp_ranges.Element = AAZStrArg() + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.WorkloadNetworksCreateSegments(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class WorkloadNetworksCreateSegments(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "segmentId", self.ctx.args.segment, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("connectedGateway", AAZStrType, ".connected_gateway") + properties.set_prop("displayName", AAZStrType, ".display_name") + properties.set_prop("revision", AAZIntType, ".revision") + properties.set_prop("subnet", AAZObjectType) + + subnet = _builder.get(".properties.subnet") + if subnet is not None: + subnet.set_prop("dhcpRanges", AAZListType, ".dhcp_ranges") + subnet.set_prop("gatewayAddress", AAZStrType, ".gateway_address") + + dhcp_ranges = _builder.get(".properties.subnet.dhcpRanges") + if dhcp_ranges is not None: + dhcp_ranges.set_elements(AAZStrType, ".") + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200_201.properties + properties.connected_gateway = AAZStrType( + serialized_name="connectedGateway", + ) + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.port_vif = AAZListType( + serialized_name="portVif", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.revision = AAZIntType() + properties.status = AAZStrType( + flags={"read_only": True}, + ) + properties.subnet = AAZObjectType() + + port_vif = cls._schema_on_200_201.properties.port_vif + port_vif.Element = AAZObjectType() + + _element = cls._schema_on_200_201.properties.port_vif.Element + _element.port_name = AAZStrType( + serialized_name="portName", + ) + + subnet = cls._schema_on_200_201.properties.subnet + subnet.dhcp_ranges = AAZListType( + serialized_name="dhcpRanges", + ) + subnet.gateway_address = AAZStrType( + serialized_name="gatewayAddress", + ) + + dhcp_ranges = cls._schema_on_200_201.properties.subnet.dhcp_ranges + dhcp_ranges.Element = AAZStrType() + + return cls._schema_on_200_201 + + +class _CreateHelper: + """Helper class for Create""" + + +__all__ = ["Create"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/segment/_delete.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/segment/_delete.py new file mode 100644 index 00000000000..968d66fe904 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/segment/_delete.py @@ -0,0 +1,173 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware workload-network segment delete", + confirmation="This will delete the workload network segment. Are you sure?", +) +class Delete(AAZCommand): + """Delete a segment by id in a private cloud workload network. + + :example: Delete a segment by ID in a workload network. + az vmware workload-network segment delete --resource-group group1 --private-cloud cloud1 --segment segment1 + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/workloadnetworks/default/segments/{}", "2022-05-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, None) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.segment = AAZStrArg( + options=["-n", "--name", "--segment"], + help="NSX Segment identifier. Generally the same as the Segment's display name", + required=True, + id_part="child_name_2", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.WorkloadNetworksDeleteSegment(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class WorkloadNetworksDeleteSegment(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [204]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_204, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "segmentId", self.ctx.args.segment, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/segment/_list.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/segment/_list.py new file mode 100644 index 00000000000..fa7bf1b314c --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/segment/_list.py @@ -0,0 +1,229 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware workload-network segment list", +) +class List(AAZCommand): + """List of segments in a private cloud workload network. + + :example: List of segments in a workload network. + az vmware workload-network segment list --resource-group group1 --private-cloud cloud1 + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/workloadnetworks/default/segments", "2022-05-01"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WorkloadNetworksListSegments(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class WorkloadNetworksListSegments(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + flags={"read_only": True}, + ) + _schema_on_200.value = AAZListType( + flags={"read_only": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.connected_gateway = AAZStrType( + serialized_name="connectedGateway", + ) + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.port_vif = AAZListType( + serialized_name="portVif", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.revision = AAZIntType() + properties.status = AAZStrType( + flags={"read_only": True}, + ) + properties.subnet = AAZObjectType() + + port_vif = cls._schema_on_200.value.Element.properties.port_vif + port_vif.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.properties.port_vif.Element + _element.port_name = AAZStrType( + serialized_name="portName", + ) + + subnet = cls._schema_on_200.value.Element.properties.subnet + subnet.dhcp_ranges = AAZListType( + serialized_name="dhcpRanges", + ) + subnet.gateway_address = AAZStrType( + serialized_name="gatewayAddress", + ) + + dhcp_ranges = cls._schema_on_200.value.Element.properties.subnet.dhcp_ranges + dhcp_ranges.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/segment/_show.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/segment/_show.py new file mode 100644 index 00000000000..c8cc234ebca --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/segment/_show.py @@ -0,0 +1,226 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware workload-network segment show", +) +class Show(AAZCommand): + """Get a segment by id in a private cloud workload network. + + :example: Get a segment by ID in a workload network. + az vmware workload-network segment show --resource-group group1 --private-cloud cloud1 --segment segment1 + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/workloadnetworks/default/segments/{}", "2022-05-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.segment = AAZStrArg( + options=["-n", "--name", "--segment"], + help="NSX Segment identifier. Generally the same as the Segment's display name", + required=True, + id_part="child_name_2", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WorkloadNetworksGetSegment(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class WorkloadNetworksGetSegment(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "segmentId", self.ctx.args.segment, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.connected_gateway = AAZStrType( + serialized_name="connectedGateway", + ) + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.port_vif = AAZListType( + serialized_name="portVif", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.revision = AAZIntType() + properties.status = AAZStrType( + flags={"read_only": True}, + ) + properties.subnet = AAZObjectType() + + port_vif = cls._schema_on_200.properties.port_vif + port_vif.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.port_vif.Element + _element.port_name = AAZStrType( + serialized_name="portName", + ) + + subnet = cls._schema_on_200.properties.subnet + subnet.dhcp_ranges = AAZListType( + serialized_name="dhcpRanges", + ) + subnet.gateway_address = AAZStrType( + serialized_name="gatewayAddress", + ) + + dhcp_ranges = cls._schema_on_200.properties.subnet.dhcp_ranges + dhcp_ranges.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/segment/_update.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/segment/_update.py new file mode 100644 index 00000000000..c5629576620 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/segment/_update.py @@ -0,0 +1,458 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware workload-network segment update", +) +class Update(AAZCommand): + """Update a segment by id in a private cloud workload network. + + :example: Update a segment by ID in a workload network. + az vmware workload-network segment update --resource-group group1 --private-cloud cloud1 --segment segment1 --display-name segment1 --connected-gateway /infra/tier-1s/gateway --revision 1 --dhcp-ranges 40.20.0.0 40.20.0.1 --gateway-address 40.20.20.20/16 + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/workloadnetworks/default/segments/{}", "2022-05-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + AZ_SUPPORT_GENERIC_UPDATE = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.segment = AAZStrArg( + options=["-n", "--name", "--segment"], + help="NSX Segment identifier. Generally the same as the Segment's display name", + required=True, + id_part="child_name_2", + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.connected_gateway = AAZStrArg( + options=["--connected-gateway"], + arg_group="Properties", + help="Gateway which to connect segment to.", + nullable=True, + ) + _args_schema.display_name = AAZStrArg( + options=["--display-name"], + arg_group="Properties", + help="Display name of the segment.", + nullable=True, + ) + _args_schema.revision = AAZIntArg( + options=["--revision"], + arg_group="Properties", + help="NSX revision number.", + nullable=True, + ) + + # define Arg Group "Subnet" + + _args_schema = cls._args_schema + _args_schema.dhcp_ranges = AAZListArg( + options=["--dhcp-ranges"], + arg_group="Subnet", + help="DHCP Range assigned for subnet.", + nullable=True, + ) + _args_schema.gateway_address = AAZStrArg( + options=["--gateway-address"], + arg_group="Subnet", + help="Gateway address.", + nullable=True, + ) + + dhcp_ranges = cls._args_schema.dhcp_ranges + dhcp_ranges.Element = AAZStrArg( + nullable=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WorkloadNetworksGetSegment(ctx=self.ctx)() + self.pre_instance_update(self.ctx.vars.instance) + self.InstanceUpdateByJson(ctx=self.ctx)() + self.InstanceUpdateByGeneric(ctx=self.ctx)() + self.post_instance_update(self.ctx.vars.instance) + yield self.WorkloadNetworksCreateSegments(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + @register_callback + def pre_instance_update(self, instance): + pass + + @register_callback + def post_instance_update(self, instance): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class WorkloadNetworksGetSegment(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "segmentId", self.ctx.args.segment, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _UpdateHelper._build_schema_workload_network_segment_read(cls._schema_on_200) + + return cls._schema_on_200 + + class WorkloadNetworksCreateSegments(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "segmentId", self.ctx.args.segment, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + value=self.ctx.vars.instance, + ) + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + _UpdateHelper._build_schema_workload_network_segment_read(cls._schema_on_200_201) + + return cls._schema_on_200_201 + + class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance(self.ctx.vars.instance) + + def _update_instance(self, instance): + _instance_value, _builder = self.new_content_builder( + self.ctx.args, + value=instance, + typ=AAZObjectType + ) + _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("connectedGateway", AAZStrType, ".connected_gateway") + properties.set_prop("displayName", AAZStrType, ".display_name") + properties.set_prop("revision", AAZIntType, ".revision") + properties.set_prop("subnet", AAZObjectType) + + subnet = _builder.get(".properties.subnet") + if subnet is not None: + subnet.set_prop("dhcpRanges", AAZListType, ".dhcp_ranges") + subnet.set_prop("gatewayAddress", AAZStrType, ".gateway_address") + + dhcp_ranges = _builder.get(".properties.subnet.dhcpRanges") + if dhcp_ranges is not None: + dhcp_ranges.set_elements(AAZStrType, ".") + + return _instance_value + + class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance_by_generic( + self.ctx.vars.instance, + self.ctx.generic_update_args + ) + + +class _UpdateHelper: + """Helper class for Update""" + + _schema_workload_network_segment_read = None + + @classmethod + def _build_schema_workload_network_segment_read(cls, _schema): + if cls._schema_workload_network_segment_read is not None: + _schema.id = cls._schema_workload_network_segment_read.id + _schema.name = cls._schema_workload_network_segment_read.name + _schema.properties = cls._schema_workload_network_segment_read.properties + _schema.type = cls._schema_workload_network_segment_read.type + return + + cls._schema_workload_network_segment_read = _schema_workload_network_segment_read = AAZObjectType() + + workload_network_segment_read = _schema_workload_network_segment_read + workload_network_segment_read.id = AAZStrType( + flags={"read_only": True}, + ) + workload_network_segment_read.name = AAZStrType( + flags={"read_only": True}, + ) + workload_network_segment_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + workload_network_segment_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_workload_network_segment_read.properties + properties.connected_gateway = AAZStrType( + serialized_name="connectedGateway", + ) + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.port_vif = AAZListType( + serialized_name="portVif", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.revision = AAZIntType() + properties.status = AAZStrType( + flags={"read_only": True}, + ) + properties.subnet = AAZObjectType() + + port_vif = _schema_workload_network_segment_read.properties.port_vif + port_vif.Element = AAZObjectType() + + _element = _schema_workload_network_segment_read.properties.port_vif.Element + _element.port_name = AAZStrType( + serialized_name="portName", + ) + + subnet = _schema_workload_network_segment_read.properties.subnet + subnet.dhcp_ranges = AAZListType( + serialized_name="dhcpRanges", + ) + subnet.gateway_address = AAZStrType( + serialized_name="gatewayAddress", + ) + + dhcp_ranges = _schema_workload_network_segment_read.properties.subnet.dhcp_ranges + dhcp_ranges.Element = AAZStrType() + + _schema.id = cls._schema_workload_network_segment_read.id + _schema.name = cls._schema_workload_network_segment_read.name + _schema.properties = cls._schema_workload_network_segment_read.properties + _schema.type = cls._schema_workload_network_segment_read.type + + +__all__ = ["Update"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/segment/_wait.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/segment/_wait.py new file mode 100644 index 00000000000..65eafa4ce86 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/segment/_wait.py @@ -0,0 +1,222 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware workload-network segment wait", +) +class Wait(AAZWaitCommand): + """Place the CLI in a waiting state until a condition is met. + """ + + _aaz_info = { + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/workloadnetworks/default/segments/{}", "2022-05-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.segment = AAZStrArg( + options=["-n", "--name", "--segment"], + help="NSX Segment identifier. Generally the same as the Segment's display name", + required=True, + id_part="child_name_2", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WorkloadNetworksGetSegment(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False) + return result + + class WorkloadNetworksGetSegment(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "segmentId", self.ctx.args.segment, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.connected_gateway = AAZStrType( + serialized_name="connectedGateway", + ) + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.port_vif = AAZListType( + serialized_name="portVif", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.revision = AAZIntType() + properties.status = AAZStrType( + flags={"read_only": True}, + ) + properties.subnet = AAZObjectType() + + port_vif = cls._schema_on_200.properties.port_vif + port_vif.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.port_vif.Element + _element.port_name = AAZStrType( + serialized_name="portName", + ) + + subnet = cls._schema_on_200.properties.subnet + subnet.dhcp_ranges = AAZListType( + serialized_name="dhcpRanges", + ) + subnet.gateway_address = AAZStrType( + serialized_name="gatewayAddress", + ) + + dhcp_ranges = cls._schema_on_200.properties.subnet.dhcp_ranges + dhcp_ranges.Element = AAZStrType() + + return cls._schema_on_200 + + +class _WaitHelper: + """Helper class for Wait""" + + +__all__ = ["Wait"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/vm/__cmd_group.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/vm/__cmd_group.py new file mode 100644 index 00000000000..952a0442360 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/vm/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "vmware workload-network vm", +) +class __CMDGroup(AAZCommandGroup): + """Commands to manage a Virtual Machine workload network. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/vm/__init__.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/vm/__init__.py new file mode 100644 index 00000000000..2df85698253 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/vm/__init__.py @@ -0,0 +1,13 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._list import * +from ._show import * diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/vm/_list.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/vm/_list.py new file mode 100644 index 00000000000..67ce9289e1f --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/vm/_list.py @@ -0,0 +1,198 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware workload-network vm list", +) +class List(AAZCommand): + """List of virtual machines in a private cloud workload network. + + :example: List of Virtual Machines in a workload network. + az vmware workload-network vm list --resource-group group1 --private-cloud cloud1 + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/workloadnetworks/default/virtualmachines", "2022-05-01"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WorkloadNetworksListVirtualMachines(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class WorkloadNetworksListVirtualMachines(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/virtualMachines", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + flags={"read_only": True}, + ) + _schema_on_200.value = AAZListType( + flags={"read_only": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.vm_type = AAZStrType( + serialized_name="vmType", + flags={"read_only": True}, + ) + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/vm/_show.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/vm/_show.py new file mode 100644 index 00000000000..ef6df061f75 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/vm/_show.py @@ -0,0 +1,195 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware workload-network vm show", +) +class Show(AAZCommand): + """Get a virtual machine by id in a private cloud workload network. + + :example: Get a Virtual Machines by ID in a workload network. + az vmware workload-network vm show --resource-group group1 --private-cloud cloud1 --virtual-machine vm1 + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/workloadnetworks/default/virtualmachines/{}", "2022-05-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.virtual_machine = AAZStrArg( + options=["-n", "--name", "--virtual-machine"], + help="Virtual Machine identifier", + required=True, + id_part="child_name_2", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WorkloadNetworksGetVirtualMachine(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class WorkloadNetworksGetVirtualMachine(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/virtualMachines/{virtualMachineId}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "virtualMachineId", self.ctx.args.virtual_machine, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.vm_type = AAZStrType( + serialized_name="vmType", + flags={"read_only": True}, + ) + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/vm_group/__cmd_group.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/vm_group/__cmd_group.py new file mode 100644 index 00000000000..54c0ff4164a --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/vm_group/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "vmware workload-network vm-group", +) +class __CMDGroup(AAZCommandGroup): + """Commands to manage a VM Group workload network. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/vm_group/__init__.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/vm_group/__init__.py new file mode 100644 index 00000000000..db73033039b --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/vm_group/__init__.py @@ -0,0 +1,17 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._create import * +from ._delete import * +from ._list import * +from ._show import * +from ._update import * +from ._wait import * diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/vm_group/_create.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/vm_group/_create.py new file mode 100644 index 00000000000..bd14e699cf9 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/vm_group/_create.py @@ -0,0 +1,264 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware workload-network vm-group create", +) +class Create(AAZCommand): + """Create a vm group by id in a private cloud workload network. + + :example: Create a VM Group by ID in a workload network. + az vmware workload-network vm-group create --resource-group group1 --private-cloud cloud1 --vm-group vmGroup1 --display-name vmGroup1 --members 564d43da-fefc-2a3b-1d92-42855622fa50 --revision 1 + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/workloadnetworks/default/vmgroups/{}", "2022-05-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.vm_group = AAZStrArg( + options=["-n", "--name", "--vm-group"], + help="NSX VM Group identifier. Generally the same as the VM Group's display name", + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.display_name = AAZStrArg( + options=["--display-name"], + arg_group="Properties", + help="Display name of the VM group.", + ) + _args_schema.members = AAZListArg( + options=["--members"], + arg_group="Properties", + help="Virtual machine members of this group.", + ) + _args_schema.revision = AAZIntArg( + options=["--revision"], + arg_group="Properties", + help="NSX revision number.", + ) + + members = cls._args_schema.members + members.Element = AAZStrArg() + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.WorkloadNetworksCreateVMGroup(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class WorkloadNetworksCreateVMGroup(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "vmGroupId", self.ctx.args.vm_group, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("displayName", AAZStrType, ".display_name") + properties.set_prop("members", AAZListType, ".members") + properties.set_prop("revision", AAZIntType, ".revision") + + members = _builder.get(".properties.members") + if members is not None: + members.set_elements(AAZStrType, ".") + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200_201.properties + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.members = AAZListType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.revision = AAZIntType() + properties.status = AAZStrType( + flags={"read_only": True}, + ) + + members = cls._schema_on_200_201.properties.members + members.Element = AAZStrType() + + return cls._schema_on_200_201 + + +class _CreateHelper: + """Helper class for Create""" + + +__all__ = ["Create"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/vm_group/_delete.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/vm_group/_delete.py new file mode 100644 index 00000000000..9dc259133b5 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/vm_group/_delete.py @@ -0,0 +1,173 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware workload-network vm-group delete", + confirmation="This will delete the workload network VM group. Are you sure?", +) +class Delete(AAZCommand): + """Delete a vm group by id in a private cloud workload network. + + :example: Delete a VM Group by ID in a private cloud workload network. + az vmware workload-network vm-group delete --resource-group group1 --private-cloud cloud1 --vm-group vmGroup1 + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/workloadnetworks/default/vmgroups/{}", "2022-05-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, None) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.vm_group = AAZStrArg( + options=["-n", "--name", "--vm-group"], + help="NSX VM Group identifier. Generally the same as the VM Group's display name", + required=True, + id_part="child_name_2", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.WorkloadNetworksDeleteVMGroup(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class WorkloadNetworksDeleteVMGroup(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [204]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_204, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "vmGroupId", self.ctx.args.vm_group, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/vm_group/_list.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/vm_group/_list.py new file mode 100644 index 00000000000..cbc51d01c95 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/vm_group/_list.py @@ -0,0 +1,206 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware workload-network vm-group list", +) +class List(AAZCommand): + """List of vm groups in a private cloud workload network. + + :example: List of VM Groups in a workload network. + az vmware workload-network vm-group list --resource-group group1 --private-cloud cloud1 + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/workloadnetworks/default/vmgroups", "2022-05-01"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WorkloadNetworksListVMGroups(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class WorkloadNetworksListVMGroups(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + flags={"read_only": True}, + ) + _schema_on_200.value = AAZListType( + flags={"read_only": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.members = AAZListType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.revision = AAZIntType() + properties.status = AAZStrType( + flags={"read_only": True}, + ) + + members = cls._schema_on_200.value.Element.properties.members + members.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/vm_group/_show.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/vm_group/_show.py new file mode 100644 index 00000000000..94894db2f9b --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/vm_group/_show.py @@ -0,0 +1,203 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware workload-network vm-group show", +) +class Show(AAZCommand): + """Get a vm group by id in a private cloud workload network. + + :example: Get a VM Group by ID in a workload network. + az vmware workload-network vm-group show --resource-group group1 --private-cloud cloud1 --vm-group vmGroup1 + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/workloadnetworks/default/vmgroups/{}", "2022-05-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.vm_group = AAZStrArg( + options=["-n", "--name", "--vm-group"], + help="NSX VM Group identifier. Generally the same as the VM Group's display name", + required=True, + id_part="child_name_2", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WorkloadNetworksGetVMGroup(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class WorkloadNetworksGetVMGroup(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "vmGroupId", self.ctx.args.vm_group, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.members = AAZListType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.revision = AAZIntType() + properties.status = AAZStrType( + flags={"read_only": True}, + ) + + members = cls._schema_on_200.properties.members + members.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/vm_group/_update.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/vm_group/_update.py new file mode 100644 index 00000000000..d01002cc0a5 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/vm_group/_update.py @@ -0,0 +1,413 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware workload-network vm-group update", +) +class Update(AAZCommand): + """Update a vm group by id in a private cloud workload network. + + :example: Update a VM Group by ID in a workload network. + az vmware workload-network vm-group update --resource-group group1 --private-cloud cloud1 --vm-group vmGroup1 --display-name vmGroup1 --members 564d43da-fefc-2a3b-1d92-42855622fa50 --revision 1 + """ + + _aaz_info = { + "version": "2022-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/workloadnetworks/default/vmgroups/{}", "2022-05-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + AZ_SUPPORT_GENERIC_UPDATE = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.vm_group = AAZStrArg( + options=["-n", "--name", "--vm-group"], + help="NSX VM Group identifier. Generally the same as the VM Group's display name", + required=True, + id_part="child_name_2", + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.display_name = AAZStrArg( + options=["--display-name"], + arg_group="Properties", + help="Display name of the VM group.", + nullable=True, + ) + _args_schema.members = AAZListArg( + options=["--members"], + arg_group="Properties", + help="Virtual machine members of this group.", + nullable=True, + ) + _args_schema.revision = AAZIntArg( + options=["--revision"], + arg_group="Properties", + help="NSX revision number.", + nullable=True, + ) + + members = cls._args_schema.members + members.Element = AAZStrArg( + nullable=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WorkloadNetworksGetVMGroup(ctx=self.ctx)() + self.pre_instance_update(self.ctx.vars.instance) + self.InstanceUpdateByJson(ctx=self.ctx)() + self.InstanceUpdateByGeneric(ctx=self.ctx)() + self.post_instance_update(self.ctx.vars.instance) + yield self.WorkloadNetworksCreateVMGroup(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + @register_callback + def pre_instance_update(self, instance): + pass + + @register_callback + def post_instance_update(self, instance): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class WorkloadNetworksGetVMGroup(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "vmGroupId", self.ctx.args.vm_group, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _UpdateHelper._build_schema_workload_network_vm_group_read(cls._schema_on_200) + + return cls._schema_on_200 + + class WorkloadNetworksCreateVMGroup(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "vmGroupId", self.ctx.args.vm_group, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + value=self.ctx.vars.instance, + ) + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + _UpdateHelper._build_schema_workload_network_vm_group_read(cls._schema_on_200_201) + + return cls._schema_on_200_201 + + class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance(self.ctx.vars.instance) + + def _update_instance(self, instance): + _instance_value, _builder = self.new_content_builder( + self.ctx.args, + value=instance, + typ=AAZObjectType + ) + _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("displayName", AAZStrType, ".display_name") + properties.set_prop("members", AAZListType, ".members") + properties.set_prop("revision", AAZIntType, ".revision") + + members = _builder.get(".properties.members") + if members is not None: + members.set_elements(AAZStrType, ".") + + return _instance_value + + class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance_by_generic( + self.ctx.vars.instance, + self.ctx.generic_update_args + ) + + +class _UpdateHelper: + """Helper class for Update""" + + _schema_workload_network_vm_group_read = None + + @classmethod + def _build_schema_workload_network_vm_group_read(cls, _schema): + if cls._schema_workload_network_vm_group_read is not None: + _schema.id = cls._schema_workload_network_vm_group_read.id + _schema.name = cls._schema_workload_network_vm_group_read.name + _schema.properties = cls._schema_workload_network_vm_group_read.properties + _schema.type = cls._schema_workload_network_vm_group_read.type + return + + cls._schema_workload_network_vm_group_read = _schema_workload_network_vm_group_read = AAZObjectType() + + workload_network_vm_group_read = _schema_workload_network_vm_group_read + workload_network_vm_group_read.id = AAZStrType( + flags={"read_only": True}, + ) + workload_network_vm_group_read.name = AAZStrType( + flags={"read_only": True}, + ) + workload_network_vm_group_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + workload_network_vm_group_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_workload_network_vm_group_read.properties + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.members = AAZListType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.revision = AAZIntType() + properties.status = AAZStrType( + flags={"read_only": True}, + ) + + members = _schema_workload_network_vm_group_read.properties.members + members.Element = AAZStrType() + + _schema.id = cls._schema_workload_network_vm_group_read.id + _schema.name = cls._schema_workload_network_vm_group_read.name + _schema.properties = cls._schema_workload_network_vm_group_read.properties + _schema.type = cls._schema_workload_network_vm_group_read.type + + +__all__ = ["Update"] diff --git a/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/vm_group/_wait.py b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/vm_group/_wait.py new file mode 100644 index 00000000000..427432b4479 --- /dev/null +++ b/src/vmware/azext_vmware/aaz/latest/vmware/workload_network/vm_group/_wait.py @@ -0,0 +1,199 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "vmware workload-network vm-group wait", +) +class Wait(AAZWaitCommand): + """Place the CLI in a waiting state until a condition is met. + """ + + _aaz_info = { + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.avs/privateclouds/{}/workloadnetworks/default/vmgroups/{}", "2022-05-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.private_cloud = AAZStrArg( + options=["-c", "--private-cloud"], + help="Name of the private cloud", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.vm_group = AAZStrArg( + options=["-n", "--name", "--vm-group"], + help="NSX VM Group identifier. Generally the same as the VM Group's display name", + required=True, + id_part="child_name_2", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WorkloadNetworksGetVMGroup(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False) + return result + + class WorkloadNetworksGetVMGroup(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "privateCloudName", self.ctx.args.private_cloud, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "vmGroupId", self.ctx.args.vm_group, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.members = AAZListType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.revision = AAZIntType() + properties.status = AAZStrType( + flags={"read_only": True}, + ) + + members = cls._schema_on_200.properties.members + members.Element = AAZStrType() + + return cls._schema_on_200 + + +class _WaitHelper: + """Helper class for Wait""" + + +__all__ = ["Wait"] diff --git a/src/vmware/azext_vmware/action.py b/src/vmware/azext_vmware/action.py index 1fe25003123..e6017a28b93 100644 --- a/src/vmware/azext_vmware/action.py +++ b/src/vmware/azext_vmware/action.py @@ -9,7 +9,6 @@ from typing import Dict, List from azure.cli.core.azclierror import InvalidArgumentValueError, RequiredArgumentMissingError from knack.util import CLIError -from azext_vmware.vendored_sdks.avs_client.models import ScriptExecutionParameter, ScriptExecutionParameterType, ScriptStringExecutionParameter, ScriptSecureStringExecutionParameter, PSCredentialExecutionParameter class ScriptExecutionNamedOutputAction(argparse._AppendAction): @@ -35,29 +34,43 @@ def __call__(self, parser, namespace, values, option_string=None): namespace.parameters = [parameter] -def script_execution_parameters(values: List[str]) -> ScriptExecutionParameter: +def script_execution_parameters(values: List[str]): values = dict(map(lambda x: x.split('=', 1), values)) tp = require(values, "type") type_lower = tp.lower() - - if type_lower == ScriptExecutionParameterType.VALUE.lower(): + if type_lower == "Value".lower(): try: - return ScriptStringExecutionParameter(name=require(values, "name"), value=values.get("value")) + return { + "name": require(values, "name"), + "value": { + "value": values.get("value") + } + } except CLIError as error: - raise InvalidArgumentValueError('parsing {} script execution parameter'.format(ScriptExecutionParameterType.VALUE)) from error + raise InvalidArgumentValueError('parsing {} script execution parameter'.format('Value')) from error - elif type_lower == ScriptExecutionParameterType.SECURE_VALUE.lower(): + elif type_lower == "SecureValue".lower(): try: - return ScriptSecureStringExecutionParameter(name=require(values, "name"), secure_value=values.get("secureValue")) + return { + "name": require(values, "name"), + "secure_value": { + "secure_value": values.get("secureValue") + } + } except CLIError as error: - raise InvalidArgumentValueError('parsing {} script execution parameter'.format(ScriptExecutionParameterType.SECURE_VALUE)) from error + raise InvalidArgumentValueError('parsing {} script execution parameter'.format('SecureValue')) from error - elif type_lower == ScriptExecutionParameterType.CREDENTIAL.lower(): + elif type_lower == "Credential".lower(): try: - return PSCredentialExecutionParameter(name=require(values, "name"), username=values.get("username"), password=values.get("password")) + return { + "name": require(values, "name"), + "credential": { + "username": values.get("username"), + "password": values.get("password"), + } + } except CLIError as error: - raise InvalidArgumentValueError('parsing {} script execution parameter'.format(ScriptExecutionParameterType.CREDENTIAL)) from error - + raise InvalidArgumentValueError('parsing {} script execution parameter'.format('Credential')) from error else: raise InvalidArgumentValueError('script execution paramater type \'{}\' not matched'.format(tp)) diff --git a/src/vmware/azext_vmware/azext_metadata.json b/src/vmware/azext_vmware/azext_metadata.json index 4e44ef19715..aa8808714b7 100644 --- a/src/vmware/azext_vmware/azext_metadata.json +++ b/src/vmware/azext_vmware/azext_metadata.json @@ -1,4 +1,4 @@ { "azext.isPreview": false, - "azext.minCliCoreVersion": "2.11.0" + "azext.minCliCoreVersion": "2.51.0" } \ No newline at end of file diff --git a/src/vmware/azext_vmware/commands.py b/src/vmware/azext_vmware/commands.py index 4945d6e0b12..f3404311bad 100644 --- a/src/vmware/azext_vmware/commands.py +++ b/src/vmware/azext_vmware/commands.py @@ -4,209 +4,97 @@ # -------------------------------------------------------------------------------------------- # pylint: disable=line-too-long,too-many-statements -from azure.cli.core.commands import CliCommandType -from azext_vmware._client_factory import cf_vmware - def load_command_table(self, _): - vmware_sdk = CliCommandType( - operations_tmpl='azext_vmware.vendored_sdks.operations#PrivateCloudOperations.{}', - client_factory=cf_vmware) + with self.command_group('vmware private-cloud') as g: + from .operations.private_cloud import PrivateCloudCreate, PrivateCloudUpdate + self.command_table['vmware private-cloud create'] = PrivateCloudCreate(loader=self) + self.command_table['vmware private-cloud update'] = PrivateCloudUpdate(loader=self) - with self.command_group('vmware private-cloud', vmware_sdk, client_factory=cf_vmware) as g: - g.custom_command('list', 'privatecloud_list') - g.custom_show_command('show', 'privatecloud_show') - g.custom_command('create', 'privatecloud_create') - g.custom_command('update', 'privatecloud_update') - g.custom_command('delete', 'privatecloud_delete') g.custom_command('listadmincredentials', 'privatecloud_listadmincredentials', deprecate_info=g.deprecate(redirect='az vmware private-cloud list-admin-credentials', hide=True)) - g.custom_command('list-admin-credentials', 'privatecloud_listadmincredentials') - g.custom_command('addidentitysource', 'privatecloud_addidentitysource', deprecate_info=g.deprecate(redirect='az vmware private-cloud add-identity-source', hide=True)) - g.custom_command('add-identity-source', 'privatecloud_addidentitysource') - g.custom_command('deleteidentitysource', 'privatecloud_deleteidentitysource', deprecate_info=g.deprecate(redirect='az vmware private-cloud delete-identity-source', hide=True)) - g.custom_command('delete-identity-source', 'privatecloud_deleteidentitysource') + g.custom_command('addidentitysource', 'privatecloud_addidentitysource', deprecate_info=g.deprecate(redirect='az vmware private-cloud identity-source create', hide=True)) + g.custom_command('add-identity-source', 'privatecloud_addidentitysource', deprecate_info=g.deprecate(redirect='az vmware private-cloud identity-source create', hide=True)) + g.custom_command('deleteidentitysource', 'privatecloud_deleteidentitysource', deprecate_info=g.deprecate(redirect='az vmware private-cloud identity-source delete', hide=True)) + g.custom_command('delete-identity-source', 'privatecloud_deleteidentitysource', deprecate_info=g.deprecate(redirect='az vmware private-cloud identity-source delete', hide=True)) g.custom_command('add-cmk-encryption', 'privatecloud_addcmkencryption', deprecate_info=g.deprecate(redirect='az vmware private-cloud enable-cmk-encryption', hide=True)) g.custom_command('delete-cmk-encryption', 'privatecloud_deletecmkenryption', deprecate_info=g.deprecate(redirect='az vmware private-cloud disable-cmk-encryption', hide=True)) g.custom_command('enable-cmk-encryption', 'privatecloud_addcmkencryption') g.custom_command('disable-cmk-encryption', 'privatecloud_deletecmkenryption') - g.custom_command('rotate-vcenter-password', 'privatecloud_rotate_vcenter_password') g.custom_command('rotate-nsxt-password', 'privatecloud_rotate_nsxt_password') - with self.command_group('vmware private-cloud identity', vmware_sdk, client_factory=cf_vmware) as g: + with self.command_group('vmware private-cloud identity') as g: g.custom_command('assign', 'privatecloud_identity_assign') g.custom_command('remove', 'privatecloud_identity_remove') g.custom_show_command('show', 'privatecloud_identity_get') - with self.command_group('vmware cluster', vmware_sdk, client_factory=cf_vmware) as g: - g.custom_command('create', 'cluster_create') - g.custom_command('update', 'cluster_update') - g.custom_command('list', 'cluster_list') - g.custom_command('delete', 'cluster_delete') - g.custom_command('list-zones', 'cluster_list_zones') - g.custom_show_command('show', 'cluster_show') - - with self.command_group('vmware authorization', vmware_sdk, client_factory=cf_vmware) as g: - g.custom_command('create', 'authorization_create') - g.custom_command('list', 'authorization_list') - g.custom_command('delete', 'authorization_delete') - g.custom_show_command('show', 'authorization_show') - - with self.command_group('vmware hcx-enterprise-site', vmware_sdk, client_factory=cf_vmware) as g: - g.custom_command('create', 'hcxenterprisesite_create') - g.custom_command('list', 'hcxenterprisesite_list') - g.custom_command('delete', 'hcxenterprisesite_delete') - g.custom_show_command('show', 'hcxenterprisesite_show') - - with self.command_group('vmware location', vmware_sdk, client_factory=cf_vmware) as g: + with self.command_group('vmware location') as g: g.custom_command('checkquotaavailability', 'check_quota_availability', deprecate_info=g.deprecate(redirect='az vmware location check-quota-availability', hide=True)) g.custom_command('checktrialavailability', 'check_trial_availability', deprecate_info=g.deprecate(redirect='az vmware location check-trial-availability', hide=True)) - g.custom_command('check-quota-availability', 'check_quota_availability') - g.custom_command('check-trial-availability', 'check_trial_availability') - with self.command_group('vmware datastore', vmware_sdk, client_factory=cf_vmware) as g: + with self.command_group('vmware datastore') as g: g.custom_command('create', 'datastore_create', deprecate_info=g.deprecate(redirect='"az vmware datastore netapp-volume create" or "az vmware datastore disk-pool-volume create"', hide=True)) - g.custom_command('list', 'datastore_list') - g.custom_show_command('show', 'datastore_show') - g.custom_command('delete', 'datastore_delete') - - with self.command_group('vmware datastore netapp-volume', vmware_sdk, client_factory=cf_vmware) as g: - g.custom_command('create', 'datastore_netappvolume_create') - - with self.command_group('vmware datastore disk-pool-volume', vmware_sdk, client_factory=cf_vmware) as g: - g.custom_command('create', 'datastore_diskpoolvolume_create') - - with self.command_group('vmware addon', vmware_sdk, client_factory=cf_vmware) as g: - g.custom_command('list', 'addon_list') - - with self.command_group('vmware addon vr', vmware_sdk, client_factory=cf_vmware) as g: - g.custom_command('create', 'addon_vr_create') - g.custom_show_command('show', 'addon_vr_show') - g.custom_command('update', 'addon_vr_update') - g.custom_command('delete', 'addon_vr_delete') - - with self.command_group('vmware addon hcx', vmware_sdk, client_factory=cf_vmware) as g: - g.custom_command('create', 'addon_hcx_create') - g.custom_show_command('show', 'addon_hcx_show') - g.custom_command('update', 'addon_hcx_update') - g.custom_command('delete', 'addon_hcx_delete') - - with self.command_group('vmware addon srm', vmware_sdk, client_factory=cf_vmware) as g: - g.custom_command('create', 'addon_srm_create') - g.custom_show_command('show', 'addon_srm_show') - g.custom_command('update', 'addon_srm_update') - g.custom_command('delete', 'addon_srm_delete') - - with self.command_group('vmware addon arc', vmware_sdk, client_factory=cf_vmware) as g: - g.custom_command('create', 'addon_arc_create') - g.custom_show_command('show', 'addon_arc_show') - g.custom_command('update', 'addon_arc_update') - g.custom_command('delete', 'addon_arc_delete') - - with self.command_group('vmware global-reach-connection', vmware_sdk, client_factory=cf_vmware) as g: - g.custom_command('create', 'globalreachconnection_create') - g.custom_command('list', 'globalreachconnection_list') - g.custom_command('delete', 'globalreachconnection_delete') - g.custom_show_command('show', 'globalreachconnection_show') - - with self.command_group('vmware cloud-link', vmware_sdk, client_factory=cf_vmware) as g: - g.custom_command('create', 'cloud_link_create') - g.custom_command('list', 'cloud_link_list') - g.custom_command('delete', 'cloud_link_delete') - g.custom_show_command('show', 'cloud_link_show') - - with self.command_group('vmware script-cmdlet', vmware_sdk, client_factory=cf_vmware) as g: - g.custom_command('list', 'script_cmdlet_list') - g.custom_show_command('show', 'script_cmdlet_show') - - with self.command_group('vmware script-package', vmware_sdk, client_factory=cf_vmware) as g: - g.custom_command('list', 'script_package_list') - g.custom_show_command('show', 'script_package_show') - - with self.command_group('vmware script-execution', vmware_sdk, client_factory=cf_vmware) as g: + + with self.command_group('vmware script-execution') as g: g.custom_command('create', 'script_execution_create') - g.custom_command('list', 'script_execution_list') - g.custom_command('delete', 'script_execution_delete') - g.custom_show_command('show', 'script_execution_show') - - with self.command_group('vmware workload-network dhcp', vmware_sdk, client_factory=cf_vmware) as g: - g.custom_command('list', 'workload_network_dhcp_list') - g.custom_show_command('show', 'workload_network_dhcp_show') - - with self.command_group('vmware workload-network dhcp server', vmware_sdk, client_factory=cf_vmware) as g: - g.custom_command('create', 'workload_network_dhcp_server_create') - g.custom_command('delete', 'workload_network_dhcp_delete') - g.custom_command('update', 'workload_network_dhcp_server_update') - - with self.command_group('vmware workload-network dhcp relay', vmware_sdk, client_factory=cf_vmware) as g: - g.custom_command('create', 'workload_network_dhcp_relay_create') - g.custom_command('delete', 'workload_network_dhcp_delete') - g.custom_command('update', 'workload_network_dhcp_relay_update') - - with self.command_group('vmware workload-network dns-service', vmware_sdk, client_factory=cf_vmware) as g: - g.custom_command('list', 'workload_network_dns_services_list') - g.custom_show_command('show', 'workload_network_dns_services_get') - g.custom_command('create', 'workload_network_dns_services_create') - g.custom_command('update', 'workload_network_dns_services_update') - g.custom_command('delete', 'workload_network_dns_services_delete') - - with self.command_group('vmware workload-network dns-zone', vmware_sdk, client_factory=cf_vmware) as g: - g.custom_command('list', 'workload_network_dns_zone_list') - g.custom_show_command('show', 'workload_network_dns_zone_get') - g.custom_command('create', 'workload_network_dns_zone_create') - g.custom_command('update', 'workload_network_dns_zone_update') - g.custom_command('delete', 'workload_network_dns_zone_delete') - - with self.command_group('vmware workload-network port-mirroring', vmware_sdk, client_factory=cf_vmware) as g: - g.custom_command('list', 'workload_network_port_mirroring_list') - g.custom_show_command('show', 'workload_network_port_mirroring_get') - g.custom_command('create', 'workload_network_port_mirroring_create') - g.custom_command('update', 'workload_network_port_mirroring_update') - g.custom_command('delete', 'workload_network_port_mirroring_delete') - - with self.command_group('vmware workload-network segment', vmware_sdk, client_factory=cf_vmware) as g: - g.custom_command('list', 'workload_network_segment_list') - g.custom_show_command('show', 'workload_network_segment_get') - g.custom_command('create', 'workload_network_segment_create') - g.custom_command('update', 'workload_network_segment_update') - g.custom_command('delete', 'workload_network_segment_delete') - - with self.command_group('vmware workload-network public-ip', vmware_sdk, client_factory=cf_vmware) as g: - g.custom_command('list', 'workload_network_public_ip_list') - g.custom_show_command('show', 'workload_network_public_ip_get') - g.custom_command('create', 'workload_network_public_ip_create') - g.custom_command('delete', 'workload_network_public_ip_delete') - - with self.command_group('vmware workload-network vm-group', vmware_sdk, client_factory=cf_vmware) as g: - g.custom_command('list', 'workload_network_vm_group_list') - g.custom_show_command('show', 'workload_network_vm_group_get') - g.custom_command('create', 'workload_network_vm_group_create') - g.custom_command('update', 'workload_network_vm_group_update') - g.custom_command('delete', 'workload_network_vm_group_delete') - - with self.command_group('vmware workload-network vm', vmware_sdk, client_factory=cf_vmware) as g: - g.custom_command('list', 'workload_network_vm_list') - g.custom_show_command('show', 'workload_network_vm_get') - - with self.command_group('vmware workload-network gateway', vmware_sdk, client_factory=cf_vmware) as g: - g.custom_command('list', 'workload_network_gateway_list') - g.custom_show_command('show', 'workload_network_gateway_get') - - with self.command_group('vmware placement-policy', vmware_sdk, client_factory=cf_vmware) as g: - g.custom_command('list', 'placement_policy_list') - g.custom_show_command('show', 'placement_policy_get') - - with self.command_group('vmware placement-policy vm', vmware_sdk, client_factory=cf_vmware) as g: - g.custom_command('create', 'placement_policy_vm_create') - g.custom_command('update', 'placement_policy_update') - g.custom_command('delete', 'placement_policy_delete') - - with self.command_group('vmware placement-policy vm-host', vmware_sdk, client_factory=cf_vmware) as g: - g.custom_command('create', 'placement_policy_vm_host_create') - g.custom_command('update', 'placement_policy_update') - g.custom_command('delete', 'placement_policy_delete') - - with self.command_group('vmware vm', vmware_sdk, client_factory=cf_vmware) as g: - g.custom_command('list', 'virtual_machine_list') - g.custom_show_command('show', 'virtual_machine_get') - g.custom_command('restrict-movement', 'virtual_machine_restrict') + + with self.command_group('vmware datastore netapp-volume'): + from .operations.datastore import DatastoreNetappVolumeCreate + self.command_table['vmware datastore netapp-volume create'] = DatastoreNetappVolumeCreate(loader=self) + + with self.command_group('vmware datastore disk-pool-volume'): + from .operations.datastore import DatastoreDiskPoolVolumeCreate + self.command_table['vmware datastore disk-pool-volume create'] = DatastoreDiskPoolVolumeCreate(loader=self) + + with self.command_group('vmware addon vr'): + from .operations.addon import AddonVrCreate, AddonVrUpdate, AddonVrShow, AddonVrDelete + self.command_table['vmware addon vr create'] = AddonVrCreate(loader=self) + self.command_table['vmware addon vr update'] = AddonVrUpdate(loader=self) + self.command_table['vmware addon vr show'] = AddonVrShow(loader=self) + self.command_table['vmware addon vr delete'] = AddonVrDelete(loader=self) + + with self.command_group('vmware addon hcx'): + from .operations.addon import AddonHcxCreate, AddonHcxUpdate, AddonHcxShow, AddonHcxDelete + self.command_table['vmware addon hcx create'] = AddonHcxCreate(loader=self) + self.command_table['vmware addon hcx update'] = AddonHcxUpdate(loader=self) + self.command_table['vmware addon hcx show'] = AddonHcxShow(loader=self) + self.command_table['vmware addon hcx delete'] = AddonHcxDelete(loader=self) + + with self.command_group('vmware addon srm'): + from .operations.addon import AddonSrmCreate, AddonSrmUpdate, AddonSrmShow, AddonSrmDelete + self.command_table['vmware addon srm create'] = AddonSrmCreate(loader=self) + self.command_table['vmware addon srm update'] = AddonSrmUpdate(loader=self) + self.command_table['vmware addon srm show'] = AddonSrmShow(loader=self) + self.command_table['vmware addon srm delete'] = AddonSrmDelete(loader=self) + + with self.command_group('vmware addon arc'): + from .operations.addon import AddonArcCreate, AddonArcUpdate, AddonArcShow, AddonArcDelete + self.command_table['vmware addon arc create'] = AddonArcCreate(loader=self) + self.command_table['vmware addon arc update'] = AddonArcUpdate(loader=self) + self.command_table['vmware addon arc show'] = AddonArcShow(loader=self) + self.command_table['vmware addon arc delete'] = AddonArcDelete(loader=self) + + with self.command_group('vmware workload-network dhcp relay'): + from .operations.workload_network import DHCPRelayCreate, DHCPRelayUpdate, DHCPRelayDelete + self.command_table['vmware workload-network dhcp relay create'] = DHCPRelayCreate(loader=self) + self.command_table['vmware workload-network dhcp relay update'] = DHCPRelayUpdate(loader=self) + self.command_table['vmware workload-network dhcp relay delete'] = DHCPRelayDelete(loader=self) + + with self.command_group('vmware workload-network dhcp server'): + from .operations.workload_network import DHCPServerCreate, DHCPServerUpdate, DHCPServerDelete + self.command_table['vmware workload-network dhcp server create'] = DHCPServerCreate(loader=self) + self.command_table['vmware workload-network dhcp server update'] = DHCPServerUpdate(loader=self) + self.command_table['vmware workload-network dhcp server delete'] = DHCPServerDelete(loader=self) + + with self.command_group('vmware placement-policy vm'): + from .operations.placement_policy import PlacementPolicyVMCreate, PlacementPolicyVMUpdate, PlacementPolicyVMDelete + self.command_table['vmware placement-policy vm create'] = PlacementPolicyVMCreate(loader=self) + self.command_table['vmware placement-policy vm update'] = PlacementPolicyVMUpdate(loader=self) + self.command_table['vmware placement-policy vm delete'] = PlacementPolicyVMDelete(loader=self) + + with self.command_group('vmware placement-policy vm-host'): + from .operations.placement_policy import PlacementPolicyVMHostCreate, PlacementPolicyVMHostUpdate, \ + PlacementPolicyVMHostDelete + self.command_table['vmware placement-policy vm-host create'] = PlacementPolicyVMHostCreate(loader=self) + self.command_table['vmware placement-policy vm-host update'] = PlacementPolicyVMHostUpdate(loader=self) + self.command_table['vmware placement-policy vm-host delete'] = PlacementPolicyVMHostDelete(loader=self) diff --git a/src/vmware/azext_vmware/custom.py b/src/vmware/azext_vmware/custom.py index 820ca6c5e97..d521fb2c0e5 100644 --- a/src/vmware/azext_vmware/custom.py +++ b/src/vmware/azext_vmware/custom.py @@ -5,7 +5,6 @@ # pylint: disable=line-too-long from typing import List, Tuple -from azext_vmware.vendored_sdks.avs_client import AVSClient LEGAL_TERMS = ''' LEGAL TERMS @@ -38,146 +37,123 @@ ''' -def privatecloud_list(client: AVSClient, resource_group_name=None): - if resource_group_name is None: - return client.private_clouds.list_in_subscription() - return client.private_clouds.list(resource_group_name) - - -def privatecloud_show(client: AVSClient, resource_group_name, name): - return client.private_clouds.get(resource_group_name, name) - - -def privatecloud_addavailabilityzone(client: AVSClient, resource_group_name, private_cloud, strategy=None, zone=None, secondary_zone=None): - from azext_vmware.vendored_sdks.avs_client.models import AvailabilityProperties - pc = client.private_clouds.get(resource_group_name, private_cloud) - pc.availability = AvailabilityProperties(strategy=strategy, zone=zone, secondary_zone=secondary_zone) - return client.private_clouds.begin_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, private_cloud_update=pc) - - -# pylint: disable=too-many-locals -def privatecloud_create(client: AVSClient, resource_group_name, name, sku, cluster_size, network_block, location=None, internet=None, vcenter_password=None, nsxt_password=None, strategy=None, zone=None, secondary_zone=None, tags=None, accept_eula=False, mi_system_assigned=False, yes=False): - from knack.prompting import prompt_y_n - if not accept_eula: - print(LEGAL_TERMS) - msg = 'Do you agree to the above additional terms for AVS?' - if not yes and not prompt_y_n(msg, default="n"): - return None - from azext_vmware.vendored_sdks.avs_client.models import PrivateCloud, Circuit, ManagementCluster, Sku, PrivateCloudIdentity, ResourceIdentityType, AvailabilityProperties, AvailabilityStrategy - cloud = PrivateCloud(sku=Sku(name=sku), ciruit=Circuit(), management_cluster=ManagementCluster(cluster_size=cluster_size), network_block=network_block) - if location is not None: - cloud.location = location - if tags is not None: - cloud.tags = tags - if mi_system_assigned: - cloud.identity = PrivateCloudIdentity(type=ResourceIdentityType.SYSTEM_ASSIGNED) - else: - cloud.identity = PrivateCloudIdentity(type=ResourceIdentityType.NONE) - if internet is not None: - cloud.internet = internet - if vcenter_password is not None: - cloud.vcenter_password = vcenter_password - if nsxt_password is not None: - cloud.nsxt_password = nsxt_password - if strategy == AvailabilityStrategy.SINGLE_ZONE: - cloud.availability = AvailabilityProperties(strategy=AvailabilityStrategy.SINGLE_ZONE, zone=zone, secondary_zone=secondary_zone) - if strategy == AvailabilityStrategy.DUAL_ZONE: - cloud.availability = AvailabilityProperties(strategy=AvailabilityStrategy.DUAL_ZONE, zone=zone, secondary_zone=secondary_zone) - return client.private_clouds.begin_create_or_update(resource_group_name, name, cloud) - - -def privatecloud_update(client: AVSClient, resource_group_name, name, cluster_size=None, internet=None, tags=None): - from azext_vmware.vendored_sdks.avs_client.models import ManagementCluster - private_cloud_update = client.private_clouds.get(resource_group_name, name) - if tags is not None: - private_cloud_update.tags = tags - if cluster_size is not None: - private_cloud_update.management_cluster = ManagementCluster(cluster_size=cluster_size) - if internet is not None: - private_cloud_update.internet = internet - return client.private_clouds.begin_update(resource_group_name, name, private_cloud_update) - - -def privatecloud_delete(client: AVSClient, resource_group_name, name, yes=False): - from knack.prompting import prompt_y_n - msg = 'This will delete the private cloud. Are you sure?' - if not yes and not prompt_y_n(msg, default="n"): - return None - return client.private_clouds.begin_delete(resource_group_name, name) - - -def privatecloud_listadmincredentials(client: AVSClient, resource_group_name, private_cloud): - return client.private_clouds.list_admin_credentials(resource_group_name=resource_group_name, private_cloud_name=private_cloud) - - -def privatecloud_addidentitysource(client: AVSClient, resource_group_name, name, private_cloud, alias, domain, base_user_dn, base_group_dn, primary_server, username, password, secondary_server=None, ssl="Disabled"): - from azext_vmware.vendored_sdks.avs_client.models import IdentitySource - pc = client.private_clouds.get(resource_group_name, private_cloud) - identitysource = IdentitySource(name=name, alias=alias, domain=domain, base_user_dn=base_user_dn, base_group_dn=base_group_dn, primary_server=primary_server, ssl=ssl, username=username, password=password) +def privatecloud_listadmincredentials(cmd, resource_group_name, private_cloud): + from .aaz.latest.vmware.private_cloud import ListAdminCredentials + return ListAdminCredentials(cli_ctx=cmd.cli_ctx)(command_args={ + "resource_group": resource_group_name, + "private_cloud": private_cloud + }) + + +def privatecloud_addidentitysource(cmd, resource_group_name, name, private_cloud, alias, domain, base_user_dn, base_group_dn, primary_server, username, password, secondary_server=None, ssl="Disabled"): + from .aaz.latest.vmware.private_cloud.identity_source import Create + command_args = { + "private_cloud": private_cloud, + "resource_group": resource_group_name, + "name": name, + "alias": alias, + "domain": domain, + "base_user_dn": base_user_dn, + "base_group_dn": base_group_dn, + "primary_server": primary_server, + "username": username, + "password": password, + "ssl": ssl, + } if secondary_server is not None: - identitysource.secondary_server = secondary_server - pc.identity_sources.append(identitysource) - return client.private_clouds.begin_create_or_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, private_cloud=pc) + command_args["secondary_server"] = secondary_server + return Create(cli_ctx=cmd.cli_ctx)(command_args=command_args) -def privatecloud_deleteidentitysource(client: AVSClient, resource_group_name, name, private_cloud, alias, domain, yes=False): +def privatecloud_deleteidentitysource(cmd, resource_group_name, name, private_cloud, alias, domain, yes=False): + from .aaz.latest.vmware.private_cloud.identity_source import Delete from knack.prompting import prompt_y_n msg = 'This will delete the identity source. Are you sure?' if not yes and not prompt_y_n(msg, default="n"): return None - pc = client.private_clouds.get(resource_group_name, private_cloud) - found = next((ids for ids in pc.identity_sources - if ids.name == name and ids.alias == alias and ids.domain == domain), None) - if found: - pc.identity_sources.remove(found) - return client.private_clouds.begin_create_or_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, private_cloud=pc) - return pc + return Delete(cli_ctx=cmd.cli_ctx)(command_args={ + "private_cloud": private_cloud, + "resource_group": resource_group_name, + "name": name, + }) -def privatecloud_addcmkencryption(client: AVSClient, resource_group_name, private_cloud, enc_kv_key_name=None, enc_kv_key_version=None, enc_kv_url=None): - from azext_vmware.vendored_sdks.avs_client.models import Encryption, EncryptionKeyVaultProperties, EncryptionState - pc = client.private_clouds.get(resource_group_name, private_cloud) - pc.encryption = Encryption(status=EncryptionState.ENABLED, key_vault_properties=EncryptionKeyVaultProperties(key_name=enc_kv_key_name, key_version=enc_kv_key_version, key_vault_url=enc_kv_url)) - return client.private_clouds.begin_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, private_cloud_update=pc) +def privatecloud_addcmkencryption(cmd, resource_group_name, private_cloud, enc_kv_key_name=None, enc_kv_key_version=None, enc_kv_url=None): + from .operations.private_cloud import PrivateCloudUpdate + return PrivateCloudUpdate(cli_ctx=cmd.cli_ctx)(command_args={ + "private_cloud_name": private_cloud, + "resource_group": resource_group_name, + "encryption": { + "status": "Enabled", + "key_vault_properties": { + "key_name": enc_kv_key_name, + "key_version": enc_kv_key_version, + "key_vault_url": enc_kv_url + } + } + }) -def privatecloud_deletecmkenryption(client: AVSClient, resource_group_name, private_cloud, yes=False): +def privatecloud_deletecmkenryption(cmd, resource_group_name, private_cloud, yes=False): from knack.prompting import prompt_y_n msg = 'This will delete the managed keys encryption. Are you sure?' if not yes and not prompt_y_n(msg, default="n"): return None - from azext_vmware.vendored_sdks.avs_client.models import Encryption, EncryptionState - pc = client.private_clouds.get(resource_group_name, private_cloud) - pc.encryption = Encryption(status=EncryptionState.DISABLED) - return client.private_clouds.begin_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, private_cloud_update=pc) + from .operations.private_cloud import PrivateCloudUpdate + return PrivateCloudUpdate(cli_ctx=cmd.cli_ctx)(command_args={ + "private_cloud_name": private_cloud, + "resource_group": resource_group_name, + "encryption": { + "status": "Disabled", + } + }) -def privatecloud_identity_assign(client: AVSClient, resource_group_name, private_cloud, system_assigned=False): - from azext_vmware.vendored_sdks.avs_client.models import PrivateCloudIdentity, ResourceIdentityType - pc = client.private_clouds.get(resource_group_name, private_cloud) - if system_assigned: - pc.identity = PrivateCloudIdentity(type=ResourceIdentityType.SYSTEM_ASSIGNED) - return client.private_clouds.begin_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, private_cloud_update=pc) +def check_quota_availability(cmd, location): + from .aaz.latest.vmware.location import CheckQuotaAvailability + return CheckQuotaAvailability(cli_ctx=cmd.cli_ctx)(command_args={ + "location": location + }) + +def check_trial_availability(cmd, location, sku=None): + from .aaz.latest.vmware.location import CheckTrialAvailability + return CheckTrialAvailability(cli_ctx=cmd.cli_ctx)(command_args={ + "location": location, + "sku": sku + }) -def privatecloud_identity_remove(client: AVSClient, resource_group_name, private_cloud, system_assigned=False): - from azext_vmware.vendored_sdks.avs_client.models import PrivateCloudIdentity, ResourceIdentityType - pc = client.private_clouds.get(resource_group_name, private_cloud) + +def privatecloud_identity_assign(cmd, resource_group_name, private_cloud, system_assigned=False): + from .operations.private_cloud import PrivateCloudUpdate if system_assigned: - pc.identity = PrivateCloudIdentity(type=ResourceIdentityType.NONE) - return client.private_clouds.begin_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, private_cloud_update=pc) + return PrivateCloudUpdate(cli_ctx=cmd.cli_ctx)(command_args={ + "private_cloud_name": private_cloud, + "resource_group": resource_group_name, + "identity": { + "type": "SystemAssigned", + } + }) -def privatecloud_identity_get(client: AVSClient, resource_group_name, private_cloud): - return client.private_clouds.get(resource_group_name, private_cloud).identity +def privatecloud_identity_remove(cmd, resource_group_name, private_cloud, system_assigned=False): + from .operations.private_cloud import PrivateCloudUpdate + if system_assigned: + return PrivateCloudUpdate(cli_ctx=cmd.cli_ctx)(command_args={ + "private_cloud_name": private_cloud, + "resource_group": resource_group_name, + "identity": { + "type": "None", + } + }) -def privatecloud_rotate_vcenter_password(client: AVSClient, resource_group_name, private_cloud, yes=False): - from knack.prompting import prompt_y_n - msg = ROTATE_VCENTER_PASSWORD_TERMS - if not yes and not prompt_y_n(msg, default="n"): - return None - return client.private_clouds.begin_rotate_vcenter_password(resource_group_name=resource_group_name, private_cloud_name=private_cloud) +def privatecloud_identity_get(cmd, resource_group_name, private_cloud): + from .aaz.latest.vmware.private_cloud import Show + return Show(cli_ctx=cmd.cli_ctx)(command_args={ + "private_cloud_name": private_cloud, + "resource_group": resource_group_name, + }).get("identity") def privatecloud_rotate_nsxt_password(): @@ -187,572 +163,24 @@ def privatecloud_rotate_nsxt_password(): # return client.private_clouds.begin_rotate_nsxt_password(resource_group_name=resource_group_name, private_cloud_name=private_cloud) -def cluster_create(client: AVSClient, resource_group_name, name, sku, private_cloud, size=None, hosts=None): - from azext_vmware.vendored_sdks.avs_client.models import Sku, Cluster - return client.clusters.begin_create_or_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, cluster_name=name, cluster=Cluster(sku=Sku(name=sku), cluster_size=size, hosts=hosts)) - - -def cluster_update(client: AVSClient, resource_group_name, name, private_cloud, size=None, hosts=None): - from azext_vmware.vendored_sdks.avs_client.models import ClusterUpdate - return client.clusters.begin_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, cluster_name=name, cluster_update=ClusterUpdate(cluster_size=size, hosts=hosts)) - - -def cluster_list(client: AVSClient, resource_group_name, private_cloud): - return client.clusters.list(resource_group_name=resource_group_name, private_cloud_name=private_cloud) - - -def cluster_show(client: AVSClient, resource_group_name, private_cloud, name): - return client.clusters.get(resource_group_name=resource_group_name, private_cloud_name=private_cloud, cluster_name=name) - - -def cluster_delete(client: AVSClient, resource_group_name, private_cloud, name, yes=False): - from knack.prompting import prompt_y_n - msg = 'This will delete the cluster. Are you sure?' - if not yes and not prompt_y_n(msg, default="n"): - return None - return client.clusters.begin_delete(resource_group_name=resource_group_name, private_cloud_name=private_cloud, cluster_name=name) - - -def cluster_list_zones(client: AVSClient, resource_group_name, private_cloud, name): - return client.clusters.list_zones(resource_group_name=resource_group_name, private_cloud_name=private_cloud, cluster_name=name) - - -def check_quota_availability(client: AVSClient, location): - return client.locations.check_quota_availability(location) - - -def check_trial_availability(client: AVSClient, location, sku=None): - from azext_vmware.vendored_sdks.avs_client.models import Sku - return client.locations.check_trial_availability(location=location, sku=Sku(name=sku)) - - -def authorization_create(client: AVSClient, resource_group_name, private_cloud, name, express_route_id=None): - from azext_vmware.vendored_sdks.avs_client.models import ExpressRouteAuthorization - return client.authorizations.begin_create_or_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, authorization_name=name, authorization=ExpressRouteAuthorization(express_route_id=express_route_id)) - - -def authorization_list(client: AVSClient, resource_group_name, private_cloud): - return client.authorizations.list(resource_group_name=resource_group_name, private_cloud_name=private_cloud) - - -def authorization_show(client: AVSClient, resource_group_name, private_cloud, name): - return client.authorizations.get(resource_group_name=resource_group_name, private_cloud_name=private_cloud, authorization_name=name) - - -def authorization_delete(client: AVSClient, resource_group_name, private_cloud, name, yes=False): - from knack.prompting import prompt_y_n - msg = 'This will delete the authorization. Are you sure?' - if not yes and not prompt_y_n(msg, default="n"): - return None - return client.authorizations.begin_delete(resource_group_name=resource_group_name, private_cloud_name=private_cloud, authorization_name=name) - - -def hcxenterprisesite_create(client: AVSClient, resource_group_name, private_cloud, name): - from azext_vmware.vendored_sdks.avs_client.models import HcxEnterpriseSite - return client.hcx_enterprise_sites.create_or_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, hcx_enterprise_site_name=name, hcx_enterprise_site=HcxEnterpriseSite()) - - -def hcxenterprisesite_list(client: AVSClient, resource_group_name, private_cloud): - return client.hcx_enterprise_sites.list(resource_group_name=resource_group_name, private_cloud_name=private_cloud) - - -def hcxenterprisesite_show(client: AVSClient, resource_group_name, private_cloud, name): - return client.hcx_enterprise_sites.get(resource_group_name=resource_group_name, private_cloud_name=private_cloud, hcx_enterprise_site_name=name) - - -def hcxenterprisesite_delete(client: AVSClient, resource_group_name, private_cloud, name, yes=False): - from knack.prompting import prompt_y_n - msg = 'This will delete the HCX enterprise site. Are you sure?' - if not yes and not prompt_y_n(msg, default="n"): - return None - return client.hcx_enterprise_sites.delete(resource_group_name=resource_group_name, private_cloud_name=private_cloud, hcx_enterprise_site_name=name) - - def datastore_create(): print('Please use "az vmware datastore netapp-volume create" or "az vmware datastore disk-pool-volume create" instead.') -def datastore_netappvolume_create(client: AVSClient, resource_group_name, private_cloud, cluster, name, volume_id): - from azext_vmware.vendored_sdks.avs_client.models import NetAppVolume, Datastore - net_app_volume = NetAppVolume(id=volume_id) - return client.datastores.begin_create_or_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, cluster_name=cluster, datastore_name=name, datastore=Datastore(net_app_volume=net_app_volume)) - - -def datastore_diskpoolvolume_create(client: AVSClient, resource_group_name, private_cloud, cluster, name, target_id, lun_name, mount_option="MOUNT"): - from azext_vmware.vendored_sdks.avs_client.models import DiskPoolVolume, Datastore - disk_pool_volume = DiskPoolVolume(target_id=target_id, lun_name=lun_name, mount_option=mount_option) - return client.datastores.begin_create_or_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, cluster_name=cluster, datastore_name=name, datastore=Datastore(disk_pool_volume=disk_pool_volume)) - - -def datastore_list(client: AVSClient, resource_group_name, private_cloud, cluster): - return client.datastores.list(resource_group_name=resource_group_name, private_cloud_name=private_cloud, cluster_name=cluster) - - -def datastore_show(client: AVSClient, resource_group_name, private_cloud, cluster, name): - return client.datastores.get(resource_group_name=resource_group_name, private_cloud_name=private_cloud, cluster_name=cluster, datastore_name=name) - - -def datastore_delete(client: AVSClient, resource_group_name, private_cloud, cluster, name, yes=False): - from knack.prompting import prompt_y_n - msg = 'This will delete the datastore. Are you sure?' - if not yes and not prompt_y_n(msg, default="n"): - return None - return client.datastores.begin_delete(resource_group_name=resource_group_name, private_cloud_name=private_cloud, cluster_name=cluster, datastore_name=name) - - -def addon_list(client: AVSClient, resource_group_name, private_cloud): - return client.addons.list(resource_group_name=resource_group_name, private_cloud_name=private_cloud) - - -def addon_vr_create(client: AVSClient, resource_group_name, private_cloud, vrs_count: int): - from azext_vmware.vendored_sdks.avs_client.models import AddonVrProperties, Addon - properties = AddonVrProperties(vrs_count=vrs_count) - return client.addons.begin_create_or_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, addon_name="vr", addon=Addon(properties=properties)) - - -def addon_hcx_create(client: AVSClient, resource_group_name, private_cloud, offer: str): - from azext_vmware.vendored_sdks.avs_client.models import AddonHcxProperties, Addon - properties = AddonHcxProperties(offer=offer) - return client.addons.begin_create_or_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, addon_name="hcx", addon=Addon(properties=properties)) - - -def addon_srm_create(client: AVSClient, resource_group_name, private_cloud, license_key: str): - from azext_vmware.vendored_sdks.avs_client.models import AddonSrmProperties, Addon - properties = AddonSrmProperties(license_key=license_key) - return client.addons.begin_create_or_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, addon_name="srm", addon=Addon(properties=properties)) - - -def addon_arc_create(client: AVSClient, resource_group_name, private_cloud, vcenter: str): - from azext_vmware.vendored_sdks.avs_client.models import AddonArcProperties, Addon - properties = AddonArcProperties(v_center=vcenter) - return client.addons.begin_create_or_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, addon_name="arc", addon=Addon(properties=properties)) - - -def addon_vr_show(client: AVSClient, resource_group_name, private_cloud): - return client.addons.get(resource_group_name=resource_group_name, private_cloud_name=private_cloud, addon_name="vr") - - -def addon_hcx_show(client: AVSClient, resource_group_name, private_cloud): - return client.addons.get(resource_group_name=resource_group_name, private_cloud_name=private_cloud, addon_name="hcx") - - -def addon_srm_show(client: AVSClient, resource_group_name, private_cloud): - return client.addons.get(resource_group_name=resource_group_name, private_cloud_name=private_cloud, addon_name="srm") - - -def addon_arc_show(client: AVSClient, resource_group_name, private_cloud): - return client.addons.get(resource_group_name=resource_group_name, private_cloud_name=private_cloud, addon_name="arc") - - -def addon_vr_update(client: AVSClient, resource_group_name, private_cloud, vrs_count: int): - from azext_vmware.vendored_sdks.avs_client.models import AddonVrProperties, Addon - properties = AddonVrProperties(vrs_count=vrs_count) - return client.addons.begin_create_or_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, addon_name="vr", addon=Addon(properties=properties)) - - -def addon_hcx_update(client: AVSClient, resource_group_name, private_cloud, offer: str): - from azext_vmware.vendored_sdks.avs_client.models import AddonHcxProperties, Addon - properties = AddonHcxProperties(offer=offer) - return client.addons.begin_create_or_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, addon_name="hcx", addon=Addon(properties=properties)) - - -def addon_srm_update(client: AVSClient, resource_group_name, private_cloud, license_key: str): - from azext_vmware.vendored_sdks.avs_client.models import AddonSrmProperties, Addon - properties = AddonSrmProperties(license_key=license_key) - return client.addons.begin_create_or_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, addon_name="srm", addon=Addon(properties=properties)) - - -def addon_arc_update(client: AVSClient, resource_group_name, private_cloud, vcenter: str): - from azext_vmware.vendored_sdks.avs_client.models import AddonArcProperties, Addon - properties = AddonArcProperties(v_center=vcenter) - return client.addons.begin_create_or_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, addon_name="arc", addon=Addon(properties=properties)) - - -def addon_vr_delete(client: AVSClient, resource_group_name, private_cloud, yes=False): - from knack.prompting import prompt_y_n - msg = 'This will delete the VR addon. Are you sure?' - if not yes and not prompt_y_n(msg, default="n"): - return None - return client.addons.begin_delete(resource_group_name=resource_group_name, private_cloud_name=private_cloud, addon_name="vr") - - -def addon_hcx_delete(client: AVSClient, resource_group_name, private_cloud, yes=False): - from knack.prompting import prompt_y_n - msg = 'This will delete the HCX addon. Are you sure?' - if not yes and not prompt_y_n(msg, default="n"): - return None - return client.addons.begin_delete(resource_group_name=resource_group_name, private_cloud_name=private_cloud, addon_name="hcx") - - -def addon_srm_delete(client: AVSClient, resource_group_name, private_cloud, yes=False): - from knack.prompting import prompt_y_n - msg = 'This will delete the SRM addon. Are you sure?' - if not yes and not prompt_y_n(msg, default="n"): - return None - return client.addons.begin_delete(resource_group_name=resource_group_name, private_cloud_name=private_cloud, addon_name="srm") - - -def addon_arc_delete(client: AVSClient, resource_group_name, private_cloud, yes=False): - from knack.prompting import prompt_y_n - msg = 'This will delete the Arc addon. Are you sure?' - if not yes and not prompt_y_n(msg, default="n"): - return None - return client.addons.begin_delete(resource_group_name=resource_group_name, private_cloud_name=private_cloud, addon_name="arc") - - -def globalreachconnection_create(client: AVSClient, resource_group_name, private_cloud, name, authorization_key=None, peer_express_route_circuit=None, express_route_id=None): - from azext_vmware.vendored_sdks.avs_client.models import GlobalReachConnection - return client.global_reach_connections.begin_create_or_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, global_reach_connection_name=name, global_reach_connection=GlobalReachConnection(authorization_key=authorization_key, peer_express_route_circuit=peer_express_route_circuit, express_route_id=express_route_id)) - - -def globalreachconnection_list(client: AVSClient, resource_group_name, private_cloud): - return client.global_reach_connections.list(resource_group_name=resource_group_name, private_cloud_name=private_cloud) - - -def globalreachconnection_show(client: AVSClient, resource_group_name, private_cloud, name): - return client.global_reach_connections.get(resource_group_name=resource_group_name, private_cloud_name=private_cloud, global_reach_connection_name=name) - - -def globalreachconnection_delete(client: AVSClient, resource_group_name, private_cloud, name, yes=False): - from knack.prompting import prompt_y_n - msg = 'This will delete the global reach connection. Are you sure?' - if not yes and not prompt_y_n(msg, default="n"): - return None - return client.global_reach_connections.begin_delete(resource_group_name=resource_group_name, private_cloud_name=private_cloud, global_reach_connection_name=name) - - -def cloud_link_create(client: AVSClient, resource_group_name, name, private_cloud, linked_cloud): - from azext_vmware.vendored_sdks.avs_client.models import CloudLink - return client.cloud_links.begin_create_or_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, cloud_link_name=name, cloud_link=CloudLink(linked_cloud=linked_cloud)) - - -def cloud_link_list(client: AVSClient, resource_group_name, private_cloud): - return client.cloud_links.list(resource_group_name=resource_group_name, private_cloud_name=private_cloud) - - -def cloud_link_show(client: AVSClient, resource_group_name, private_cloud, name): - return client.cloud_links.get(resource_group_name=resource_group_name, private_cloud_name=private_cloud, cloud_link_name=name) - - -def cloud_link_delete(client: AVSClient, resource_group_name, private_cloud, name, yes=False): - from knack.prompting import prompt_y_n - msg = 'This will delete the cloud link. Are you sure?' - if not yes and not prompt_y_n(msg, default="n"): - return None - return client.cloud_links.begin_delete(resource_group_name=resource_group_name, private_cloud_name=private_cloud, cloud_link_name=name) - - -def script_cmdlet_list(client: AVSClient, resource_group_name, private_cloud, script_package): - return client.script_cmdlets.list(resource_group_name=resource_group_name, private_cloud_name=private_cloud, script_package_name=script_package) - - -def script_cmdlet_show(client: AVSClient, resource_group_name, private_cloud, script_package, name): - return client.script_cmdlets.get(resource_group_name=resource_group_name, private_cloud_name=private_cloud, script_package_name=script_package, script_cmdlet_name=name) - - -def script_package_list(client: AVSClient, resource_group_name, private_cloud): - return client.script_packages.list(resource_group_name=resource_group_name, private_cloud_name=private_cloud) - - -def script_package_show(client: AVSClient, resource_group_name, private_cloud, name): - return client.script_packages.get(resource_group_name=resource_group_name, private_cloud_name=private_cloud, script_package_name=name) - - -def script_execution_create(client: AVSClient, resource_group_name, private_cloud, name, timeout, script_cmdlet_id=None, parameters=None, hidden_parameters=None, failure_reason=None, retention=None, out=None, named_outputs: List[Tuple[str, str]] = None): - from azext_vmware.vendored_sdks.avs_client.models import ScriptExecution +def script_execution_create(cmd, resource_group_name, private_cloud, name, timeout, script_cmdlet_id=None, parameters=None, hidden_parameters=None, failure_reason=None, retention=None, out=None, named_outputs: List[Tuple[str, str]] = None): + from .aaz.latest.vmware.script_execution import Create if named_outputs is not None: named_outputs = dict(named_outputs) - script_execution = ScriptExecution(timeout=timeout, script_cmdlet_id=script_cmdlet_id, parameters=parameters, hidden_parameters=hidden_parameters, failure_reason=failure_reason, retention=retention, output=out, named_outputs=named_outputs) - return client.script_executions.begin_create_or_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, script_execution_name=name, script_execution=script_execution) - - -def script_execution_list(client: AVSClient, resource_group_name, private_cloud): - return client.script_executions.list(resource_group_name=resource_group_name, private_cloud_name=private_cloud) - - -def script_execution_show(client: AVSClient, resource_group_name, private_cloud, name): - return client.script_executions.get(resource_group_name=resource_group_name, private_cloud_name=private_cloud, script_execution_name=name) - - -def script_execution_delete(client: AVSClient, resource_group_name, private_cloud, name, yes=False): - from knack.prompting import prompt_y_n - msg = 'This will delete the script execution. Are you sure?' - if not yes and not prompt_y_n(msg, default="n"): - return None - return client.script_executions.begin_delete(resource_group_name=resource_group_name, private_cloud_name=private_cloud, script_execution_name=name) - - -def script_execution_logs(client: AVSClient, resource_group_name, private_cloud, name): - return client.script_executions.get_execution_logs(resource_group_name=resource_group_name, private_cloud_name=private_cloud, script_execution_name=name) - - -def workload_network_dhcp_server_create(client: AVSClient, resource_group_name, private_cloud, dhcp: str, display_name=None, revision=None, server_address=None, lease_time=None): - from azext_vmware.vendored_sdks.avs_client.models import WorkloadNetworkDhcpServer, WorkloadNetworkDhcp - properties = WorkloadNetworkDhcp(properties=WorkloadNetworkDhcpServer(dhcp_type="SERVER", display_name=display_name, revision=revision, server_address=server_address, lease_time=lease_time)) - return client.workload_networks.begin_create_dhcp(resource_group_name=resource_group_name, private_cloud_name=private_cloud, dhcp_id=dhcp, workload_network_dhcp=properties) - - -def workload_network_dhcp_relay_create(client: AVSClient, resource_group_name, private_cloud, dhcp: str, display_name=None, revision=None, server_addresses=None): - from azext_vmware.vendored_sdks.avs_client.models import WorkloadNetworkDhcpRelay, WorkloadNetworkDhcp - properties = WorkloadNetworkDhcp(properties=WorkloadNetworkDhcpRelay(dhcp_type="RELAY", display_name=display_name, revision=revision, server_addresses=server_addresses)) - return client.workload_networks.begin_create_dhcp(resource_group_name=resource_group_name, private_cloud_name=private_cloud, dhcp_id=dhcp, workload_network_dhcp=properties) - - -def workload_network_dhcp_server_update(client: AVSClient, resource_group_name, private_cloud, dhcp: str, display_name=None, revision=None, server_address=None, lease_time=None): - from azext_vmware.vendored_sdks.avs_client.models import WorkloadNetworkDhcpServer, WorkloadNetworkDhcp - properties = WorkloadNetworkDhcp(properties=WorkloadNetworkDhcpServer(dhcp_type="SERVER", display_name=display_name, revision=revision, server_address=server_address, lease_time=lease_time)) - return client.workload_networks.begin_update_dhcp(resource_group_name=resource_group_name, private_cloud_name=private_cloud, dhcp_id=dhcp, workload_network_dhcp=properties) - - -def workload_network_dhcp_relay_update(client: AVSClient, resource_group_name, private_cloud, dhcp: str, display_name=None, revision=None, server_addresses=None): - from azext_vmware.vendored_sdks.avs_client.models import WorkloadNetworkDhcpRelay, WorkloadNetworkDhcp - properties = WorkloadNetworkDhcp(properties=WorkloadNetworkDhcpRelay(dhcp_type="RELAY", display_name=display_name, revision=revision, server_addresses=server_addresses)) - return client.workload_networks.begin_update_dhcp(resource_group_name=resource_group_name, private_cloud_name=private_cloud, dhcp_id=dhcp, workload_network_dhcp=properties) - - -def workload_network_dhcp_delete(client: AVSClient, resource_group_name, private_cloud, dhcp: str, yes=False): - from knack.prompting import prompt_y_n - msg = 'This will delete the workload network DHCP. Are you sure?' - if not yes and not prompt_y_n(msg, default="n"): - return None - return client.workload_networks.begin_delete_dhcp(resource_group_name=resource_group_name, private_cloud_name=private_cloud, dhcp_id=dhcp) - - -def workload_network_dhcp_list(client: AVSClient, resource_group_name, private_cloud): - return client.workload_networks.list_dhcp(resource_group_name=resource_group_name, private_cloud_name=private_cloud) - - -def workload_network_dhcp_show(client: AVSClient, resource_group_name, private_cloud, dhcp: str): - return client.workload_networks.get_dhcp(resource_group_name=resource_group_name, private_cloud_name=private_cloud, dhcp_id=dhcp) - - -def workload_network_dns_services_list(client: AVSClient, resource_group_name, private_cloud): - return client.workload_networks.list_dns_services(resource_group_name=resource_group_name, private_cloud_name=private_cloud) - - -def workload_network_dns_services_get(client: AVSClient, resource_group_name, private_cloud, dns_service): - return client.workload_networks.get_dns_service(resource_group_name=resource_group_name, private_cloud_name=private_cloud, dns_service_id=dns_service) - - -def workload_network_dns_services_create(client: AVSClient, resource_group_name, private_cloud, dns_service, display_name=None, dns_service_ip=None, default_dns_zone=None, fqdn_zones=None, log_level=None, revision=None): - from azext_vmware.vendored_sdks.avs_client.models import WorkloadNetworkDnsService - prop = WorkloadNetworkDnsService(display_name=display_name, dns_service_ip=dns_service_ip, default_dns_zone=default_dns_zone, log_level=log_level, revision=revision, fqdn_zones=fqdn_zones) - return client.workload_networks.begin_create_dns_service(resource_group_name=resource_group_name, private_cloud_name=private_cloud, dns_service_id=dns_service, workload_network_dns_service=prop) - - -def workload_network_dns_services_update(client: AVSClient, resource_group_name, private_cloud, dns_service, display_name=None, dns_service_ip=None, default_dns_zone=None, fqdn_zones=None, log_level=None, revision=None): - from azext_vmware.vendored_sdks.avs_client.models import WorkloadNetworkDnsService - prop = WorkloadNetworkDnsService(display_name=display_name, dns_service_ip=dns_service_ip, default_dns_zone=default_dns_zone, fqdn_zones=fqdn_zones, log_level=log_level, revision=revision) - return client.workload_networks.begin_update_dns_service(resource_group_name=resource_group_name, private_cloud_name=private_cloud, dns_service_id=dns_service, workload_network_dns_service=prop) - - -def workload_network_dns_services_delete(client: AVSClient, resource_group_name, private_cloud, dns_service, yes=False): - from knack.prompting import prompt_y_n - msg = 'This will delete the workload network DNS services. Are you sure?' - if not yes and not prompt_y_n(msg, default="n"): - return None - return client.workload_networks.begin_delete_dns_service(resource_group_name=resource_group_name, private_cloud_name=private_cloud, dns_service_id=dns_service) - - -def workload_network_dns_zone_list(client: AVSClient, resource_group_name, private_cloud): - return client.workload_networks.list_dns_zones(resource_group_name=resource_group_name, private_cloud_name=private_cloud) - - -def workload_network_dns_zone_get(client: AVSClient, resource_group_name, private_cloud, dns_zone): - return client.workload_networks.get_dns_zone(resource_group_name=resource_group_name, private_cloud_name=private_cloud, dns_zone_id=dns_zone) - - -def workload_network_dns_zone_create(client: AVSClient, resource_group_name, private_cloud, dns_zone, display_name=None, domain=None, dns_server_ips=None, source_ip=None, dns_services=None, revision=None): - from azext_vmware.vendored_sdks.avs_client.models import WorkloadNetworkDnsZone - prop = WorkloadNetworkDnsZone(display_name=display_name, domain=domain, dns_server_ips=dns_server_ips, source_ip=source_ip, dns_services=dns_services, revision=revision) - return client.workload_networks.begin_create_dns_zone(resource_group_name=resource_group_name, private_cloud_name=private_cloud, dns_zone_id=dns_zone, workload_network_dns_zone=prop) - - -def workload_network_dns_zone_update(client: AVSClient, resource_group_name, private_cloud, dns_zone, display_name=None, domain=None, dns_server_ips=None, source_ip=None, dns_services=None, revision=None): - from azext_vmware.vendored_sdks.avs_client.models import WorkloadNetworkDnsZone - prop = WorkloadNetworkDnsZone(display_name=display_name, domain=domain, dns_server_ips=dns_server_ips, source_ip=source_ip, dns_services=dns_services, revision=revision) - return client.workload_networks.begin_update_dns_zone(resource_group_name=resource_group_name, private_cloud_name=private_cloud, dns_zone_id=dns_zone, workload_network_dns_zone=prop) - - -def workload_network_dns_zone_delete(client: AVSClient, resource_group_name, private_cloud, dns_zone, yes=False): - from knack.prompting import prompt_y_n - msg = 'This will delete the workload network DNS zone. Are you sure?' - if not yes and not prompt_y_n(msg, default="n"): - return None - return client.workload_networks.begin_delete_dns_zone(resource_group_name=resource_group_name, private_cloud_name=private_cloud, dns_zone_id=dns_zone) - - -def workload_network_port_mirroring_list(client: AVSClient, resource_group_name, private_cloud): - return client.workload_networks.list_port_mirroring(resource_group_name=resource_group_name, private_cloud_name=private_cloud) - - -def workload_network_port_mirroring_get(client: AVSClient, resource_group_name, private_cloud, port_mirroring): - return client.workload_networks.get_port_mirroring(resource_group_name=resource_group_name, private_cloud_name=private_cloud, port_mirroring_id=port_mirroring) - - -def workload_network_port_mirroring_create(client: AVSClient, resource_group_name, private_cloud, port_mirroring, display_name=None, direction=None, source=None, destination=None, revision=None): - from azext_vmware.vendored_sdks.avs_client.models import WorkloadNetworkPortMirroring - prop = WorkloadNetworkPortMirroring(display_name=display_name, direction=direction, source=source, destination=destination, revision=revision) - return client.workload_networks.begin_create_port_mirroring(resource_group_name=resource_group_name, private_cloud_name=private_cloud, port_mirroring_id=port_mirroring, workload_network_port_mirroring=prop) - - -def workload_network_port_mirroring_update(client: AVSClient, resource_group_name, private_cloud, port_mirroring, display_name=None, direction=None, source=None, destination=None, revision=None): - from azext_vmware.vendored_sdks.avs_client.models import WorkloadNetworkPortMirroring - prop = WorkloadNetworkPortMirroring(display_name=display_name, direction=direction, source=source, destination=destination, revision=revision) - return client.workload_networks.begin_update_port_mirroring(resource_group_name=resource_group_name, private_cloud_name=private_cloud, port_mirroring_id=port_mirroring, workload_network_port_mirroring=prop) - - -def workload_network_port_mirroring_delete(client: AVSClient, resource_group_name, private_cloud, port_mirroring, yes=False): - from knack.prompting import prompt_y_n - msg = 'This will delete the workload network port mirroring. Are you sure?' - if not yes and not prompt_y_n(msg, default="n"): - return None - return client.workload_networks.begin_delete_port_mirroring(resource_group_name=resource_group_name, private_cloud_name=private_cloud, port_mirroring_id=port_mirroring) - - -def workload_network_segment_list(client: AVSClient, resource_group_name, private_cloud): - return client.workload_networks.list_segments(resource_group_name=resource_group_name, private_cloud_name=private_cloud) - - -def workload_network_segment_get(client: AVSClient, resource_group_name, private_cloud, segment): - return client.workload_networks.get_segment(resource_group_name=resource_group_name, private_cloud_name=private_cloud, segment_id=segment) - - -def workload_network_segment_create(client: AVSClient, resource_group_name, private_cloud, segment, display_name=None, connected_gateway=None, revision=None, dhcp_ranges=None, gateway_address=None, port_name=None): - from azext_vmware.vendored_sdks.avs_client.models import WorkloadNetworkSegmentPortVif - from azext_vmware.vendored_sdks.avs_client.models import WorkloadNetworkSegmentSubnet - from azext_vmware.vendored_sdks.avs_client.models import WorkloadNetworkSegment - portVif = WorkloadNetworkSegmentPortVif(port_name=port_name) - subnet = WorkloadNetworkSegmentSubnet(dhcp_ranges=dhcp_ranges, gateway_address=gateway_address) - segmentObj = WorkloadNetworkSegment(display_name=display_name, connected_gateway=connected_gateway, subnet=subnet, port_vif=portVif, revision=revision) - return client.workload_networks.begin_create_segments(resource_group_name=resource_group_name, private_cloud_name=private_cloud, segment_id=segment, workload_network_segment=segmentObj) - - -def workload_network_segment_update(client: AVSClient, resource_group_name, private_cloud, segment, display_name=None, connected_gateway=None, revision=None, dhcp_ranges=None, gateway_address=None, port_name=None): - from azext_vmware.vendored_sdks.avs_client.models import WorkloadNetworkSegmentPortVif - from azext_vmware.vendored_sdks.avs_client.models import WorkloadNetworkSegmentSubnet - from azext_vmware.vendored_sdks.avs_client.models import WorkloadNetworkSegment - portVif = WorkloadNetworkSegmentPortVif(port_name=port_name) - subnet = WorkloadNetworkSegmentSubnet(dhcp_ranges=dhcp_ranges, gateway_address=gateway_address) - segmentObj = WorkloadNetworkSegment(display_name=display_name, connected_gateway=connected_gateway, subnet=subnet, port_vif=portVif, revision=revision) - return client.workload_networks.begin_update_segments(resource_group_name=resource_group_name, private_cloud_name=private_cloud, segment_id=segment, workload_network_segment=segmentObj) - - -def workload_network_segment_delete(client: AVSClient, resource_group_name, private_cloud, segment, yes=False): - from knack.prompting import prompt_y_n - msg = 'This will delete the workload network segment. Are you sure?' - if not yes and not prompt_y_n(msg, default="n"): - return None - return client.workload_networks.begin_delete_segment(resource_group_name=resource_group_name, private_cloud_name=private_cloud, segment_id=segment) - - -def workload_network_public_ip_list(client: AVSClient, resource_group_name, private_cloud): - return client.workload_networks.list_public_i_ps(resource_group_name=resource_group_name, private_cloud_name=private_cloud) - - -def workload_network_public_ip_get(client: AVSClient, resource_group_name, private_cloud, public_ip): - return client.workload_networks.get_public_ip(resource_group_name=resource_group_name, private_cloud_name=private_cloud, public_ip_id=public_ip) - - -def workload_network_public_ip_create(client: AVSClient, resource_group_name, private_cloud, public_ip, display_name=None, number_of_public_ips=None): - from azext_vmware.vendored_sdks.avs_client.models import WorkloadNetworkPublicIP - return client.workload_networks.begin_create_public_ip(resource_group_name=resource_group_name, private_cloud_name=private_cloud, public_ip_id=public_ip, workload_network_public_ip=WorkloadNetworkPublicIP(display_name=display_name, number_of_public_i_ps=number_of_public_ips)) - - -def workload_network_public_ip_delete(client: AVSClient, resource_group_name, private_cloud, public_ip, yes=False): - from knack.prompting import prompt_y_n - msg = 'This will delete the workload network public IP. Are you sure?' - if not yes and not prompt_y_n(msg, default="n"): - return None - return client.workload_networks.begin_delete_public_ip(resource_group_name=resource_group_name, private_cloud_name=private_cloud, public_ip_id=public_ip) - - -def workload_network_vm_group_list(client: AVSClient, resource_group_name, private_cloud): - return client.workload_networks.list_vm_groups(resource_group_name=resource_group_name, private_cloud_name=private_cloud) - - -def workload_network_vm_group_get(client: AVSClient, resource_group_name, private_cloud, vm_group): - return client.workload_networks.get_vm_group(resource_group_name=resource_group_name, private_cloud_name=private_cloud, vm_group_id=vm_group) - - -def workload_network_vm_group_create(client: AVSClient, resource_group_name, private_cloud, vm_group, display_name=None, members=None, revision=None): - from azext_vmware.vendored_sdks.avs_client.models import WorkloadNetworkVMGroup - vmGroup = WorkloadNetworkVMGroup(display_name=display_name, members=members, revision=revision) - return client.workload_networks.begin_create_vm_group(resource_group_name=resource_group_name, private_cloud_name=private_cloud, vm_group_id=vm_group, workload_network_vm_group=vmGroup) - - -def workload_network_vm_group_update(client: AVSClient, resource_group_name, private_cloud, vm_group, display_name=None, members=None, revision=None): - from azext_vmware.vendored_sdks.avs_client.models import WorkloadNetworkVMGroup - vmGroup = WorkloadNetworkVMGroup(display_name=display_name, members=members, revision=revision) - return client.workload_networks.begin_update_vm_group(resource_group_name=resource_group_name, private_cloud_name=private_cloud, vm_group_id=vm_group, workload_network_vm_group=vmGroup) - - -def workload_network_vm_group_delete(client: AVSClient, resource_group_name, private_cloud, vm_group, yes=False): - from knack.prompting import prompt_y_n - msg = 'This will delete the workload network VM group. Are you sure?' - if not yes and not prompt_y_n(msg, default="n"): - return None - return client.workload_networks.begin_delete_vm_group(resource_group_name=resource_group_name, private_cloud_name=private_cloud, vm_group_id=vm_group) - - -def workload_network_vm_list(client: AVSClient, resource_group_name, private_cloud): - return client.workload_networks.list_virtual_machines(resource_group_name=resource_group_name, private_cloud_name=private_cloud) - - -def workload_network_vm_get(client: AVSClient, resource_group_name, private_cloud, virtual_machine): - return client.workload_networks.get_virtual_machine(resource_group_name=resource_group_name, private_cloud_name=private_cloud, virtual_machine_id=virtual_machine) - - -def workload_network_gateway_list(client: AVSClient, resource_group_name, private_cloud): - return client.workload_networks.list_gateways(resource_group_name=resource_group_name, private_cloud_name=private_cloud) - - -def workload_network_gateway_get(client: AVSClient, resource_group_name, private_cloud, gateway): - return client.workload_networks.get_gateway(resource_group_name=resource_group_name, private_cloud_name=private_cloud, gateway_id=gateway) - - -def placement_policy_list(client: AVSClient, resource_group_name, private_cloud, cluster_name): - return client.placement_policies.list(resource_group_name=resource_group_name, private_cloud_name=private_cloud, cluster_name=cluster_name) - - -def placement_policy_get(client: AVSClient, resource_group_name, private_cloud, cluster_name, placement_policy_name): - return client.placement_policies.get(resource_group_name=resource_group_name, private_cloud_name=private_cloud, cluster_name=cluster_name, placement_policy_name=placement_policy_name) - - -def placement_policy_vm_create(client: AVSClient, resource_group_name, private_cloud, cluster_name, placement_policy_name, vm_members, affinity_type, state=None, display_name=None): - from azext_vmware.vendored_sdks.avs_client.models import VmPlacementPolicyProperties, PlacementPolicy - vmProperties = PlacementPolicy(properties=VmPlacementPolicyProperties(type="VmVm", state=state, display_name=display_name, vm_members=vm_members, affinity_type=affinity_type)) - return client.placement_policies.begin_create_or_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, cluster_name=cluster_name, placement_policy_name=placement_policy_name, placement_policy=vmProperties) - - -def placement_policy_vm_host_create(client: AVSClient, resource_group_name, private_cloud, cluster_name, placement_policy_name, vm_members, host_members, affinity_type, state=None, display_name=None, affinity_strength=None, azure_hybrid_benefit=None): - from azext_vmware.vendored_sdks.avs_client.models import VmHostPlacementPolicyProperties, PlacementPolicy - vmHostProperties = PlacementPolicy(properties=VmHostPlacementPolicyProperties(type="VmHost", state=state, display_name=display_name, vm_members=vm_members, host_members=host_members, affinity_type=affinity_type, affinity_strength=affinity_strength, azure_hybrid_benefit_type=azure_hybrid_benefit)) - return client.placement_policies.begin_create_or_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, cluster_name=cluster_name, placement_policy_name=placement_policy_name, placement_policy=vmHostProperties) - - -def placement_policy_update(client: AVSClient, resource_group_name, private_cloud, cluster_name, placement_policy_name, state=None, vm_members=None, host_members=None, affinity_strength=None, azure_hybrid_benefit=None): - from azext_vmware.vendored_sdks.avs_client.models import PlacementPolicyUpdate - props = PlacementPolicyUpdate(state=state, vm_members=vm_members, host_members=host_members, affinity_strength=affinity_strength, azure_hybrid_benefit_type=azure_hybrid_benefit) - return client.placement_policies.begin_update(resource_group_name=resource_group_name, private_cloud_name=private_cloud, cluster_name=cluster_name, placement_policy_name=placement_policy_name, placement_policy_update=props) - - -def placement_policy_delete(client: AVSClient, resource_group_name, private_cloud, cluster_name, placement_policy_name, yes=False): - from knack.prompting import prompt_y_n - msg = 'This will delete the placement policy. Are you sure?' - if not yes and not prompt_y_n(msg, default="n"): - return None - return client.placement_policies.begin_delete(resource_group_name=resource_group_name, private_cloud_name=private_cloud, cluster_name=cluster_name, placement_policy_name=placement_policy_name) - - -def virtual_machine_get(client: AVSClient, resource_group_name, private_cloud, cluster_name, virtual_machine): - return client.virtual_machines.get(resource_group_name=resource_group_name, private_cloud_name=private_cloud, cluster_name=cluster_name, virtual_machine_id=virtual_machine) - - -def virtual_machine_list(client: AVSClient, resource_group_name, private_cloud, cluster_name): - return client.virtual_machines.list(resource_group_name=resource_group_name, private_cloud_name=private_cloud, cluster_name=cluster_name) - - -def virtual_machine_restrict(client: AVSClient, resource_group_name, private_cloud, cluster_name, virtual_machine, restrict_movement): - from azext_vmware.vendored_sdks.avs_client.models import VirtualMachineRestrictMovement - return client.virtual_machines.begin_restrict_movement(resource_group_name=resource_group_name, private_cloud_name=private_cloud, cluster_name=cluster_name, virtual_machine_id=virtual_machine, restrict_movement=VirtualMachineRestrictMovement(restrict_movement=restrict_movement)) + return Create(cli_ctx=cmd.cli_ctx)(command_args={ + "private_cloud": private_cloud, + "resource_group": resource_group_name, + "script_execution_name": name, + "timeout": timeout, + "script_cmdlet_id": script_cmdlet_id, + "parameters": parameters, + "hidden_parameters": hidden_parameters, + "failure_reason": failure_reason, + "retention": retention, + "output": out, + "named_outputs": named_outputs, + }) diff --git a/src/vmware/azext_vmware/operations/__init__.py b/src/vmware/azext_vmware/operations/__init__.py new file mode 100644 index 00000000000..34913fb394d --- /dev/null +++ b/src/vmware/azext_vmware/operations/__init__.py @@ -0,0 +1,4 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- diff --git a/src/vmware/azext_vmware/operations/addon.py b/src/vmware/azext_vmware/operations/addon.py new file mode 100644 index 00000000000..89407c3833d --- /dev/null +++ b/src/vmware/azext_vmware/operations/addon.py @@ -0,0 +1,494 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# pylint: disable=line-too-long + +from ..aaz.latest.vmware.addon import Show as _AddonShow, Create as _AddonCreate, Update as _AddonUpdate, \ + Delete as _AddonDelete +from azure.cli.core.aaz import register_command + +# vr + + +@register_command( + "vmware addon vr show", +) +class AddonVrShow(_AddonShow): + """Show details of a vSphere Replication (VR) addon for a private cloud. + + :example: Show details of a vSphere Replication (VR) addon. + az vmware addon vr show --resource-group MyResourceGroup --private-cloud MyPrivateCloud + """ + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + args_schema = super()._build_arguments_schema(*args, **kwargs) + args_schema.addon_name._required = False + args_schema.addon_name._registered = False + return args_schema + + def pre_operations(self): + args = self.ctx.args + args.addon_name = "vr" + + +@register_command( + "vmware addon vr create", +) +class AddonVrCreate(_AddonCreate): + """Create a vSphere Replication (VR) addon for a private cloud. + + :example: Create a vSphere Replication (VR) addon. + az vmware addon vr create --resource-group MyResourceGroup --private-cloud MyPrivateCloud --vrs-count 1 + """ + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + from azure.cli.core.aaz import AAZIntArg + args_schema = super()._build_arguments_schema(*args, **kwargs) + args_schema.vrs_count = AAZIntArg( + options=["--vrs-count"], + help="The vSphere Replication Server (VRS) count", + required=True, + ) + + args_schema.vr._registered = False + args_schema.hcx._registered = False + args_schema.srm._registered = False + args_schema.arc._registered = False + + args_schema.addon_name._required = False + args_schema.addon_name._registered = False + return args_schema + + def pre_operations(self): + args = self.ctx.args + args.addon_name = "vr" + args.vr.vrs_count = args.vrs_count + + +@register_command( + "vmware addon vr update", +) +class AddonVrUpdate(_AddonUpdate): + """Update a vSphere Replication (VR) addon for a private cloud. + + :example: Update a vSphere Replication (VR) addon. + az vmware addon vr update --resource-group MyResourceGroup --private-cloud MyPrivateCloud --vrs-count 1 + """ + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + from azure.cli.core.aaz import AAZIntArg + + args_schema = super()._build_arguments_schema(*args, **kwargs) + args_schema.vrs_count = AAZIntArg( + options=["--vrs-count"], + help="The vSphere Replication Server (VRS) count", + required=True, + ) + + args_schema.vr._registered = False + args_schema.hcx._registered = False + args_schema.srm._registered = False + args_schema.arc._registered = False + + args_schema.addon_name._required = False + args_schema.addon_name._registered = False + return args_schema + + def pre_operations(self): + args = self.ctx.args + args.addon_name = "vr" + args.vr.vrs_count = args.vrs_count + + +@register_command( + "vmware addon vr delete", + confirmation="This will delete the VR addon. Are you sure?" +) +class AddonVrDelete(_AddonDelete): + """Delete a vSphere Replication (VR) addon for a private cloud. + + :example: Delete a vSphere Replication (VR) addon. + az vmware addon vr delete --resource-group MyResourceGroup --private-cloud MyPrivateCloud + """ + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + args_schema = super()._build_arguments_schema(*args, **kwargs) + + args_schema.addon_name._required = False + args_schema.addon_name._registered = False + return args_schema + + def pre_operations(self): + args = self.ctx.args + args.addon_name = "vr" + +# hcx + + +@register_command( + "vmware addon hcx show", +) +class AddonHcxShow(_AddonShow): + """Show details of a HCX addon for a private cloud. + + :example: Show details of a HCX addon. + az vmware addon hcx show --resource-group MyResourceGroup --private-cloud MyPrivateCloud + """ + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + args_schema = super()._build_arguments_schema(*args, **kwargs) + args_schema.addon_name._required = False + args_schema.addon_name._registered = False + return args_schema + + def pre_operations(self): + args = self.ctx.args + args.addon_name = "hcx" + + +@register_command( + "vmware addon hcx create", +) +class AddonHcxCreate(_AddonCreate): + """ Create a HCX addon for a private cloud. + + :example: Create a HCX addon. + az vmware addon hcx create --resource-group MyResourceGroup --private-cloud MyPrivateCloud --offer "VMware MaaS Cloud Provider (Enterprise)" + """ + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + from azure.cli.core.aaz import AAZStrArg + args_schema = super()._build_arguments_schema(*args, **kwargs) + args_schema.offer = AAZStrArg( + options=["--offer"], + help="The HCX offer, example VMware MaaS Cloud Provider (Enterprise)", + required=True, + ) + + args_schema.vr._registered = False + args_schema.hcx._registered = False + args_schema.srm._registered = False + args_schema.arc._registered = False + + args_schema.addon_name._required = False + args_schema.addon_name._registered = False + return args_schema + + def pre_operations(self): + args = self.ctx.args + args.addon_name = "hcx" + + args.hcx.offer = args.offer + + +@register_command( + "vmware addon hcx update", +) +class AddonHcxUpdate(_AddonUpdate): + """Update a HCX addon for a private cloud. + + :example: Update a HCX addon. + az vmware addon hcx update --resource-group MyResourceGroup --private-cloud MyPrivateCloud --offer "VMware MaaS Cloud Provider (Enterprise)" + """ + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + from azure.cli.core.aaz import AAZStrArg + + args_schema = super()._build_arguments_schema(*args, **kwargs) + + args_schema.offer = AAZStrArg( + options=["--offer"], + help="The HCX offer, example VMware MaaS Cloud Provider (Enterprise)", + required=True, + ) + + args_schema.vr._registered = False + args_schema.hcx._registered = False + args_schema.srm._registered = False + args_schema.arc._registered = False + + args_schema.addon_name._required = False + args_schema.addon_name._registered = False + return args_schema + + def pre_operations(self): + args = self.ctx.args + args.addon_name = "hcx" + + args.hcx.offer = args.offer + + +@register_command( + "vmware addon hcx delete", + confirmation="This will delete the HCX addon. Are you sure?" +) +class AddonHcxDelete(_AddonDelete): + """Delete a HCX addon for a private cloud. + + :example: Delete a HCX addon. + az vmware addon hcx delete --resource-group MyResourceGroup --private-cloud MyPrivateCloud + """ + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + args_schema = super()._build_arguments_schema(*args, **kwargs) + + args_schema.addon_name._required = False + args_schema.addon_name._registered = False + return args_schema + + def pre_operations(self): + args = self.ctx.args + args.addon_name = "hcx" + + +# srm + + +@register_command( + "vmware addon srm show", +) +class AddonSrmShow(_AddonShow): + """Show details of a Site Recovery Manager (SRM) addon. + + :example: Show details of a Site Recovery Manager (SRM) addon. + az vmware addon srm show --resource-group MyResourceGroup --private-cloud MyPrivateCloud + """ + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + args_schema = super()._build_arguments_schema(*args, **kwargs) + + args_schema.addon_name._required = False + args_schema.addon_name._registered = False + return args_schema + + def pre_operations(self): + args = self.ctx.args + args.addon_name = "srm" + + +@register_command( + "vmware addon srm create", +) +class AddonSrmCreate(_AddonCreate): + """Create a Site Recovery Manager (SRM) addon for a private cloud. + + :example: Create a Site Recovery Manager (SRM) addon. + az vmware addon srm create --resource-group MyResourceGroup --private-cloud MyPrivateCloud --license-key "41915-178A8-FF4A4-DB683-6D735" + """ + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + from azure.cli.core.aaz import AAZStrArg + args_schema = super()._build_arguments_schema(*args, **kwargs) + + args_schema.license_key = AAZStrArg( + options=["--license-key"], + help="The Site Recovery Manager (SRM) license", + required=True, + ) + + args_schema.vr._registered = False + args_schema.hcx._registered = False + args_schema.srm._registered = False + args_schema.arc._registered = False + + args_schema.addon_name._required = False + args_schema.addon_name._registered = False + return args_schema + + def pre_operations(self): + args = self.ctx.args + args.addon_name = "srm" + args.srm.license_key = args.license_key + + +@register_command( + "vmware addon srm update", +) +class AddonSrmUpdate(_AddonUpdate): + """Update a Site Recovery Manager (SRM) addon for a private cloud. + + :example: Update a Site Recovery Manager (SRM) addon. + az vmware addon srm update --resource-group MyResourceGroup --private-cloud MyPrivateCloud --license-key "41915-178A8-FF4A4-DB683-6D735" + """ + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + from azure.cli.core.aaz import AAZStrArg + args_schema = super()._build_arguments_schema(*args, **kwargs) + + args_schema.license_key = AAZStrArg( + options=["--license-key"], + help="The Site Recovery Manager (SRM) license", + required=True, + ) + + args_schema.vr._registered = False + args_schema.hcx._registered = False + args_schema.srm._registered = False + args_schema.arc._registered = False + + args_schema.addon_name._required = False + args_schema.addon_name._registered = False + return args_schema + + def pre_operations(self): + args = self.ctx.args + args.addon_name = "srm" + args.srm.license_key = args.license_key + + +@register_command( + "vmware addon srm delete", + confirmation="This will delete the SRM addon. Are you sure?" +) +class AddonSrmDelete(_AddonDelete): + """Delete a Site Recovery Manager (SRM) addon for a private cloud. + + :example: Delete a Site Recovery Manager (SRM) addon. + az vmware addon srm delete --resource-group MyResourceGroup --private-cloud MyPrivateCloud + """ + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + args_schema = super()._build_arguments_schema(*args, **kwargs) + + args_schema.addon_name._required = False + args_schema.addon_name._registered = False + return args_schema + + def pre_operations(self): + args = self.ctx.args + args.addon_name = "srm" + + +# arc + + +@register_command( + "vmware addon arc show", +) +class AddonArcShow(_AddonShow): + """Show details of an Arc addon for a private cloud. + + :example: Show details of an Arc addon. + az vmware addon arc show --resource-group MyResourceGroup --private-cloud MyPrivateCloud + """ + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + args_schema = super()._build_arguments_schema(*args, **kwargs) + + args_schema.addon_name._required = False + args_schema.addon_name._registered = False + return args_schema + + def pre_operations(self): + args = self.ctx.args + args.addon_name = "arc" + + +@register_command( + "vmware addon arc create", +) +class AddonArcCreate(_AddonCreate): + """Create an Arc addon for a private cloud. + + :example: Create an Arc addon. + az vmware addon vr show --resource-group MyResourceGroup --private-cloud MyPrivateCloud + """ + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + from azure.cli.core.aaz import AAZStrArg + args_schema = super()._build_arguments_schema(*args, **kwargs) + + args_schema.vcenter = AAZStrArg( + options=["--vcenter"], + help="The VMware vCenter resource ID", + required=True, + ) + + args_schema.vr._registered = False + args_schema.hcx._registered = False + args_schema.srm._registered = False + args_schema.arc._registered = False + + args_schema.addon_name._required = False + args_schema.addon_name._registered = False + return args_schema + + def pre_operations(self): + args = self.ctx.args + args.addon_name = "arc" + args.arc.vcenter = args.vcenter + + +@register_command( + "vmware addon arc update", +) +class AddonArcUpdate(_AddonUpdate): + """Update an Arc addon for a private cloud. + + :example: Update an Arc addon. + az vmware addon arc update --resource-group MyResourceGroup --private-cloud MyPrivateCloud --vcenter "00000000-0000-0000-0000-000000000000" + """ + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + from azure.cli.core.aaz import AAZStrArg + args_schema = super()._build_arguments_schema(*args, **kwargs) + + args_schema.vcenter = AAZStrArg( + options=["--vcenter"], + help="The VMware vCenter resource ID", + required=True, + ) + + args_schema.vr._registered = False + args_schema.hcx._registered = False + args_schema.srm._registered = False + args_schema.arc._registered = False + + args_schema.addon_name._required = False + args_schema.addon_name._registered = False + return args_schema + + def pre_operations(self): + args = self.ctx.args + args.addon_name = "arc" + args.arc.vcenter = args.vcenter + + +@register_command( + "vmware addon arc delete", + confirmation="This will delete the Arc addon. Are you sure?" +) +class AddonArcDelete(_AddonDelete): + """Delete an Arc addon for a private cloud. + + :example: Delete an Arc addon. + az vmware addon arc delete --resource-group MyResourceGroup --private-cloud MyPrivateCloud + """ + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + args_schema = super()._build_arguments_schema(*args, **kwargs) + + args_schema.addon_name._required = False + args_schema.addon_name._registered = False + return args_schema + + def pre_operations(self): + args = self.ctx.args + args.addon_name = "arc" diff --git a/src/vmware/azext_vmware/operations/datastore.py b/src/vmware/azext_vmware/operations/datastore.py new file mode 100644 index 00000000000..304f075c07a --- /dev/null +++ b/src/vmware/azext_vmware/operations/datastore.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# pylint: disable=line-too-long + +from ..aaz.latest.vmware.datastore import Create as _DatastoreCreate +from azure.cli.core.aaz import register_command + + +@register_command( + "vmware datastore netapp-volume create", +) +class DatastoreNetappVolumeCreate(_DatastoreCreate): + """Create a new Microsoft.NetApp provided NetApp volume in a private cloud cluster. + """ + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + args_schema = super()._build_arguments_schema(*args, **kwargs) + + args_schema.net_app_volumn._required = True + + args_schema.lun_name._registered = False + args_schema.mount_option._registered = False + args_schema.target_id._registered = False + return args_schema + + +@register_command( + "vmware datastore disk-pool-volume create", +) +class DatastoreDiskPoolVolumeCreate(_DatastoreCreate): + """Create a VMFS datastore in a private cloud cluster using Microsoft.StoragePool provided iSCSI target. + """ + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + args_schema = super()._build_arguments_schema(*args, **kwargs) + + args_schema.net_app_volumn._registered = False + + args_schema.lun_name._required = True + args_schema.target_id._required = True + return args_schema diff --git a/src/vmware/azext_vmware/operations/placement_policy.py b/src/vmware/azext_vmware/operations/placement_policy.py new file mode 100644 index 00000000000..530b0c1397f --- /dev/null +++ b/src/vmware/azext_vmware/operations/placement_policy.py @@ -0,0 +1,225 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# pylint: disable=line-too-long + +from ..aaz.latest.vmware.placement_policy import Create as _Create, Update as _Update, Delete as _Delete +from azure.cli.core.aaz import register_command + + +# vm + + +@register_command( + "vmware placement-policy vm create", +) +class PlacementPolicyVMCreate(_Create): + """Create a VM placement policy in a private cloud cluster. + + :example: Create a VM placement policy. + az vmware placement-policy vm create --resource-group group1 --private-cloud cloud1 --cluster-name cluster1 --placement-policy-name policy1 --state Enabled --display-name policy1 --vm-members /subscriptions/subId/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-128 /subscriptions/subId/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-256 --affinity-type AntiAffinity + """ + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + from azure.cli.core.aaz import AAZStrArg, AAZListArg + args_schema = super()._build_arguments_schema(*args, **kwargs) + args_schema.affinity_type = AAZStrArg( + options=["--affinity-type"], + help="placement policy affinity type", + required=True, + enum={"Affinity": "Affinity", "AntiAffinity": "AntiAffinity"}, + ) + args_schema.vm_members = AAZListArg( + options=["--vm-members"], + help="Virtual machine members list", + required=True, + ) + vm_members = args_schema.vm_members + vm_members.Element = AAZStrArg() + + args_schema.vm_host._registered = False + args_schema.vm_vm._registered = False + return args_schema + + def pre_operations(self): + args = self.ctx.args + args.vm_vm.affinity_type = args.affinity_type + args.vm_vm.vm_members = args.vm_members + + +@register_command( + "vmware placement-policy vm update", +) +class PlacementPolicyVMUpdate(_Update): + """Update a VM placement policy in a private cloud cluster. + + :example: Update a VM placement policy. + az vmware placement-policy vm update --resource-group group1 --private-cloud cloud1 --cluster-name cluster1 --placement-policy-name policy1 --state Enabled --display-name policy1 --vm-members /subscriptions/subId/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-128 /subscriptions/subId/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-256 + """ + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + from azure.cli.core.aaz import AAZStrArg, AAZListArg + args_schema = super()._build_arguments_schema(*args, **kwargs) + args_schema.vm_members = AAZListArg( + options=["--vm-members"], + help="Virtual machine members list", + ) + vm_members = args_schema.vm_members + vm_members.Element = AAZStrArg( + nullable=True, + ) + + args_schema.vm_host._registered = False + args_schema.vm_vm._registered = False + return args_schema + + def pre_operations(self): + args = self.ctx.args + args.vm_vm.vm_members = args.vm_members + + +@register_command( + "vmware placement-policy vm delete", + confirmation="This will delete the placement policy. Are you sure?" +) +class PlacementPolicyVMDelete(_Delete): + """Delete a VM placement policy in a private cloud cluster. + + :example: Delete a VM placement policy. + az vmware placement-policy vm delete --resource-group group1 --private-cloud cloud1 --cluster-name cluster1 --placement-policy-name policy1 + """ + + +# vm-host + + +@register_command( + "vmware placement-policy vm-host create", +) +class PlacementPolicyVMHostCreate(_Create): + """Create a VM Host placement policy in a private cloud cluster. + + :example: Create a VM placement policy. + az vmware placement-policy vm-host create --resource-group group1 --private-cloud cloud1 --cluster-name cluster1 --placement-policy-name policy1 --state Enabled --display-name policy1 --vm-members /subscriptions/subId/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-128 /subscriptions/subId/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-256 --host-members fakehost22.nyc1.kubernetes.center fakehost23.nyc1.kubernetes.center --affinity-type AntiAffinity + """ + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + from azure.cli.core.aaz import AAZStrArg, AAZListArg + args_schema = super()._build_arguments_schema(*args, **kwargs) + args_schema.affinity_strength = AAZStrArg( + options=["--affinity-strength"], + help="vm-host placement policy affinity strength (should/must)", + enum={"Must": "Must", "Should": "Should"}, + ) + args_schema.affinity_type = AAZStrArg( + options=["--affinity-type"], + help="placement policy affinity type", + required=True, + enum={"Affinity": "Affinity", "AntiAffinity": "AntiAffinity"}, + ) + args_schema.azure_hybrid_benefit = AAZStrArg( + options=["--azure-hybrid-benefit"], + help="placement policy azure hybrid benefit opt-in type", + enum={"None": "None", "SqlHost": "SqlHost"}, + ) + args_schema.host_members = AAZListArg( + options=["--host-members"], + help="Host members list", + required=True, + ) + args_schema.vm_members = AAZListArg( + options=["--vm-members"], + help="Virtual machine members list", + required=True, + ) + + host_members = args_schema.host_members + host_members.Element = AAZStrArg() + + vm_members = args_schema.vm_members + vm_members.Element = AAZStrArg() + + args_schema.vm_host._registered = False + args_schema.vm_vm._registered = False + return args_schema + + def pre_operations(self): + args = self.ctx.args + args.vm_host.affinity_strength = args.affinity_strength + args.vm_host.affinity_type = args.affinity_type + args.vm_host.azure_hybrid_benefit = args.azure_hybrid_benefit + args.vm_host.host_members = args.host_members + args.vm_host.vm_members = args.vm_members + + +@register_command( + "vmware placement-policy vm-host update", +) +class PlacementPolicyVMHostUpdate(_Update): + """Update a VM Host placement policy in a private cloud cluster. + + :example: Update a VM Host placement policy. + az vmware placement-policy vm-host update --resource-group group1 --private-cloud cloud1 --cluster-name cluster1 --placement-policy-name policy1 --state Enabled --display-name policy1 --vm-members /subscriptions/subId/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-128 /subscriptions/subId/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-256 --host-members fakehost22.nyc1.kubernetes.center fakehost23.nyc1.kubernetes.center + """ + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + from azure.cli.core.aaz import AAZStrArg, AAZListArg + args_schema = super()._build_arguments_schema(*args, **kwargs) + args_schema.affinity_strength = AAZStrArg( + options=["--affinity-strength"], + help="vm-host placement policy affinity strength (should/must)", + nullable=True, + enum={"Must": "Must", "Should": "Should"}, + ) + args_schema.azure_hybrid_benefit = AAZStrArg( + options=["--azure-hybrid-benefit"], + help="placement policy azure hybrid benefit opt-in type", + nullable=True, + enum={"None": "None", "SqlHost": "SqlHost"}, + ) + args_schema.host_members = AAZListArg( + options=["--host-members"], + help="Host members list", + ) + args_schema.vm_members = AAZListArg( + options=["--vm-members"], + help="Virtual machine members list", + ) + + host_members = args_schema.host_members + host_members.Element = AAZStrArg( + nullable=True, + ) + + vm_members = args_schema.vm_members + vm_members.Element = AAZStrArg( + nullable=True, + ) + + args_schema.vm_host._registered = False + args_schema.vm_vm._registered = False + return args_schema + + def pre_operations(self): + args = self.ctx.args + args.vm_host.affinity_strength = args.affinity_strength + args.vm_host.azure_hybrid_benefit = args.azure_hybrid_benefit + args.vm_host.host_members = args.host_members + args.vm_host.vm_members = args.vm_members + + +@register_command( + "vmware placement-policy vm-host delete", + confirmation="This will delete the placement policy. Are you sure?" +) +class PlacementPolicyVMHostDelete(_Delete): + """Delete a VM Host placement policy in a private cloud cluster. + + :example: Delete a VM Host placement policy. + az vmware placement-policy vm-host delete --resource-group group1 --private-cloud cloud1 --cluster-name cluster1 --placement-policy-name policy1 + """ diff --git a/src/vmware/azext_vmware/operations/private_cloud.py b/src/vmware/azext_vmware/operations/private_cloud.py new file mode 100644 index 00000000000..f8c1f433169 --- /dev/null +++ b/src/vmware/azext_vmware/operations/private_cloud.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# pylint: disable=line-too-long + +from ..aaz.latest.vmware.private_cloud import Create as _PrivateCloudCreate, Update as _PrivateCloudUpdate + +from knack.arguments import CLICommandArgument + + +class PrivateCloudCreate(_PrivateCloudCreate): + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + from azure.cli.core.aaz import AAZBoolArg + args_schema = super()._build_arguments_schema(*args, **kwargs) + args_schema.mi_system_assigned = AAZBoolArg( + options=["--mi-system-assigned"], + help="Enable a system assigned identity." + ) + # use mi_system_assigned to assign this value in pre_operations + args_schema.identity._registered = False + return args_schema + + def load_arguments(self): + super().load_arguments() + # This is a special customization which to overwrite default yes argument in framework + # to backword compatible with the old command. + if self.confirmation: + self.arguments['yes'] = CLICommandArgument( + dest='yes', options_list=['--yes', '-y', '--accept-eula'], action='store_true', + help='Accept the end-user license agreement without prompting.') + + def pre_operations(self): + args = self.ctx.args + if args.mi_system_assigned: + args.identity.type = "SystemAssigned" + else: + args.identity.type = "None" + + +class PrivateCloudUpdate(_PrivateCloudUpdate): + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + args_schema = super()._build_arguments_schema(*args, **kwargs) + args_schema.identity._registered = False + # updated by vmware private-cloud enable-cmk-encryption/disable-cmk-encryption + args_schema.encryption._registered = False + # updated by vmware private-cloud add-identity-source/delete-identity-source + args_schema.identity_sources._registered = False + return args_schema diff --git a/src/vmware/azext_vmware/operations/workload_network.py b/src/vmware/azext_vmware/operations/workload_network.py new file mode 100644 index 00000000000..6a8b82ee17b --- /dev/null +++ b/src/vmware/azext_vmware/operations/workload_network.py @@ -0,0 +1,174 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# pylint: disable=line-too-long + +from ..aaz.latest.vmware.workload_network.dhcp import Create as _DHCPCreate, Update as _DHCPUpdate, Delete as _DHCPDelete +from azure.cli.core.aaz import register_command + +# dhcp relay + + +@register_command( + "vmware workload-network dhcp relay create", +) +class DHCPRelayCreate(_DHCPCreate): + """Create DHCP by ID in a private cloud workload network. + + :example: Create DHCP by ID in a workload network. + az vmware workload-network dhcp relay create --resource-group group1 --private-cloud cloud1 --dhcp dhcp1 --display-name dhcpConfigurations1 --revision 1 --server-addresses 40.1.5.1/24 + """ + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + from azure.cli.core.aaz import AAZListArg, AAZStrArg, AAZListArgFormat + args_schema = super()._build_arguments_schema(*args, **kwargs) + + args_schema.server_addresses = AAZListArg( + options=["--server-addresses"], + fmt=AAZListArgFormat(max_length=3), + help="DHCP Relay Addresses. Max 3.", + ) + server_addresses = args_schema.server_addresses + server_addresses.Element = AAZStrArg() + + args_schema.relay._registered = False + args_schema.server._registered = False + return args_schema + + def pre_operations(self): + args = self.ctx.args + args.relay.server_addresses = args.server_addresses + + +@register_command( + "vmware workload-network dhcp relay delete", + confirmation="This will delete the workload network DHCP. Are you sure?" +) +class DHCPRelayDelete(_DHCPDelete): + """Delete DHCP by ID in a private cloud workload network. + + :example: Delete DHCP by ID in a workload network. + az vmware workload-network dhcp relay delete --resource-group group1 --private-cloud cloud1 --dhcp dhcp1 + """ + + +@register_command( + "vmware workload-network dhcp relay update", +) +class DHCPRelayUpdate(_DHCPUpdate): + """Create DHCP by ID in a private cloud workload network. + + :example: Update DHCP by ID in a workload network. + az vmware workload-network dhcp relay update --resource-group group1 --private-cloud cloud1 --dhcp dhcp1 --display-name dhcpConfigurations1 --revision 1 --server-addresses 40.1.5.1/24 + """ + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + from azure.cli.core.aaz import AAZListArg, AAZStrArg, AAZListArgFormat + args_schema = super()._build_arguments_schema(*args, **kwargs) + + args_schema.server_addresses = AAZListArg( + options=["--server-addresses"], + fmt=AAZListArgFormat(max_length=3), + help="DHCP Relay Addresses. Max 3.", + nullable=True, + ) + server_addresses = args_schema.server_addresses + server_addresses.Element = AAZStrArg( + nullable=True, + ) + + args_schema.relay._registered = False + args_schema.server._registered = False + return args_schema + + def pre_operations(self): + args = self.ctx.args + args.relay.server_addresses = args.server_addresses + + +# dhcp server + + +@register_command( + "vmware workload-network dhcp server create", +) +class DHCPServerCreate(_DHCPCreate): + """Create DHCP by ID in a private cloud workload network. + + :example: Create DHCP by ID in a workload network. + az vmware workload-network dhcp server create --resource-group group1 --private-cloud cloud1 --dhcp dhcp1 --display-name dhcpConfigurations1 --revision 1 --server-address 40.1.5.1/24 --lease-time 86400 + """ + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + from azure.cli.core.aaz import AAZIntArg, AAZStrArg + args_schema = super()._build_arguments_schema(*args, **kwargs) + + args_schema.lease_time = AAZIntArg( + options=["--lease-time"], + help="DHCP Server Lease Time.", + ) + args_schema.server_address = AAZStrArg( + options=["--server-address"], + help="DHCP Server Address.", + ) + + args_schema.relay._registered = False + args_schema.server._registered = False + return args_schema + + def pre_operations(self): + args = self.ctx.args + args.server.lease_time = args.lease_time + args.server.server_address = args.server_address + + +@register_command( + "vmware workload-network dhcp server delete", + confirmation="This will delete the workload network DHCP. Are you sure?" +) +class DHCPServerDelete(_DHCPDelete): + """Delete DHCP by ID in a private cloud workload network. + + :example: Delete DHCP by ID in a workload network. + az vmware workload-network dhcp server delete --resource-group group1 --private-cloud cloud1 --dhcp dhcp1 + """ + + +@register_command( + "vmware workload-network dhcp server update", +) +class DHCPServerUpdate(_DHCPUpdate): + """Update DHCP by ID in a private cloud workload network. + + :example: Update DHCP by ID in a workload network. + az vmware workload-network dhcp server update --resource-group group1 --private-cloud cloud1 --dhcp dhcp1 --display-name dhcpConfigurations1 --revision 1 --server-address 40.1.5.1/24 --lease-time 86400 + """ + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + from azure.cli.core.aaz import AAZIntArg, AAZStrArg + args_schema = super()._build_arguments_schema(*args, **kwargs) + + args_schema.lease_time = AAZIntArg( + options=["--lease-time"], + help="DHCP Server Lease Time.", + nullable=True, + ) + args_schema.server_address = AAZStrArg( + options=["--server-address"], + help="DHCP Server Address.", + nullable=True, + ) + + args_schema.relay._registered = False + args_schema.server._registered = False + return args_schema + + def pre_operations(self): + args = self.ctx.args + args.server.lease_time = args.lease_time + args.server.server_address = args.server_address diff --git a/src/vmware/azext_vmware/tests/latest/recordings/test_vmware.yaml b/src/vmware/azext_vmware/tests/latest/recordings/test_vmware.yaml index 27c970dcad3..de05a350145 100644 --- a/src/vmware/azext_vmware/tests/latest/recordings/test_vmware.yaml +++ b/src/vmware/azext_vmware/tests/latest/recordings/test_vmware.yaml @@ -232,7 +232,7 @@ interactions: - -g -n --cluster-size User-Agent: - AZURECLI/2.27.1 azsdk-python-mgmt-avs/1.0.0b1 Python/3.8.10 (Windows-10-10.0.22621-SP0) - method: PATCH + method: PUT uri: https://localhost:8888/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1?api-version=2022-05-01 response: body: @@ -310,7 +310,7 @@ interactions: - -g -n --internet User-Agent: - AZURECLI/2.27.1 azsdk-python-mgmt-avs/1.0.0b1 Python/3.8.10 (Windows-10-10.0.22621-SP0) - method: PATCH + method: PUT uri: https://localhost:8888/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1?api-version=2022-05-01 response: body: @@ -465,7 +465,7 @@ interactions: uri: https://localhost:8888/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1?api-version=2022-05-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1","name":"cloud1","type":"Microsoft.AVS/privateClouds","location":"eastus2","tags":{},"sku":{"name":"AV36"},"properties":{"managementCluster":{"clusterSize":4,"clusterId":1,"hosts":["fakehost18.nyc1.kubernetes.center","fakehost19.nyc1.kubernetes.center","fakehost20.nyc1.kubernetes.center","fakehost21.nyc1.kubernetes.center"]},"internet":"Disabled","identitySources":[{"name":"group1","alias":"groupAlias","domain":"domain1","baseUserDN":"ou=baseUser","baseGroupDN":"ou=baseGroup","primaryServer":"ldaps://1.1.1.1:636/","secondaryServer":"ldaps://1.1.1.2:636/","ssl":"Enabled"}],"availability":{"strategy":"SingleZone","zone":1},"provisioningState":"Succeeded","circuit":{"primarySubnet":"192.168.53.0/30","secondarySubnet":"192.168.53.4/30","expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt13-41a90db2-9d5e-4bd5-a77a-5ce7b58213d6-eastus2/providers/Microsoft.Network/expressroutecircuits/tnt13-41a90db2-9d5e-4bd5-a77a-5ce7b58213d6-eastus2-xconnect"},"endpoints":{"nsxtManager":"https://192.168.50.3/","vcsa":"https://192.168.50.2/"},"networkBlock":"192.168.48.0/22","externalCloudLinks":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup/providers/Microsoft.AVS/privateClouds/cloud2"]}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1","name":"cloud1","type":"Microsoft.AVS/privateClouds","location":"eastus2","tags":{},"sku":{"name":"AV36"},"properties":{"managementCluster":{"clusterSize":4,"clusterId":1,"hosts":["fakehost18.nyc1.kubernetes.center","fakehost19.nyc1.kubernetes.center","fakehost20.nyc1.kubernetes.center","fakehost21.nyc1.kubernetes.center"]},"internet":"Disabled","identitySources":[{"name":"groupName","alias":"groupAlias","domain":"domain","baseUserDN":"ou=baseUser","baseGroupDN":"ou=baseGroup","primaryServer":"ldaps://1.1.1.1:636/","secondaryServer":"ldaps://1.1.1.2:636/","ssl":"Enabled"}],"availability":{"strategy":"SingleZone","zone":1},"provisioningState":"Succeeded","circuit":{"primarySubnet":"192.168.53.0/30","secondarySubnet":"192.168.53.4/30","expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt13-41a90db2-9d5e-4bd5-a77a-5ce7b58213d6-eastus2/providers/Microsoft.Network/expressroutecircuits/tnt13-41a90db2-9d5e-4bd5-a77a-5ce7b58213d6-eastus2-xconnect"},"endpoints":{"nsxtManager":"https://192.168.50.3/","vcsa":"https://192.168.50.2/"},"networkBlock":"192.168.48.0/22","externalCloudLinks":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup/providers/Microsoft.AVS/privateClouds/cloud2"]}}' headers: content-length: - '1377' @@ -510,6 +510,47 @@ interactions: status: code: 200 message: OK +- request: + body: '{"location": "eastus2", "tags": {}, "sku": {"name": "AV36"}, "identity": + {"type": "SystemAssigned"}, "properties": {"managementCluster": {"clusterSize": + 4, "hosts": ["fakehost18.nyc1.kubernetes.center", "fakehost19.nyc1.kubernetes.center", + "fakehost20.nyc1.kubernetes.center", "fakehost21.nyc1.kubernetes.center"]}, + "internet": "Disabled", "identitySources": [], "availability": {"strategy": "SingleZone", "zone": 1}, "encryption": + {"status": "Enabled", "keyVaultProperties": {"keyName": "keyname1", "keyVersion": + "ver1.0", "keyVaultUrl": "https://keyvault1-kmip-kvault.vault.azure.net/"}}, + "circuit": {}, "networkBlock": "192.168.48.0/22"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud delete-identity-source + Connection: + - keep-alive + ParameterSetName: + - -g -c -n --alias --domain --yes + Content-Length: + - '1098' + User-Agent: + - AZURECLI/2.27.1 azsdk-python-mgmt-avs/1.0.0b1 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: PUT + uri: https://localhost:8888/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware000001/providers/Microsoft.AVS/privateClouds/cloud1?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1","name":"cloud1","type":"Microsoft.AVS/privateClouds","location":"eastus2","tags":{},"sku":{"name":"AV36"},"properties":{"managementCluster":{"clusterSize":4,"clusterId":1,"hosts":["fakehost18.nyc1.kubernetes.center","fakehost19.nyc1.kubernetes.center","fakehost20.nyc1.kubernetes.center","fakehost21.nyc1.kubernetes.center"]},"internet":"Disabled","identitySources":[{"name":"groupName","alias":"groupAlias","domain":"domain","baseUserDN":"ou=baseUser","baseGroupDN":"ou=baseGroup","primaryServer":"ldaps://1.1.1.1:636/","secondaryServer":"ldaps://1.1.1.2:636/","ssl":"Enabled"}],"availability":{"strategy":"SingleZone","zone":1},"encryption":{"status":"Enabled","keyVaultProperties":{"keyName":"keyname1","keyVersion":"ver1.0","keyVaultUrl":"https://keyvault1-kmip-kvault.vault.azure.net/","keyState":"Connected","versionType":"Fixed"}},"provisioningState":"Succeeded","circuit":{"primarySubnet":"192.168.53.0/30","secondarySubnet":"192.168.53.4/30","expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt13-41a90db2-9d5e-4bd5-a77a-5ce7b58213d6-eastus2/providers/Microsoft.Network/expressroutecircuits/tnt13-41a90db2-9d5e-4bd5-a77a-5ce7b58213d6-eastus2-xconnect","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt42-cust-p01-dmo01/providers/Microsoft.Network/expressroutecircuits/tnt42-cust-p01-dmo01-er/peerings/AzurePrivatePeering"},"endpoints":{"nsxtManager":"https://192.168.50.3/","vcsa":"https://192.168.50.2/","hcxCloudManager":"https://192.168.50.4/"},"networkBlock":"192.168.48.0/22","externalCloudLinks":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup/providers/Microsoft.AVS/privateClouds/cloud2"]},"identity":{"principalId":"881e5573-063f-49e4-8c08-79d7df0169d8","tenantId":"881e5573-063f-49e4-8c08-79d7df0169d8","type":"SystemAssigned"}}' + headers: + content-length: + - '1990' + content-type: + - application/json + date: + - Wed, 28 Jun 2023 13:51:35 GMT + server: + - Rocket + status: + code: 200 + message: OK - request: body: null headers: diff --git a/src/vmware/azext_vmware/tests/latest/recordings/test_vmware_private_cloud.yaml b/src/vmware/azext_vmware/tests/latest/recordings/test_vmware_private_cloud.yaml new file mode 100644 index 00000000000..360f1a12517 --- /dev/null +++ b/src/vmware/azext_vmware/tests/latest/recordings/test_vmware_private_cloud.yaml @@ -0,0 +1,17193 @@ +interactions: +- request: + body: '{"location": "brazilsouth"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - group create + Connection: + - keep-alive + Content-Length: + - '27' + Content-Type: + - application/json + ParameterSetName: + - --name --location + User-Agent: + - AZURECLI/2.51.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmwarepc?api-version=2022-09-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc","name":"cli_test_vmwarepc","type":"Microsoft.Resources/resourceGroups","location":"brazilsouth","properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '236' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:34:37 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware location check-quota-availability + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --location + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.AVS/locations/brazilsouth/checkQuotaAvailability?api-version=2022-05-01 + response: + body: + string: '{"hostsRemaining":{"gp":0,"he":2,"he2":0,"hv":0},"quotaEnabled":"Enabled"}' + headers: + cache-control: + - no-cache + content-length: + - '74' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:34:40 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"name": "av36"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware location check-trial-availability + Connection: + - keep-alive + Content-Length: + - '16' + Content-Type: + - application/json + ParameterSetName: + - --location --sku + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.AVS/locations/brazilsouth/checkTrialAvailability?api-version=2022-05-01 + response: + body: + string: '{"availableHosts":0,"status":"TrialDisabled"}' + headers: + cache-control: + - no-cache + content-length: + - '45' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:34:43 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"identity": {"type": "None"}, "location": "brazilsouth", "properties": + {"internet": "Disabled", "managementCluster": {"clusterSize": 4}, "networkBlock": + "192.168.48.0/22", "nsxtPassword": "5rqdLj4GF3cePUe6(", "vcenterPassword": "UpfBXae9ZquZSDXk("}, + "sku": {"name": "av36"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + Content-Length: + - '275' + Content-Type: + - application/json + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1","location":"brazilsouth","name":"cloud1","properties":{"availability":{"strategy":"SingleZone","zone":3},"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt81-cust-p01-brazilsouth/providers/Microsoft.Network/expressRouteCircuits/tnt81-cust-p01-brazilsouth-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt81-cust-p01-brazilsouth/providers/Microsoft.Network/expressRouteCircuits/tnt81-cust-p01-brazilsouth-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.48.232/30","secondarySubnet":"192.168.48.236/30"},"encryption":{"status":"Disabled"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[],"internet":"Enabled","managementCluster":{"clusterId":1,"clusterSize":4,"hosts":["esx02-r04.p01.brazilsouth.avs.azure.com","esx19-r15.p01.brazilsouth.avs.azure.com","esx15-r17.p01.brazilsouth.avs.azure.com","esx18-r16.p01.brazilsouth.avs.azure.com"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/26","networkBlock":"192.168.48.0/22","nsxPublicIpQuotaRaised":"Disabled","nsxtCertificateThumbprint":"552A71130735FB52B31BDE0E70CA286EAD68B3A0","provisioningNetwork":"192.168.50.0/25","provisioningState":"Updating","vcenterCertificateThumbprint":"6DB896D0AF8FC574E02C9589168D0A916F691E20","vmotionNetwork":"192.168.49.128/25"},"sku":{"name":"av36"},"tags":{},"type":"Microsoft.AVS/privateClouds"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + cache-control: + - no-cache + content-length: + - '1674' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:34:53 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":0,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:34:54 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":0,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:35:04 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":0,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:35:16 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":0,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:35:26 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":0,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:35:37 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":0,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:35:47 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":0,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:35:59 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":0,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:36:09 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":0,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:36:19 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":0,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:36:30 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":0,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:36:41 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":0,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:36:52 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":0,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:37:02 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":0,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:37:13 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":0,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:37:24 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":0,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:37:35 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":0,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:37:45 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":0,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:37:57 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":0,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:38:07 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":0,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:38:17 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":0,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:38:29 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":0,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:38:39 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":0,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:38:51 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":0,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:39:02 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":0,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:39:13 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":0,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:39:23 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":10,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:39:33 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":10,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:39:45 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":10,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:39:55 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":11,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:40:06 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":11,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:40:16 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":11,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:40:27 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":50,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:40:38 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":50,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:40:48 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":50,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:41:00 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":50,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:41:10 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":50,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:41:21 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":50,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:41:31 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":50,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:41:42 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":50,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:41:53 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":50,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:42:03 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":50,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:42:14 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":50,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:42:26 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":50,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:42:36 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":50,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:42:47 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":50,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:42:58 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":50,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:43:10 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":50,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:43:20 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":50,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:43:31 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":50,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:43:41 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":50,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:43:52 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":50,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:44:03 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":50,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:44:13 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":50,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:44:24 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":50,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:44:34 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":50,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:44:46 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":50,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:44:56 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":100,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '329' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:45:07 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":100,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '329' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:45:17 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":100,"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '329' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:45:29 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be?api-version=2022-05-01 + response: + body: + string: '{"endTime":"2023-08-21T03:44:59.8826094+00:00","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/2064eacc-3401-4153-bef7-51459f09c4be","name":"2064eacc-3401-4153-bef7-51459f09c4be","percentComplete":100,"properties":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1","location":"brazilsouth","name":"cloud1","properties":{"availability":{"strategy":"SingleZone","zone":3},"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt81-cust-p01-brazilsouth/providers/Microsoft.Network/expressRouteCircuits/tnt81-cust-p01-brazilsouth-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt81-cust-p01-brazilsouth/providers/Microsoft.Network/expressRouteCircuits/tnt81-cust-p01-brazilsouth-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.48.232/30","secondarySubnet":"192.168.48.236/30"},"encryption":{"status":"Disabled"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[],"internet":"Disabled","managementCluster":{"clusterId":1,"clusterSize":4,"hosts":["esx02-r04.p01.brazilsouth.avs.azure.com","esx19-r15.p01.brazilsouth.avs.azure.com","esx15-r17.p01.brazilsouth.avs.azure.com","esx18-r16.p01.brazilsouth.avs.azure.com"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/26","networkBlock":"192.168.48.0/22","nsxPublicIpQuotaRaised":"Disabled","nsxtCertificateThumbprint":"552A71130735FB52B31BDE0E70CA286EAD68B3A0","provisioningNetwork":"192.168.50.0/25","provisioningState":"Succeeded","vcenterCertificateThumbprint":"6DB896D0AF8FC574E02C9589168D0A916F691E20","vmotionNetwork":"192.168.49.128/25"},"sku":{"name":"av36"},"tags":{},"type":"Microsoft.AVS/privateClouds"},"startTime":"2023-08-21T03:34:48.3231195+00:00","status":"Succeeded"}' + headers: + cache-control: + - no-cache + content-length: + - '2066' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:45:39 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud create + Connection: + - keep-alive + ParameterSetName: + - -g -n --location --sku --cluster-size --network-block --nsxt-password --vcenter-password + --accept-eula + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1","location":"brazilsouth","name":"cloud1","properties":{"availability":{"strategy":"SingleZone","zone":3},"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt81-cust-p01-brazilsouth/providers/Microsoft.Network/expressRouteCircuits/tnt81-cust-p01-brazilsouth-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt81-cust-p01-brazilsouth/providers/Microsoft.Network/expressRouteCircuits/tnt81-cust-p01-brazilsouth-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.48.232/30","secondarySubnet":"192.168.48.236/30"},"encryption":{"status":"Disabled"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[],"internet":"Disabled","managementCluster":{"clusterId":1,"clusterSize":4,"hosts":["esx02-r04.p01.brazilsouth.avs.azure.com","esx19-r15.p01.brazilsouth.avs.azure.com","esx15-r17.p01.brazilsouth.avs.azure.com","esx18-r16.p01.brazilsouth.avs.azure.com"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/26","networkBlock":"192.168.48.0/22","nsxPublicIpQuotaRaised":"Disabled","nsxtCertificateThumbprint":"552A71130735FB52B31BDE0E70CA286EAD68B3A0","provisioningNetwork":"192.168.50.0/25","provisioningState":"Succeeded","vcenterCertificateThumbprint":"6DB896D0AF8FC574E02C9589168D0A916F691E20","vmotionNetwork":"192.168.49.128/25"},"sku":{"name":"av36"},"tags":{},"type":"Microsoft.AVS/privateClouds"}' + headers: + cache-control: + - no-cache + content-length: + - '1676' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:45:40 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud list + Connection: + - keep-alive + ParameterSetName: + - -g + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds?api-version=2022-05-01 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1","location":"brazilsouth","name":"cloud1","properties":{"availability":{"strategy":"SingleZone","zone":3},"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt81-cust-p01-brazilsouth/providers/Microsoft.Network/expressRouteCircuits/tnt81-cust-p01-brazilsouth-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt81-cust-p01-brazilsouth/providers/Microsoft.Network/expressRouteCircuits/tnt81-cust-p01-brazilsouth-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.48.232/30","secondarySubnet":"192.168.48.236/30"},"encryption":{"status":"Disabled"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[],"internet":"Disabled","managementCluster":{"clusterId":1,"clusterSize":4,"hosts":["esx02-r04.p01.brazilsouth.avs.azure.com","esx19-r15.p01.brazilsouth.avs.azure.com","esx15-r17.p01.brazilsouth.avs.azure.com","esx18-r16.p01.brazilsouth.avs.azure.com"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/26","networkBlock":"192.168.48.0/22","nsxPublicIpQuotaRaised":"Disabled","nsxtCertificateThumbprint":"552A71130735FB52B31BDE0E70CA286EAD68B3A0","provisioningNetwork":"192.168.50.0/25","provisioningState":"Succeeded","vcenterCertificateThumbprint":"6DB896D0AF8FC574E02C9589168D0A916F691E20","vmotionNetwork":"192.168.49.128/25"},"sku":{"name":"av36"},"tags":{},"type":"Microsoft.AVS/privateClouds"}]}' + headers: + cache-control: + - no-cache + content-length: + - '1688' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:45:43 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1","location":"brazilsouth","name":"cloud1","properties":{"availability":{"strategy":"SingleZone","zone":3},"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt81-cust-p01-brazilsouth/providers/Microsoft.Network/expressRouteCircuits/tnt81-cust-p01-brazilsouth-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt81-cust-p01-brazilsouth/providers/Microsoft.Network/expressRouteCircuits/tnt81-cust-p01-brazilsouth-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.48.232/30","secondarySubnet":"192.168.48.236/30"},"encryption":{"status":"Disabled"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[],"internet":"Disabled","managementCluster":{"clusterId":1,"clusterSize":4,"hosts":["esx02-r04.p01.brazilsouth.avs.azure.com","esx19-r15.p01.brazilsouth.avs.azure.com","esx15-r17.p01.brazilsouth.avs.azure.com","esx18-r16.p01.brazilsouth.avs.azure.com"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/26","networkBlock":"192.168.48.0/22","nsxPublicIpQuotaRaised":"Disabled","nsxtCertificateThumbprint":"552A71130735FB52B31BDE0E70CA286EAD68B3A0","provisioningNetwork":"192.168.50.0/25","provisioningState":"Succeeded","vcenterCertificateThumbprint":"6DB896D0AF8FC574E02C9589168D0A916F691E20","vmotionNetwork":"192.168.49.128/25"},"sku":{"name":"av36"},"tags":{},"type":"Microsoft.AVS/privateClouds"}' + headers: + cache-control: + - no-cache + content-length: + - '1676' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:45:46 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "brazilsouth", "properties": {"availability": {"strategy": + "SingleZone", "zone": 3}, "circuit": {}, "encryption": {"status": "Disabled"}, + "endpoints": {}, "identitySources": [], "internet": "Disabled", "managementCluster": + {"clusterSize": 3, "hosts": ["esx02-r04.p01.brazilsouth.avs.azure.com", "esx19-r15.p01.brazilsouth.avs.azure.com", + "esx15-r17.p01.brazilsouth.avs.azure.com", "esx18-r16.p01.brazilsouth.avs.azure.com"]}, + "networkBlock": "192.168.48.0/22"}, "sku": {"name": "av36"}, "tags": {}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + Content-Length: + - '511' + Content-Type: + - application/json + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1","location":"brazilsouth","name":"cloud1","properties":{"availability":{"strategy":"SingleZone","zone":3},"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt81-cust-p01-brazilsouth/providers/Microsoft.Network/expressRouteCircuits/tnt81-cust-p01-brazilsouth-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt81-cust-p01-brazilsouth/providers/Microsoft.Network/expressRouteCircuits/tnt81-cust-p01-brazilsouth-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.48.232/30","secondarySubnet":"192.168.48.236/30"},"encryption":{"status":"Disabled"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[],"internet":"Disabled","managementCluster":{"clusterId":1,"clusterSize":3,"hosts":["esx19-r15.p01.brazilsouth.avs.azure.com","esx15-r17.p01.brazilsouth.avs.azure.com","esx18-r16.p01.brazilsouth.avs.azure.com"],"provisioningState":"Updating"},"managementNetwork":"192.168.48.0/26","networkBlock":"192.168.48.0/22","nsxPublicIpQuotaRaised":"Disabled","nsxtCertificateThumbprint":"552A71130735FB52B31BDE0E70CA286EAD68B3A0","provisioningNetwork":"192.168.50.0/25","provisioningState":"Updating","vcenterCertificateThumbprint":"6DB896D0AF8FC574E02C9589168D0A916F691E20","vmotionNetwork":"192.168.49.128/25"},"sku":{"name":"av36"},"tags":{},"type":"Microsoft.AVS/privateClouds"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + cache-control: + - no-cache + content-length: + - '1632' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:45:48 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":0,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:45:49 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":0,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:45:59 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":0,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:46:10 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":0,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:46:20 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":0,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:46:32 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":0,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:46:42 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":0,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:46:53 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":0,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:47:04 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":0,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:47:14 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":0,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:47:25 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":0,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:47:35 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":0,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:47:47 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":0,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:47:57 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":0,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:48:08 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":0,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:48:18 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":0,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:48:30 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":0,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:48:40 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":0,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:48:50 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":0,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:49:01 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":0,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:49:11 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":0,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:49:23 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":0,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:49:33 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":0,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:49:44 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":0,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:49:54 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":0,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:50:06 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":0,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:50:16 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":0,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:50:27 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":0,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:50:38 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":0,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:50:50 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":0,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:51:01 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:51:11 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:51:22 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:51:33 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:51:44 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:51:54 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:52:05 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:52:15 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:52:27 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:52:37 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:52:48 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:52:58 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:53:10 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:53:20 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:53:31 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:53:41 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:53:52 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:54:03 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:54:14 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:54:24 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:54:34 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:54:46 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:54:56 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:55:07 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:55:18 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:55:29 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:55:39 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:55:52 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:56:02 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:56:13 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:56:23 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:56:35 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:56:45 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:56:56 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:57:07 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:57:17 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:57:28 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:57:39 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:57:50 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:58:00 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:58:11 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:58:22 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:58:33 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:58:43 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:58:54 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:59:05 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:59:15 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:59:26 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:59:36 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:59:47 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 03:59:59 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:00:11 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:00:21 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:00:32 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:00:42 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:00:54 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:01:05 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:01:16 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:01:26 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:01:37 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:01:47 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:01:59 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:02:09 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:02:20 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:02:30 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:02:41 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:02:52 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:03:03 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:03:13 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:03:24 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:03:35 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:03:46 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:03:57 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:04:07 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:04:18 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:04:29 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:04:41 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:04:51 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:05:02 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:05:12 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:05:23 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:05:33 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:05:45 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:05:57 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:06:07 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:06:18 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:06:28 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:06:40 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:06:50 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:07:01 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:07:12 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:07:22 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:07:33 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:07:43 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:07:54 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:08:05 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:08:16 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:08:26 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:08:37 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:08:47 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:08:59 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:09:10 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:09:21 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:09:31 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:09:42 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:09:52 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:10:04 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:10:14 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:10:25 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:10:35 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:10:46 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:10:58 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:11:09 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:11:19 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:11:30 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:11:41 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:11:51 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:12:03 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:12:13 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":50,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:12:24 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:12:34 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:12:45 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:12:56 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:13:07 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:13:17 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:13:27 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:13:39 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:13:49 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:14:00 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:14:11 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:14:22 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:14:33 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:14:43 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:14:54 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:15:04 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:15:15 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:15:26 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:15:36 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:15:47 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:15:59 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:16:10 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:16:21 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:16:31 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:16:42 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:16:52 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:17:04 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:17:14 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:17:25 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:17:36 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:17:46 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:17:57 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:18:08 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:18:18 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:18:29 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:18:40 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:18:51 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:19:02 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:19:13 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:19:23 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:19:34 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:19:44 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:19:55 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:20:06 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:20:17 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:20:27 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:20:38 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:20:48 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:21:00 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:21:12 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:21:22 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:21:33 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:21:43 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:21:53 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:22:05 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:22:15 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:22:26 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:22:36 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:22:48 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:22:58 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:23:09 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:23:20 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:23:30 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:23:42 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:23:52 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:24:03 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:24:13 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:24:24 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:24:34 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:24:46 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:24:56 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:25:07 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:25:17 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:25:29 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:25:39 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:25:50 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:26:02 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:26:12 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:26:23 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:26:34 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:26:45 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:26:56 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:27:06 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:27:17 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:27:27 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:27:38 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:27:49 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":75,"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:28:01 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17?api-version=2022-05-01 + response: + body: + string: '{"endTime":"2023-08-21T04:42:29.8875788+00:00","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/948d4891-e4ab-44f2-81ce-05d73e5f6f17","name":"948d4891-e4ab-44f2-81ce-05d73e5f6f17","percentComplete":100,"properties":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1","location":"brazilsouth","name":"cloud1","properties":{"availability":{"strategy":"SingleZone","zone":3},"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt81-cust-p01-brazilsouth/providers/Microsoft.Network/expressRouteCircuits/tnt81-cust-p01-brazilsouth-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt81-cust-p01-brazilsouth/providers/Microsoft.Network/expressRouteCircuits/tnt81-cust-p01-brazilsouth-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.48.232/30","secondarySubnet":"192.168.48.236/30"},"encryption":{"status":"Disabled"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[],"internet":"Disabled","managementCluster":{"clusterId":1,"clusterSize":3,"hosts":["esx19-r15.p01.brazilsouth.avs.azure.com","esx15-r17.p01.brazilsouth.avs.azure.com","esx18-r16.p01.brazilsouth.avs.azure.com"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/26","networkBlock":"192.168.48.0/22","nsxPublicIpQuotaRaised":"Disabled","nsxtCertificateThumbprint":"552A71130735FB52B31BDE0E70CA286EAD68B3A0","provisioningNetwork":"192.168.50.0/25","provisioningState":"Succeeded","vcenterCertificateThumbprint":"6DB896D0AF8FC574E02C9589168D0A916F691E20","vmotionNetwork":"192.168.49.128/25"},"sku":{"name":"av36"},"tags":{},"type":"Microsoft.AVS/privateClouds"},"startTime":"2023-08-21T03:45:47.9227808+00:00","status":"Succeeded"}' + headers: + cache-control: + - no-cache + content-length: + - '2024' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:44:15 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --cluster-size + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1","location":"brazilsouth","name":"cloud1","properties":{"availability":{"strategy":"SingleZone","zone":3},"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt81-cust-p01-brazilsouth/providers/Microsoft.Network/expressRouteCircuits/tnt81-cust-p01-brazilsouth-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt81-cust-p01-brazilsouth/providers/Microsoft.Network/expressRouteCircuits/tnt81-cust-p01-brazilsouth-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.48.232/30","secondarySubnet":"192.168.48.236/30"},"encryption":{"status":"Disabled"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[],"internet":"Disabled","managementCluster":{"clusterId":1,"clusterSize":3,"hosts":["esx19-r15.p01.brazilsouth.avs.azure.com","esx15-r17.p01.brazilsouth.avs.azure.com","esx18-r16.p01.brazilsouth.avs.azure.com"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/26","networkBlock":"192.168.48.0/22","nsxPublicIpQuotaRaised":"Disabled","nsxtCertificateThumbprint":"552A71130735FB52B31BDE0E70CA286EAD68B3A0","provisioningNetwork":"192.168.50.0/25","provisioningState":"Succeeded","vcenterCertificateThumbprint":"6DB896D0AF8FC574E02C9589168D0A916F691E20","vmotionNetwork":"192.168.49.128/25"},"sku":{"name":"av36"},"tags":{},"type":"Microsoft.AVS/privateClouds"}' + headers: + cache-control: + - no-cache + content-length: + - '1634' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:44:15 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1","location":"brazilsouth","name":"cloud1","properties":{"availability":{"strategy":"SingleZone","zone":3},"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt81-cust-p01-brazilsouth/providers/Microsoft.Network/expressRouteCircuits/tnt81-cust-p01-brazilsouth-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt81-cust-p01-brazilsouth/providers/Microsoft.Network/expressRouteCircuits/tnt81-cust-p01-brazilsouth-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.48.232/30","secondarySubnet":"192.168.48.236/30"},"encryption":{"status":"Disabled"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[],"internet":"Disabled","managementCluster":{"clusterId":1,"clusterSize":3,"hosts":["esx19-r15.p01.brazilsouth.avs.azure.com","esx15-r17.p01.brazilsouth.avs.azure.com","esx18-r16.p01.brazilsouth.avs.azure.com"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/26","networkBlock":"192.168.48.0/22","nsxPublicIpQuotaRaised":"Disabled","nsxtCertificateThumbprint":"552A71130735FB52B31BDE0E70CA286EAD68B3A0","provisioningNetwork":"192.168.50.0/25","provisioningState":"Succeeded","vcenterCertificateThumbprint":"6DB896D0AF8FC574E02C9589168D0A916F691E20","vmotionNetwork":"192.168.49.128/25"},"sku":{"name":"av36"},"tags":{},"type":"Microsoft.AVS/privateClouds"}' + headers: + cache-control: + - no-cache + content-length: + - '1634' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:44:17 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "brazilsouth", "properties": {"availability": {"strategy": + "SingleZone", "zone": 3}, "circuit": {}, "encryption": {"status": "Disabled"}, + "endpoints": {}, "identitySources": [], "internet": "Enabled", "managementCluster": + {"clusterSize": 3, "hosts": ["esx19-r15.p01.brazilsouth.avs.azure.com", "esx15-r17.p01.brazilsouth.avs.azure.com", + "esx18-r16.p01.brazilsouth.avs.azure.com"]}, "networkBlock": "192.168.48.0/22"}, + "sku": {"name": "av36"}, "tags": {}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + Content-Length: + - '467' + Content-Type: + - application/json + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1","location":"brazilsouth","name":"cloud1","properties":{"availability":{"strategy":"SingleZone","zone":3},"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt81-cust-p01-brazilsouth/providers/Microsoft.Network/expressRouteCircuits/tnt81-cust-p01-brazilsouth-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt81-cust-p01-brazilsouth/providers/Microsoft.Network/expressRouteCircuits/tnt81-cust-p01-brazilsouth-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.48.232/30","secondarySubnet":"192.168.48.236/30"},"encryption":{"status":"Disabled"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[],"internet":"Disabled","managementCluster":{"clusterId":1,"clusterSize":3,"hosts":["esx19-r15.p01.brazilsouth.avs.azure.com","esx15-r17.p01.brazilsouth.avs.azure.com","esx18-r16.p01.brazilsouth.avs.azure.com"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/26","networkBlock":"192.168.48.0/22","nsxPublicIpQuotaRaised":"Disabled","nsxtCertificateThumbprint":"552A71130735FB52B31BDE0E70CA286EAD68B3A0","provisioningNetwork":"192.168.50.0/25","provisioningState":"Updating","vcenterCertificateThumbprint":"6DB896D0AF8FC574E02C9589168D0A916F691E20","vmotionNetwork":"192.168.49.128/25"},"sku":{"name":"av36"},"tags":{},"type":"Microsoft.AVS/privateClouds"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f?api-version=2022-05-01 + cache-control: + - no-cache + content-length: + - '1633' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:44:19 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f","name":"f3009768-df56-4c54-a947-daacc36ded9f","percentComplete":0,"startTime":"2023-08-21T04:44:19.8904488+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:44:20 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f","name":"f3009768-df56-4c54-a947-daacc36ded9f","percentComplete":0,"startTime":"2023-08-21T04:44:19.8904488+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:44:31 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f","name":"f3009768-df56-4c54-a947-daacc36ded9f","percentComplete":0,"startTime":"2023-08-21T04:44:19.8904488+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:44:42 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f","name":"f3009768-df56-4c54-a947-daacc36ded9f","percentComplete":0,"startTime":"2023-08-21T04:44:19.8904488+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:44:53 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f","name":"f3009768-df56-4c54-a947-daacc36ded9f","percentComplete":0,"startTime":"2023-08-21T04:44:19.8904488+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:45:03 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f","name":"f3009768-df56-4c54-a947-daacc36ded9f","percentComplete":0,"startTime":"2023-08-21T04:44:19.8904488+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:45:14 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f","name":"f3009768-df56-4c54-a947-daacc36ded9f","percentComplete":0,"startTime":"2023-08-21T04:44:19.8904488+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:45:24 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f","name":"f3009768-df56-4c54-a947-daacc36ded9f","percentComplete":0,"startTime":"2023-08-21T04:44:19.8904488+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:45:36 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f","name":"f3009768-df56-4c54-a947-daacc36ded9f","percentComplete":0,"startTime":"2023-08-21T04:44:19.8904488+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:45:46 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f","name":"f3009768-df56-4c54-a947-daacc36ded9f","percentComplete":0,"startTime":"2023-08-21T04:44:19.8904488+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:45:57 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f","name":"f3009768-df56-4c54-a947-daacc36ded9f","percentComplete":0,"startTime":"2023-08-21T04:44:19.8904488+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:46:07 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f","name":"f3009768-df56-4c54-a947-daacc36ded9f","percentComplete":0,"startTime":"2023-08-21T04:44:19.8904488+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:46:19 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f","name":"f3009768-df56-4c54-a947-daacc36ded9f","percentComplete":0,"startTime":"2023-08-21T04:44:19.8904488+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:46:29 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f","name":"f3009768-df56-4c54-a947-daacc36ded9f","percentComplete":0,"startTime":"2023-08-21T04:44:19.8904488+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:46:40 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f","name":"f3009768-df56-4c54-a947-daacc36ded9f","percentComplete":0,"startTime":"2023-08-21T04:44:19.8904488+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:46:51 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f","name":"f3009768-df56-4c54-a947-daacc36ded9f","percentComplete":0,"startTime":"2023-08-21T04:44:19.8904488+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:47:01 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f","name":"f3009768-df56-4c54-a947-daacc36ded9f","percentComplete":0,"startTime":"2023-08-21T04:44:19.8904488+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:47:12 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f","name":"f3009768-df56-4c54-a947-daacc36ded9f","percentComplete":0,"startTime":"2023-08-21T04:44:19.8904488+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:47:22 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f","name":"f3009768-df56-4c54-a947-daacc36ded9f","percentComplete":0,"startTime":"2023-08-21T04:44:19.8904488+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:47:33 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f","name":"f3009768-df56-4c54-a947-daacc36ded9f","percentComplete":0,"startTime":"2023-08-21T04:44:19.8904488+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:47:44 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f","name":"f3009768-df56-4c54-a947-daacc36ded9f","percentComplete":0,"startTime":"2023-08-21T04:44:19.8904488+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:47:55 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f","name":"f3009768-df56-4c54-a947-daacc36ded9f","percentComplete":0,"startTime":"2023-08-21T04:44:19.8904488+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:48:05 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f","name":"f3009768-df56-4c54-a947-daacc36ded9f","percentComplete":0,"startTime":"2023-08-21T04:44:19.8904488+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:48:17 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f","name":"f3009768-df56-4c54-a947-daacc36ded9f","percentComplete":0,"startTime":"2023-08-21T04:44:19.8904488+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:48:28 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f","name":"f3009768-df56-4c54-a947-daacc36ded9f","percentComplete":0,"startTime":"2023-08-21T04:44:19.8904488+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:48:39 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f","name":"f3009768-df56-4c54-a947-daacc36ded9f","percentComplete":0,"startTime":"2023-08-21T04:44:19.8904488+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '327' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:48:50 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f","name":"f3009768-df56-4c54-a947-daacc36ded9f","percentComplete":10,"startTime":"2023-08-21T04:44:19.8904488+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:49:01 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f","name":"f3009768-df56-4c54-a947-daacc36ded9f","percentComplete":10,"startTime":"2023-08-21T04:44:19.8904488+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:49:12 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f","name":"f3009768-df56-4c54-a947-daacc36ded9f","percentComplete":10,"startTime":"2023-08-21T04:44:19.8904488+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:49:22 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f","name":"f3009768-df56-4c54-a947-daacc36ded9f","percentComplete":11,"startTime":"2023-08-21T04:44:19.8904488+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:49:33 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f","name":"f3009768-df56-4c54-a947-daacc36ded9f","percentComplete":11,"startTime":"2023-08-21T04:44:19.8904488+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:49:43 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f","name":"f3009768-df56-4c54-a947-daacc36ded9f","percentComplete":11,"startTime":"2023-08-21T04:44:19.8904488+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:49:55 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f","name":"f3009768-df56-4c54-a947-daacc36ded9f","percentComplete":50,"startTime":"2023-08-21T04:44:19.8904488+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:50:05 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f","name":"f3009768-df56-4c54-a947-daacc36ded9f","percentComplete":50,"startTime":"2023-08-21T04:44:19.8904488+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:50:16 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f","name":"f3009768-df56-4c54-a947-daacc36ded9f","percentComplete":50,"startTime":"2023-08-21T04:44:19.8904488+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:50:27 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f","name":"f3009768-df56-4c54-a947-daacc36ded9f","percentComplete":50,"startTime":"2023-08-21T04:44:19.8904488+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:50:38 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f","name":"f3009768-df56-4c54-a947-daacc36ded9f","percentComplete":50,"startTime":"2023-08-21T04:44:19.8904488+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:50:48 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f","name":"f3009768-df56-4c54-a947-daacc36ded9f","percentComplete":50,"startTime":"2023-08-21T04:44:19.8904488+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:50:58 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f","name":"f3009768-df56-4c54-a947-daacc36ded9f","percentComplete":50,"startTime":"2023-08-21T04:44:19.8904488+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:51:09 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f","name":"f3009768-df56-4c54-a947-daacc36ded9f","percentComplete":50,"startTime":"2023-08-21T04:44:19.8904488+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:51:20 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f","name":"f3009768-df56-4c54-a947-daacc36ded9f","percentComplete":50,"startTime":"2023-08-21T04:44:19.8904488+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:51:31 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f","name":"f3009768-df56-4c54-a947-daacc36ded9f","percentComplete":50,"startTime":"2023-08-21T04:44:19.8904488+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:51:41 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f","name":"f3009768-df56-4c54-a947-daacc36ded9f","percentComplete":50,"startTime":"2023-08-21T04:44:19.8904488+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:51:52 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f","name":"f3009768-df56-4c54-a947-daacc36ded9f","percentComplete":50,"startTime":"2023-08-21T04:44:19.8904488+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:52:03 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f","name":"f3009768-df56-4c54-a947-daacc36ded9f","percentComplete":50,"startTime":"2023-08-21T04:44:19.8904488+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:52:14 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f","name":"f3009768-df56-4c54-a947-daacc36ded9f","percentComplete":50,"startTime":"2023-08-21T04:44:19.8904488+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '328' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:52:24 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f","name":"f3009768-df56-4c54-a947-daacc36ded9f","percentComplete":100,"startTime":"2023-08-21T04:44:19.8904488+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '329' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:52:35 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f","name":"f3009768-df56-4c54-a947-daacc36ded9f","percentComplete":100,"startTime":"2023-08-21T04:44:19.8904488+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '329' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:52:46 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f","name":"f3009768-df56-4c54-a947-daacc36ded9f","percentComplete":100,"startTime":"2023-08-21T04:44:19.8904488+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '329' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:52:58 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f?api-version=2022-05-01 + response: + body: + string: '{"endTime":"2023-08-21T04:52:30.2423115+00:00","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/f3009768-df56-4c54-a947-daacc36ded9f","name":"f3009768-df56-4c54-a947-daacc36ded9f","percentComplete":100,"properties":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1","location":"brazilsouth","name":"cloud1","properties":{"availability":{"strategy":"SingleZone","zone":3},"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt81-cust-p01-brazilsouth/providers/Microsoft.Network/expressRouteCircuits/tnt81-cust-p01-brazilsouth-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt81-cust-p01-brazilsouth/providers/Microsoft.Network/expressRouteCircuits/tnt81-cust-p01-brazilsouth-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.48.232/30","secondarySubnet":"192.168.48.236/30"},"encryption":{"status":"Disabled"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[],"internet":"Enabled","managementCluster":{"clusterId":1,"clusterSize":3,"hosts":["esx19-r15.p01.brazilsouth.avs.azure.com","esx15-r17.p01.brazilsouth.avs.azure.com","esx18-r16.p01.brazilsouth.avs.azure.com"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/26","networkBlock":"192.168.48.0/22","nsxPublicIpQuotaRaised":"Disabled","nsxtCertificateThumbprint":"552A71130735FB52B31BDE0E70CA286EAD68B3A0","provisioningNetwork":"192.168.50.0/25","provisioningState":"Succeeded","vcenterCertificateThumbprint":"6DB896D0AF8FC574E02C9589168D0A916F691E20","vmotionNetwork":"192.168.49.128/25"},"sku":{"name":"av36"},"tags":{},"type":"Microsoft.AVS/privateClouds"},"startTime":"2023-08-21T04:44:19.8904488+00:00","status":"Succeeded"}' + headers: + cache-control: + - no-cache + content-length: + - '2023' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:53:09 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud update + Connection: + - keep-alive + ParameterSetName: + - -g -n --internet + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1","location":"brazilsouth","name":"cloud1","properties":{"availability":{"strategy":"SingleZone","zone":3},"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt81-cust-p01-brazilsouth/providers/Microsoft.Network/expressRouteCircuits/tnt81-cust-p01-brazilsouth-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt81-cust-p01-brazilsouth/providers/Microsoft.Network/expressRouteCircuits/tnt81-cust-p01-brazilsouth-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.48.232/30","secondarySubnet":"192.168.48.236/30"},"encryption":{"status":"Disabled"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[],"internet":"Enabled","managementCluster":{"clusterId":1,"clusterSize":3,"hosts":["esx19-r15.p01.brazilsouth.avs.azure.com","esx15-r17.p01.brazilsouth.avs.azure.com","esx18-r16.p01.brazilsouth.avs.azure.com"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/26","networkBlock":"192.168.48.0/22","nsxPublicIpQuotaRaised":"Disabled","nsxtCertificateThumbprint":"552A71130735FB52B31BDE0E70CA286EAD68B3A0","provisioningNetwork":"192.168.50.0/25","provisioningState":"Succeeded","vcenterCertificateThumbprint":"6DB896D0AF8FC574E02C9589168D0A916F691E20","vmotionNetwork":"192.168.49.128/25"},"sku":{"name":"av36"},"tags":{},"type":"Microsoft.AVS/privateClouds"}' + headers: + cache-control: + - no-cache + content-length: + - '1633' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:53:10 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware authorization create + Connection: + - keep-alive + Content-Length: + - '2' + Content-Type: + - application/json + ParameterSetName: + - -g -c -n + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/authorizations/myauthname?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/authorizations/myauthname","name":"myauthname","properties":{"expressRouteAuthorizationId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt81-cust-p01-brazilsouth/providers/Microsoft.Network/expressRouteCircuits/tnt81-cust-p01-brazilsouth-er/authorizations/avs_resource_myauthname","expressRouteAuthorizationKey":"464ce089-5468-4787-8d3b-3cc8921d1e4a","expressRouteId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt81-cust-p01-brazilsouth/providers/Microsoft.Network/expressRouteCircuits/tnt81-cust-p01-brazilsouth-er","provisioningState":"Succeeded"},"type":"Microsoft.AVS/privateClouds/authorizations"}' + headers: + cache-control: + - no-cache + content-length: + - '789' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:53:25 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware authorization delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -c -n --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/authorizations/myauthname?api-version=2022-05-01 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + content-type: + - text/html + date: + - Mon, 21 Aug 2023 04:53:38 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud identity assign + Connection: + - keep-alive + ParameterSetName: + - -g -c --system-assigned + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1","location":"brazilsouth","name":"cloud1","properties":{"availability":{"strategy":"SingleZone","zone":3},"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt81-cust-p01-brazilsouth/providers/Microsoft.Network/expressRouteCircuits/tnt81-cust-p01-brazilsouth-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt81-cust-p01-brazilsouth/providers/Microsoft.Network/expressRouteCircuits/tnt81-cust-p01-brazilsouth-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.48.232/30","secondarySubnet":"192.168.48.236/30"},"encryption":{"status":"Disabled"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[],"internet":"Enabled","managementCluster":{"clusterId":1,"clusterSize":3,"hosts":["esx19-r15.p01.brazilsouth.avs.azure.com","esx15-r17.p01.brazilsouth.avs.azure.com","esx18-r16.p01.brazilsouth.avs.azure.com"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/26","networkBlock":"192.168.48.0/22","nsxPublicIpQuotaRaised":"Disabled","nsxtCertificateThumbprint":"552A71130735FB52B31BDE0E70CA286EAD68B3A0","provisioningNetwork":"192.168.50.0/25","provisioningState":"Succeeded","vcenterCertificateThumbprint":"6DB896D0AF8FC574E02C9589168D0A916F691E20","vmotionNetwork":"192.168.49.128/25"},"sku":{"name":"av36"},"tags":{},"type":"Microsoft.AVS/privateClouds"}' + headers: + cache-control: + - no-cache + content-length: + - '1633' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:53:42 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"identity": {"type": "SystemAssigned"}, "location": "brazilsouth", "properties": + {"availability": {"strategy": "SingleZone", "zone": 3}, "circuit": {}, "encryption": + {"status": "Disabled"}, "endpoints": {}, "identitySources": [], "internet": + "Enabled", "managementCluster": {"clusterSize": 3, "hosts": ["esx19-r15.p01.brazilsouth.avs.azure.com", + "esx15-r17.p01.brazilsouth.avs.azure.com", "esx18-r16.p01.brazilsouth.avs.azure.com"]}, + "networkBlock": "192.168.48.0/22"}, "sku": {"name": "av36"}, "tags": {}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud identity assign + Connection: + - keep-alive + Content-Length: + - '507' + Content-Type: + - application/json + ParameterSetName: + - -g -c --system-assigned + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1","identity":{"principalId":"b050128c-4b24-44a1-8ee5-8f828feb6488","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","type":"systemassigned"},"location":"brazilsouth","name":"cloud1","properties":{"availability":{"strategy":"SingleZone","zone":3},"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt81-cust-p01-brazilsouth/providers/Microsoft.Network/expressRouteCircuits/tnt81-cust-p01-brazilsouth-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt81-cust-p01-brazilsouth/providers/Microsoft.Network/expressRouteCircuits/tnt81-cust-p01-brazilsouth-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.48.232/30","secondarySubnet":"192.168.48.236/30"},"encryption":{"status":"Disabled"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[],"internet":"Enabled","managementCluster":{"clusterId":1,"clusterSize":3,"hosts":["esx19-r15.p01.brazilsouth.avs.azure.com","esx15-r17.p01.brazilsouth.avs.azure.com","esx18-r16.p01.brazilsouth.avs.azure.com"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/26","networkBlock":"192.168.48.0/22","nsxPublicIpQuotaRaised":"Disabled","nsxtCertificateThumbprint":"552A71130735FB52B31BDE0E70CA286EAD68B3A0","provisioningNetwork":"192.168.50.0/25","provisioningState":"Succeeded","vcenterCertificateThumbprint":"6DB896D0AF8FC574E02C9589168D0A916F691E20","vmotionNetwork":"192.168.49.128/25"},"sku":{"name":"av36"},"tags":{},"type":"Microsoft.AVS/privateClouds"}' + headers: + cache-control: + - no-cache + content-length: + - '1773' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:53:52 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud identity show + Connection: + - keep-alive + ParameterSetName: + - -g -c + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1","identity":{"principalId":"b050128c-4b24-44a1-8ee5-8f828feb6488","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","type":"systemassigned"},"location":"brazilsouth","name":"cloud1","properties":{"availability":{"strategy":"SingleZone","zone":3},"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt81-cust-p01-brazilsouth/providers/Microsoft.Network/expressRouteCircuits/tnt81-cust-p01-brazilsouth-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt81-cust-p01-brazilsouth/providers/Microsoft.Network/expressRouteCircuits/tnt81-cust-p01-brazilsouth-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.48.232/30","secondarySubnet":"192.168.48.236/30"},"encryption":{"status":"Disabled"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[],"internet":"Enabled","managementCluster":{"clusterId":1,"clusterSize":3,"hosts":["esx19-r15.p01.brazilsouth.avs.azure.com","esx15-r17.p01.brazilsouth.avs.azure.com","esx18-r16.p01.brazilsouth.avs.azure.com"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/26","networkBlock":"192.168.48.0/22","nsxPublicIpQuotaRaised":"Disabled","nsxtCertificateThumbprint":"552A71130735FB52B31BDE0E70CA286EAD68B3A0","provisioningNetwork":"192.168.50.0/25","provisioningState":"Succeeded","vcenterCertificateThumbprint":"6DB896D0AF8FC574E02C9589168D0A916F691E20","vmotionNetwork":"192.168.49.128/25"},"sku":{"name":"av36"},"tags":{},"type":"Microsoft.AVS/privateClouds"}' + headers: + cache-control: + - no-cache + content-length: + - '1773' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:53:55 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - keyvault create + Connection: + - keep-alive + ParameterSetName: + - --name -g --sku --location + User-Agent: + - AZURECLI/2.51.0 azsdk-python-azure-mgmt-keyvault/10.2.3 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.KeyVault/vaults/cli-test-vmwarepc0821?api-version=2023-02-01 + response: + body: + string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.KeyVault/vaults/cli-test-vmwarepc0821'' + under resource group ''cli_test_vmwarepc'' was not found. For more details + please go to https://aka.ms/ARMResourceNotFoundFix"}}' + headers: + cache-control: + - no-cache + content-length: + - '236' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:54:02 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-failure-cause: + - gateway + status: + code: 404 + message: Not Found +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - keyvault create + Connection: + - keep-alive + ParameterSetName: + - --name -g --sku --location + User-Agent: + - python/3.8.10 (Windows-10-10.0.22621-SP0) AZURECLI/2.51.0 + method: GET + uri: https://graph.microsoft.com/v1.0/me + response: + body: + string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#users/$entity","businessPhones":[],"displayName":"Kai + Ru","givenName":null,"jobTitle":null,"mail":"kairu@microsoft.com","mobilePhone":null,"officeLocation":null,"preferredLanguage":null,"surname":null,"userPrincipalName":"kairu_microsoft.com#EXT#@AzureSDKTeam.onmicrosoft.com","id":"d64e4618-a7a0-41ff-a20c-1594fdde8c87"}' + headers: + cache-control: + - no-cache + content-length: + - '383' + content-type: + - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8 + date: + - Mon, 21 Aug 2023 04:54:04 GMT + odata-version: + - '4.0' + request-id: + - b2922844-1cac-494a-8bb2-943510dbbbf0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-ms-ags-diagnostic: + - '{"ServerInfo":{"DataCenter":"Southeast Asia","Slice":"E","Ring":"5","ScaleUnit":"000","RoleInstance":"SI1PEPF00010F58"}}' + x-ms-resource-unit: + - '1' + status: + code: 200 + message: OK +- request: + body: '{"location": "brazilsouth", "properties": {"tenantId": "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a", + "sku": {"family": "A", "name": "standard"}, "accessPolicies": [{"tenantId": + "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a", "objectId": "d64e4618-a7a0-41ff-a20c-1594fdde8c87", + "permissions": {"keys": ["all"], "secrets": ["all"], "certificates": ["all"], + "storage": ["all"]}}], "enableSoftDelete": true, "softDeleteRetentionInDays": + 90, "networkAcls": {"bypass": "AzureServices", "defaultAction": "Allow"}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - keyvault create + Connection: + - keep-alive + Content-Length: + - '493' + Content-Type: + - application/json + ParameterSetName: + - --name -g --sku --location + User-Agent: + - AZURECLI/2.51.0 azsdk-python-azure-mgmt-keyvault/10.2.3 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.KeyVault/vaults/cli-test-vmwarepc0821?api-version=2023-02-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.KeyVault/vaults/cli-test-vmwarepc0821","name":"cli-test-vmwarepc0821","type":"Microsoft.KeyVault/vaults","location":"brazilsouth","tags":{},"systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2023-08-21T04:54:13.326Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-08-21T04:54:13.326Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","accessPolicies":[{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","objectId":"d64e4618-a7a0-41ff-a20c-1594fdde8c87","permissions":{"keys":["all"],"secrets":["all"],"certificates":["all"],"storage":["all"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"vaultUri":"https://cli-test-vmwarepc0821.vault.azure.net","provisioningState":"RegisteringDns","publicNetworkAccess":"Enabled"}}' + headers: + cache-control: + - no-cache + content-length: + - '1001' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:54:18 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-service-version: + - 1.5.885.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - keyvault create + Connection: + - keep-alive + ParameterSetName: + - --name -g --sku --location + User-Agent: + - AZURECLI/2.51.0 azsdk-python-azure-mgmt-keyvault/10.2.3 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.KeyVault/vaults/cli-test-vmwarepc0821?api-version=2023-02-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.KeyVault/vaults/cli-test-vmwarepc0821","name":"cli-test-vmwarepc0821","type":"Microsoft.KeyVault/vaults","location":"brazilsouth","tags":{},"systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2023-08-21T04:54:13.326Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-08-21T04:54:13.326Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","accessPolicies":[{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","objectId":"d64e4618-a7a0-41ff-a20c-1594fdde8c87","permissions":{"keys":["all"],"secrets":["all"],"certificates":["all"],"storage":["all"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"vaultUri":"https://cli-test-vmwarepc0821.vault.azure.net/","provisioningState":"RegisteringDns","publicNetworkAccess":"Enabled"}}' + headers: + cache-control: + - no-cache + content-length: + - '1002' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:54:19 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-service-version: + - 1.5.885.0 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - keyvault create + Connection: + - keep-alive + ParameterSetName: + - --name -g --sku --location + User-Agent: + - AZURECLI/2.51.0 azsdk-python-azure-mgmt-keyvault/10.2.3 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.KeyVault/vaults/cli-test-vmwarepc0821?api-version=2023-02-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.KeyVault/vaults/cli-test-vmwarepc0821","name":"cli-test-vmwarepc0821","type":"Microsoft.KeyVault/vaults","location":"brazilsouth","tags":{},"systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2023-08-21T04:54:13.326Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-08-21T04:54:13.326Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","accessPolicies":[{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","objectId":"d64e4618-a7a0-41ff-a20c-1594fdde8c87","permissions":{"keys":["all"],"secrets":["all"],"certificates":["all"],"storage":["all"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"vaultUri":"https://cli-test-vmwarepc0821.vault.azure.net/","provisioningState":"Succeeded","publicNetworkAccess":"Enabled"}}' + headers: + cache-control: + - no-cache + content-length: + - '997' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:54:49 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-service-version: + - 1.5.885.0 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Content-Type: + - application/json + User-Agent: + - azsdk-python-keyvault-keys/4.8.0b2 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: POST + uri: https://cli-test-vmwarepc0821.vault.azure.net/keys/vmwarekey/create?api-version=7.4-preview.1 + response: + body: + string: '{"error":{"code":"Unauthorized","message":"AKV10000: Request is missing + a Bearer or PoP token."}}' + headers: + cache-control: + - no-cache + content-length: + - '97' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:54:52 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000;includeSubDomains + www-authenticate: + - Bearer authorization="https://login.microsoftonline.com/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a", + resource="https://vault.azure.net" + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - conn_type=Ipv4;addr=167.220.255.108;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - brazilsouth + x-ms-keyvault-service-version: + - 1.9.908.1 + status: + code: 401 + message: Unauthorized +- request: + body: '{"kty": "RSA", "attributes": {"enabled": true}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '47' + Content-Type: + - application/json + User-Agent: + - azsdk-python-keyvault-keys/4.8.0b2 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: POST + uri: https://cli-test-vmwarepc0821.vault.azure.net/keys/vmwarekey/create?api-version=7.4-preview.1 + response: + body: + string: '{"key":{"kid":"https://cli-test-vmwarepc0821.vault.azure.net/keys/vmwarekey/5c1a85a871d84f4b818cc71680d9aa1c","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"4m1oRnuBPumsfNIonrpZsCzrsposHZzK8BaSYbX7yNgkwgbWBoVpdlxHdmgrb7bBo0LIycUuVphJQvRQ6gjjGmCr3Fs8ItuWsYPHzr-hg-2336k2BMubWQKwYu-WySWGlukC_A2NkKZCYPLXpDb-YB4eZzE0mqVIxV2wQbsXl3Eg6Jod81FQ8DVoOOmURuMkQadB5uLo3mf9VNrqeytMat2hjAqEmw7yKBOOhXWoi0ag-B32bZwPTJPBvgZL6EA0n_8FJJEajwAauKEkJSu4Js_emyslXiG_x5HuZUZ3BBQ8bGemJfK3l4Q-1YoNDvDckuujz1gnHFG6-w9pWJjAsQ","e":"AQAB"},"attributes":{"enabled":true,"created":1692593695,"updated":1692593695,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90,"exportable":false}}' + headers: + cache-control: + - no-cache + content-length: + - '705' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:54:54 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000;includeSubDomains + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - conn_type=Ipv4;addr=167.220.255.108;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - brazilsouth + x-ms-keyvault-service-version: + - 1.9.908.1 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - keyvault set-policy + Connection: + - keep-alive + ParameterSetName: + - -g --name --key-permissions --object-id + User-Agent: + - AZURECLI/2.51.0 azsdk-python-azure-mgmt-keyvault/10.2.3 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.KeyVault/vaults/cli-test-vmwarepc0821?api-version=2023-02-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.KeyVault/vaults/cli-test-vmwarepc0821","name":"cli-test-vmwarepc0821","type":"Microsoft.KeyVault/vaults","location":"brazilsouth","tags":{},"systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2023-08-21T04:54:13.326Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-08-21T04:54:13.326Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","accessPolicies":[{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","objectId":"d64e4618-a7a0-41ff-a20c-1594fdde8c87","permissions":{"keys":["all"],"secrets":["all"],"certificates":["all"],"storage":["all"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"vaultUri":"https://cli-test-vmwarepc0821.vault.azure.net/","provisioningState":"Succeeded","publicNetworkAccess":"Enabled"}}' + headers: + cache-control: + - no-cache + content-length: + - '997' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:54:55 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-service-version: + - 1.5.885.0 + status: + code: 200 + message: OK +- request: + body: '{"location": "brazilsouth", "tags": {}, "properties": {"tenantId": "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a", + "sku": {"family": "A", "name": "standard"}, "accessPolicies": [{"tenantId": + "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a", "objectId": "d64e4618-a7a0-41ff-a20c-1594fdde8c87", + "permissions": {"keys": ["all"], "secrets": ["all"], "certificates": ["all"], + "storage": ["all"]}}, {"tenantId": "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a", "objectId": + "b050128c-4b24-44a1-8ee5-8f828feb6488", "permissions": {"keys": ["all"]}}], + "vaultUri": "https://cli-test-vmwarepc0821.vault.azure.net/", "enabledForDeployment": + false, "enableSoftDelete": true, "softDeleteRetentionInDays": 90, "provisioningState": + "Succeeded", "publicNetworkAccess": "Enabled"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - keyvault set-policy + Connection: + - keep-alive + Content-Length: + - '736' + Content-Type: + - application/json + ParameterSetName: + - -g --name --key-permissions --object-id + User-Agent: + - AZURECLI/2.51.0 azsdk-python-azure-mgmt-keyvault/10.2.3 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.KeyVault/vaults/cli-test-vmwarepc0821?api-version=2023-02-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.KeyVault/vaults/cli-test-vmwarepc0821","name":"cli-test-vmwarepc0821","type":"Microsoft.KeyVault/vaults","location":"brazilsouth","tags":{},"systemData":{"createdBy":"kairu@microsoft.com","createdByType":"User","createdAt":"2023-08-21T04:54:13.326Z","lastModifiedBy":"kairu@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-08-21T04:54:56.92Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","accessPolicies":[{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","objectId":"d64e4618-a7a0-41ff-a20c-1594fdde8c87","permissions":{"keys":["all"],"secrets":["all"],"certificates":["all"],"storage":["all"]}},{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","objectId":"b050128c-4b24-44a1-8ee5-8f828feb6488","permissions":{"keys":["all"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"vaultUri":"https://cli-test-vmwarepc0821.vault.azure.net/","provisioningState":"Succeeded","publicNetworkAccess":"Enabled"}}' + headers: + cache-control: + - no-cache + content-length: + - '1129' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:54:57 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-service-version: + - 1.5.885.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud enable-cmk-encryption + Connection: + - keep-alive + ParameterSetName: + - -c -g --enc-kv-key-name --enc-kv-url + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1","identity":{"principalId":"b050128c-4b24-44a1-8ee5-8f828feb6488","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","type":"systemassigned"},"location":"brazilsouth","name":"cloud1","properties":{"availability":{"strategy":"SingleZone","zone":3},"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt81-cust-p01-brazilsouth/providers/Microsoft.Network/expressRouteCircuits/tnt81-cust-p01-brazilsouth-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt81-cust-p01-brazilsouth/providers/Microsoft.Network/expressRouteCircuits/tnt81-cust-p01-brazilsouth-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.48.232/30","secondarySubnet":"192.168.48.236/30"},"encryption":{"status":"Disabled"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[],"internet":"Enabled","managementCluster":{"clusterId":1,"clusterSize":3,"hosts":["esx19-r15.p01.brazilsouth.avs.azure.com","esx15-r17.p01.brazilsouth.avs.azure.com","esx18-r16.p01.brazilsouth.avs.azure.com"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/26","networkBlock":"192.168.48.0/22","nsxPublicIpQuotaRaised":"Disabled","nsxtCertificateThumbprint":"552A71130735FB52B31BDE0E70CA286EAD68B3A0","provisioningNetwork":"192.168.50.0/25","provisioningState":"Succeeded","vcenterCertificateThumbprint":"6DB896D0AF8FC574E02C9589168D0A916F691E20","vmotionNetwork":"192.168.49.128/25"},"sku":{"name":"av36"},"tags":{},"type":"Microsoft.AVS/privateClouds"}' + headers: + cache-control: + - no-cache + content-length: + - '1773' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:54:59 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"identity": {"type": "systemassigned"}, "location": "brazilsouth", "properties": + {"availability": {"strategy": "SingleZone", "zone": 3}, "circuit": {}, "encryption": + {"keyVaultProperties": {"keyName": "vmwarekey", "keyVaultUrl": "https://cli-test-vmwarepc0821.vault.azure.net/"}, + "status": "Enabled"}, "endpoints": {}, "identitySources": [], "internet": "Enabled", + "managementCluster": {"clusterSize": 3, "hosts": ["esx19-r15.p01.brazilsouth.avs.azure.com", + "esx15-r17.p01.brazilsouth.avs.azure.com", "esx18-r16.p01.brazilsouth.avs.azure.com"]}, + "networkBlock": "192.168.48.0/22"}, "sku": {"name": "av36"}, "tags": {}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud enable-cmk-encryption + Connection: + - keep-alive + Content-Length: + - '619' + Content-Type: + - application/json + ParameterSetName: + - -c -g --enc-kv-key-name --enc-kv-url + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1","identity":{"principalId":"b050128c-4b24-44a1-8ee5-8f828feb6488","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","type":"systemassigned"},"location":"brazilsouth","name":"cloud1","properties":{"availability":{"strategy":"SingleZone","zone":3},"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt81-cust-p01-brazilsouth/providers/Microsoft.Network/expressRouteCircuits/tnt81-cust-p01-brazilsouth-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt81-cust-p01-brazilsouth/providers/Microsoft.Network/expressRouteCircuits/tnt81-cust-p01-brazilsouth-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.48.232/30","secondarySubnet":"192.168.48.236/30"},"encryption":{"status":"Disabled"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[],"internet":"Enabled","managementCluster":{"clusterId":1,"clusterSize":3,"hosts":["esx19-r15.p01.brazilsouth.avs.azure.com","esx15-r17.p01.brazilsouth.avs.azure.com","esx18-r16.p01.brazilsouth.avs.azure.com"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/26","networkBlock":"192.168.48.0/22","nsxPublicIpQuotaRaised":"Disabled","nsxtCertificateThumbprint":"552A71130735FB52B31BDE0E70CA286EAD68B3A0","provisioningNetwork":"192.168.50.0/25","provisioningState":"Updating","vcenterCertificateThumbprint":"6DB896D0AF8FC574E02C9589168D0A916F691E20","vmotionNetwork":"192.168.49.128/25"},"sku":{"name":"av36"},"tags":{},"type":"Microsoft.AVS/privateClouds"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/77bde0ae-28b1-4dd6-9bb8-7973fe69e834?api-version=2022-05-01 + cache-control: + - no-cache + content-length: + - '1772' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:55:10 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud enable-cmk-encryption + Connection: + - keep-alive + ParameterSetName: + - -c -g --enc-kv-key-name --enc-kv-url + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/77bde0ae-28b1-4dd6-9bb8-7973fe69e834?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/77bde0ae-28b1-4dd6-9bb8-7973fe69e834","name":"77bde0ae-28b1-4dd6-9bb8-7973fe69e834","percentComplete":100,"properties":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1","location":"brazilsouth","name":"cloud1","properties":{"availability":{"strategy":"SingleZone","zone":3},"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt81-cust-p01-brazilsouth/providers/Microsoft.Network/expressRouteCircuits/tnt81-cust-p01-brazilsouth-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt81-cust-p01-brazilsouth/providers/Microsoft.Network/expressRouteCircuits/tnt81-cust-p01-brazilsouth-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.48.232/30","secondarySubnet":"192.168.48.236/30"},"encryption":{"keyVaultProperties":{"autoDetectedKeyVersion":"","keyName":"vmwarekey","keyState":"Connected","keyVaultUrl":"https://cli-test-vmwarepc0821.vault.azure.net/","keyVersion":"","versionType":"AutoDetected"},"status":"Enabled"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[],"internet":"Enabled","managementCluster":{"clusterId":1,"clusterSize":3,"hosts":["esx19-r15.p01.brazilsouth.avs.azure.com","esx15-r17.p01.brazilsouth.avs.azure.com","esx18-r16.p01.brazilsouth.avs.azure.com"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/26","networkBlock":"192.168.48.0/22","nsxPublicIpQuotaRaised":"Disabled","nsxtCertificateThumbprint":"552A71130735FB52B31BDE0E70CA286EAD68B3A0","provisioningNetwork":"192.168.50.0/25","provisioningState":"Succeeded","vcenterCertificateThumbprint":"6DB896D0AF8FC574E02C9589168D0A916F691E20","vmotionNetwork":"192.168.49.128/25"},"sku":{"name":"av36"},"tags":{},"type":"Microsoft.AVS/privateClouds"},"startTime":"2023-08-21T04:55:05.4741523+00:00","status":"Succeeded"}' + headers: + cache-control: + - no-cache + content-length: + - '2180' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:55:11 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud enable-cmk-encryption + Connection: + - keep-alive + ParameterSetName: + - -c -g --enc-kv-key-name --enc-kv-url + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1","identity":{"principalId":"b050128c-4b24-44a1-8ee5-8f828feb6488","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","type":"systemassigned"},"location":"brazilsouth","name":"cloud1","properties":{"availability":{"strategy":"SingleZone","zone":3},"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt81-cust-p01-brazilsouth/providers/Microsoft.Network/expressRouteCircuits/tnt81-cust-p01-brazilsouth-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt81-cust-p01-brazilsouth/providers/Microsoft.Network/expressRouteCircuits/tnt81-cust-p01-brazilsouth-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.48.232/30","secondarySubnet":"192.168.48.236/30"},"encryption":{"keyVaultProperties":{"autoDetectedKeyVersion":"","keyName":"vmwarekey","keyState":"Connected","keyVaultUrl":"https://cli-test-vmwarepc0821.vault.azure.net/","keyVersion":"","versionType":"AutoDetected"},"status":"Enabled"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[],"internet":"Enabled","managementCluster":{"clusterId":1,"clusterSize":3,"hosts":["esx19-r15.p01.brazilsouth.avs.azure.com","esx15-r17.p01.brazilsouth.avs.azure.com","esx18-r16.p01.brazilsouth.avs.azure.com"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/26","networkBlock":"192.168.48.0/22","nsxPublicIpQuotaRaised":"Disabled","nsxtCertificateThumbprint":"552A71130735FB52B31BDE0E70CA286EAD68B3A0","provisioningNetwork":"192.168.50.0/25","provisioningState":"Succeeded","vcenterCertificateThumbprint":"6DB896D0AF8FC574E02C9589168D0A916F691E20","vmotionNetwork":"192.168.49.128/25"},"sku":{"name":"av36"},"tags":{},"type":"Microsoft.AVS/privateClouds"}' + headers: + cache-control: + - no-cache + content-length: + - '1976' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:55:12 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud disable-cmk-encryption + Connection: + - keep-alive + ParameterSetName: + - -c -g --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1","identity":{"principalId":"b050128c-4b24-44a1-8ee5-8f828feb6488","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","type":"systemassigned"},"location":"brazilsouth","name":"cloud1","properties":{"availability":{"strategy":"SingleZone","zone":3},"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt81-cust-p01-brazilsouth/providers/Microsoft.Network/expressRouteCircuits/tnt81-cust-p01-brazilsouth-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt81-cust-p01-brazilsouth/providers/Microsoft.Network/expressRouteCircuits/tnt81-cust-p01-brazilsouth-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.48.232/30","secondarySubnet":"192.168.48.236/30"},"encryption":{"keyVaultProperties":{"autoDetectedKeyVersion":"","keyName":"vmwarekey","keyState":"Connected","keyVaultUrl":"https://cli-test-vmwarepc0821.vault.azure.net/","keyVersion":"","versionType":"AutoDetected"},"status":"Enabled"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[],"internet":"Enabled","managementCluster":{"clusterId":1,"clusterSize":3,"hosts":["esx19-r15.p01.brazilsouth.avs.azure.com","esx15-r17.p01.brazilsouth.avs.azure.com","esx18-r16.p01.brazilsouth.avs.azure.com"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/26","networkBlock":"192.168.48.0/22","nsxPublicIpQuotaRaised":"Disabled","nsxtCertificateThumbprint":"552A71130735FB52B31BDE0E70CA286EAD68B3A0","provisioningNetwork":"192.168.50.0/25","provisioningState":"Succeeded","vcenterCertificateThumbprint":"6DB896D0AF8FC574E02C9589168D0A916F691E20","vmotionNetwork":"192.168.49.128/25"},"sku":{"name":"av36"},"tags":{},"type":"Microsoft.AVS/privateClouds"}' + headers: + cache-control: + - no-cache + content-length: + - '1976' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:55:15 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"identity": {"type": "systemassigned"}, "location": "brazilsouth", "properties": + {"availability": {"strategy": "SingleZone", "zone": 3}, "circuit": {}, "encryption": + {"status": "Disabled"}, "endpoints": {}, "identitySources": [], "internet": + "Enabled", "managementCluster": {"clusterSize": 3, "hosts": ["esx19-r15.p01.brazilsouth.avs.azure.com", + "esx15-r17.p01.brazilsouth.avs.azure.com", "esx18-r16.p01.brazilsouth.avs.azure.com"]}, + "networkBlock": "192.168.48.0/22"}, "sku": {"name": "av36"}, "tags": {}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud disable-cmk-encryption + Connection: + - keep-alive + Content-Length: + - '507' + Content-Type: + - application/json + ParameterSetName: + - -c -g --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1","identity":{"principalId":"b050128c-4b24-44a1-8ee5-8f828feb6488","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","type":"systemassigned"},"location":"brazilsouth","name":"cloud1","properties":{"availability":{"strategy":"SingleZone","zone":3},"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt81-cust-p01-brazilsouth/providers/Microsoft.Network/expressRouteCircuits/tnt81-cust-p01-brazilsouth-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt81-cust-p01-brazilsouth/providers/Microsoft.Network/expressRouteCircuits/tnt81-cust-p01-brazilsouth-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.48.232/30","secondarySubnet":"192.168.48.236/30"},"encryption":{"keyVaultProperties":{"autoDetectedKeyVersion":"","keyName":"vmwarekey","keyState":"Connected","keyVaultUrl":"https://cli-test-vmwarepc0821.vault.azure.net/","keyVersion":"","versionType":"AutoDetected"},"status":"Enabled"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[],"internet":"Enabled","managementCluster":{"clusterId":1,"clusterSize":3,"hosts":["esx19-r15.p01.brazilsouth.avs.azure.com","esx15-r17.p01.brazilsouth.avs.azure.com","esx18-r16.p01.brazilsouth.avs.azure.com"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/26","networkBlock":"192.168.48.0/22","nsxPublicIpQuotaRaised":"Disabled","nsxtCertificateThumbprint":"552A71130735FB52B31BDE0E70CA286EAD68B3A0","provisioningNetwork":"192.168.50.0/25","provisioningState":"Updating","vcenterCertificateThumbprint":"6DB896D0AF8FC574E02C9589168D0A916F691E20","vmotionNetwork":"192.168.49.128/25"},"sku":{"name":"av36"},"tags":{},"type":"Microsoft.AVS/privateClouds"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/b1471c0c-a8d7-4696-9395-bae887e6bf26?api-version=2022-05-01 + cache-control: + - no-cache + content-length: + - '1975' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:55:23 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud disable-cmk-encryption + Connection: + - keep-alive + ParameterSetName: + - -c -g --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/b1471c0c-a8d7-4696-9395-bae887e6bf26?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/b1471c0c-a8d7-4696-9395-bae887e6bf26","name":"b1471c0c-a8d7-4696-9395-bae887e6bf26","percentComplete":100,"properties":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1","location":"brazilsouth","name":"cloud1","properties":{"availability":{"strategy":"SingleZone","zone":3},"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt81-cust-p01-brazilsouth/providers/Microsoft.Network/expressRouteCircuits/tnt81-cust-p01-brazilsouth-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt81-cust-p01-brazilsouth/providers/Microsoft.Network/expressRouteCircuits/tnt81-cust-p01-brazilsouth-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.48.232/30","secondarySubnet":"192.168.48.236/30"},"encryption":{"status":"Disabled"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[],"internet":"Enabled","managementCluster":{"clusterId":1,"clusterSize":3,"hosts":["esx19-r15.p01.brazilsouth.avs.azure.com","esx15-r17.p01.brazilsouth.avs.azure.com","esx18-r16.p01.brazilsouth.avs.azure.com"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/26","networkBlock":"192.168.48.0/22","nsxPublicIpQuotaRaised":"Disabled","nsxtCertificateThumbprint":"552A71130735FB52B31BDE0E70CA286EAD68B3A0","provisioningNetwork":"192.168.50.0/25","provisioningState":"Succeeded","vcenterCertificateThumbprint":"6DB896D0AF8FC574E02C9589168D0A916F691E20","vmotionNetwork":"192.168.49.128/25"},"sku":{"name":"av36"},"tags":{},"type":"Microsoft.AVS/privateClouds"},"startTime":"2023-08-21T04:55:18.6065639+00:00","status":"Succeeded"}' + headers: + cache-control: + - no-cache + content-length: + - '1977' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:55:24 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud disable-cmk-encryption + Connection: + - keep-alive + ParameterSetName: + - -c -g --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1","identity":{"principalId":"b050128c-4b24-44a1-8ee5-8f828feb6488","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","type":"systemassigned"},"location":"brazilsouth","name":"cloud1","properties":{"availability":{"strategy":"SingleZone","zone":3},"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt81-cust-p01-brazilsouth/providers/Microsoft.Network/expressRouteCircuits/tnt81-cust-p01-brazilsouth-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt81-cust-p01-brazilsouth/providers/Microsoft.Network/expressRouteCircuits/tnt81-cust-p01-brazilsouth-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.48.232/30","secondarySubnet":"192.168.48.236/30"},"encryption":{"status":"Disabled"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[],"internet":"Enabled","managementCluster":{"clusterId":1,"clusterSize":3,"hosts":["esx19-r15.p01.brazilsouth.avs.azure.com","esx15-r17.p01.brazilsouth.avs.azure.com","esx18-r16.p01.brazilsouth.avs.azure.com"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/26","networkBlock":"192.168.48.0/22","nsxPublicIpQuotaRaised":"Disabled","nsxtCertificateThumbprint":"552A71130735FB52B31BDE0E70CA286EAD68B3A0","provisioningNetwork":"192.168.50.0/25","provisioningState":"Succeeded","vcenterCertificateThumbprint":"6DB896D0AF8FC574E02C9589168D0A916F691E20","vmotionNetwork":"192.168.49.128/25"},"sku":{"name":"av36"},"tags":{},"type":"Microsoft.AVS/privateClouds"}' + headers: + cache-control: + - no-cache + content-length: + - '1773' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 04:55:25 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1-tombstone-20232108T063315Z","location":"brazilsouth","name":"cloud1-tombstone-20232108T063315Z","properties":{"availability":{"strategy":"SingleZone","zone":3},"circuit":{"expressRouteID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt81-cust-p01-brazilsouth/providers/Microsoft.Network/expressRouteCircuits/tnt81-cust-p01-brazilsouth-er","expressRoutePrivatePeeringID":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tnt81-cust-p01-brazilsouth/providers/Microsoft.Network/expressRouteCircuits/tnt81-cust-p01-brazilsouth-er/peerings/AzurePrivatePeering","primarySubnet":"192.168.48.232/30","secondarySubnet":"192.168.48.236/30"},"encryption":{"status":"Disabled"},"endpoints":{"hcxCloudManager":"https://192.168.48.9/","nsxtManager":"https://192.168.48.3/","vcsa":"https://192.168.48.2/"},"externalCloudLinks":[],"identitySources":[],"internet":"Enabled","managementCluster":{"clusterId":1,"clusterSize":3,"hosts":["esx19-r15.p01.brazilsouth.avs.azure.com","esx15-r17.p01.brazilsouth.avs.azure.com","esx18-r16.p01.brazilsouth.avs.azure.com"],"provisioningState":"Succeeded"},"managementNetwork":"192.168.48.0/26","networkBlock":"192.168.48.0/22","nsxPublicIpQuotaRaised":"Disabled","nsxtCertificateThumbprint":"552A71130735FB52B31BDE0E70CA286EAD68B3A0","provisioningNetwork":"192.168.50.0/25","provisioningState":"Succeeded","vcenterCertificateThumbprint":"6DB896D0AF8FC574E02C9589168D0A916F691E20","vmotionNetwork":"192.168.49.128/25"},"sku":{"name":"av36"},"tags":{},"type":"Microsoft.AVS/privateClouds"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/65cf31f8-5805-42ed-80a7-eea26e60a387?api-version=2022-05-01 + cache-control: + - no-cache + content-length: + - '1687' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 06:33:15 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationresults/65cf31f8-5805-42ed-80a7-eea26e60a387?api-version=2022-05-01 + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud delete + Connection: + - keep-alive + ParameterSetName: + - -g -n --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/65cf31f8-5805-42ed-80a7-eea26e60a387?api-version=2022-05-01 + response: + body: + string: '{"endTime":"2023-08-21T06:33:15.2221810+00:00","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/operationstatuses/65cf31f8-5805-42ed-80a7-eea26e60a387","name":"65cf31f8-5805-42ed-80a7-eea26e60a387","percentComplete":100,"startTime":"2023-08-21T06:33:15.2221810+00:00","status":"Succeeded"}' + headers: + cache-control: + - no-cache + content-length: + - '376' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 06:33:16 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware private-cloud list + Connection: + - keep-alive + ParameterSetName: + - -g + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds?api-version=2022-05-01 + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-cache + content-length: + - '12' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 06:33:19 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - group delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --name --yes --no-wait + User-Agent: + - AZURECLI/2.51.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmwarepc?api-version=2022-09-01 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Mon, 21 Aug 2023 06:33:33 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTEk6NUZURVNUOjVGVk1XQVJFUEMtQlJBWklMU09VVEgiLCJqb2JMb2NhdGlvbiI6ImJyYXppbHNvdXRoIn0?api-version=2022-09-01 + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +version: 1 + diff --git a/src/vmware/azext_vmware/tests/latest/recordings/test_vmware_vr_addon.yaml b/src/vmware/azext_vmware/tests/latest/recordings/test_vmware_vr_addon.yaml new file mode 100644 index 00000000000..5ae97224146 --- /dev/null +++ b/src/vmware/azext_vmware/tests/latest/recordings/test_vmware_vr_addon.yaml @@ -0,0 +1,9344 @@ +interactions: +- request: + body: '{"properties": {"addonType": "VR", "vrsCount": 1}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + Content-Length: + - '50' + Content-Type: + - application/json + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr","name":"vr","properties":{"addonType":"VR","provisioningState":"Building","vrsCount":1},"type":"Microsoft.AVS/privateClouds/addons"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + cache-control: + - no-cache + content-length: + - '280' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:10:52 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:10:53 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":25,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:11:04 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":25,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:11:15 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":25,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:11:25 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":25,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:11:36 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":25,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:11:47 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":25,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:11:58 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":25,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:12:08 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":25,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:12:19 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":25,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:12:30 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":25,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:12:40 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":25,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:12:51 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:13:02 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:13:12 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:13:27 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:13:39 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:13:51 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:14:02 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:14:14 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:14:27 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:14:38 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:14:50 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:15:02 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:15:14 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:15:26 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:15:37 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:15:48 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:15:58 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:16:09 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:16:19 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:16:31 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:16:41 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:16:52 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:17:03 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:17:13 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:17:24 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:17:34 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:17:45 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:17:56 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:18:07 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:18:17 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:18:28 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:18:39 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:18:50 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:19:00 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:19:11 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:19:22 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:19:33 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:19:44 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:19:55 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:20:05 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:20:17 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:20:27 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:20:37 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:20:49 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:20:59 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:21:09 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:21:21 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:21:31 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:21:42 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:21:52 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:22:03 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:22:14 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:22:25 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:22:35 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:22:45 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:22:57 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:23:07 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:23:17 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:23:29 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:23:39 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:23:50 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:24:01 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:24:11 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:24:24 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:24:34 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:24:44 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:24:56 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:25:06 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:25:17 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:25:27 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:25:38 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:25:49 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:26:00 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:26:10 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:26:21 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:26:31 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:26:43 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:26:53 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:27:03 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:27:15 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:27:25 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:27:36 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:27:46 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:27:57 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:28:08 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:28:19 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:28:30 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:28:40 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:28:52 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:29:03 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:29:13 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:29:24 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:29:34 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:29:46 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":50,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:29:56 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:30:07 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:30:17 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:30:27 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:30:39 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:30:49 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:31:00 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:31:10 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:31:22 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:31:32 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:31:42 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:31:54 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:32:04 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:32:14 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:32:26 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:32:37 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:32:47 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:32:58 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:33:09 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:33:21 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:33:31 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:33:42 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:33:53 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:34:03 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:34:14 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":0,"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:34:24 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4?api-version=2022-05-01 + response: + body: + string: '{"endTime":"2023-08-21T05:33:42.4046380+00:00","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/3053193f-2fac-44fb-888e-513f165b7cf4","name":"3053193f-2fac-44fb-888e-513f165b7cf4","percentComplete":100,"properties":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr","name":"vr","properties":{"addonType":"VR","provisioningState":"Succeeded","vrsCount":1},"type":"Microsoft.AVS/privateClouds/addons"},"startTime":"2023-08-21T05:10:52.8037826+00:00","status":"Succeeded"}' + headers: + cache-control: + - no-cache + content-length: + - '681' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:34:35 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr create + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr","name":"vr","properties":{"addonType":"VR","provisioningState":"Succeeded","vrsCount":1},"type":"Microsoft.AVS/privateClouds/addons"}' + headers: + cache-control: + - no-cache + content-length: + - '281' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:34:36 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr update + Connection: + - keep-alive + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr","name":"vr","properties":{"addonType":"VR","provisioningState":"Succeeded","vrsCount":1},"type":"Microsoft.AVS/privateClouds/addons"}' + headers: + cache-control: + - no-cache + content-length: + - '281' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:34:40 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"properties": {"addonType": "VR", "vrsCount": 1}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr update + Connection: + - keep-alive + Content-Length: + - '50' + Content-Type: + - application/json + ParameterSetName: + - -g -c --vrs-count + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr","name":"vr","properties":{"addonType":"VR","provisioningState":"Succeeded","vrsCount":1},"type":"Microsoft.AVS/privateClouds/addons"}' + headers: + cache-control: + - no-cache + content-length: + - '281' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:34:41 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon list + Connection: + - keep-alive + ParameterSetName: + - -g -c + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons?api-version=2022-05-01 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr","name":"vr","properties":{"addonType":"VR","provisioningState":"Succeeded","vrsCount":1},"type":"Microsoft.AVS/privateClouds/addons"}]}' + headers: + cache-control: + - no-cache + content-length: + - '293' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:34:43 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr show + Connection: + - keep-alive + ParameterSetName: + - -g -c + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr","name":"vr","properties":{"addonType":"VR","provisioningState":"Succeeded","vrsCount":1},"type":"Microsoft.AVS/privateClouds/addons"}' + headers: + cache-control: + - no-cache + content-length: + - '281' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:34:47 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr","name":"vr","properties":{"addonType":"VR","provisioningState":"Deleting","vrsCount":1},"type":"Microsoft.AVS/privateClouds/addons"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + cache-control: + - no-cache + content-length: + - '280' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:34:50 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationresults/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:34:51 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:35:02 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:35:12 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:35:24 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:35:34 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:35:45 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:35:55 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:36:06 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:36:17 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:36:27 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:36:39 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:36:49 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:37:00 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:37:10 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:37:21 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:37:31 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:37:43 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:37:54 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:38:04 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:38:15 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:38:25 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:38:36 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:38:47 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:38:57 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:39:09 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:39:20 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:39:30 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:39:41 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:39:52 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:40:02 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:40:14 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:40:24 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:40:35 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:40:45 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:40:56 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:41:07 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:41:18 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:41:29 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:41:39 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:41:50 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:42:01 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:42:11 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:42:22 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":50,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:42:33 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":50,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:42:44 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":50,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:42:54 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":50,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:43:05 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":50,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:43:15 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":50,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:43:28 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":50,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:43:38 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":50,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:43:49 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":50,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:43:59 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":50,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:44:10 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":50,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:44:21 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":50,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:44:32 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":50,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:44:43 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":50,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:44:53 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":50,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:45:04 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":50,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:45:15 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":50,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:45:26 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:45:37 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:45:47 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:45:58 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:46:09 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:46:20 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:46:30 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:46:41 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:46:51 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:47:02 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:47:13 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":0,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Building"}' + headers: + cache-control: + - no-cache + content-length: + - '337' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:47:24 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon vr delete + Connection: + - keep-alive + ParameterSetName: + - -g -c --yes + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5?api-version=2022-05-01 + response: + body: + string: '{"endTime":"2023-08-21T05:46:31.9762540+00:00","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr/operationstatuses/f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","name":"f4c0b0da-5d12-44b2-a5ab-33847f26bfd5","percentComplete":100,"startTime":"2023-08-21T05:34:50.7227991+00:00","status":"Succeeded"}' + headers: + cache-control: + - no-cache + content-length: + - '386' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:47:34 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware addon list + Connection: + - keep-alive + ParameterSetName: + - -g -c + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmwarepc/providers/Microsoft.AVS/privateClouds/cloud1/addons?api-version=2022-05-01 + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-cache + content-length: + - '12' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 21 Aug 2023 05:47:38 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +version: 1 diff --git a/src/vmware/azext_vmware/tests/latest/test_addon_scenario.py b/src/vmware/azext_vmware/tests/latest/test_addon_scenario.py index 907584a5cd1..95b1ced1c76 100644 --- a/src/vmware/azext_vmware/tests/latest/test_addon_scenario.py +++ b/src/vmware/azext_vmware/tests/latest/test_addon_scenario.py @@ -24,7 +24,8 @@ def test_vmware_addon(self): }) # create a private cloud - self.cmd('vmware private-cloud create -g {rg} -n {privatecloud} --location {loc} --sku av20 --cluster-size 4 --network-block 192.168.48.0/22 --accept-eula') + self.cmd( + 'vmware private-cloud create -g {rg} -n {privatecloud} --location {loc} --sku av20 --cluster-size 4 --network-block 192.168.48.0/22 --accept-eula') # List all existing addon count = len(self.cmd('vmware addon list -g {rg} -c {privatecloud}').get_output_in_json()) @@ -33,8 +34,8 @@ def test_vmware_addon(self): # Create a VR addon self.cmd('az vmware addon vr create -g {rg} -c {privatecloud} --vrs-count 1') - # Update a VR addon - self.cmd('az vmware addon vr update -g {rg} -c {privatecloud} --vrs-count 1') + # # Update a VR addon + # self.cmd('az vmware addon vr update -g {rg} -c {privatecloud} --vrs-count 1') # List all existing addon count = len(self.cmd('vmware addon list -g {rg} -c {privatecloud}').get_output_in_json()) @@ -53,8 +54,8 @@ def test_vmware_addon(self): # Create a SRM addon self.cmd('az vmware addon srm create -g {rg} -c {privatecloud} --license-key "41915-178A8-FF4A4-DB683-6D735"') - # Update a SRM addon - self.cmd('az vmware addon srm update -g {rg} -c {privatecloud} --license-key "41915-178A8-FF4A4-DB683-6D735"') + # # Update a SRM addon + # self.cmd('az vmware addon srm update -g {rg} -c {privatecloud} --license-key "41915-178A8-FF4A4-DB683-6D735"') # List all existing addon count = len(self.cmd('vmware addon list -g {rg} -c {privatecloud}').get_output_in_json()) @@ -69,8 +70,8 @@ def test_vmware_addon(self): # Create an HCX addon self.cmd('az vmware addon hcx create -g {rg} -c {privatecloud} --offer offerId') - # Update an HCX addon - self.cmd('az vmware addon hcx update -g {rg} -c {privatecloud} --offer offerId') + # # Update an HCX addon + # self.cmd('az vmware addon hcx update -g {rg} -c {privatecloud} --offer offerId') # Show a HCX addon self.cmd('az vmware addon hcx show -g {rg} -c {privatecloud}') @@ -81,8 +82,8 @@ def test_vmware_addon(self): # Create an Arc addon self.cmd('az vmware addon arc create -g {rg} -c {privatecloud} --vcenter vcenterId') - # Update an Arc addon - self.cmd('az vmware addon arc update -g {rg} -c {privatecloud} --vcenter vcenterId') + # # Update an Arc addon + # self.cmd('az vmware addon arc update -g {rg} -c {privatecloud} --vcenter vcenterId') # Show a Arc addon self.cmd('az vmware addon arc show -g {rg} -c {privatecloud}') @@ -93,3 +94,33 @@ def test_vmware_addon(self): # List all existing addon count = len(self.cmd('vmware addon list -g {rg} -c {privatecloud}').get_output_in_json()) self.assertEqual(count, 1, 'addon count expected to be 1') + + def test_vmware_vr_addon(self): + self.kwargs.update({ + 'rg': "cli_test_vmwarepc", + 'privatecloud': 'cloud1', + 'sku': 'av36', + 'loc': "brazilsouth" + }) + + # Create a VR addon + self.cmd('az vmware addon vr create -g {rg} -c {privatecloud} --vrs-count 1') + + # Update a VR addon + self.cmd('az vmware addon vr update -g {rg} -c {privatecloud} --vrs-count 1') + + # List all existing addon + self.cmd('vmware addon list -g {rg} -c {privatecloud}', checks=[ + self.check('length(@)', 1) + ]) + + # Show a VR addon + self.cmd('az vmware addon vr show -g {rg} -c {privatecloud}') + + # Delete a VR addon + self.cmd('az vmware addon vr delete -g {rg} -c {privatecloud} --yes') + + # List all existing addon + self.cmd('vmware addon list -g {rg} -c {privatecloud}', checks=[ + self.check('length(@)', 0) + ]) diff --git a/src/vmware/azext_vmware/tests/latest/test_datastores_scenario.py b/src/vmware/azext_vmware/tests/latest/test_datastores_scenario.py index 502d0867a0c..1de7b6fee08 100644 --- a/src/vmware/azext_vmware/tests/latest/test_datastores_scenario.py +++ b/src/vmware/azext_vmware/tests/latest/test_datastores_scenario.py @@ -51,4 +51,3 @@ def test_vmware_datastores(self): # Create a new iSCSI based datastore with --mount-option as ATTACH self.cmd('az vmware datastore disk-pool-volume create --name iSCSIDatastore1 --resource-group {rg} --private-cloud {privatecloud} --cluster {cluster} --target-id {target_id} --lun-name lun0 --mount-option ATTACH') - \ No newline at end of file diff --git a/src/vmware/azext_vmware/tests/latest/test_placement_policies_scenario.py b/src/vmware/azext_vmware/tests/latest/test_placement_policies_scenario.py index 3d41f9fd55a..b3265b996d2 100644 --- a/src/vmware/azext_vmware/tests/latest/test_placement_policies_scenario.py +++ b/src/vmware/azext_vmware/tests/latest/test_placement_policies_scenario.py @@ -35,8 +35,8 @@ def test_vmware_placement_policy(self): placementPolicyVmHostCreate = self.cmd('az vmware placement-policy vm-host create --resource-group {rg} --private-cloud {privatecloud} --cluster-name {cluster_name} --placement-policy-name {placement_policy_name} --state {state} --display-name {display_name} --vm-members {vm_members} --host-members {host_members} --affinity-type {affinity_type} --affinity-strength Must --azure-hybrid-benefit SqlHost').get_output_in_json() self.assertEqual(placementPolicyVmHostCreate['name'], 'policy1') - placementPolicyVmHostUpdate = self.cmd('az vmware placement-policy vm-host update --resource-group {rg} --private-cloud {privatecloud} --cluster-name {cluster_name} --placement-policy-name {placement_policy_name} --state {state} --vm-members {vm_members} --host-members {host_members} --affinity-strength Must --azure-hybrid-benefit SqlHost').get_output_in_json() - self.assertEqual(placementPolicyVmHostUpdate['name'], 'policy1') + # placementPolicyVmHostUpdate = self.cmd('az vmware placement-policy vm-host update --resource-group {rg} --private-cloud {privatecloud} --cluster-name {cluster_name} --placement-policy-name {placement_policy_name} --state {state} --vm-members {vm_members} --host-members {host_members} --affinity-strength Must --azure-hybrid-benefit SqlHost').get_output_in_json() + # self.assertEqual(placementPolicyVmHostUpdate['name'], 'policy1') placementPolicyVmHostDelete = self.cmd('az vmware placement-policy vm-host delete --resource-group {rg} --private-cloud {privatecloud} --cluster-name {cluster_name} --placement-policy-name {placement_policy_name} --yes').output self.assertEqual(len(placementPolicyVmHostDelete), 0) @@ -44,8 +44,8 @@ def test_vmware_placement_policy(self): placementPolicyVmCreate = self.cmd('az vmware placement-policy vm create --resource-group {rg} --private-cloud {privatecloud} --cluster-name {cluster_name} --placement-policy-name {placement_policy_name} --state {state} --display-name {display_name} --vm-members {vm_members} --affinity-type {affinity_type}').get_output_in_json() self.assertEqual(placementPolicyVmCreate['name'], 'policy1') - placementPolicyVmUpdate = self.cmd('az vmware placement-policy vm update --resource-group {rg} --private-cloud {privatecloud} --cluster-name {cluster_name} --placement-policy-name {placement_policy_name} --state {state} --vm-members {vm_members}').get_output_in_json() - self.assertEqual(placementPolicyVmUpdate['name'], 'policy1') + # placementPolicyVmUpdate = self.cmd('az vmware placement-policy vm update --resource-group {rg} --private-cloud {privatecloud} --cluster-name {cluster_name} --placement-policy-name {placement_policy_name} --state {state} --vm-members {vm_members}').get_output_in_json() + # self.assertEqual(placementPolicyVmUpdate['name'], 'policy1') placementPolicyVmDelete = self.cmd('az vmware placement-policy vm delete --resource-group {rg} --private-cloud {privatecloud} --cluster-name {cluster_name} --placement-policy-name {placement_policy_name} --yes').output self.assertEqual(len(placementPolicyVmDelete), 0) \ No newline at end of file diff --git a/src/vmware/azext_vmware/tests/latest/test_vmware_scenario.py b/src/vmware/azext_vmware/tests/latest/test_vmware_scenario.py index d4afa01ed84..2b7563e465a 100644 --- a/src/vmware/azext_vmware/tests/latest/test_vmware_scenario.py +++ b/src/vmware/azext_vmware/tests/latest/test_vmware_scenario.py @@ -6,8 +6,8 @@ import os import unittest -from azure.cli.testsdk import (ScenarioTest, ResourceGroupPreparer) -from msrestazure.azure_exceptions import CloudError +from azure.cli.testsdk import (ScenarioTest, ResourceGroupPreparer, record_only) +from azure.cli.core.azclierror import ResourceNotFoundError class VmwareScenarioTest(ScenarioTest): @@ -31,15 +31,12 @@ def test_vmware(self): # check trial availability self.cmd('vmware location check-trial-availability --location {loc} --sku sku') - # show should throw ResourceNotFound - # with self.assertRaisesRegexp(CloudError, 'ResourceNotFound'): - # self.cmd('vmware private-cloud show -g {rg} -n {privatecloud}') - count = len(self.cmd('vmware private-cloud list -g {rg}').get_output_in_json()) self.assertEqual(count, 1, 'private cloud count expected to be 1') # create a private cloud - self.cmd('vmware private-cloud create -g {rg} -n {privatecloud} --location {loc} --sku av20 --cluster-size 3 --network-block 192.168.48.0/22 --nsxt-password 5rqdLj4GF3cePUe6( --vcenter-password UpfBXae9ZquZSDXk( --accept-eula') + self.cmd( + 'vmware private-cloud create -g {rg} -n {privatecloud} --location {loc} --sku av20 --cluster-size 3 --network-block 192.168.48.0/22 --nsxt-password 5rqdLj4GF3cePUe6( --vcenter-password UpfBXae9ZquZSDXk( --accept-eula') count = len(self.cmd('vmware private-cloud list -g {rg}').get_output_in_json()) self.assertEqual(count, 1, 'private cloud count expected to be 1') @@ -70,10 +67,12 @@ def test_vmware(self): self.cmd('vmware authorization delete -g {rg} -c {privatecloud} -n myauthname --yes') # add identity source - self.cmd('vmware private-cloud add-identity-source -g {rg} -c {privatecloud} -n groupName --alias groupAlias --domain domain --base-user-dn "ou=baseUser" --base-group-dn "ou=baseGroup" --primary-server ldaps://1.1.1.1:636 --username someone --password something') + self.cmd( + 'vmware private-cloud add-identity-source -g {rg} -c {privatecloud} -n groupName --alias groupAlias --domain domain --base-user-dn "ou=baseUser" --base-group-dn "ou=baseGroup" --primary-server ldaps://1.1.1.1:636 --username someone --password something') # delete identity source - self.cmd('vmware private-cloud delete-identity-source -g {rg} -c {privatecloud} -n groupName --alias groupAlias --domain domain --yes') + self.cmd( + 'vmware private-cloud delete-identity-source -g {rg} -c {privatecloud} -n group1 --alias groupAlias --domain domain1 --yes') # cluster list should report 0 count = len(self.cmd('vmware cluster list -g {rg} -c {privatecloud}').get_output_in_json()) @@ -89,8 +88,8 @@ def test_vmware(self): count = len(self.cmd('vmware cluster list -g {rg} -c {privatecloud}').get_output_in_json()) self.assertEqual(count, 1, 'cluster count expected to be 1') - # cluster update - self.cmd('vmware cluster update -g {rg} -c {privatecloud} -n {cluster} --size 4') + # # cluster update + # self.cmd('vmware cluster update -g {rg} -c {privatecloud} -n {cluster} --size 4') # cluster delete self.cmd('vmware cluster delete -g {rg} -c {privatecloud} -n {cluster} --yes') @@ -101,20 +100,70 @@ def test_vmware(self): # delete the private cloud self.cmd('vmware private-cloud delete -g {rg} -n {privatecloud} --yes') - # enable cmk encryption - self.cmd('az vmware private-cloud enable-cmk-encryption -c {privatecloud} -g {rg} --enc-kv-key-name test-key-name --enc-kv-key-version 1 --enc-kv-url test-url') + @record_only() + def test_vmware_private_cloud(self): + self.kwargs.update({ + 'rg': "cli_test_vmwarepc", + "kv": "cli-test-vmwarepc0821", + 'privatecloud': 'cloud1', + 'sku': 'av36', + # 'cluster': 'pycluster1', + 'key_vault_key': "vmwarekey", + 'loc': "brazilsouth" + }) - # disable cmk encyrption - self.cmd('az vmware private-cloud disable-cmk-encryption -c {privatecloud} -g {rg} --yes') + self.cmd("group create --name {rg} --location {loc}") + + # check quote availability + self.cmd('vmware location check-quota-availability --location {loc}') + + # check trial availability + self.cmd('vmware location check-trial-availability --location {loc} --sku {sku}') + + # create a private cloud + self.cmd('vmware private-cloud create -g {rg} -n {privatecloud} --location {loc} --sku {sku} --cluster-size 4 --network-block 192.168.48.0/22 --nsxt-password 5rqdLj4GF3cePUe6( --vcenter-password UpfBXae9ZquZSDXk( --accept-eula') + + self.cmd('vmware private-cloud list -g {rg}', checks=[ + self.check('length(@)', 1) + ]) + + # update private cloud to changed default cluster size + private_cloud = self.cmd('vmware private-cloud update -g {rg} -n {privatecloud} --cluster-size 3').get_output_in_json() + self.kwargs["hosts"] = private_cloud["managementCluster"]["hosts"][:3] + + # update private cloud to enable internet + self.cmd('vmware private-cloud update -g {rg} -n {privatecloud} --internet Enabled') + + # create authorization + self.cmd('vmware authorization create -g {rg} -c {privatecloud} -n myauthname') + + # delete authorization + self.cmd('vmware authorization delete -g {rg} -c {privatecloud} -n myauthname --yes') # set managed identity self.cmd('vmware private-cloud identity assign -g {rg} -c {privatecloud} --system-assigned') + # show managed identity + self.kwargs["object_id"] = self.cmd('vmware private-cloud identity show -g {rg} -c {privatecloud}').get_output_in_json()["principalId"] + + self.cmd("keyvault create --name {kv} -g {rg} --sku standard --location {loc}") + + self.cmd('keyvault key create --vault-name {kv} --name {key_vault_key} --protection software') + + self.kwargs["vault_url"] = self.cmd('keyvault set-policy -g {rg} --name {kv} --key-permissions all --object-id {object_id}').get_output_in_json()['properties']['vaultUri'] + + # enable cmk encryption + self.cmd('vmware private-cloud enable-cmk-encryption -c {privatecloud} -g {rg} --enc-kv-key-name {key_vault_key} --enc-kv-url {vault_url}') + + # disable cmk encyrption + self.cmd('vmware private-cloud disable-cmk-encryption -c {privatecloud} -g {rg} --yes') + # remove managed identity self.cmd('vmware private-cloud identity remove -g {rg} -c {privatecloud}') - # show managed identity - self.cmd('vmware private-cloud identity show -g {rg} -c {privatecloud}') - - count = len(self.cmd('vmware private-cloud list -g {rg}').get_output_in_json()) - self.assertEqual(count, 1, 'private cloud count expected to be 1') + # delete the private cloud + self.cmd('vmware private-cloud delete -g {rg} -n {privatecloud} --yes') + self.cmd('vmware private-cloud list -g {rg}', checks=[ + self.check('length(@)', 0) + ]) + self.cmd('group delete --name {rg} --yes --no-wait') diff --git a/src/vmware/azext_vmware/tests/latest/test_workload_network_scenario.py b/src/vmware/azext_vmware/tests/latest/test_workload_network_scenario.py index 42bb3ab4ad1..71325fe40e5 100644 --- a/src/vmware/azext_vmware/tests/latest/test_workload_network_scenario.py +++ b/src/vmware/azext_vmware/tests/latest/test_workload_network_scenario.py @@ -61,8 +61,8 @@ def test_vmware_workload_network(self): dhcpRelayDelete = self.cmd('az vmware workload-network dhcp relay delete --resource-group {rg} --private-cloud {privatecloud} --dhcp {dhcp} --yes').output self.assertEqual(len(dhcpRelayDelete), 0) - dhcpRelayUpdate = self.cmd('az vmware workload-network dhcp relay update --resource-group {rg} --private-cloud {privatecloud} --dhcp {dhcp} --display-name {display_name} --revision {revision} --server-addresses {server_addresses}').get_output_in_json() - self.assertEqual(dhcpRelayUpdate['name'], 'dhcp1') + # dhcpRelayUpdate = self.cmd('az vmware workload-network dhcp relay update --resource-group {rg} --private-cloud {privatecloud} --dhcp {dhcp} --display-name {display_name} --revision {revision} --server-addresses {server_addresses}').get_output_in_json() + # self.assertEqual(dhcpRelayUpdate['name'], 'dhcp1') dhcpServerCreate = self.cmd('az vmware workload-network dhcp server create --resource-group {rg} --private-cloud {privatecloud} --dhcp {dhcp} --display-name {display_name} --revision {revision} --server-address {server_address} --lease-time {lease_time}').get_output_in_json() self.assertEqual(dhcpServerCreate['name'], 'dhcp1') @@ -70,8 +70,8 @@ def test_vmware_workload_network(self): dhcpServerDelete = self.cmd('az vmware workload-network dhcp server delete --resource-group {rg} --private-cloud {privatecloud} --dhcp {dhcp} --yes').output self.assertEqual(len(dhcpServerDelete), 0) - dhcpServerUpdate = self.cmd('az vmware workload-network dhcp server update --resource-group {rg} --private-cloud {privatecloud} --dhcp {dhcp} --display-name {display_name} --revision {revision} --server-address {server_address} --lease-time {lease_time}').get_output_in_json() - self.assertEqual(dhcpServerUpdate['name'], 'dhcp1') + # dhcpServerUpdate = self.cmd('az vmware workload-network dhcp server update --resource-group {rg} --private-cloud {privatecloud} --dhcp {dhcp} --display-name {display_name} --revision {revision} --server-address {server_address} --lease-time {lease_time}').get_output_in_json() + # self.assertEqual(dhcpServerUpdate['name'], 'dhcp1') dnsServiceList = self.cmd('az vmware workload-network dns-service list --resource-group {rg} --private-cloud {privatecloud}').get_output_in_json() self.assertEqual(len(dnsServiceList), 1, 'count expected to be 1') @@ -82,8 +82,8 @@ def test_vmware_workload_network(self): dnsServiceCreate = self.cmd('az vmware workload-network dns-service create --resource-group {rg} --private-cloud {privatecloud} --dns-service {dns_service} --display-name {display_name} --dns-service-ip {dns_service_ip} --default-dns-zone {default_dns_zone} --fqdn-zones {fqdn_zones} --log-level {log_level} --revision {revision}').get_output_in_json() self.assertEqual(dnsServiceCreate['name'], 'dnsService1') - dnsServiceUpdate = self.cmd('az vmware workload-network dns-service update --resource-group {rg} --private-cloud {privatecloud} --dns-service {dns_service} --display-name {display_name} --dns-service-ip {dns_service_ip} --default-dns-zone {default_dns_zone} --fqdn-zones {fqdn_zones} --log-level {log_level} --revision {revision}').get_output_in_json() - self.assertEqual(dnsServiceUpdate['name'], 'dnsService1') + # dnsServiceUpdate = self.cmd('az vmware workload-network dns-service update --resource-group {rg} --private-cloud {privatecloud} --dns-service {dns_service} --display-name {display_name} --dns-service-ip {dns_service_ip} --default-dns-zone {default_dns_zone} --fqdn-zones {fqdn_zones} --log-level {log_level} --revision {revision}').get_output_in_json() + # self.assertEqual(dnsServiceUpdate['name'], 'dnsService1') dnsServiceDelete = self.cmd('az vmware workload-network dns-service delete --resource-group {rg} --private-cloud {privatecloud} --dns-service {dns_service} --yes').output self.assertEqual(len(dnsServiceDelete), 0) @@ -97,8 +97,8 @@ def test_vmware_workload_network(self): dnsZoneCreate = self.cmd('az vmware workload-network dns-zone create --resource-group {rg} --private-cloud {privatecloud} --dns-zone {dns_zone} --display-name {display_name} --domain {domain} --dns-server-ips {dns_server_ips} --source-ip {source_ip} --dns-services {dns_services} --revision {revision}').get_output_in_json() self.assertEqual(dnsZoneCreate['name'], 'dnsZone1') - dnsZoneUpdate = self.cmd('az vmware workload-network dns-zone update --resource-group {rg} --private-cloud {privatecloud} --dns-zone {dns_zone} --display-name {display_name} --domain {domain} --dns-server-ips {dns_server_ips} --source-ip {source_ip} --dns-services {dns_services} --revision {revision}').get_output_in_json() - self.assertEqual(dnsZoneUpdate['name'], 'dnsZone1') + # dnsZoneUpdate = self.cmd('az vmware workload-network dns-zone update --resource-group {rg} --private-cloud {privatecloud} --dns-zone {dns_zone} --display-name {display_name} --domain {domain} --dns-server-ips {dns_server_ips} --source-ip {source_ip} --dns-services {dns_services} --revision {revision}').get_output_in_json() + # self.assertEqual(dnsZoneUpdate['name'], 'dnsZone1') dnsZoneDelete = self.cmd('az vmware workload-network dns-zone delete --resource-group {rg} --private-cloud {privatecloud} --dns-zone {dns_zone} --yes').output self.assertEqual(len(dnsZoneDelete), 0) @@ -112,8 +112,8 @@ def test_vmware_workload_network(self): portMirroringCreate = self.cmd('az vmware workload-network port-mirroring create --resource-group {rg} --private-cloud {privatecloud} --port-mirroring {port_mirroring} --display-name {display_name} --direction {direction} --source {source} --destination {destination} --revision {revision}').get_output_in_json() self.assertEqual(portMirroringCreate['name'], 'portMirroring1') - portMirroringUpdate = self.cmd('az vmware workload-network port-mirroring update --resource-group {rg} --private-cloud {privatecloud} --port-mirroring {port_mirroring} --display-name {display_name} --direction {direction} --source {source} --destination {destination} --revision {revision}').get_output_in_json() - self.assertEqual(portMirroringUpdate['name'], 'portMirroring1') + # portMirroringUpdate = self.cmd('az vmware workload-network port-mirroring update --resource-group {rg} --private-cloud {privatecloud} --port-mirroring {port_mirroring} --display-name {display_name} --direction {direction} --source {source} --destination {destination} --revision {revision}').get_output_in_json() + # self.assertEqual(portMirroringUpdate['name'], 'portMirroring1') portMirroringDelete = self.cmd('az vmware workload-network port-mirroring delete --resource-group {rg} --private-cloud {privatecloud} --port-mirroring {port_mirroring} --yes').output self.assertEqual(len(portMirroringDelete), 0) @@ -127,8 +127,8 @@ def test_vmware_workload_network(self): segmentCreate = self.cmd('az vmware workload-network segment create --resource-group {rg} --private-cloud {privatecloud} --segment {segment} --display-name {display_name} --connected-gateway {connected_gateway} --revision {revision} --dhcp-ranges {dhcp_ranges} --gateway-address {gateway_address}').get_output_in_json() self.assertEqual(segmentCreate['name'], 'segment1') - segmentUpdate = self.cmd('az vmware workload-network segment update --resource-group {rg} --private-cloud {privatecloud} --segment {segment} --display-name {display_name} --connected-gateway {connected_gateway} --revision {revision} --dhcp-ranges {dhcp_ranges} --gateway-address {gateway_address}').get_output_in_json() - self.assertEqual(segmentUpdate['name'], 'segment1') + # segmentUpdate = self.cmd('az vmware workload-network segment update --resource-group {rg} --private-cloud {privatecloud} --segment {segment} --display-name {display_name} --connected-gateway {connected_gateway} --revision {revision} --dhcp-ranges {dhcp_ranges} --gateway-address {gateway_address}').get_output_in_json() + # self.assertEqual(segmentUpdate['name'], 'segment1') segmentDelete = self.cmd('az vmware workload-network segment delete --resource-group {rg} --private-cloud {privatecloud} --segment {segment} --yes').output self.assertEqual(len(segmentDelete), 0) @@ -154,8 +154,8 @@ def test_vmware_workload_network(self): vmGroupCreate = self.cmd('az vmware workload-network vm-group create --resource-group {rg} --private-cloud {privatecloud} --vm-group {vm_group} --display-name {display_name} --members {members} --revision {revision}').get_output_in_json() self.assertEqual(vmGroupCreate['name'], 'vmGroup1') - vmGroupUpdate = self.cmd('az vmware workload-network vm-group update --resource-group {rg} --private-cloud {privatecloud} --vm-group {vm_group} --display-name {display_name} --members {members} --revision {revision}').get_output_in_json() - self.assertEqual(vmGroupUpdate['name'], 'cloud1') + # vmGroupUpdate = self.cmd('az vmware workload-network vm-group update --resource-group {rg} --private-cloud {privatecloud} --vm-group {vm_group} --display-name {display_name} --members {members} --revision {revision}').get_output_in_json() + # self.assertEqual(vmGroupUpdate['name'], 'cloud1') vmGroupDelete = self.cmd('az vmware workload-network vm-group delete --resource-group {rg} --private-cloud {privatecloud} --vm-group {vm_group} --yes').output self.assertEqual(len(vmGroupDelete), 0) diff --git a/src/vmware/azext_vmware/vendored_sdks/__init__.py b/src/vmware/azext_vmware/vendored_sdks/__init__.py deleted file mode 100644 index c9cfdc73e77..00000000000 --- a/src/vmware/azext_vmware/vendored_sdks/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/__init__.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/__init__.py deleted file mode 100644 index 45ca0700235..00000000000 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from ._avs_client import AVSClient -from ._version import VERSION - -__version__ = VERSION -__all__ = ['AVSClient'] - -try: - from ._patch import patch_sdk # type: ignore - patch_sdk() -except ImportError: - pass diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/_avs_client.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/_avs_client.py deleted file mode 100644 index 30022992217..00000000000 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/_avs_client.py +++ /dev/null @@ -1,164 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import TYPE_CHECKING - -from azure.mgmt.core import ARMPipelineClient -from msrest import Deserializer, Serializer - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Optional - - from azure.core.credentials import TokenCredential - from azure.core.pipeline.transport import HttpRequest, HttpResponse - -from ._configuration import AVSClientConfiguration -from .operations import Operations -from .operations import LocationsOperations -from .operations import PrivateCloudsOperations -from .operations import ClustersOperations -from .operations import DatastoresOperations -from .operations import HcxEnterpriseSitesOperations -from .operations import AuthorizationsOperations -from .operations import GlobalReachConnectionsOperations -from .operations import WorkloadNetworksOperations -from .operations import CloudLinksOperations -from .operations import AddonsOperations -from .operations import VirtualMachinesOperations -from .operations import PlacementPoliciesOperations -from .operations import ScriptPackagesOperations -from .operations import ScriptCmdletsOperations -from .operations import ScriptExecutionsOperations -from . import models - - -class AVSClient(object): - """Azure VMware Solution API. - - :ivar operations: Operations operations - :vartype operations: avs_client.operations.Operations - :ivar locations: LocationsOperations operations - :vartype locations: avs_client.operations.LocationsOperations - :ivar private_clouds: PrivateCloudsOperations operations - :vartype private_clouds: avs_client.operations.PrivateCloudsOperations - :ivar clusters: ClustersOperations operations - :vartype clusters: avs_client.operations.ClustersOperations - :ivar datastores: DatastoresOperations operations - :vartype datastores: avs_client.operations.DatastoresOperations - :ivar hcx_enterprise_sites: HcxEnterpriseSitesOperations operations - :vartype hcx_enterprise_sites: avs_client.operations.HcxEnterpriseSitesOperations - :ivar authorizations: AuthorizationsOperations operations - :vartype authorizations: avs_client.operations.AuthorizationsOperations - :ivar global_reach_connections: GlobalReachConnectionsOperations operations - :vartype global_reach_connections: avs_client.operations.GlobalReachConnectionsOperations - :ivar workload_networks: WorkloadNetworksOperations operations - :vartype workload_networks: avs_client.operations.WorkloadNetworksOperations - :ivar cloud_links: CloudLinksOperations operations - :vartype cloud_links: avs_client.operations.CloudLinksOperations - :ivar addons: AddonsOperations operations - :vartype addons: avs_client.operations.AddonsOperations - :ivar virtual_machines: VirtualMachinesOperations operations - :vartype virtual_machines: avs_client.operations.VirtualMachinesOperations - :ivar placement_policies: PlacementPoliciesOperations operations - :vartype placement_policies: avs_client.operations.PlacementPoliciesOperations - :ivar script_packages: ScriptPackagesOperations operations - :vartype script_packages: avs_client.operations.ScriptPackagesOperations - :ivar script_cmdlets: ScriptCmdletsOperations operations - :vartype script_cmdlets: avs_client.operations.ScriptCmdletsOperations - :ivar script_executions: ScriptExecutionsOperations operations - :vartype script_executions: avs_client.operations.ScriptExecutionsOperations - :param credential: Credential needed for the client to connect to Azure. - :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The ID of the target subscription. - :type subscription_id: str - :param str base_url: Service URL - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - """ - - def __init__( - self, - credential, # type: "TokenCredential" - subscription_id, # type: str - base_url=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> None - if not base_url: - base_url = 'https://management.azure.com' - self._config = AVSClientConfiguration(credential, subscription_id, **kwargs) - self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._serialize.client_side_validation = False - self._deserialize = Deserializer(client_models) - - self.operations = Operations( - self._client, self._config, self._serialize, self._deserialize) - self.locations = LocationsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.private_clouds = PrivateCloudsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.clusters = ClustersOperations( - self._client, self._config, self._serialize, self._deserialize) - self.datastores = DatastoresOperations( - self._client, self._config, self._serialize, self._deserialize) - self.hcx_enterprise_sites = HcxEnterpriseSitesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.authorizations = AuthorizationsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.global_reach_connections = GlobalReachConnectionsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.workload_networks = WorkloadNetworksOperations( - self._client, self._config, self._serialize, self._deserialize) - self.cloud_links = CloudLinksOperations( - self._client, self._config, self._serialize, self._deserialize) - self.addons = AddonsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.virtual_machines = VirtualMachinesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.placement_policies = PlacementPoliciesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.script_packages = ScriptPackagesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.script_cmdlets = ScriptCmdletsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.script_executions = ScriptExecutionsOperations( - self._client, self._config, self._serialize, self._deserialize) - - def _send_request(self, http_request, **kwargs): - # type: (HttpRequest, Any) -> HttpResponse - """Runs the network request through the client's chained policies. - - :param http_request: The network request you want to make. Required. - :type http_request: ~azure.core.pipeline.transport.HttpRequest - :keyword bool stream: Whether the response payload will be streamed. Defaults to True. - :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.pipeline.transport.HttpResponse - """ - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - } - http_request.url = self._client.format_url(http_request.url, **path_format_arguments) - stream = kwargs.pop("stream", True) - pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) - return pipeline_response.http_response - - def close(self): - # type: () -> None - self._client.close() - - def __enter__(self): - # type: () -> AVSClient - self._client.__enter__() - return self - - def __exit__(self, *exc_details): - # type: (Any) -> None - self._client.__exit__(*exc_details) diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/_configuration.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/_configuration.py deleted file mode 100644 index e1d71abffe2..00000000000 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/_configuration.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import TYPE_CHECKING - -from azure.core.configuration import Configuration -from azure.core.pipeline import policies -from azure.mgmt.core.policies import ARMHttpLoggingPolicy - -from ._version import VERSION - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any - - from azure.core.credentials import TokenCredential - - -class AVSClientConfiguration(Configuration): - """Configuration for AVSClient. - - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credential: Credential needed for the client to connect to Azure. - :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The ID of the target subscription. - :type subscription_id: str - """ - - def __init__( - self, - credential, # type: "TokenCredential" - subscription_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - if credential is None: - raise ValueError("Parameter 'credential' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - super(AVSClientConfiguration, self).__init__(**kwargs) - - self.credential = credential - self.subscription_id = subscription_id - self.api_version = "2022-05-01" - self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'mgmt-avs/{}'.format(VERSION)) - self._configure(**kwargs) - - def _configure( - self, - **kwargs # type: Any - ): - # type: (...) -> None - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') - if self.credential and not self.authentication_policy: - self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/_avs_client.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/_avs_client.py deleted file mode 100644 index 7fe07fd648c..00000000000 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/_avs_client.py +++ /dev/null @@ -1,157 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import Any, Optional, TYPE_CHECKING - -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core import AsyncARMPipelineClient -from msrest import Deserializer, Serializer - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from azure.core.credentials_async import AsyncTokenCredential - -from ._configuration import AVSClientConfiguration -from .operations import Operations -from .operations import LocationsOperations -from .operations import PrivateCloudsOperations -from .operations import ClustersOperations -from .operations import DatastoresOperations -from .operations import HcxEnterpriseSitesOperations -from .operations import AuthorizationsOperations -from .operations import GlobalReachConnectionsOperations -from .operations import WorkloadNetworksOperations -from .operations import CloudLinksOperations -from .operations import AddonsOperations -from .operations import VirtualMachinesOperations -from .operations import PlacementPoliciesOperations -from .operations import ScriptPackagesOperations -from .operations import ScriptCmdletsOperations -from .operations import ScriptExecutionsOperations -from .. import models - - -class AVSClient(object): - """Azure VMware Solution API. - - :ivar operations: Operations operations - :vartype operations: avs_client.aio.operations.Operations - :ivar locations: LocationsOperations operations - :vartype locations: avs_client.aio.operations.LocationsOperations - :ivar private_clouds: PrivateCloudsOperations operations - :vartype private_clouds: avs_client.aio.operations.PrivateCloudsOperations - :ivar clusters: ClustersOperations operations - :vartype clusters: avs_client.aio.operations.ClustersOperations - :ivar datastores: DatastoresOperations operations - :vartype datastores: avs_client.aio.operations.DatastoresOperations - :ivar hcx_enterprise_sites: HcxEnterpriseSitesOperations operations - :vartype hcx_enterprise_sites: avs_client.aio.operations.HcxEnterpriseSitesOperations - :ivar authorizations: AuthorizationsOperations operations - :vartype authorizations: avs_client.aio.operations.AuthorizationsOperations - :ivar global_reach_connections: GlobalReachConnectionsOperations operations - :vartype global_reach_connections: avs_client.aio.operations.GlobalReachConnectionsOperations - :ivar workload_networks: WorkloadNetworksOperations operations - :vartype workload_networks: avs_client.aio.operations.WorkloadNetworksOperations - :ivar cloud_links: CloudLinksOperations operations - :vartype cloud_links: avs_client.aio.operations.CloudLinksOperations - :ivar addons: AddonsOperations operations - :vartype addons: avs_client.aio.operations.AddonsOperations - :ivar virtual_machines: VirtualMachinesOperations operations - :vartype virtual_machines: avs_client.aio.operations.VirtualMachinesOperations - :ivar placement_policies: PlacementPoliciesOperations operations - :vartype placement_policies: avs_client.aio.operations.PlacementPoliciesOperations - :ivar script_packages: ScriptPackagesOperations operations - :vartype script_packages: avs_client.aio.operations.ScriptPackagesOperations - :ivar script_cmdlets: ScriptCmdletsOperations operations - :vartype script_cmdlets: avs_client.aio.operations.ScriptCmdletsOperations - :ivar script_executions: ScriptExecutionsOperations operations - :vartype script_executions: avs_client.aio.operations.ScriptExecutionsOperations - :param credential: Credential needed for the client to connect to Azure. - :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The ID of the target subscription. - :type subscription_id: str - :param str base_url: Service URL - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - """ - - def __init__( - self, - credential: "AsyncTokenCredential", - subscription_id: str, - base_url: Optional[str] = None, - **kwargs: Any - ) -> None: - if not base_url: - base_url = 'https://management.azure.com' - self._config = AVSClientConfiguration(credential, subscription_id, **kwargs) - self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._serialize.client_side_validation = False - self._deserialize = Deserializer(client_models) - - self.operations = Operations( - self._client, self._config, self._serialize, self._deserialize) - self.locations = LocationsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.private_clouds = PrivateCloudsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.clusters = ClustersOperations( - self._client, self._config, self._serialize, self._deserialize) - self.datastores = DatastoresOperations( - self._client, self._config, self._serialize, self._deserialize) - self.hcx_enterprise_sites = HcxEnterpriseSitesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.authorizations = AuthorizationsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.global_reach_connections = GlobalReachConnectionsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.workload_networks = WorkloadNetworksOperations( - self._client, self._config, self._serialize, self._deserialize) - self.cloud_links = CloudLinksOperations( - self._client, self._config, self._serialize, self._deserialize) - self.addons = AddonsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.virtual_machines = VirtualMachinesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.placement_policies = PlacementPoliciesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.script_packages = ScriptPackagesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.script_cmdlets = ScriptCmdletsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.script_executions = ScriptExecutionsOperations( - self._client, self._config, self._serialize, self._deserialize) - - async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: - """Runs the network request through the client's chained policies. - - :param http_request: The network request you want to make. Required. - :type http_request: ~azure.core.pipeline.transport.HttpRequest - :keyword bool stream: Whether the response payload will be streamed. Defaults to True. - :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse - """ - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - } - http_request.url = self._client.format_url(http_request.url, **path_format_arguments) - stream = kwargs.pop("stream", True) - pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) - return pipeline_response.http_response - - async def close(self) -> None: - await self._client.close() - - async def __aenter__(self) -> "AVSClient": - await self._client.__aenter__() - return self - - async def __aexit__(self, *exc_details) -> None: - await self._client.__aexit__(*exc_details) diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/_configuration.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/_configuration.py deleted file mode 100644 index 33ad393274e..00000000000 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/_configuration.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import Any, TYPE_CHECKING - -from azure.core.configuration import Configuration -from azure.core.pipeline import policies -from azure.mgmt.core.policies import ARMHttpLoggingPolicy - -from .._version import VERSION - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from azure.core.credentials_async import AsyncTokenCredential - - -class AVSClientConfiguration(Configuration): - """Configuration for AVSClient. - - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credential: Credential needed for the client to connect to Azure. - :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The ID of the target subscription. - :type subscription_id: str - """ - - def __init__( - self, - credential: "AsyncTokenCredential", - subscription_id: str, - **kwargs: Any - ) -> None: - if credential is None: - raise ValueError("Parameter 'credential' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - super(AVSClientConfiguration, self).__init__(**kwargs) - - self.credential = credential - self.subscription_id = subscription_id - self.api_version = "2022-05-01" - self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'mgmt-avs/{}'.format(VERSION)) - self._configure(**kwargs) - - def _configure( - self, - **kwargs: Any - ) -> None: - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') - if self.credential and not self.authentication_policy: - self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/__init__.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/__init__.py deleted file mode 100644 index d6090880195..00000000000 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/__init__.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from ._operations import Operations -from ._locations_operations import LocationsOperations -from ._private_clouds_operations import PrivateCloudsOperations -from ._clusters_operations import ClustersOperations -from ._datastores_operations import DatastoresOperations -from ._hcx_enterprise_sites_operations import HcxEnterpriseSitesOperations -from ._authorizations_operations import AuthorizationsOperations -from ._global_reach_connections_operations import GlobalReachConnectionsOperations -from ._workload_networks_operations import WorkloadNetworksOperations -from ._cloud_links_operations import CloudLinksOperations -from ._addons_operations import AddonsOperations -from ._virtual_machines_operations import VirtualMachinesOperations -from ._placement_policies_operations import PlacementPoliciesOperations -from ._script_packages_operations import ScriptPackagesOperations -from ._script_cmdlets_operations import ScriptCmdletsOperations -from ._script_executions_operations import ScriptExecutionsOperations - -__all__ = [ - 'Operations', - 'LocationsOperations', - 'PrivateCloudsOperations', - 'ClustersOperations', - 'DatastoresOperations', - 'HcxEnterpriseSitesOperations', - 'AuthorizationsOperations', - 'GlobalReachConnectionsOperations', - 'WorkloadNetworksOperations', - 'CloudLinksOperations', - 'AddonsOperations', - 'VirtualMachinesOperations', - 'PlacementPoliciesOperations', - 'ScriptPackagesOperations', - 'ScriptCmdletsOperations', - 'ScriptExecutionsOperations', -] diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_addons_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_addons_operations.py deleted file mode 100644 index 5ce6f9d9329..00000000000 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_addons_operations.py +++ /dev/null @@ -1,438 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class AddonsOperations: - """AddonsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~avs_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name: str, - private_cloud_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.AddonList"]: - """List addons in a private cloud. - - List addons in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either AddonList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~avs_client.models.AddonList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.AddonList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('AddonList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons'} # type: ignore - - async def get( - self, - resource_group_name: str, - private_cloud_name: str, - addon_name: str, - **kwargs: Any - ) -> "_models.Addon": - """Get an addon by name in a private cloud. - - Get an addon by name in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param addon_name: Name of the addon for the private cloud. - :type addon_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: Addon, or the result of cls(response) - :rtype: ~avs_client.models.Addon - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.Addon"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'addonName': self._serialize.url("addon_name", addon_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('Addon', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}'} # type: ignore - - async def _create_or_update_initial( - self, - resource_group_name: str, - private_cloud_name: str, - addon_name: str, - addon: "_models.Addon", - **kwargs: Any - ) -> "_models.Addon": - cls = kwargs.pop('cls', None) # type: ClsType["_models.Addon"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'addonName': self._serialize.url("addon_name", addon_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(addon, 'Addon') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('Addon', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('Addon', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}'} # type: ignore - - async def begin_create_or_update( - self, - resource_group_name: str, - private_cloud_name: str, - addon_name: str, - addon: "_models.Addon", - **kwargs: Any - ) -> AsyncLROPoller["_models.Addon"]: - """Create or update a addon in a private cloud. - - Create or update a addon in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: The name of the private cloud. - :type private_cloud_name: str - :param addon_name: Name of the addon for the private cloud. - :type addon_name: str - :param addon: A addon in the private cloud. - :type addon: ~avs_client.models.Addon - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either Addon or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~avs_client.models.Addon] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.Addon"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - addon_name=addon_name, - addon=addon, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('Addon', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'addonName': self._serialize.url("addon_name", addon_name, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}'} # type: ignore - - async def _delete_initial( - self, - resource_group_name: str, - private_cloud_name: str, - addon_name: str, - **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'addonName': self._serialize.url("addon_name", addon_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}'} # type: ignore - - async def begin_delete( - self, - resource_group_name: str, - private_cloud_name: str, - addon_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Delete a addon in a private cloud. - - Delete a addon in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param addon_name: Name of the addon for the private cloud. - :type addon_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - addon_name=addon_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'addonName': self._serialize.url("addon_name", addon_name, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}'} # type: ignore diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_authorizations_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_authorizations_operations.py deleted file mode 100644 index 7b01551ae30..00000000000 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_authorizations_operations.py +++ /dev/null @@ -1,438 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class AuthorizationsOperations: - """AuthorizationsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~avs_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name: str, - private_cloud_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.ExpressRouteAuthorizationList"]: - """List ExpressRoute Circuit Authorizations in a private cloud. - - List ExpressRoute Circuit Authorizations in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ExpressRouteAuthorizationList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~avs_client.models.ExpressRouteAuthorizationList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteAuthorizationList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('ExpressRouteAuthorizationList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations'} # type: ignore - - async def get( - self, - resource_group_name: str, - private_cloud_name: str, - authorization_name: str, - **kwargs: Any - ) -> "_models.ExpressRouteAuthorization": - """Get an ExpressRoute Circuit Authorization by name in a private cloud. - - Get an ExpressRoute Circuit Authorization by name in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param authorization_name: Name of the ExpressRoute Circuit Authorization in the private cloud. - :type authorization_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ExpressRouteAuthorization, or the result of cls(response) - :rtype: ~avs_client.models.ExpressRouteAuthorization - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteAuthorization"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'authorizationName': self._serialize.url("authorization_name", authorization_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ExpressRouteAuthorization', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}'} # type: ignore - - async def _create_or_update_initial( - self, - resource_group_name: str, - private_cloud_name: str, - authorization_name: str, - authorization: "_models.ExpressRouteAuthorization", - **kwargs: Any - ) -> "_models.ExpressRouteAuthorization": - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteAuthorization"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'authorizationName': self._serialize.url("authorization_name", authorization_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(authorization, 'ExpressRouteAuthorization') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('ExpressRouteAuthorization', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('ExpressRouteAuthorization', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}'} # type: ignore - - async def begin_create_or_update( - self, - resource_group_name: str, - private_cloud_name: str, - authorization_name: str, - authorization: "_models.ExpressRouteAuthorization", - **kwargs: Any - ) -> AsyncLROPoller["_models.ExpressRouteAuthorization"]: - """Create or update an ExpressRoute Circuit Authorization in a private cloud. - - Create or update an ExpressRoute Circuit Authorization in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: The name of the private cloud. - :type private_cloud_name: str - :param authorization_name: Name of the ExpressRoute Circuit Authorization in the private cloud. - :type authorization_name: str - :param authorization: An ExpressRoute Circuit Authorization. - :type authorization: ~avs_client.models.ExpressRouteAuthorization - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either ExpressRouteAuthorization or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~avs_client.models.ExpressRouteAuthorization] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteAuthorization"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - authorization_name=authorization_name, - authorization=authorization, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ExpressRouteAuthorization', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'authorizationName': self._serialize.url("authorization_name", authorization_name, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}'} # type: ignore - - async def _delete_initial( - self, - resource_group_name: str, - private_cloud_name: str, - authorization_name: str, - **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'authorizationName': self._serialize.url("authorization_name", authorization_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}'} # type: ignore - - async def begin_delete( - self, - resource_group_name: str, - private_cloud_name: str, - authorization_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Delete an ExpressRoute Circuit Authorization in a private cloud. - - Delete an ExpressRoute Circuit Authorization in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param authorization_name: Name of the ExpressRoute Circuit Authorization in the private cloud. - :type authorization_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - authorization_name=authorization_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'authorizationName': self._serialize.url("authorization_name", authorization_name, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}'} # type: ignore diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_cloud_links_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_cloud_links_operations.py deleted file mode 100644 index cc9b25ed14e..00000000000 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_cloud_links_operations.py +++ /dev/null @@ -1,438 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class CloudLinksOperations: - """CloudLinksOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~avs_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name: str, - private_cloud_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.CloudLinkList"]: - """List cloud link in a private cloud. - - List cloud link in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either CloudLinkList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~avs_client.models.CloudLinkList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.CloudLinkList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('CloudLinkList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks'} # type: ignore - - async def get( - self, - resource_group_name: str, - private_cloud_name: str, - cloud_link_name: str, - **kwargs: Any - ) -> "_models.CloudLink": - """Get an cloud link by name in a private cloud. - - Get an cloud link by name in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param cloud_link_name: Name of the cloud link resource. - :type cloud_link_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: CloudLink, or the result of cls(response) - :rtype: ~avs_client.models.CloudLink - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.CloudLink"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'cloudLinkName': self._serialize.url("cloud_link_name", cloud_link_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('CloudLink', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}'} # type: ignore - - async def _create_or_update_initial( - self, - resource_group_name: str, - private_cloud_name: str, - cloud_link_name: str, - cloud_link: "_models.CloudLink", - **kwargs: Any - ) -> "_models.CloudLink": - cls = kwargs.pop('cls', None) # type: ClsType["_models.CloudLink"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'cloudLinkName': self._serialize.url("cloud_link_name", cloud_link_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(cloud_link, 'CloudLink') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('CloudLink', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('CloudLink', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}'} # type: ignore - - async def begin_create_or_update( - self, - resource_group_name: str, - private_cloud_name: str, - cloud_link_name: str, - cloud_link: "_models.CloudLink", - **kwargs: Any - ) -> AsyncLROPoller["_models.CloudLink"]: - """Create or update a cloud link in a private cloud. - - Create or update a cloud link in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: The name of the private cloud. - :type private_cloud_name: str - :param cloud_link_name: Name of the cloud link resource. - :type cloud_link_name: str - :param cloud_link: A cloud link in the private cloud. - :type cloud_link: ~avs_client.models.CloudLink - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either CloudLink or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~avs_client.models.CloudLink] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.CloudLink"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - cloud_link_name=cloud_link_name, - cloud_link=cloud_link, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('CloudLink', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'cloudLinkName': self._serialize.url("cloud_link_name", cloud_link_name, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}'} # type: ignore - - async def _delete_initial( - self, - resource_group_name: str, - private_cloud_name: str, - cloud_link_name: str, - **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'cloudLinkName': self._serialize.url("cloud_link_name", cloud_link_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}'} # type: ignore - - async def begin_delete( - self, - resource_group_name: str, - private_cloud_name: str, - cloud_link_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Delete a cloud link in a private cloud. - - Delete a cloud link in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param cloud_link_name: Name of the cloud link resource. - :type cloud_link_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - cloud_link_name=cloud_link_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'cloudLinkName': self._serialize.url("cloud_link_name", cloud_link_name, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}'} # type: ignore diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_clusters_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_clusters_operations.py deleted file mode 100644 index 3b90b26e911..00000000000 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_clusters_operations.py +++ /dev/null @@ -1,639 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class ClustersOperations: - """ClustersOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~avs_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name: str, - private_cloud_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.ClusterList"]: - """List clusters in a private cloud. - - List clusters in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ClusterList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~avs_client.models.ClusterList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('ClusterList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters'} # type: ignore - - async def get( - self, - resource_group_name: str, - private_cloud_name: str, - cluster_name: str, - **kwargs: Any - ) -> "_models.Cluster": - """Get a cluster by name in a private cloud. - - Get a cluster by name in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param cluster_name: Name of the cluster in the private cloud. - :type cluster_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: Cluster, or the result of cls(response) - :rtype: ~avs_client.models.Cluster - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.Cluster"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('Cluster', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}'} # type: ignore - - async def _create_or_update_initial( - self, - resource_group_name: str, - private_cloud_name: str, - cluster_name: str, - cluster: "_models.Cluster", - **kwargs: Any - ) -> "_models.Cluster": - cls = kwargs.pop('cls', None) # type: ClsType["_models.Cluster"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(cluster, 'Cluster') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('Cluster', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('Cluster', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}'} # type: ignore - - async def begin_create_or_update( - self, - resource_group_name: str, - private_cloud_name: str, - cluster_name: str, - cluster: "_models.Cluster", - **kwargs: Any - ) -> AsyncLROPoller["_models.Cluster"]: - """Create or update a cluster in a private cloud. - - Create or update a cluster in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: The name of the private cloud. - :type private_cloud_name: str - :param cluster_name: Name of the cluster in the private cloud. - :type cluster_name: str - :param cluster: A cluster in the private cloud. - :type cluster: ~avs_client.models.Cluster - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either Cluster or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~avs_client.models.Cluster] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.Cluster"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - cluster_name=cluster_name, - cluster=cluster, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('Cluster', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}'} # type: ignore - - async def _update_initial( - self, - resource_group_name: str, - private_cloud_name: str, - cluster_name: str, - cluster_update: "_models.ClusterUpdate", - **kwargs: Any - ) -> "_models.Cluster": - cls = kwargs.pop('cls', None) # type: ClsType["_models.Cluster"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._update_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(cluster_update, 'ClusterUpdate') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('Cluster', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('Cluster', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}'} # type: ignore - - async def begin_update( - self, - resource_group_name: str, - private_cloud_name: str, - cluster_name: str, - cluster_update: "_models.ClusterUpdate", - **kwargs: Any - ) -> AsyncLROPoller["_models.Cluster"]: - """Update a cluster in a private cloud. - - Update a cluster in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param cluster_name: Name of the cluster in the private cloud. - :type cluster_name: str - :param cluster_update: The cluster properties to be updated. - :type cluster_update: ~avs_client.models.ClusterUpdate - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either Cluster or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~avs_client.models.Cluster] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.Cluster"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - cluster_name=cluster_name, - cluster_update=cluster_update, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('Cluster', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}'} # type: ignore - - async def _delete_initial( - self, - resource_group_name: str, - private_cloud_name: str, - cluster_name: str, - **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}'} # type: ignore - - async def begin_delete( - self, - resource_group_name: str, - private_cloud_name: str, - cluster_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Delete a cluster in a private cloud. - - Delete a cluster in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param cluster_name: Name of the cluster in the private cloud. - :type cluster_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - cluster_name=cluster_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}'} # type: ignore - - async def list_zones( - self, - resource_group_name: str, - private_cloud_name: str, - cluster_name: str, - **kwargs: Any - ) -> "_models.ClusterZoneList": - """List hosts by zone in a cluster. - - List hosts by zone in a cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param cluster_name: Name of the cluster in the private cloud. - :type cluster_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ClusterZoneList, or the result of cls(response) - :rtype: ~avs_client.models.ClusterZoneList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterZoneList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.list_zones.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ClusterZoneList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - list_zones.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/listZones'} # type: ignore diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_datastores_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_datastores_operations.py deleted file mode 100644 index b057914df50..00000000000 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_datastores_operations.py +++ /dev/null @@ -1,460 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class DatastoresOperations: - """DatastoresOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~avs_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name: str, - private_cloud_name: str, - cluster_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.DatastoreList"]: - """List datastores in a private cloud cluster. - - List datastores in a private cloud cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param cluster_name: Name of the cluster in the private cloud. - :type cluster_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either DatastoreList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~avs_client.models.DatastoreList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DatastoreList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('DatastoreList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores'} # type: ignore - - async def get( - self, - resource_group_name: str, - private_cloud_name: str, - cluster_name: str, - datastore_name: str, - **kwargs: Any - ) -> "_models.Datastore": - """Get a datastore in a private cloud cluster. - - Get a datastore in a private cloud cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param cluster_name: Name of the cluster in the private cloud. - :type cluster_name: str - :param datastore_name: Name of the datastore in the private cloud cluster. - :type datastore_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: Datastore, or the result of cls(response) - :rtype: ~avs_client.models.Datastore - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.Datastore"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'datastoreName': self._serialize.url("datastore_name", datastore_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('Datastore', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}'} # type: ignore - - async def _create_or_update_initial( - self, - resource_group_name: str, - private_cloud_name: str, - cluster_name: str, - datastore_name: str, - datastore: "_models.Datastore", - **kwargs: Any - ) -> "_models.Datastore": - cls = kwargs.pop('cls', None) # type: ClsType["_models.Datastore"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'datastoreName': self._serialize.url("datastore_name", datastore_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(datastore, 'Datastore') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('Datastore', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('Datastore', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}'} # type: ignore - - async def begin_create_or_update( - self, - resource_group_name: str, - private_cloud_name: str, - cluster_name: str, - datastore_name: str, - datastore: "_models.Datastore", - **kwargs: Any - ) -> AsyncLROPoller["_models.Datastore"]: - """Create or update a datastore in a private cloud cluster. - - Create or update a datastore in a private cloud cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param cluster_name: Name of the cluster in the private cloud. - :type cluster_name: str - :param datastore_name: Name of the datastore in the private cloud cluster. - :type datastore_name: str - :param datastore: A datastore in a private cloud cluster. - :type datastore: ~avs_client.models.Datastore - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either Datastore or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~avs_client.models.Datastore] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.Datastore"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - cluster_name=cluster_name, - datastore_name=datastore_name, - datastore=datastore, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('Datastore', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'datastoreName': self._serialize.url("datastore_name", datastore_name, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}'} # type: ignore - - async def _delete_initial( - self, - resource_group_name: str, - private_cloud_name: str, - cluster_name: str, - datastore_name: str, - **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'datastoreName': self._serialize.url("datastore_name", datastore_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}'} # type: ignore - - async def begin_delete( - self, - resource_group_name: str, - private_cloud_name: str, - cluster_name: str, - datastore_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Delete a datastore in a private cloud cluster. - - Delete a datastore in a private cloud cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param cluster_name: Name of the cluster in the private cloud. - :type cluster_name: str - :param datastore_name: Name of the datastore in the private cloud cluster. - :type datastore_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - cluster_name=cluster_name, - datastore_name=datastore_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'datastoreName': self._serialize.url("datastore_name", datastore_name, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}'} # type: ignore diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_global_reach_connections_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_global_reach_connections_operations.py deleted file mode 100644 index b9a359cb854..00000000000 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_global_reach_connections_operations.py +++ /dev/null @@ -1,438 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class GlobalReachConnectionsOperations: - """GlobalReachConnectionsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~avs_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name: str, - private_cloud_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.GlobalReachConnectionList"]: - """List global reach connections in a private cloud. - - List global reach connections in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either GlobalReachConnectionList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~avs_client.models.GlobalReachConnectionList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.GlobalReachConnectionList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('GlobalReachConnectionList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections'} # type: ignore - - async def get( - self, - resource_group_name: str, - private_cloud_name: str, - global_reach_connection_name: str, - **kwargs: Any - ) -> "_models.GlobalReachConnection": - """Get a global reach connection by name in a private cloud. - - Get a global reach connection by name in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param global_reach_connection_name: Name of the global reach connection in the private cloud. - :type global_reach_connection_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: GlobalReachConnection, or the result of cls(response) - :rtype: ~avs_client.models.GlobalReachConnection - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.GlobalReachConnection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'globalReachConnectionName': self._serialize.url("global_reach_connection_name", global_reach_connection_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('GlobalReachConnection', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}'} # type: ignore - - async def _create_or_update_initial( - self, - resource_group_name: str, - private_cloud_name: str, - global_reach_connection_name: str, - global_reach_connection: "_models.GlobalReachConnection", - **kwargs: Any - ) -> "_models.GlobalReachConnection": - cls = kwargs.pop('cls', None) # type: ClsType["_models.GlobalReachConnection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'globalReachConnectionName': self._serialize.url("global_reach_connection_name", global_reach_connection_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(global_reach_connection, 'GlobalReachConnection') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('GlobalReachConnection', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('GlobalReachConnection', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}'} # type: ignore - - async def begin_create_or_update( - self, - resource_group_name: str, - private_cloud_name: str, - global_reach_connection_name: str, - global_reach_connection: "_models.GlobalReachConnection", - **kwargs: Any - ) -> AsyncLROPoller["_models.GlobalReachConnection"]: - """Create or update a global reach connection in a private cloud. - - Create or update a global reach connection in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: The name of the private cloud. - :type private_cloud_name: str - :param global_reach_connection_name: Name of the global reach connection in the private cloud. - :type global_reach_connection_name: str - :param global_reach_connection: A global reach connection in the private cloud. - :type global_reach_connection: ~avs_client.models.GlobalReachConnection - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either GlobalReachConnection or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~avs_client.models.GlobalReachConnection] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.GlobalReachConnection"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - global_reach_connection_name=global_reach_connection_name, - global_reach_connection=global_reach_connection, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('GlobalReachConnection', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'globalReachConnectionName': self._serialize.url("global_reach_connection_name", global_reach_connection_name, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}'} # type: ignore - - async def _delete_initial( - self, - resource_group_name: str, - private_cloud_name: str, - global_reach_connection_name: str, - **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'globalReachConnectionName': self._serialize.url("global_reach_connection_name", global_reach_connection_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}'} # type: ignore - - async def begin_delete( - self, - resource_group_name: str, - private_cloud_name: str, - global_reach_connection_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Delete a global reach connection in a private cloud. - - Delete a global reach connection in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param global_reach_connection_name: Name of the global reach connection in the private cloud. - :type global_reach_connection_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - global_reach_connection_name=global_reach_connection_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'globalReachConnectionName': self._serialize.url("global_reach_connection_name", global_reach_connection_name, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}'} # type: ignore diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_hcx_enterprise_sites_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_hcx_enterprise_sites_operations.py deleted file mode 100644 index c972a51a22e..00000000000 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_hcx_enterprise_sites_operations.py +++ /dev/null @@ -1,319 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class HcxEnterpriseSitesOperations: - """HcxEnterpriseSitesOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~avs_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name: str, - private_cloud_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.HcxEnterpriseSiteList"]: - """List HCX Enterprise Sites in a private cloud. - - List HCX Enterprise Sites in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either HcxEnterpriseSiteList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~avs_client.models.HcxEnterpriseSiteList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.HcxEnterpriseSiteList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('HcxEnterpriseSiteList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites'} # type: ignore - - async def get( - self, - resource_group_name: str, - private_cloud_name: str, - hcx_enterprise_site_name: str, - **kwargs: Any - ) -> "_models.HcxEnterpriseSite": - """Get an HCX Enterprise Site by name in a private cloud. - - Get an HCX Enterprise Site by name in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param hcx_enterprise_site_name: Name of the HCX Enterprise Site in the private cloud. - :type hcx_enterprise_site_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: HcxEnterpriseSite, or the result of cls(response) - :rtype: ~avs_client.models.HcxEnterpriseSite - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.HcxEnterpriseSite"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'hcxEnterpriseSiteName': self._serialize.url("hcx_enterprise_site_name", hcx_enterprise_site_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('HcxEnterpriseSite', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites/{hcxEnterpriseSiteName}'} # type: ignore - - async def create_or_update( - self, - resource_group_name: str, - private_cloud_name: str, - hcx_enterprise_site_name: str, - hcx_enterprise_site: "_models.HcxEnterpriseSite", - **kwargs: Any - ) -> "_models.HcxEnterpriseSite": - """Create or update an HCX Enterprise Site in a private cloud. - - Create or update an HCX Enterprise Site in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: The name of the private cloud. - :type private_cloud_name: str - :param hcx_enterprise_site_name: Name of the HCX Enterprise Site in the private cloud. - :type hcx_enterprise_site_name: str - :param hcx_enterprise_site: The HCX Enterprise Site. - :type hcx_enterprise_site: ~avs_client.models.HcxEnterpriseSite - :keyword callable cls: A custom type or function that will be passed the direct response - :return: HcxEnterpriseSite, or the result of cls(response) - :rtype: ~avs_client.models.HcxEnterpriseSite - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.HcxEnterpriseSite"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'hcxEnterpriseSiteName': self._serialize.url("hcx_enterprise_site_name", hcx_enterprise_site_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(hcx_enterprise_site, 'HcxEnterpriseSite') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('HcxEnterpriseSite', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('HcxEnterpriseSite', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites/{hcxEnterpriseSiteName}'} # type: ignore - - async def delete( - self, - resource_group_name: str, - private_cloud_name: str, - hcx_enterprise_site_name: str, - **kwargs: Any - ) -> None: - """Delete an HCX Enterprise Site in a private cloud. - - Delete an HCX Enterprise Site in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param hcx_enterprise_site_name: Name of the HCX Enterprise Site in the private cloud. - :type hcx_enterprise_site_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.delete.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'hcxEnterpriseSiteName': self._serialize.url("hcx_enterprise_site_name", hcx_enterprise_site_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites/{hcxEnterpriseSiteName}'} # type: ignore diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_locations_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_locations_operations.py deleted file mode 100644 index 36a9640425b..00000000000 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_locations_operations.py +++ /dev/null @@ -1,160 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class LocationsOperations: - """LocationsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~avs_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def check_trial_availability( - self, - location: str, - sku: Optional["_models.Sku"] = None, - **kwargs: Any - ) -> "_models.Trial": - """Return trial status for subscription by region. - - :param location: Azure region. - :type location: str - :param sku: The sku to check for trial availability. - :type sku: ~avs_client.models.Sku - :keyword callable cls: A custom type or function that will be passed the direct response - :return: Trial, or the result of cls(response) - :rtype: ~avs_client.models.Trial - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.Trial"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.check_trial_availability.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'location': self._serialize.url("location", location, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - if sku is not None: - body_content = self._serialize.body(sku, 'Sku') - else: - body_content = None - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('Trial', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - check_trial_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/checkTrialAvailability'} # type: ignore - - async def check_quota_availability( - self, - location: str, - **kwargs: Any - ) -> "_models.Quota": - """Return quota for subscription by region. - - :param location: Azure region. - :type location: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: Quota, or the result of cls(response) - :rtype: ~avs_client.models.Quota - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.Quota"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.check_quota_availability.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'location': self._serialize.url("location", location, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('Quota', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - check_quota_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/checkQuotaAvailability'} # type: ignore diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_operations.py deleted file mode 100644 index 7614320d932..00000000000 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_operations.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class Operations: - """Operations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~avs_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - **kwargs: Any - ) -> AsyncIterable["_models.OperationList"]: - """Lists all of the available operations. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either OperationList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~avs_client.models.OperationList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('OperationList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/providers/Microsoft.AVS/operations'} # type: ignore diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_placement_policies_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_placement_policies_operations.py deleted file mode 100644 index 1867f669179..00000000000 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_placement_policies_operations.py +++ /dev/null @@ -1,608 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class PlacementPoliciesOperations: - """PlacementPoliciesOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~avs_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name: str, - private_cloud_name: str, - cluster_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.PlacementPoliciesList"]: - """List placement policies in a private cloud cluster. - - List placement policies in a private cloud cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param cluster_name: Name of the cluster in the private cloud. - :type cluster_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PlacementPoliciesList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~avs_client.models.PlacementPoliciesList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PlacementPoliciesList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('PlacementPoliciesList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies'} # type: ignore - - async def get( - self, - resource_group_name: str, - private_cloud_name: str, - cluster_name: str, - placement_policy_name: str, - **kwargs: Any - ) -> "_models.PlacementPolicy": - """Get a placement policy by name in a private cloud cluster. - - Get a placement policy by name in a private cloud cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param cluster_name: Name of the cluster in the private cloud. - :type cluster_name: str - :param placement_policy_name: Name of the VMware vSphere Distributed Resource Scheduler (DRS) - placement policy. - :type placement_policy_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PlacementPolicy, or the result of cls(response) - :rtype: ~avs_client.models.PlacementPolicy - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PlacementPolicy"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'placementPolicyName': self._serialize.url("placement_policy_name", placement_policy_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PlacementPolicy', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}'} # type: ignore - - async def _create_or_update_initial( - self, - resource_group_name: str, - private_cloud_name: str, - cluster_name: str, - placement_policy_name: str, - placement_policy: "_models.PlacementPolicy", - **kwargs: Any - ) -> "_models.PlacementPolicy": - cls = kwargs.pop('cls', None) # type: ClsType["_models.PlacementPolicy"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'placementPolicyName': self._serialize.url("placement_policy_name", placement_policy_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(placement_policy, 'PlacementPolicy') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('PlacementPolicy', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('PlacementPolicy', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}'} # type: ignore - - async def begin_create_or_update( - self, - resource_group_name: str, - private_cloud_name: str, - cluster_name: str, - placement_policy_name: str, - placement_policy: "_models.PlacementPolicy", - **kwargs: Any - ) -> AsyncLROPoller["_models.PlacementPolicy"]: - """Create or update a placement policy in a private cloud cluster. - - Create or update a placement policy in a private cloud cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param cluster_name: Name of the cluster in the private cloud. - :type cluster_name: str - :param placement_policy_name: Name of the VMware vSphere Distributed Resource Scheduler (DRS) - placement policy. - :type placement_policy_name: str - :param placement_policy: A placement policy in the private cloud cluster. - :type placement_policy: ~avs_client.models.PlacementPolicy - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either PlacementPolicy or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~avs_client.models.PlacementPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PlacementPolicy"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - cluster_name=cluster_name, - placement_policy_name=placement_policy_name, - placement_policy=placement_policy, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('PlacementPolicy', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'placementPolicyName': self._serialize.url("placement_policy_name", placement_policy_name, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}'} # type: ignore - - async def _update_initial( - self, - resource_group_name: str, - private_cloud_name: str, - cluster_name: str, - placement_policy_name: str, - placement_policy_update: "_models.PlacementPolicyUpdate", - **kwargs: Any - ) -> "_models.PlacementPolicy": - cls = kwargs.pop('cls', None) # type: ClsType["_models.PlacementPolicy"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._update_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'placementPolicyName': self._serialize.url("placement_policy_name", placement_policy_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(placement_policy_update, 'PlacementPolicyUpdate') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('PlacementPolicy', pipeline_response) - - if response.status_code == 202: - deserialized = self._deserialize('PlacementPolicy', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}'} # type: ignore - - async def begin_update( - self, - resource_group_name: str, - private_cloud_name: str, - cluster_name: str, - placement_policy_name: str, - placement_policy_update: "_models.PlacementPolicyUpdate", - **kwargs: Any - ) -> AsyncLROPoller["_models.PlacementPolicy"]: - """Update a placement policy in a private cloud cluster. - - Update a placement policy in a private cloud cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param cluster_name: Name of the cluster in the private cloud. - :type cluster_name: str - :param placement_policy_name: Name of the VMware vSphere Distributed Resource Scheduler (DRS) - placement policy. - :type placement_policy_name: str - :param placement_policy_update: The placement policy properties that may be updated. - :type placement_policy_update: ~avs_client.models.PlacementPolicyUpdate - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either PlacementPolicy or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~avs_client.models.PlacementPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PlacementPolicy"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - cluster_name=cluster_name, - placement_policy_name=placement_policy_name, - placement_policy_update=placement_policy_update, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('PlacementPolicy', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'placementPolicyName': self._serialize.url("placement_policy_name", placement_policy_name, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}'} # type: ignore - - async def _delete_initial( - self, - resource_group_name: str, - private_cloud_name: str, - cluster_name: str, - placement_policy_name: str, - **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'placementPolicyName': self._serialize.url("placement_policy_name", placement_policy_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}'} # type: ignore - - async def begin_delete( - self, - resource_group_name: str, - private_cloud_name: str, - cluster_name: str, - placement_policy_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Delete a placement policy in a private cloud cluster. - - Delete a placement policy in a private cloud cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param cluster_name: Name of the cluster in the private cloud. - :type cluster_name: str - :param placement_policy_name: Name of the VMware vSphere Distributed Resource Scheduler (DRS) - placement policy. - :type placement_policy_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - cluster_name=cluster_name, - placement_policy_name=placement_policy_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'placementPolicyName': self._serialize.url("placement_policy_name", placement_policy_name, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}'} # type: ignore diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_private_clouds_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_private_clouds_operations.py deleted file mode 100644 index 2f28810a6cf..00000000000 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_private_clouds_operations.py +++ /dev/null @@ -1,894 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class PrivateCloudsOperations: - """PrivateCloudsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~avs_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.PrivateCloudList"]: - """List private clouds in a resource group. - - List private clouds in a resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PrivateCloudList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~avs_client.models.PrivateCloudList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateCloudList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('PrivateCloudList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds'} # type: ignore - - def list_in_subscription( - self, - **kwargs: Any - ) -> AsyncIterable["_models.PrivateCloudList"]: - """List private clouds in a subscription. - - List private clouds in a subscription. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PrivateCloudList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~avs_client.models.PrivateCloudList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateCloudList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_in_subscription.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('PrivateCloudList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list_in_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AVS/privateClouds'} # type: ignore - - async def get( - self, - resource_group_name: str, - private_cloud_name: str, - **kwargs: Any - ) -> "_models.PrivateCloud": - """Get a private cloud. - - Get a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PrivateCloud, or the result of cls(response) - :rtype: ~avs_client.models.PrivateCloud - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateCloud"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PrivateCloud', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}'} # type: ignore - - async def _create_or_update_initial( - self, - resource_group_name: str, - private_cloud_name: str, - private_cloud: "_models.PrivateCloud", - **kwargs: Any - ) -> "_models.PrivateCloud": - cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateCloud"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(private_cloud, 'PrivateCloud') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('PrivateCloud', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('PrivateCloud', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}'} # type: ignore - - async def begin_create_or_update( - self, - resource_group_name: str, - private_cloud_name: str, - private_cloud: "_models.PrivateCloud", - **kwargs: Any - ) -> AsyncLROPoller["_models.PrivateCloud"]: - """Create or update a private cloud. - - Create or update a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param private_cloud: The private cloud. - :type private_cloud: ~avs_client.models.PrivateCloud - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either PrivateCloud or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~avs_client.models.PrivateCloud] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateCloud"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - private_cloud=private_cloud, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('PrivateCloud', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}'} # type: ignore - - async def _update_initial( - self, - resource_group_name: str, - private_cloud_name: str, - private_cloud_update: "_models.PrivateCloudUpdate", - **kwargs: Any - ) -> "_models.PrivateCloud": - cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateCloud"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._update_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(private_cloud_update, 'PrivateCloudUpdate') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('PrivateCloud', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('PrivateCloud', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}'} # type: ignore - - async def begin_update( - self, - resource_group_name: str, - private_cloud_name: str, - private_cloud_update: "_models.PrivateCloudUpdate", - **kwargs: Any - ) -> AsyncLROPoller["_models.PrivateCloud"]: - """Update a private cloud. - - Update a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param private_cloud_update: The private cloud properties to be updated. - :type private_cloud_update: ~avs_client.models.PrivateCloudUpdate - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either PrivateCloud or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~avs_client.models.PrivateCloud] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateCloud"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - private_cloud_update=private_cloud_update, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('PrivateCloud', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}'} # type: ignore - - async def _delete_initial( - self, - resource_group_name: str, - private_cloud_name: str, - **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}'} # type: ignore - - async def begin_delete( - self, - resource_group_name: str, - private_cloud_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Delete a private cloud. - - Delete a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}'} # type: ignore - - async def _rotate_vcenter_password_initial( - self, - resource_group_name: str, - private_cloud_name: str, - **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self._rotate_vcenter_password_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _rotate_vcenter_password_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/rotateVcenterPassword'} # type: ignore - - async def begin_rotate_vcenter_password( - self, - resource_group_name: str, - private_cloud_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Rotate the vCenter password. - - Rotate the vCenter password. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._rotate_vcenter_password_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_rotate_vcenter_password.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/rotateVcenterPassword'} # type: ignore - - async def _rotate_nsxt_password_initial( - self, - resource_group_name: str, - private_cloud_name: str, - **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self._rotate_nsxt_password_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _rotate_nsxt_password_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/rotateNsxtPassword'} # type: ignore - - async def begin_rotate_nsxt_password( - self, - resource_group_name: str, - private_cloud_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Rotate the NSX-T Manager password. - - Rotate the NSX-T Manager password. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._rotate_nsxt_password_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_rotate_nsxt_password.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/rotateNsxtPassword'} # type: ignore - - async def list_admin_credentials( - self, - resource_group_name: str, - private_cloud_name: str, - **kwargs: Any - ) -> "_models.AdminCredentials": - """List the admin credentials for the private cloud. - - List the admin credentials for the private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: AdminCredentials, or the result of cls(response) - :rtype: ~avs_client.models.AdminCredentials - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.AdminCredentials"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.list_admin_credentials.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('AdminCredentials', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - list_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/listAdminCredentials'} # type: ignore diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_script_cmdlets_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_script_cmdlets_operations.py deleted file mode 100644 index a7ae80f3d9c..00000000000 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_script_cmdlets_operations.py +++ /dev/null @@ -1,188 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class ScriptCmdletsOperations: - """ScriptCmdletsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~avs_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name: str, - private_cloud_name: str, - script_package_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.ScriptCmdletsList"]: - """List script cmdlet resources available for a private cloud to create a script execution - resource on a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param script_package_name: Name of the script package in the private cloud. - :type script_package_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ScriptCmdletsList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~avs_client.models.ScriptCmdletsList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ScriptCmdletsList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'scriptPackageName': self._serialize.url("script_package_name", script_package_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('ScriptCmdletsList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}/scriptCmdlets'} # type: ignore - - async def get( - self, - resource_group_name: str, - private_cloud_name: str, - script_package_name: str, - script_cmdlet_name: str, - **kwargs: Any - ) -> "_models.ScriptCmdlet": - """Return information about a script cmdlet resource in a specific package on a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param script_package_name: Name of the script package in the private cloud. - :type script_package_name: str - :param script_cmdlet_name: Name of the script cmdlet resource in the script package in the - private cloud. - :type script_cmdlet_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ScriptCmdlet, or the result of cls(response) - :rtype: ~avs_client.models.ScriptCmdlet - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ScriptCmdlet"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'scriptPackageName': self._serialize.url("script_package_name", script_package_name, 'str'), - 'scriptCmdletName': self._serialize.url("script_cmdlet_name", script_cmdlet_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ScriptCmdlet', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}/scriptCmdlets/{scriptCmdletName}'} # type: ignore diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_script_executions_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_script_executions_operations.py deleted file mode 100644 index d92cd8ef74d..00000000000 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_script_executions_operations.py +++ /dev/null @@ -1,512 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, List, Optional, TypeVar, Union -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class ScriptExecutionsOperations: - """ScriptExecutionsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~avs_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name: str, - private_cloud_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.ScriptExecutionsList"]: - """List script executions in a private cloud. - - List script executions in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ScriptExecutionsList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~avs_client.models.ScriptExecutionsList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ScriptExecutionsList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('ScriptExecutionsList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions'} # type: ignore - - async def get( - self, - resource_group_name: str, - private_cloud_name: str, - script_execution_name: str, - **kwargs: Any - ) -> "_models.ScriptExecution": - """Get an script execution by name in a private cloud. - - Get an script execution by name in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param script_execution_name: Name of the user-invoked script execution resource. - :type script_execution_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ScriptExecution, or the result of cls(response) - :rtype: ~avs_client.models.ScriptExecution - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ScriptExecution"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'scriptExecutionName': self._serialize.url("script_execution_name", script_execution_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ScriptExecution', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}'} # type: ignore - - async def _create_or_update_initial( - self, - resource_group_name: str, - private_cloud_name: str, - script_execution_name: str, - script_execution: "_models.ScriptExecution", - **kwargs: Any - ) -> "_models.ScriptExecution": - cls = kwargs.pop('cls', None) # type: ClsType["_models.ScriptExecution"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'scriptExecutionName': self._serialize.url("script_execution_name", script_execution_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(script_execution, 'ScriptExecution') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('ScriptExecution', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('ScriptExecution', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}'} # type: ignore - - async def begin_create_or_update( - self, - resource_group_name: str, - private_cloud_name: str, - script_execution_name: str, - script_execution: "_models.ScriptExecution", - **kwargs: Any - ) -> AsyncLROPoller["_models.ScriptExecution"]: - """Create or update a script execution in a private cloud. - - Create or update a script execution in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: The name of the private cloud. - :type private_cloud_name: str - :param script_execution_name: Name of the user-invoked script execution resource. - :type script_execution_name: str - :param script_execution: A script running in the private cloud. - :type script_execution: ~avs_client.models.ScriptExecution - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either ScriptExecution or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~avs_client.models.ScriptExecution] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ScriptExecution"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - script_execution_name=script_execution_name, - script_execution=script_execution, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ScriptExecution', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'scriptExecutionName': self._serialize.url("script_execution_name", script_execution_name, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}'} # type: ignore - - async def _delete_initial( - self, - resource_group_name: str, - private_cloud_name: str, - script_execution_name: str, - **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'scriptExecutionName': self._serialize.url("script_execution_name", script_execution_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}'} # type: ignore - - async def begin_delete( - self, - resource_group_name: str, - private_cloud_name: str, - script_execution_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Cancel a ScriptExecution in a private cloud. - - Cancel a ScriptExecution in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param script_execution_name: Name of the user-invoked script execution resource. - :type script_execution_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - script_execution_name=script_execution_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'scriptExecutionName': self._serialize.url("script_execution_name", script_execution_name, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}'} # type: ignore - - async def get_execution_logs( - self, - resource_group_name: str, - private_cloud_name: str, - script_execution_name: str, - script_output_stream_type: Optional[List[Union[str, "_models.ScriptOutputStreamType"]]] = None, - **kwargs: Any - ) -> "_models.ScriptExecution": - """Return the logs for a script execution resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param script_execution_name: Name of the user-invoked script execution resource. - :type script_execution_name: str - :param script_output_stream_type: Name of the desired output stream to return. If not provided, - will return all. An empty array will return nothing. - :type script_output_stream_type: list[str or ~avs_client.models.ScriptOutputStreamType] - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ScriptExecution, or the result of cls(response) - :rtype: ~avs_client.models.ScriptExecution - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ScriptExecution"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.get_execution_logs.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'scriptExecutionName': self._serialize.url("script_execution_name", script_execution_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - if script_output_stream_type is not None: - body_content = self._serialize.body(script_output_stream_type, '[str]') - else: - body_content = None - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ScriptExecution', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_execution_logs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}/getExecutionLogs'} # type: ignore diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_script_packages_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_script_packages_operations.py deleted file mode 100644 index 2603957c983..00000000000 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_script_packages_operations.py +++ /dev/null @@ -1,178 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class ScriptPackagesOperations: - """ScriptPackagesOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~avs_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name: str, - private_cloud_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.ScriptPackagesList"]: - """List script packages available to run on the private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ScriptPackagesList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~avs_client.models.ScriptPackagesList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ScriptPackagesList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('ScriptPackagesList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages'} # type: ignore - - async def get( - self, - resource_group_name: str, - private_cloud_name: str, - script_package_name: str, - **kwargs: Any - ) -> "_models.ScriptPackage": - """Get a script package available to run on a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param script_package_name: Name of the script package in the private cloud. - :type script_package_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ScriptPackage, or the result of cls(response) - :rtype: ~avs_client.models.ScriptPackage - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ScriptPackage"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'scriptPackageName': self._serialize.url("script_package_name", script_package_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ScriptPackage', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}'} # type: ignore diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_virtual_machines_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_virtual_machines_operations.py deleted file mode 100644 index f1482cda3d5..00000000000 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_virtual_machines_operations.py +++ /dev/null @@ -1,327 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class VirtualMachinesOperations: - """VirtualMachinesOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~avs_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name: str, - private_cloud_name: str, - cluster_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.VirtualMachinesList"]: - """List of virtual machines in a private cloud cluster. - - List of virtual machines in a private cloud cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param cluster_name: Name of the cluster in the private cloud. - :type cluster_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either VirtualMachinesList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~avs_client.models.VirtualMachinesList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachinesList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('VirtualMachinesList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines'} # type: ignore - - async def get( - self, - resource_group_name: str, - private_cloud_name: str, - cluster_name: str, - virtual_machine_id: str, - **kwargs: Any - ) -> "_models.VirtualMachine": - """Get a virtual machine by id in a private cloud cluster. - - Get a virtual machine by id in a private cloud cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param cluster_name: Name of the cluster in the private cloud. - :type cluster_name: str - :param virtual_machine_id: Virtual Machine identifier. - :type virtual_machine_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: VirtualMachine, or the result of cls(response) - :rtype: ~avs_client.models.VirtualMachine - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachine"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'virtualMachineId': self._serialize.url("virtual_machine_id", virtual_machine_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('VirtualMachine', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines/{virtualMachineId}'} # type: ignore - - async def _restrict_movement_initial( - self, - resource_group_name: str, - private_cloud_name: str, - cluster_name: str, - virtual_machine_id: str, - restrict_movement: "_models.VirtualMachineRestrictMovement", - **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._restrict_movement_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'virtualMachineId': self._serialize.url("virtual_machine_id", virtual_machine_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(restrict_movement, 'VirtualMachineRestrictMovement') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _restrict_movement_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines/{virtualMachineId}/restrictMovement'} # type: ignore - - async def begin_restrict_movement( - self, - resource_group_name: str, - private_cloud_name: str, - cluster_name: str, - virtual_machine_id: str, - restrict_movement: "_models.VirtualMachineRestrictMovement", - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Enable or disable DRS-driven VM movement restriction. - - Enable or disable DRS-driven VM movement restriction. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param cluster_name: Name of the cluster in the private cloud. - :type cluster_name: str - :param virtual_machine_id: Virtual Machine identifier. - :type virtual_machine_id: str - :param restrict_movement: Whether VM DRS-driven movement is restricted (Enabled) or not - (Disabled). - :type restrict_movement: ~avs_client.models.VirtualMachineRestrictMovement - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._restrict_movement_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - cluster_name=cluster_name, - virtual_machine_id=virtual_machine_id, - restrict_movement=restrict_movement, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'virtualMachineId': self._serialize.url("virtual_machine_id", virtual_machine_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restrict_movement.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines/{virtualMachineId}/restrictMovement'} # type: ignore diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_workload_networks_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_workload_networks_operations.py deleted file mode 100644 index dede0ed187c..00000000000 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_workload_networks_operations.py +++ /dev/null @@ -1,4043 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class WorkloadNetworksOperations: - """WorkloadNetworksOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~avs_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def get( - self, - resource_group_name: str, - private_cloud_name: str, - workload_network_name: Union[str, "_models.WorkloadNetworkName"], - **kwargs: Any - ) -> "_models.WorkloadNetwork": - """Get a private cloud workload network. - - Get a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param workload_network_name: Name for the workload network in the private cloud. - :type workload_network_name: str or ~avs_client.models.WorkloadNetworkName - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkloadNetwork, or the result of cls(response) - :rtype: ~avs_client.models.WorkloadNetwork - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetwork"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'workloadNetworkName': self._serialize.url("workload_network_name", workload_network_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('WorkloadNetwork', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}'} # type: ignore - - def list( - self, - resource_group_name: str, - private_cloud_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.WorkloadNetworkList"]: - """List of workload networks in a private cloud. - - List of workload networks in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either WorkloadNetworkList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~avs_client.models.WorkloadNetworkList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('WorkloadNetworkList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks'} # type: ignore - - def list_segments( - self, - resource_group_name: str, - private_cloud_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.WorkloadNetworkSegmentsList"]: - """List of segments in a private cloud workload network. - - List of segments in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either WorkloadNetworkSegmentsList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~avs_client.models.WorkloadNetworkSegmentsList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkSegmentsList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_segments.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('WorkloadNetworkSegmentsList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list_segments.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments'} # type: ignore - - async def get_segment( - self, - resource_group_name: str, - private_cloud_name: str, - segment_id: str, - **kwargs: Any - ) -> "_models.WorkloadNetworkSegment": - """Get a segment by id in a private cloud workload network. - - Get a segment by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param segment_id: NSX Segment identifier. Generally the same as the Segment's display name. - :type segment_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkloadNetworkSegment, or the result of cls(response) - :rtype: ~avs_client.models.WorkloadNetworkSegment - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkSegment"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.get_segment.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'segmentId': self._serialize.url("segment_id", segment_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('WorkloadNetworkSegment', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_segment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}'} # type: ignore - - async def _create_segments_initial( - self, - resource_group_name: str, - private_cloud_name: str, - segment_id: str, - workload_network_segment: "_models.WorkloadNetworkSegment", - **kwargs: Any - ) -> "_models.WorkloadNetworkSegment": - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkSegment"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._create_segments_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'segmentId': self._serialize.url("segment_id", segment_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(workload_network_segment, 'WorkloadNetworkSegment') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('WorkloadNetworkSegment', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('WorkloadNetworkSegment', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _create_segments_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}'} # type: ignore - - async def begin_create_segments( - self, - resource_group_name: str, - private_cloud_name: str, - segment_id: str, - workload_network_segment: "_models.WorkloadNetworkSegment", - **kwargs: Any - ) -> AsyncLROPoller["_models.WorkloadNetworkSegment"]: - """Create a segment by id in a private cloud workload network. - - Create a segment by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param segment_id: NSX Segment identifier. Generally the same as the Segment's display name. - :type segment_id: str - :param workload_network_segment: NSX Segment. - :type workload_network_segment: ~avs_client.models.WorkloadNetworkSegment - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either WorkloadNetworkSegment or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~avs_client.models.WorkloadNetworkSegment] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkSegment"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._create_segments_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - segment_id=segment_id, - workload_network_segment=workload_network_segment, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('WorkloadNetworkSegment', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'segmentId': self._serialize.url("segment_id", segment_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_segments.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}'} # type: ignore - - async def _update_segments_initial( - self, - resource_group_name: str, - private_cloud_name: str, - segment_id: str, - workload_network_segment: "_models.WorkloadNetworkSegment", - **kwargs: Any - ) -> Optional["_models.WorkloadNetworkSegment"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.WorkloadNetworkSegment"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._update_segments_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'segmentId': self._serialize.url("segment_id", segment_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(workload_network_segment, 'WorkloadNetworkSegment') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WorkloadNetworkSegment', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _update_segments_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}'} # type: ignore - - async def begin_update_segments( - self, - resource_group_name: str, - private_cloud_name: str, - segment_id: str, - workload_network_segment: "_models.WorkloadNetworkSegment", - **kwargs: Any - ) -> AsyncLROPoller["_models.WorkloadNetworkSegment"]: - """Create or update a segment by id in a private cloud workload network. - - Create or update a segment by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param segment_id: NSX Segment identifier. Generally the same as the Segment's display name. - :type segment_id: str - :param workload_network_segment: NSX Segment. - :type workload_network_segment: ~avs_client.models.WorkloadNetworkSegment - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either WorkloadNetworkSegment or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~avs_client.models.WorkloadNetworkSegment] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkSegment"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._update_segments_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - segment_id=segment_id, - workload_network_segment=workload_network_segment, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('WorkloadNetworkSegment', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'segmentId': self._serialize.url("segment_id", segment_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_segments.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}'} # type: ignore - - async def _delete_segment_initial( - self, - resource_group_name: str, - private_cloud_name: str, - segment_id: str, - **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self._delete_segment_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'segmentId': self._serialize.url("segment_id", segment_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_segment_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}'} # type: ignore - - async def begin_delete_segment( - self, - resource_group_name: str, - private_cloud_name: str, - segment_id: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Delete a segment by id in a private cloud workload network. - - Delete a segment by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param segment_id: NSX Segment identifier. Generally the same as the Segment's display name. - :type segment_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._delete_segment_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - segment_id=segment_id, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'segmentId': self._serialize.url("segment_id", segment_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_segment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}'} # type: ignore - - def list_dhcp( - self, - resource_group_name: str, - private_cloud_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.WorkloadNetworkDhcpList"]: - """List dhcp in a private cloud workload network. - - List dhcp in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either WorkloadNetworkDhcpList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~avs_client.models.WorkloadNetworkDhcpList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkDhcpList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_dhcp.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('WorkloadNetworkDhcpList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list_dhcp.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations'} # type: ignore - - async def get_dhcp( - self, - resource_group_name: str, - dhcp_id: str, - private_cloud_name: str, - **kwargs: Any - ) -> "_models.WorkloadNetworkDhcp": - """Get dhcp by id in a private cloud workload network. - - Get dhcp by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param dhcp_id: NSX DHCP identifier. Generally the same as the DHCP display name. - :type dhcp_id: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkloadNetworkDhcp, or the result of cls(response) - :rtype: ~avs_client.models.WorkloadNetworkDhcp - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkDhcp"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.get_dhcp.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'dhcpId': self._serialize.url("dhcp_id", dhcp_id, 'str'), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('WorkloadNetworkDhcp', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_dhcp.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}'} # type: ignore - - async def _create_dhcp_initial( - self, - resource_group_name: str, - private_cloud_name: str, - dhcp_id: str, - workload_network_dhcp: "_models.WorkloadNetworkDhcp", - **kwargs: Any - ) -> "_models.WorkloadNetworkDhcp": - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkDhcp"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._create_dhcp_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'dhcpId': self._serialize.url("dhcp_id", dhcp_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(workload_network_dhcp, 'WorkloadNetworkDhcp') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('WorkloadNetworkDhcp', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('WorkloadNetworkDhcp', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _create_dhcp_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}'} # type: ignore - - async def begin_create_dhcp( - self, - resource_group_name: str, - private_cloud_name: str, - dhcp_id: str, - workload_network_dhcp: "_models.WorkloadNetworkDhcp", - **kwargs: Any - ) -> AsyncLROPoller["_models.WorkloadNetworkDhcp"]: - """Create dhcp by id in a private cloud workload network. - - Create dhcp by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param dhcp_id: NSX DHCP identifier. Generally the same as the DHCP display name. - :type dhcp_id: str - :param workload_network_dhcp: NSX DHCP. - :type workload_network_dhcp: ~avs_client.models.WorkloadNetworkDhcp - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either WorkloadNetworkDhcp or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~avs_client.models.WorkloadNetworkDhcp] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkDhcp"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._create_dhcp_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - dhcp_id=dhcp_id, - workload_network_dhcp=workload_network_dhcp, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('WorkloadNetworkDhcp', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'dhcpId': self._serialize.url("dhcp_id", dhcp_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_dhcp.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}'} # type: ignore - - async def _update_dhcp_initial( - self, - resource_group_name: str, - private_cloud_name: str, - dhcp_id: str, - workload_network_dhcp: "_models.WorkloadNetworkDhcp", - **kwargs: Any - ) -> Optional["_models.WorkloadNetworkDhcp"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.WorkloadNetworkDhcp"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._update_dhcp_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'dhcpId': self._serialize.url("dhcp_id", dhcp_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(workload_network_dhcp, 'WorkloadNetworkDhcp') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WorkloadNetworkDhcp', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _update_dhcp_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}'} # type: ignore - - async def begin_update_dhcp( - self, - resource_group_name: str, - private_cloud_name: str, - dhcp_id: str, - workload_network_dhcp: "_models.WorkloadNetworkDhcp", - **kwargs: Any - ) -> AsyncLROPoller["_models.WorkloadNetworkDhcp"]: - """Create or update dhcp by id in a private cloud workload network. - - Create or update dhcp by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param dhcp_id: NSX DHCP identifier. Generally the same as the DHCP display name. - :type dhcp_id: str - :param workload_network_dhcp: NSX DHCP. - :type workload_network_dhcp: ~avs_client.models.WorkloadNetworkDhcp - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either WorkloadNetworkDhcp or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~avs_client.models.WorkloadNetworkDhcp] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkDhcp"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._update_dhcp_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - dhcp_id=dhcp_id, - workload_network_dhcp=workload_network_dhcp, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('WorkloadNetworkDhcp', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'dhcpId': self._serialize.url("dhcp_id", dhcp_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_dhcp.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}'} # type: ignore - - async def _delete_dhcp_initial( - self, - resource_group_name: str, - private_cloud_name: str, - dhcp_id: str, - **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self._delete_dhcp_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'dhcpId': self._serialize.url("dhcp_id", dhcp_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_dhcp_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}'} # type: ignore - - async def begin_delete_dhcp( - self, - resource_group_name: str, - private_cloud_name: str, - dhcp_id: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Delete dhcp by id in a private cloud workload network. - - Delete dhcp by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param dhcp_id: NSX DHCP identifier. Generally the same as the DHCP display name. - :type dhcp_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._delete_dhcp_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - dhcp_id=dhcp_id, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'dhcpId': self._serialize.url("dhcp_id", dhcp_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_dhcp.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}'} # type: ignore - - def list_gateways( - self, - resource_group_name: str, - private_cloud_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.WorkloadNetworkGatewayList"]: - """List of gateways in a private cloud workload network. - - List of gateways in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either WorkloadNetworkGatewayList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~avs_client.models.WorkloadNetworkGatewayList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkGatewayList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_gateways.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('WorkloadNetworkGatewayList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list_gateways.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/gateways'} # type: ignore - - async def get_gateway( - self, - resource_group_name: str, - private_cloud_name: str, - gateway_id: str, - **kwargs: Any - ) -> "_models.WorkloadNetworkGateway": - """Get a gateway by id in a private cloud workload network. - - Get a gateway by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param gateway_id: NSX Gateway identifier. Generally the same as the Gateway's display name. - :type gateway_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkloadNetworkGateway, or the result of cls(response) - :rtype: ~avs_client.models.WorkloadNetworkGateway - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkGateway"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.get_gateway.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'gatewayId': self._serialize.url("gateway_id", gateway_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('WorkloadNetworkGateway', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/gateways/{gatewayId}'} # type: ignore - - def list_port_mirroring( - self, - resource_group_name: str, - private_cloud_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.WorkloadNetworkPortMirroringList"]: - """List of port mirroring profiles in a private cloud workload network. - - List of port mirroring profiles in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either WorkloadNetworkPortMirroringList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~avs_client.models.WorkloadNetworkPortMirroringList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkPortMirroringList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_port_mirroring.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('WorkloadNetworkPortMirroringList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list_port_mirroring.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles'} # type: ignore - - async def get_port_mirroring( - self, - resource_group_name: str, - private_cloud_name: str, - port_mirroring_id: str, - **kwargs: Any - ) -> "_models.WorkloadNetworkPortMirroring": - """Get a port mirroring profile by id in a private cloud workload network. - - Get a port mirroring profile by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param port_mirroring_id: NSX Port Mirroring identifier. Generally the same as the Port - Mirroring display name. - :type port_mirroring_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkloadNetworkPortMirroring, or the result of cls(response) - :rtype: ~avs_client.models.WorkloadNetworkPortMirroring - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkPortMirroring"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.get_port_mirroring.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'portMirroringId': self._serialize.url("port_mirroring_id", port_mirroring_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('WorkloadNetworkPortMirroring', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_port_mirroring.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}'} # type: ignore - - async def _create_port_mirroring_initial( - self, - resource_group_name: str, - private_cloud_name: str, - port_mirroring_id: str, - workload_network_port_mirroring: "_models.WorkloadNetworkPortMirroring", - **kwargs: Any - ) -> "_models.WorkloadNetworkPortMirroring": - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkPortMirroring"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._create_port_mirroring_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'portMirroringId': self._serialize.url("port_mirroring_id", port_mirroring_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(workload_network_port_mirroring, 'WorkloadNetworkPortMirroring') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('WorkloadNetworkPortMirroring', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('WorkloadNetworkPortMirroring', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _create_port_mirroring_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}'} # type: ignore - - async def begin_create_port_mirroring( - self, - resource_group_name: str, - private_cloud_name: str, - port_mirroring_id: str, - workload_network_port_mirroring: "_models.WorkloadNetworkPortMirroring", - **kwargs: Any - ) -> AsyncLROPoller["_models.WorkloadNetworkPortMirroring"]: - """Create a port mirroring profile by id in a private cloud workload network. - - Create a port mirroring profile by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param port_mirroring_id: NSX Port Mirroring identifier. Generally the same as the Port - Mirroring display name. - :type port_mirroring_id: str - :param workload_network_port_mirroring: NSX port mirroring. - :type workload_network_port_mirroring: ~avs_client.models.WorkloadNetworkPortMirroring - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either WorkloadNetworkPortMirroring or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~avs_client.models.WorkloadNetworkPortMirroring] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkPortMirroring"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._create_port_mirroring_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - port_mirroring_id=port_mirroring_id, - workload_network_port_mirroring=workload_network_port_mirroring, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('WorkloadNetworkPortMirroring', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'portMirroringId': self._serialize.url("port_mirroring_id", port_mirroring_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_port_mirroring.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}'} # type: ignore - - async def _update_port_mirroring_initial( - self, - resource_group_name: str, - private_cloud_name: str, - port_mirroring_id: str, - workload_network_port_mirroring: "_models.WorkloadNetworkPortMirroring", - **kwargs: Any - ) -> Optional["_models.WorkloadNetworkPortMirroring"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.WorkloadNetworkPortMirroring"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._update_port_mirroring_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'portMirroringId': self._serialize.url("port_mirroring_id", port_mirroring_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(workload_network_port_mirroring, 'WorkloadNetworkPortMirroring') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WorkloadNetworkPortMirroring', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _update_port_mirroring_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}'} # type: ignore - - async def begin_update_port_mirroring( - self, - resource_group_name: str, - private_cloud_name: str, - port_mirroring_id: str, - workload_network_port_mirroring: "_models.WorkloadNetworkPortMirroring", - **kwargs: Any - ) -> AsyncLROPoller["_models.WorkloadNetworkPortMirroring"]: - """Create or update a port mirroring profile by id in a private cloud workload network. - - Create or update a port mirroring profile by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param port_mirroring_id: NSX Port Mirroring identifier. Generally the same as the Port - Mirroring display name. - :type port_mirroring_id: str - :param workload_network_port_mirroring: NSX port mirroring. - :type workload_network_port_mirroring: ~avs_client.models.WorkloadNetworkPortMirroring - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either WorkloadNetworkPortMirroring or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~avs_client.models.WorkloadNetworkPortMirroring] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkPortMirroring"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._update_port_mirroring_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - port_mirroring_id=port_mirroring_id, - workload_network_port_mirroring=workload_network_port_mirroring, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('WorkloadNetworkPortMirroring', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'portMirroringId': self._serialize.url("port_mirroring_id", port_mirroring_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_port_mirroring.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}'} # type: ignore - - async def _delete_port_mirroring_initial( - self, - resource_group_name: str, - port_mirroring_id: str, - private_cloud_name: str, - **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self._delete_port_mirroring_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'portMirroringId': self._serialize.url("port_mirroring_id", port_mirroring_id, 'str'), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_port_mirroring_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}'} # type: ignore - - async def begin_delete_port_mirroring( - self, - resource_group_name: str, - port_mirroring_id: str, - private_cloud_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Delete a port mirroring profile by id in a private cloud workload network. - - Delete a port mirroring profile by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param port_mirroring_id: NSX Port Mirroring identifier. Generally the same as the Port - Mirroring display name. - :type port_mirroring_id: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._delete_port_mirroring_initial( - resource_group_name=resource_group_name, - port_mirroring_id=port_mirroring_id, - private_cloud_name=private_cloud_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'portMirroringId': self._serialize.url("port_mirroring_id", port_mirroring_id, 'str'), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_port_mirroring.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}'} # type: ignore - - def list_vm_groups( - self, - resource_group_name: str, - private_cloud_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.WorkloadNetworkVMGroupsList"]: - """List of vm groups in a private cloud workload network. - - List of vm groups in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either WorkloadNetworkVMGroupsList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~avs_client.models.WorkloadNetworkVMGroupsList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkVMGroupsList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_vm_groups.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('WorkloadNetworkVMGroupsList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list_vm_groups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups'} # type: ignore - - async def get_vm_group( - self, - resource_group_name: str, - private_cloud_name: str, - vm_group_id: str, - **kwargs: Any - ) -> "_models.WorkloadNetworkVMGroup": - """Get a vm group by id in a private cloud workload network. - - Get a vm group by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param vm_group_id: NSX VM Group identifier. Generally the same as the VM Group's display name. - :type vm_group_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkloadNetworkVMGroup, or the result of cls(response) - :rtype: ~avs_client.models.WorkloadNetworkVMGroup - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkVMGroup"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.get_vm_group.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'vmGroupId': self._serialize.url("vm_group_id", vm_group_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('WorkloadNetworkVMGroup', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_vm_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}'} # type: ignore - - async def _create_vm_group_initial( - self, - resource_group_name: str, - private_cloud_name: str, - vm_group_id: str, - workload_network_vm_group: "_models.WorkloadNetworkVMGroup", - **kwargs: Any - ) -> "_models.WorkloadNetworkVMGroup": - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkVMGroup"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._create_vm_group_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'vmGroupId': self._serialize.url("vm_group_id", vm_group_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(workload_network_vm_group, 'WorkloadNetworkVMGroup') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('WorkloadNetworkVMGroup', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('WorkloadNetworkVMGroup', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _create_vm_group_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}'} # type: ignore - - async def begin_create_vm_group( - self, - resource_group_name: str, - private_cloud_name: str, - vm_group_id: str, - workload_network_vm_group: "_models.WorkloadNetworkVMGroup", - **kwargs: Any - ) -> AsyncLROPoller["_models.WorkloadNetworkVMGroup"]: - """Create a vm group by id in a private cloud workload network. - - Create a vm group by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param vm_group_id: NSX VM Group identifier. Generally the same as the VM Group's display name. - :type vm_group_id: str - :param workload_network_vm_group: NSX VM Group. - :type workload_network_vm_group: ~avs_client.models.WorkloadNetworkVMGroup - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either WorkloadNetworkVMGroup or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~avs_client.models.WorkloadNetworkVMGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkVMGroup"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._create_vm_group_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - vm_group_id=vm_group_id, - workload_network_vm_group=workload_network_vm_group, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('WorkloadNetworkVMGroup', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'vmGroupId': self._serialize.url("vm_group_id", vm_group_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_vm_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}'} # type: ignore - - async def _update_vm_group_initial( - self, - resource_group_name: str, - private_cloud_name: str, - vm_group_id: str, - workload_network_vm_group: "_models.WorkloadNetworkVMGroup", - **kwargs: Any - ) -> Optional["_models.WorkloadNetworkVMGroup"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.WorkloadNetworkVMGroup"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._update_vm_group_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'vmGroupId': self._serialize.url("vm_group_id", vm_group_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(workload_network_vm_group, 'WorkloadNetworkVMGroup') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WorkloadNetworkVMGroup', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _update_vm_group_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}'} # type: ignore - - async def begin_update_vm_group( - self, - resource_group_name: str, - private_cloud_name: str, - vm_group_id: str, - workload_network_vm_group: "_models.WorkloadNetworkVMGroup", - **kwargs: Any - ) -> AsyncLROPoller["_models.WorkloadNetworkVMGroup"]: - """Create or update a vm group by id in a private cloud workload network. - - Create or update a vm group by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param vm_group_id: NSX VM Group identifier. Generally the same as the VM Group's display name. - :type vm_group_id: str - :param workload_network_vm_group: NSX VM Group. - :type workload_network_vm_group: ~avs_client.models.WorkloadNetworkVMGroup - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either WorkloadNetworkVMGroup or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~avs_client.models.WorkloadNetworkVMGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkVMGroup"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._update_vm_group_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - vm_group_id=vm_group_id, - workload_network_vm_group=workload_network_vm_group, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('WorkloadNetworkVMGroup', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'vmGroupId': self._serialize.url("vm_group_id", vm_group_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_vm_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}'} # type: ignore - - async def _delete_vm_group_initial( - self, - resource_group_name: str, - vm_group_id: str, - private_cloud_name: str, - **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self._delete_vm_group_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'vmGroupId': self._serialize.url("vm_group_id", vm_group_id, 'str'), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_vm_group_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}'} # type: ignore - - async def begin_delete_vm_group( - self, - resource_group_name: str, - vm_group_id: str, - private_cloud_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Delete a vm group by id in a private cloud workload network. - - Delete a vm group by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param vm_group_id: NSX VM Group identifier. Generally the same as the VM Group's display name. - :type vm_group_id: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._delete_vm_group_initial( - resource_group_name=resource_group_name, - vm_group_id=vm_group_id, - private_cloud_name=private_cloud_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'vmGroupId': self._serialize.url("vm_group_id", vm_group_id, 'str'), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_vm_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}'} # type: ignore - - def list_virtual_machines( - self, - resource_group_name: str, - private_cloud_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.WorkloadNetworkVirtualMachinesList"]: - """List of virtual machines in a private cloud workload network. - - List of virtual machines in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either WorkloadNetworkVirtualMachinesList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~avs_client.models.WorkloadNetworkVirtualMachinesList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkVirtualMachinesList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_virtual_machines.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('WorkloadNetworkVirtualMachinesList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list_virtual_machines.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/virtualMachines'} # type: ignore - - async def get_virtual_machine( - self, - resource_group_name: str, - private_cloud_name: str, - virtual_machine_id: str, - **kwargs: Any - ) -> "_models.WorkloadNetworkVirtualMachine": - """Get a virtual machine by id in a private cloud workload network. - - Get a virtual machine by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param virtual_machine_id: Virtual Machine identifier. - :type virtual_machine_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkloadNetworkVirtualMachine, or the result of cls(response) - :rtype: ~avs_client.models.WorkloadNetworkVirtualMachine - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkVirtualMachine"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.get_virtual_machine.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'virtualMachineId': self._serialize.url("virtual_machine_id", virtual_machine_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('WorkloadNetworkVirtualMachine', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_virtual_machine.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/virtualMachines/{virtualMachineId}'} # type: ignore - - def list_dns_services( - self, - resource_group_name: str, - private_cloud_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.WorkloadNetworkDnsServicesList"]: - """List of DNS services in a private cloud workload network. - - List of DNS services in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either WorkloadNetworkDnsServicesList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~avs_client.models.WorkloadNetworkDnsServicesList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkDnsServicesList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_dns_services.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('WorkloadNetworkDnsServicesList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list_dns_services.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices'} # type: ignore - - async def get_dns_service( - self, - resource_group_name: str, - private_cloud_name: str, - dns_service_id: str, - **kwargs: Any - ) -> "_models.WorkloadNetworkDnsService": - """Get a DNS service by id in a private cloud workload network. - - Get a DNS service by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param dns_service_id: NSX DNS Service identifier. Generally the same as the DNS Service's - display name. - :type dns_service_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkloadNetworkDnsService, or the result of cls(response) - :rtype: ~avs_client.models.WorkloadNetworkDnsService - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkDnsService"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.get_dns_service.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'dnsServiceId': self._serialize.url("dns_service_id", dns_service_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('WorkloadNetworkDnsService', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_dns_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}'} # type: ignore - - async def _create_dns_service_initial( - self, - resource_group_name: str, - private_cloud_name: str, - dns_service_id: str, - workload_network_dns_service: "_models.WorkloadNetworkDnsService", - **kwargs: Any - ) -> "_models.WorkloadNetworkDnsService": - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkDnsService"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._create_dns_service_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'dnsServiceId': self._serialize.url("dns_service_id", dns_service_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(workload_network_dns_service, 'WorkloadNetworkDnsService') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('WorkloadNetworkDnsService', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('WorkloadNetworkDnsService', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _create_dns_service_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}'} # type: ignore - - async def begin_create_dns_service( - self, - resource_group_name: str, - private_cloud_name: str, - dns_service_id: str, - workload_network_dns_service: "_models.WorkloadNetworkDnsService", - **kwargs: Any - ) -> AsyncLROPoller["_models.WorkloadNetworkDnsService"]: - """Create a DNS service by id in a private cloud workload network. - - Create a DNS service by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param dns_service_id: NSX DNS Service identifier. Generally the same as the DNS Service's - display name. - :type dns_service_id: str - :param workload_network_dns_service: NSX DNS Service. - :type workload_network_dns_service: ~avs_client.models.WorkloadNetworkDnsService - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either WorkloadNetworkDnsService or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~avs_client.models.WorkloadNetworkDnsService] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkDnsService"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._create_dns_service_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - dns_service_id=dns_service_id, - workload_network_dns_service=workload_network_dns_service, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('WorkloadNetworkDnsService', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'dnsServiceId': self._serialize.url("dns_service_id", dns_service_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_dns_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}'} # type: ignore - - async def _update_dns_service_initial( - self, - resource_group_name: str, - private_cloud_name: str, - dns_service_id: str, - workload_network_dns_service: "_models.WorkloadNetworkDnsService", - **kwargs: Any - ) -> Optional["_models.WorkloadNetworkDnsService"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.WorkloadNetworkDnsService"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._update_dns_service_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'dnsServiceId': self._serialize.url("dns_service_id", dns_service_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(workload_network_dns_service, 'WorkloadNetworkDnsService') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WorkloadNetworkDnsService', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _update_dns_service_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}'} # type: ignore - - async def begin_update_dns_service( - self, - resource_group_name: str, - private_cloud_name: str, - dns_service_id: str, - workload_network_dns_service: "_models.WorkloadNetworkDnsService", - **kwargs: Any - ) -> AsyncLROPoller["_models.WorkloadNetworkDnsService"]: - """Create or update a DNS service by id in a private cloud workload network. - - Create or update a DNS service by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param dns_service_id: NSX DNS Service identifier. Generally the same as the DNS Service's - display name. - :type dns_service_id: str - :param workload_network_dns_service: NSX DNS Service. - :type workload_network_dns_service: ~avs_client.models.WorkloadNetworkDnsService - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either WorkloadNetworkDnsService or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~avs_client.models.WorkloadNetworkDnsService] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkDnsService"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._update_dns_service_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - dns_service_id=dns_service_id, - workload_network_dns_service=workload_network_dns_service, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('WorkloadNetworkDnsService', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'dnsServiceId': self._serialize.url("dns_service_id", dns_service_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_dns_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}'} # type: ignore - - async def _delete_dns_service_initial( - self, - resource_group_name: str, - dns_service_id: str, - private_cloud_name: str, - **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self._delete_dns_service_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'dnsServiceId': self._serialize.url("dns_service_id", dns_service_id, 'str'), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_dns_service_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}'} # type: ignore - - async def begin_delete_dns_service( - self, - resource_group_name: str, - dns_service_id: str, - private_cloud_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Delete a DNS service by id in a private cloud workload network. - - Delete a DNS service by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param dns_service_id: NSX DNS Service identifier. Generally the same as the DNS Service's - display name. - :type dns_service_id: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._delete_dns_service_initial( - resource_group_name=resource_group_name, - dns_service_id=dns_service_id, - private_cloud_name=private_cloud_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'dnsServiceId': self._serialize.url("dns_service_id", dns_service_id, 'str'), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_dns_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}'} # type: ignore - - def list_dns_zones( - self, - resource_group_name: str, - private_cloud_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.WorkloadNetworkDnsZonesList"]: - """List of DNS zones in a private cloud workload network. - - List of DNS zones in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either WorkloadNetworkDnsZonesList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~avs_client.models.WorkloadNetworkDnsZonesList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkDnsZonesList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_dns_zones.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('WorkloadNetworkDnsZonesList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list_dns_zones.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones'} # type: ignore - - async def get_dns_zone( - self, - resource_group_name: str, - private_cloud_name: str, - dns_zone_id: str, - **kwargs: Any - ) -> "_models.WorkloadNetworkDnsZone": - """Get a DNS zone by id in a private cloud workload network. - - Get a DNS zone by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param dns_zone_id: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - :type dns_zone_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkloadNetworkDnsZone, or the result of cls(response) - :rtype: ~avs_client.models.WorkloadNetworkDnsZone - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkDnsZone"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.get_dns_zone.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'dnsZoneId': self._serialize.url("dns_zone_id", dns_zone_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('WorkloadNetworkDnsZone', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_dns_zone.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}'} # type: ignore - - async def _create_dns_zone_initial( - self, - resource_group_name: str, - private_cloud_name: str, - dns_zone_id: str, - workload_network_dns_zone: "_models.WorkloadNetworkDnsZone", - **kwargs: Any - ) -> "_models.WorkloadNetworkDnsZone": - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkDnsZone"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._create_dns_zone_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'dnsZoneId': self._serialize.url("dns_zone_id", dns_zone_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(workload_network_dns_zone, 'WorkloadNetworkDnsZone') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('WorkloadNetworkDnsZone', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('WorkloadNetworkDnsZone', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _create_dns_zone_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}'} # type: ignore - - async def begin_create_dns_zone( - self, - resource_group_name: str, - private_cloud_name: str, - dns_zone_id: str, - workload_network_dns_zone: "_models.WorkloadNetworkDnsZone", - **kwargs: Any - ) -> AsyncLROPoller["_models.WorkloadNetworkDnsZone"]: - """Create a DNS zone by id in a private cloud workload network. - - Create a DNS zone by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param dns_zone_id: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - :type dns_zone_id: str - :param workload_network_dns_zone: NSX DNS Zone. - :type workload_network_dns_zone: ~avs_client.models.WorkloadNetworkDnsZone - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either WorkloadNetworkDnsZone or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~avs_client.models.WorkloadNetworkDnsZone] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkDnsZone"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._create_dns_zone_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - dns_zone_id=dns_zone_id, - workload_network_dns_zone=workload_network_dns_zone, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('WorkloadNetworkDnsZone', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'dnsZoneId': self._serialize.url("dns_zone_id", dns_zone_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_dns_zone.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}'} # type: ignore - - async def _update_dns_zone_initial( - self, - resource_group_name: str, - private_cloud_name: str, - dns_zone_id: str, - workload_network_dns_zone: "_models.WorkloadNetworkDnsZone", - **kwargs: Any - ) -> Optional["_models.WorkloadNetworkDnsZone"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.WorkloadNetworkDnsZone"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._update_dns_zone_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'dnsZoneId': self._serialize.url("dns_zone_id", dns_zone_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(workload_network_dns_zone, 'WorkloadNetworkDnsZone') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WorkloadNetworkDnsZone', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _update_dns_zone_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}'} # type: ignore - - async def begin_update_dns_zone( - self, - resource_group_name: str, - private_cloud_name: str, - dns_zone_id: str, - workload_network_dns_zone: "_models.WorkloadNetworkDnsZone", - **kwargs: Any - ) -> AsyncLROPoller["_models.WorkloadNetworkDnsZone"]: - """Create or update a DNS zone by id in a private cloud workload network. - - Create or update a DNS zone by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param dns_zone_id: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - :type dns_zone_id: str - :param workload_network_dns_zone: NSX DNS Zone. - :type workload_network_dns_zone: ~avs_client.models.WorkloadNetworkDnsZone - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either WorkloadNetworkDnsZone or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~avs_client.models.WorkloadNetworkDnsZone] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkDnsZone"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._update_dns_zone_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - dns_zone_id=dns_zone_id, - workload_network_dns_zone=workload_network_dns_zone, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('WorkloadNetworkDnsZone', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'dnsZoneId': self._serialize.url("dns_zone_id", dns_zone_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_dns_zone.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}'} # type: ignore - - async def _delete_dns_zone_initial( - self, - resource_group_name: str, - dns_zone_id: str, - private_cloud_name: str, - **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self._delete_dns_zone_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'dnsZoneId': self._serialize.url("dns_zone_id", dns_zone_id, 'str'), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_dns_zone_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}'} # type: ignore - - async def begin_delete_dns_zone( - self, - resource_group_name: str, - dns_zone_id: str, - private_cloud_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Delete a DNS zone by id in a private cloud workload network. - - Delete a DNS zone by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param dns_zone_id: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - :type dns_zone_id: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._delete_dns_zone_initial( - resource_group_name=resource_group_name, - dns_zone_id=dns_zone_id, - private_cloud_name=private_cloud_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'dnsZoneId': self._serialize.url("dns_zone_id", dns_zone_id, 'str'), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_dns_zone.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}'} # type: ignore - - def list_public_i_ps( - self, - resource_group_name: str, - private_cloud_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.WorkloadNetworkPublicIPsList"]: - """List of Public IP Blocks in a private cloud workload network. - - List of Public IP Blocks in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either WorkloadNetworkPublicIPsList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~avs_client.models.WorkloadNetworkPublicIPsList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkPublicIPsList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_public_i_ps.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('WorkloadNetworkPublicIPsList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list_public_i_ps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs'} # type: ignore - - async def get_public_ip( - self, - resource_group_name: str, - private_cloud_name: str, - public_ip_id: str, - **kwargs: Any - ) -> "_models.WorkloadNetworkPublicIP": - """Get a Public IP Block by id in a private cloud workload network. - - Get a Public IP Block by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param public_ip_id: NSX Public IP Block identifier. Generally the same as the Public IP - Block's display name. - :type public_ip_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkloadNetworkPublicIP, or the result of cls(response) - :rtype: ~avs_client.models.WorkloadNetworkPublicIP - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkPublicIP"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.get_public_ip.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'publicIPId': self._serialize.url("public_ip_id", public_ip_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('WorkloadNetworkPublicIP', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_public_ip.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}'} # type: ignore - - async def _create_public_ip_initial( - self, - resource_group_name: str, - private_cloud_name: str, - public_ip_id: str, - workload_network_public_ip: "_models.WorkloadNetworkPublicIP", - **kwargs: Any - ) -> "_models.WorkloadNetworkPublicIP": - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkPublicIP"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._create_public_ip_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'publicIPId': self._serialize.url("public_ip_id", public_ip_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(workload_network_public_ip, 'WorkloadNetworkPublicIP') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('WorkloadNetworkPublicIP', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('WorkloadNetworkPublicIP', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _create_public_ip_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}'} # type: ignore - - async def begin_create_public_ip( - self, - resource_group_name: str, - private_cloud_name: str, - public_ip_id: str, - workload_network_public_ip: "_models.WorkloadNetworkPublicIP", - **kwargs: Any - ) -> AsyncLROPoller["_models.WorkloadNetworkPublicIP"]: - """Create a Public IP Block by id in a private cloud workload network. - - Create a Public IP Block by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param public_ip_id: NSX Public IP Block identifier. Generally the same as the Public IP - Block's display name. - :type public_ip_id: str - :param workload_network_public_ip: NSX Public IP Block. - :type workload_network_public_ip: ~avs_client.models.WorkloadNetworkPublicIP - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either WorkloadNetworkPublicIP or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~avs_client.models.WorkloadNetworkPublicIP] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkPublicIP"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._create_public_ip_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - public_ip_id=public_ip_id, - workload_network_public_ip=workload_network_public_ip, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('WorkloadNetworkPublicIP', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'publicIPId': self._serialize.url("public_ip_id", public_ip_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_public_ip.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}'} # type: ignore - - async def _delete_public_ip_initial( - self, - resource_group_name: str, - public_ip_id: str, - private_cloud_name: str, - **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self._delete_public_ip_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'publicIPId': self._serialize.url("public_ip_id", public_ip_id, 'str'), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_public_ip_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}'} # type: ignore - - async def begin_delete_public_ip( - self, - resource_group_name: str, - public_ip_id: str, - private_cloud_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Delete a Public IP Block by id in a private cloud workload network. - - Delete a Public IP Block by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param public_ip_id: NSX Public IP Block identifier. Generally the same as the Public IP - Block's display name. - :type public_ip_id: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._delete_public_ip_initial( - resource_group_name=resource_group_name, - public_ip_id=public_ip_id, - private_cloud_name=private_cloud_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'publicIPId': self._serialize.url("public_ip_id", public_ip_id, 'str'), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_public_ip.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}'} # type: ignore diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/models/__init__.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/models/__init__.py deleted file mode 100644 index a3f7f0cd436..00000000000 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/models/__init__.py +++ /dev/null @@ -1,421 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -try: - from ._models_py3 import Addon - from ._models_py3 import AddonArcProperties - from ._models_py3 import AddonHcxProperties - from ._models_py3 import AddonList - from ._models_py3 import AddonProperties - from ._models_py3 import AddonSrmProperties - from ._models_py3 import AddonVrProperties - from ._models_py3 import AdminCredentials - from ._models_py3 import AvailabilityProperties - from ._models_py3 import Circuit - from ._models_py3 import CloudLink - from ._models_py3 import CloudLinkList - from ._models_py3 import Cluster - from ._models_py3 import ClusterList - from ._models_py3 import ClusterProperties - from ._models_py3 import ClusterUpdate - from ._models_py3 import ClusterZone - from ._models_py3 import ClusterZoneList - from ._models_py3 import CommonClusterProperties - from ._models_py3 import Datastore - from ._models_py3 import DatastoreList - from ._models_py3 import DiskPoolVolume - from ._models_py3 import Encryption - from ._models_py3 import EncryptionKeyVaultProperties - from ._models_py3 import Endpoints - from ._models_py3 import ErrorAdditionalInfo - from ._models_py3 import ErrorResponse - from ._models_py3 import ExpressRouteAuthorization - from ._models_py3 import ExpressRouteAuthorizationList - from ._models_py3 import GlobalReachConnection - from ._models_py3 import GlobalReachConnectionList - from ._models_py3 import HcxEnterpriseSite - from ._models_py3 import HcxEnterpriseSiteList - from ._models_py3 import IdentitySource - from ._models_py3 import LogSpecification - from ._models_py3 import ManagementCluster - from ._models_py3 import MetricDimension - from ._models_py3 import MetricSpecification - from ._models_py3 import NetAppVolume - from ._models_py3 import Operation - from ._models_py3 import OperationDisplay - from ._models_py3 import OperationList - from ._models_py3 import OperationProperties - from ._models_py3 import PSCredentialExecutionParameter - from ._models_py3 import PlacementPoliciesList - from ._models_py3 import PlacementPolicy - from ._models_py3 import PlacementPolicyProperties - from ._models_py3 import PlacementPolicyUpdate - from ._models_py3 import PrivateCloud - from ._models_py3 import PrivateCloudIdentity - from ._models_py3 import PrivateCloudList - from ._models_py3 import PrivateCloudProperties - from ._models_py3 import PrivateCloudUpdate - from ._models_py3 import PrivateCloudUpdateProperties - from ._models_py3 import ProxyResource - from ._models_py3 import Quota - from ._models_py3 import Resource - from ._models_py3 import ScriptCmdlet - from ._models_py3 import ScriptCmdletsList - from ._models_py3 import ScriptExecution - from ._models_py3 import ScriptExecutionParameter - from ._models_py3 import ScriptExecutionsList - from ._models_py3 import ScriptPackage - from ._models_py3 import ScriptPackagesList - from ._models_py3 import ScriptParameter - from ._models_py3 import ScriptSecureStringExecutionParameter - from ._models_py3 import ScriptStringExecutionParameter - from ._models_py3 import ServiceSpecification - from ._models_py3 import Sku - from ._models_py3 import TrackedResource - from ._models_py3 import Trial - from ._models_py3 import VirtualMachine - from ._models_py3 import VirtualMachineRestrictMovement - from ._models_py3 import VirtualMachinesList - from ._models_py3 import VmHostPlacementPolicyProperties - from ._models_py3 import VmPlacementPolicyProperties - from ._models_py3 import WorkloadNetwork - from ._models_py3 import WorkloadNetworkDhcp - from ._models_py3 import WorkloadNetworkDhcpEntity - from ._models_py3 import WorkloadNetworkDhcpList - from ._models_py3 import WorkloadNetworkDhcpRelay - from ._models_py3 import WorkloadNetworkDhcpServer - from ._models_py3 import WorkloadNetworkDnsService - from ._models_py3 import WorkloadNetworkDnsServicesList - from ._models_py3 import WorkloadNetworkDnsZone - from ._models_py3 import WorkloadNetworkDnsZonesList - from ._models_py3 import WorkloadNetworkGateway - from ._models_py3 import WorkloadNetworkGatewayList - from ._models_py3 import WorkloadNetworkList - from ._models_py3 import WorkloadNetworkPortMirroring - from ._models_py3 import WorkloadNetworkPortMirroringList - from ._models_py3 import WorkloadNetworkPublicIP - from ._models_py3 import WorkloadNetworkPublicIPsList - from ._models_py3 import WorkloadNetworkSegment - from ._models_py3 import WorkloadNetworkSegmentPortVif - from ._models_py3 import WorkloadNetworkSegmentSubnet - from ._models_py3 import WorkloadNetworkSegmentsList - from ._models_py3 import WorkloadNetworkVMGroup - from ._models_py3 import WorkloadNetworkVMGroupsList - from ._models_py3 import WorkloadNetworkVirtualMachine - from ._models_py3 import WorkloadNetworkVirtualMachinesList -except (SyntaxError, ImportError): - from ._models import Addon # type: ignore - from ._models import AddonArcProperties # type: ignore - from ._models import AddonHcxProperties # type: ignore - from ._models import AddonList # type: ignore - from ._models import AddonProperties # type: ignore - from ._models import AddonSrmProperties # type: ignore - from ._models import AddonVrProperties # type: ignore - from ._models import AdminCredentials # type: ignore - from ._models import AvailabilityProperties # type: ignore - from ._models import Circuit # type: ignore - from ._models import CloudLink # type: ignore - from ._models import CloudLinkList # type: ignore - from ._models import Cluster # type: ignore - from ._models import ClusterList # type: ignore - from ._models import ClusterProperties # type: ignore - from ._models import ClusterUpdate # type: ignore - from ._models import ClusterZone # type: ignore - from ._models import ClusterZoneList # type: ignore - from ._models import CommonClusterProperties # type: ignore - from ._models import Datastore # type: ignore - from ._models import DatastoreList # type: ignore - from ._models import DiskPoolVolume # type: ignore - from ._models import Encryption # type: ignore - from ._models import EncryptionKeyVaultProperties # type: ignore - from ._models import Endpoints # type: ignore - from ._models import ErrorAdditionalInfo # type: ignore - from ._models import ErrorResponse # type: ignore - from ._models import ExpressRouteAuthorization # type: ignore - from ._models import ExpressRouteAuthorizationList # type: ignore - from ._models import GlobalReachConnection # type: ignore - from ._models import GlobalReachConnectionList # type: ignore - from ._models import HcxEnterpriseSite # type: ignore - from ._models import HcxEnterpriseSiteList # type: ignore - from ._models import IdentitySource # type: ignore - from ._models import LogSpecification # type: ignore - from ._models import ManagementCluster # type: ignore - from ._models import MetricDimension # type: ignore - from ._models import MetricSpecification # type: ignore - from ._models import NetAppVolume # type: ignore - from ._models import Operation # type: ignore - from ._models import OperationDisplay # type: ignore - from ._models import OperationList # type: ignore - from ._models import OperationProperties # type: ignore - from ._models import PSCredentialExecutionParameter # type: ignore - from ._models import PlacementPoliciesList # type: ignore - from ._models import PlacementPolicy # type: ignore - from ._models import PlacementPolicyProperties # type: ignore - from ._models import PlacementPolicyUpdate # type: ignore - from ._models import PrivateCloud # type: ignore - from ._models import PrivateCloudIdentity # type: ignore - from ._models import PrivateCloudList # type: ignore - from ._models import PrivateCloudProperties # type: ignore - from ._models import PrivateCloudUpdate # type: ignore - from ._models import PrivateCloudUpdateProperties # type: ignore - from ._models import ProxyResource # type: ignore - from ._models import Quota # type: ignore - from ._models import Resource # type: ignore - from ._models import ScriptCmdlet # type: ignore - from ._models import ScriptCmdletsList # type: ignore - from ._models import ScriptExecution # type: ignore - from ._models import ScriptExecutionParameter # type: ignore - from ._models import ScriptExecutionsList # type: ignore - from ._models import ScriptPackage # type: ignore - from ._models import ScriptPackagesList # type: ignore - from ._models import ScriptParameter # type: ignore - from ._models import ScriptSecureStringExecutionParameter # type: ignore - from ._models import ScriptStringExecutionParameter # type: ignore - from ._models import ServiceSpecification # type: ignore - from ._models import Sku # type: ignore - from ._models import TrackedResource # type: ignore - from ._models import Trial # type: ignore - from ._models import VirtualMachine # type: ignore - from ._models import VirtualMachineRestrictMovement # type: ignore - from ._models import VirtualMachinesList # type: ignore - from ._models import VmHostPlacementPolicyProperties # type: ignore - from ._models import VmPlacementPolicyProperties # type: ignore - from ._models import WorkloadNetwork # type: ignore - from ._models import WorkloadNetworkDhcp # type: ignore - from ._models import WorkloadNetworkDhcpEntity # type: ignore - from ._models import WorkloadNetworkDhcpList # type: ignore - from ._models import WorkloadNetworkDhcpRelay # type: ignore - from ._models import WorkloadNetworkDhcpServer # type: ignore - from ._models import WorkloadNetworkDnsService # type: ignore - from ._models import WorkloadNetworkDnsServicesList # type: ignore - from ._models import WorkloadNetworkDnsZone # type: ignore - from ._models import WorkloadNetworkDnsZonesList # type: ignore - from ._models import WorkloadNetworkGateway # type: ignore - from ._models import WorkloadNetworkGatewayList # type: ignore - from ._models import WorkloadNetworkList # type: ignore - from ._models import WorkloadNetworkPortMirroring # type: ignore - from ._models import WorkloadNetworkPortMirroringList # type: ignore - from ._models import WorkloadNetworkPublicIP # type: ignore - from ._models import WorkloadNetworkPublicIPsList # type: ignore - from ._models import WorkloadNetworkSegment # type: ignore - from ._models import WorkloadNetworkSegmentPortVif # type: ignore - from ._models import WorkloadNetworkSegmentSubnet # type: ignore - from ._models import WorkloadNetworkSegmentsList # type: ignore - from ._models import WorkloadNetworkVMGroup # type: ignore - from ._models import WorkloadNetworkVMGroupsList # type: ignore - from ._models import WorkloadNetworkVirtualMachine # type: ignore - from ._models import WorkloadNetworkVirtualMachinesList # type: ignore - -from ._avs_client_enums import ( - AddonProvisioningState, - AddonType, - AffinityStrength, - AffinityType, - AvailabilityStrategy, - AzureHybridBenefitType, - CloudLinkStatus, - ClusterProvisioningState, - DatastoreProvisioningState, - DatastoreStatus, - DhcpTypeEnum, - DnsServiceLogLevelEnum, - DnsServiceStatusEnum, - EncryptionKeyStatus, - EncryptionState, - EncryptionVersionType, - ExpressRouteAuthorizationProvisioningState, - GlobalReachConnectionProvisioningState, - GlobalReachConnectionStatus, - HcxEnterpriseSiteStatus, - InternetEnum, - MountOptionEnum, - NsxPublicIpQuotaRaisedEnum, - OptionalParamEnum, - PlacementPolicyProvisioningState, - PlacementPolicyState, - PlacementPolicyType, - PortMirroringDirectionEnum, - PortMirroringStatusEnum, - PrivateCloudProvisioningState, - QuotaEnabled, - ResourceIdentityType, - ScriptExecutionParameterType, - ScriptExecutionProvisioningState, - ScriptOutputStreamType, - ScriptParameterTypes, - SegmentStatusEnum, - SslEnum, - TrialStatus, - VMGroupStatusEnum, - VMTypeEnum, - VirtualMachineRestrictMovementState, - VisibilityParameterEnum, - WorkloadNetworkDhcpProvisioningState, - WorkloadNetworkDnsServiceProvisioningState, - WorkloadNetworkDnsZoneProvisioningState, - WorkloadNetworkName, - WorkloadNetworkPortMirroringProvisioningState, - WorkloadNetworkPublicIPProvisioningState, - WorkloadNetworkSegmentProvisioningState, - WorkloadNetworkVMGroupProvisioningState, -) - -__all__ = [ - 'Addon', - 'AddonArcProperties', - 'AddonHcxProperties', - 'AddonList', - 'AddonProperties', - 'AddonSrmProperties', - 'AddonVrProperties', - 'AdminCredentials', - 'AvailabilityProperties', - 'Circuit', - 'CloudLink', - 'CloudLinkList', - 'Cluster', - 'ClusterList', - 'ClusterProperties', - 'ClusterUpdate', - 'ClusterZone', - 'ClusterZoneList', - 'CommonClusterProperties', - 'Datastore', - 'DatastoreList', - 'DiskPoolVolume', - 'Encryption', - 'EncryptionKeyVaultProperties', - 'Endpoints', - 'ErrorAdditionalInfo', - 'ErrorResponse', - 'ExpressRouteAuthorization', - 'ExpressRouteAuthorizationList', - 'GlobalReachConnection', - 'GlobalReachConnectionList', - 'HcxEnterpriseSite', - 'HcxEnterpriseSiteList', - 'IdentitySource', - 'LogSpecification', - 'ManagementCluster', - 'MetricDimension', - 'MetricSpecification', - 'NetAppVolume', - 'Operation', - 'OperationDisplay', - 'OperationList', - 'OperationProperties', - 'PSCredentialExecutionParameter', - 'PlacementPoliciesList', - 'PlacementPolicy', - 'PlacementPolicyProperties', - 'PlacementPolicyUpdate', - 'PrivateCloud', - 'PrivateCloudIdentity', - 'PrivateCloudList', - 'PrivateCloudProperties', - 'PrivateCloudUpdate', - 'PrivateCloudUpdateProperties', - 'ProxyResource', - 'Quota', - 'Resource', - 'ScriptCmdlet', - 'ScriptCmdletsList', - 'ScriptExecution', - 'ScriptExecutionParameter', - 'ScriptExecutionsList', - 'ScriptPackage', - 'ScriptPackagesList', - 'ScriptParameter', - 'ScriptSecureStringExecutionParameter', - 'ScriptStringExecutionParameter', - 'ServiceSpecification', - 'Sku', - 'TrackedResource', - 'Trial', - 'VirtualMachine', - 'VirtualMachineRestrictMovement', - 'VirtualMachinesList', - 'VmHostPlacementPolicyProperties', - 'VmPlacementPolicyProperties', - 'WorkloadNetwork', - 'WorkloadNetworkDhcp', - 'WorkloadNetworkDhcpEntity', - 'WorkloadNetworkDhcpList', - 'WorkloadNetworkDhcpRelay', - 'WorkloadNetworkDhcpServer', - 'WorkloadNetworkDnsService', - 'WorkloadNetworkDnsServicesList', - 'WorkloadNetworkDnsZone', - 'WorkloadNetworkDnsZonesList', - 'WorkloadNetworkGateway', - 'WorkloadNetworkGatewayList', - 'WorkloadNetworkList', - 'WorkloadNetworkPortMirroring', - 'WorkloadNetworkPortMirroringList', - 'WorkloadNetworkPublicIP', - 'WorkloadNetworkPublicIPsList', - 'WorkloadNetworkSegment', - 'WorkloadNetworkSegmentPortVif', - 'WorkloadNetworkSegmentSubnet', - 'WorkloadNetworkSegmentsList', - 'WorkloadNetworkVMGroup', - 'WorkloadNetworkVMGroupsList', - 'WorkloadNetworkVirtualMachine', - 'WorkloadNetworkVirtualMachinesList', - 'AddonProvisioningState', - 'AddonType', - 'AffinityStrength', - 'AffinityType', - 'AvailabilityStrategy', - 'AzureHybridBenefitType', - 'CloudLinkStatus', - 'ClusterProvisioningState', - 'DatastoreProvisioningState', - 'DatastoreStatus', - 'DhcpTypeEnum', - 'DnsServiceLogLevelEnum', - 'DnsServiceStatusEnum', - 'EncryptionKeyStatus', - 'EncryptionState', - 'EncryptionVersionType', - 'ExpressRouteAuthorizationProvisioningState', - 'GlobalReachConnectionProvisioningState', - 'GlobalReachConnectionStatus', - 'HcxEnterpriseSiteStatus', - 'InternetEnum', - 'MountOptionEnum', - 'NsxPublicIpQuotaRaisedEnum', - 'OptionalParamEnum', - 'PlacementPolicyProvisioningState', - 'PlacementPolicyState', - 'PlacementPolicyType', - 'PortMirroringDirectionEnum', - 'PortMirroringStatusEnum', - 'PrivateCloudProvisioningState', - 'QuotaEnabled', - 'ResourceIdentityType', - 'ScriptExecutionParameterType', - 'ScriptExecutionProvisioningState', - 'ScriptOutputStreamType', - 'ScriptParameterTypes', - 'SegmentStatusEnum', - 'SslEnum', - 'TrialStatus', - 'VMGroupStatusEnum', - 'VMTypeEnum', - 'VirtualMachineRestrictMovementState', - 'VisibilityParameterEnum', - 'WorkloadNetworkDhcpProvisioningState', - 'WorkloadNetworkDnsServiceProvisioningState', - 'WorkloadNetworkDnsZoneProvisioningState', - 'WorkloadNetworkName', - 'WorkloadNetworkPortMirroringProvisioningState', - 'WorkloadNetworkPublicIPProvisioningState', - 'WorkloadNetworkSegmentProvisioningState', - 'WorkloadNetworkVMGroupProvisioningState', -] diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/models/_avs_client_enums.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/models/_avs_client_enums.py deleted file mode 100644 index 0602965b52b..00000000000 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/models/_avs_client_enums.py +++ /dev/null @@ -1,470 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum, EnumMeta -from six import with_metaclass - -class _CaseInsensitiveEnumMeta(EnumMeta): - def __getitem__(self, name): - return super().__getitem__(name.upper()) - - def __getattr__(cls, name): - """Return the enum member matching `name` - We use __getattr__ instead of descriptors or inserting into the enum - class' __dict__ in order to support `name` and `value` being both - properties for enum members (which live in the class' __dict__) and - enum members themselves. - """ - try: - return cls._member_map_[name.upper()] - except KeyError: - raise AttributeError(name) - - -class AddonProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The state of the addon provisioning - """ - - SUCCEEDED = "Succeeded" - FAILED = "Failed" - CANCELLED = "Cancelled" - BUILDING = "Building" - DELETING = "Deleting" - UPDATING = "Updating" - CANCELED = "Canceled" - -class AddonType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The type of private cloud addon - """ - - SRM = "SRM" - VR = "VR" - HCX = "HCX" - ARC = "Arc" - -class AffinityStrength(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """VM-Host placement policy affinity strength (should/must) - """ - - SHOULD = "Should" - MUST = "Must" - -class AffinityType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Placement policy affinity type - """ - - AFFINITY = "Affinity" - ANTI_AFFINITY = "AntiAffinity" - -class AvailabilityStrategy(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The availability strategy for the private cloud - """ - - SINGLE_ZONE = "SingleZone" - DUAL_ZONE = "DualZone" - -class AzureHybridBenefitType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Placement policy hosts opt-in Azure Hybrid Benefit type - """ - - SQL_HOST = "SqlHost" - NONE = "None" - -class CloudLinkStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The state of the cloud link. - """ - - ACTIVE = "Active" - BUILDING = "Building" - DELETING = "Deleting" - FAILED = "Failed" - DISCONNECTED = "Disconnected" - -class ClusterProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The state of the cluster provisioning - """ - - SUCCEEDED = "Succeeded" - FAILED = "Failed" - CANCELLED = "Cancelled" - DELETING = "Deleting" - UPDATING = "Updating" - CANCELED = "Canceled" - -class DatastoreProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The state of the datastore provisioning - """ - - SUCCEEDED = "Succeeded" - FAILED = "Failed" - CANCELLED = "Cancelled" - PENDING = "Pending" - CREATING = "Creating" - UPDATING = "Updating" - DELETING = "Deleting" - CANCELED = "Canceled" - -class DatastoreStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The operational status of the datastore - """ - - UNKNOWN = "Unknown" - ACCESSIBLE = "Accessible" - INACCESSIBLE = "Inaccessible" - ATTACHED = "Attached" - DETACHED = "Detached" - LOST_COMMUNICATION = "LostCommunication" - DEAD_OR_ERROR = "DeadOrError" - -class DhcpTypeEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Type of DHCP: SERVER or RELAY. - """ - - SERVER = "SERVER" - RELAY = "RELAY" - -class DnsServiceLogLevelEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """DNS Service log level. - """ - - DEBUG = "DEBUG" - INFO = "INFO" - WARNING = "WARNING" - ERROR = "ERROR" - FATAL = "FATAL" - -class DnsServiceStatusEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """DNS Service status. - """ - - SUCCESS = "SUCCESS" - FAILURE = "FAILURE" - -class EncryptionKeyStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The state of key provided - """ - - CONNECTED = "Connected" - ACCESS_DENIED = "AccessDenied" - -class EncryptionState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Status of customer managed encryption key - """ - - ENABLED = "Enabled" - DISABLED = "Disabled" - -class EncryptionVersionType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Property of the key if user provided or auto detected - """ - - FIXED = "Fixed" - AUTO_DETECTED = "AutoDetected" - -class ExpressRouteAuthorizationProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The state of the ExpressRoute Circuit Authorization provisioning - """ - - SUCCEEDED = "Succeeded" - FAILED = "Failed" - UPDATING = "Updating" - CANCELED = "Canceled" - -class GlobalReachConnectionProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The state of the ExpressRoute Circuit Authorization provisioning - """ - - SUCCEEDED = "Succeeded" - FAILED = "Failed" - UPDATING = "Updating" - CANCELED = "Canceled" - -class GlobalReachConnectionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The connection status of the global reach connection - """ - - CONNECTED = "Connected" - CONNECTING = "Connecting" - DISCONNECTED = "Disconnected" - -class HcxEnterpriseSiteStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The status of the HCX Enterprise Site - """ - - AVAILABLE = "Available" - CONSUMED = "Consumed" - DEACTIVATED = "Deactivated" - DELETED = "Deleted" - -class InternetEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Connectivity to internet is enabled or disabled - """ - - ENABLED = "Enabled" - DISABLED = "Disabled" - -class MountOptionEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Mode that describes whether the LUN has to be mounted as a datastore or attached as a LUN - """ - - MOUNT = "MOUNT" - ATTACH = "ATTACH" - -class NsxPublicIpQuotaRaisedEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Flag to indicate whether the private cloud has the quota for provisioned NSX Public IP count - raised from 64 to 1024 - """ - - ENABLED = "Enabled" - DISABLED = "Disabled" - -class OptionalParamEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Is this parameter required or optional - """ - - OPTIONAL = "Optional" - REQUIRED = "Required" - -class PlacementPolicyProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The provisioning state - """ - - SUCCEEDED = "Succeeded" - FAILED = "Failed" - BUILDING = "Building" - DELETING = "Deleting" - UPDATING = "Updating" - CANCELED = "Canceled" - -class PlacementPolicyState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Whether the placement policy is enabled or disabled - """ - - ENABLED = "Enabled" - DISABLED = "Disabled" - -class PlacementPolicyType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """placement policy type - """ - - VM_VM = "VmVm" - VM_HOST = "VmHost" - -class PortMirroringDirectionEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Direction of port mirroring profile. - """ - - INGRESS = "INGRESS" - EGRESS = "EGRESS" - BIDIRECTIONAL = "BIDIRECTIONAL" - -class PortMirroringStatusEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Port Mirroring Status. - """ - - SUCCESS = "SUCCESS" - FAILURE = "FAILURE" - -class PrivateCloudProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The provisioning state - """ - - SUCCEEDED = "Succeeded" - FAILED = "Failed" - CANCELLED = "Cancelled" - PENDING = "Pending" - BUILDING = "Building" - DELETING = "Deleting" - UPDATING = "Updating" - CANCELED = "Canceled" - -class QuotaEnabled(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Host quota is active for current subscription - """ - - ENABLED = "Enabled" - DISABLED = "Disabled" - -class ResourceIdentityType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The type of identity used for the private cloud. The type 'SystemAssigned' refers to an - implicitly created identity. The type 'None' will remove any identities from the Private Cloud. - """ - - SYSTEM_ASSIGNED = "SystemAssigned" - NONE = "None" - -class ScriptExecutionParameterType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The type of execution parameter - """ - - VALUE = "Value" - SECURE_VALUE = "SecureValue" - CREDENTIAL = "Credential" - -class ScriptExecutionProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The state of the script execution resource - """ - - PENDING = "Pending" - RUNNING = "Running" - SUCCEEDED = "Succeeded" - FAILED = "Failed" - CANCELLING = "Cancelling" - CANCELLED = "Cancelled" - DELETING = "Deleting" - CANCELED = "Canceled" - -class ScriptOutputStreamType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - - INFORMATION = "Information" - WARNING = "Warning" - OUTPUT = "Output" - ERROR = "Error" - -class ScriptParameterTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The type of parameter the script is expecting. psCredential is a PSCredentialObject - """ - - STRING = "String" - SECURE_STRING = "SecureString" - CREDENTIAL = "Credential" - INT = "Int" - BOOL = "Bool" - FLOAT = "Float" - -class SegmentStatusEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Segment status. - """ - - SUCCESS = "SUCCESS" - FAILURE = "FAILURE" - -class SslEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Protect LDAP communication using SSL certificate (LDAPS) - """ - - ENABLED = "Enabled" - DISABLED = "Disabled" - -class TrialStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Trial status - """ - - TRIAL_AVAILABLE = "TrialAvailable" - TRIAL_USED = "TrialUsed" - TRIAL_DISABLED = "TrialDisabled" - -class VirtualMachineRestrictMovementState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Whether VM DRS-driven movement is restricted (enabled) or not (disabled) - """ - - ENABLED = "Enabled" - DISABLED = "Disabled" - -class VisibilityParameterEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Should this parameter be visible to arm and passed in the parameters argument when executing - """ - - VISIBLE = "Visible" - HIDDEN = "Hidden" - -class VMGroupStatusEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """VM Group status. - """ - - SUCCESS = "SUCCESS" - FAILURE = "FAILURE" - -class VMTypeEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Virtual machine type. - """ - - REGULAR = "REGULAR" - EDGE = "EDGE" - SERVICE = "SERVICE" - -class WorkloadNetworkDhcpProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The provisioning state - """ - - SUCCEEDED = "Succeeded" - FAILED = "Failed" - BUILDING = "Building" - DELETING = "Deleting" - UPDATING = "Updating" - CANCELED = "Canceled" - -class WorkloadNetworkDnsServiceProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The provisioning state - """ - - SUCCEEDED = "Succeeded" - FAILED = "Failed" - BUILDING = "Building" - DELETING = "Deleting" - UPDATING = "Updating" - CANCELED = "Canceled" - -class WorkloadNetworkDnsZoneProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The provisioning state - """ - - SUCCEEDED = "Succeeded" - FAILED = "Failed" - BUILDING = "Building" - DELETING = "Deleting" - UPDATING = "Updating" - CANCELED = "Canceled" - -class WorkloadNetworkName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - - DEFAULT = "default" - -class WorkloadNetworkPortMirroringProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The provisioning state - """ - - SUCCEEDED = "Succeeded" - FAILED = "Failed" - BUILDING = "Building" - DELETING = "Deleting" - UPDATING = "Updating" - CANCELED = "Canceled" - -class WorkloadNetworkPublicIPProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The provisioning state - """ - - SUCCEEDED = "Succeeded" - FAILED = "Failed" - BUILDING = "Building" - DELETING = "Deleting" - UPDATING = "Updating" - CANCELED = "Canceled" - -class WorkloadNetworkSegmentProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The provisioning state - """ - - SUCCEEDED = "Succeeded" - FAILED = "Failed" - BUILDING = "Building" - DELETING = "Deleting" - UPDATING = "Updating" - CANCELED = "Canceled" - -class WorkloadNetworkVMGroupProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The provisioning state - """ - - SUCCEEDED = "Succeeded" - FAILED = "Failed" - BUILDING = "Building" - DELETING = "Deleting" - UPDATING = "Updating" - CANCELED = "Canceled" diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/models/_models.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/models/_models.py deleted file mode 100644 index df5ffb5d48b..00000000000 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/models/_models.py +++ /dev/null @@ -1,4115 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -import msrest.serialization - - -class Resource(msrest.serialization.Model): - """The core properties of ARM resources. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class Addon(Resource): - """An addon resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param properties: The properties of an addon resource. - :type properties: ~avs_client.models.AddonProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AddonProperties'}, - } - - def __init__( - self, - **kwargs - ): - super(Addon, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - - -class AddonProperties(msrest.serialization.Model): - """The properties of an addon. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AddonArcProperties, AddonHcxProperties, AddonSrmProperties, AddonVrProperties. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param addon_type: Required. The type of private cloud addon.Constant filled by server. - Possible values include: "SRM", "VR", "HCX", "Arc". - :type addon_type: str or ~avs_client.models.AddonType - :ivar provisioning_state: The state of the addon provisioning. Possible values include: - "Succeeded", "Failed", "Cancelled", "Building", "Deleting", "Updating", "Canceled". - :vartype provisioning_state: str or ~avs_client.models.AddonProvisioningState - """ - - _validation = { - 'addon_type': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'addon_type': {'key': 'addonType', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - } - - _subtype_map = { - 'addon_type': {'Arc': 'AddonArcProperties', 'HCX': 'AddonHcxProperties', 'SRM': 'AddonSrmProperties', 'VR': 'AddonVrProperties'} - } - - def __init__( - self, - **kwargs - ): - super(AddonProperties, self).__init__(**kwargs) - self.addon_type = None # type: Optional[str] - self.provisioning_state = None - - -class AddonArcProperties(AddonProperties): - """The properties of an Arc addon. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param addon_type: Required. The type of private cloud addon.Constant filled by server. - Possible values include: "SRM", "VR", "HCX", "Arc". - :type addon_type: str or ~avs_client.models.AddonType - :ivar provisioning_state: The state of the addon provisioning. Possible values include: - "Succeeded", "Failed", "Cancelled", "Building", "Deleting", "Updating", "Canceled". - :vartype provisioning_state: str or ~avs_client.models.AddonProvisioningState - :param v_center: The VMware vCenter resource ID. - :type v_center: str - """ - - _validation = { - 'addon_type': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'addon_type': {'key': 'addonType', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'v_center': {'key': 'vCenter', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(AddonArcProperties, self).__init__(**kwargs) - self.addon_type = 'Arc' # type: str - self.v_center = kwargs.get('v_center', None) - - -class AddonHcxProperties(AddonProperties): - """The properties of an HCX addon. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param addon_type: Required. The type of private cloud addon.Constant filled by server. - Possible values include: "SRM", "VR", "HCX", "Arc". - :type addon_type: str or ~avs_client.models.AddonType - :ivar provisioning_state: The state of the addon provisioning. Possible values include: - "Succeeded", "Failed", "Cancelled", "Building", "Deleting", "Updating", "Canceled". - :vartype provisioning_state: str or ~avs_client.models.AddonProvisioningState - :param offer: Required. The HCX offer, example VMware MaaS Cloud Provider (Enterprise). - :type offer: str - """ - - _validation = { - 'addon_type': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'offer': {'required': True}, - } - - _attribute_map = { - 'addon_type': {'key': 'addonType', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'offer': {'key': 'offer', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(AddonHcxProperties, self).__init__(**kwargs) - self.addon_type = 'HCX' # type: str - self.offer = kwargs['offer'] - - -class AddonList(msrest.serialization.Model): - """A paged list of addons. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The items on a page. - :vartype value: list[~avs_client.models.Addon] - :ivar next_link: URL to get the next page if any. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Addon]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(AddonList, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class AddonSrmProperties(AddonProperties): - """The properties of a Site Recovery Manager (SRM) addon. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param addon_type: Required. The type of private cloud addon.Constant filled by server. - Possible values include: "SRM", "VR", "HCX", "Arc". - :type addon_type: str or ~avs_client.models.AddonType - :ivar provisioning_state: The state of the addon provisioning. Possible values include: - "Succeeded", "Failed", "Cancelled", "Building", "Deleting", "Updating", "Canceled". - :vartype provisioning_state: str or ~avs_client.models.AddonProvisioningState - :param license_key: The Site Recovery Manager (SRM) license. - :type license_key: str - """ - - _validation = { - 'addon_type': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'addon_type': {'key': 'addonType', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'license_key': {'key': 'licenseKey', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(AddonSrmProperties, self).__init__(**kwargs) - self.addon_type = 'SRM' # type: str - self.license_key = kwargs.get('license_key', None) - - -class AddonVrProperties(AddonProperties): - """The properties of a vSphere Replication (VR) addon. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param addon_type: Required. The type of private cloud addon.Constant filled by server. - Possible values include: "SRM", "VR", "HCX", "Arc". - :type addon_type: str or ~avs_client.models.AddonType - :ivar provisioning_state: The state of the addon provisioning. Possible values include: - "Succeeded", "Failed", "Cancelled", "Building", "Deleting", "Updating", "Canceled". - :vartype provisioning_state: str or ~avs_client.models.AddonProvisioningState - :param vrs_count: Required. The vSphere Replication Server (VRS) count. - :type vrs_count: int - """ - - _validation = { - 'addon_type': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'vrs_count': {'required': True}, - } - - _attribute_map = { - 'addon_type': {'key': 'addonType', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'vrs_count': {'key': 'vrsCount', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(AddonVrProperties, self).__init__(**kwargs) - self.addon_type = 'VR' # type: str - self.vrs_count = kwargs['vrs_count'] - - -class AdminCredentials(msrest.serialization.Model): - """Administrative credentials for accessing vCenter and NSX-T. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar nsxt_username: NSX-T Manager username. - :vartype nsxt_username: str - :ivar nsxt_password: NSX-T Manager password. - :vartype nsxt_password: str - :ivar vcenter_username: vCenter admin username. - :vartype vcenter_username: str - :ivar vcenter_password: vCenter admin password. - :vartype vcenter_password: str - """ - - _validation = { - 'nsxt_username': {'readonly': True}, - 'nsxt_password': {'readonly': True}, - 'vcenter_username': {'readonly': True}, - 'vcenter_password': {'readonly': True}, - } - - _attribute_map = { - 'nsxt_username': {'key': 'nsxtUsername', 'type': 'str'}, - 'nsxt_password': {'key': 'nsxtPassword', 'type': 'str'}, - 'vcenter_username': {'key': 'vcenterUsername', 'type': 'str'}, - 'vcenter_password': {'key': 'vcenterPassword', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(AdminCredentials, self).__init__(**kwargs) - self.nsxt_username = None - self.nsxt_password = None - self.vcenter_username = None - self.vcenter_password = None - - -class AvailabilityProperties(msrest.serialization.Model): - """The properties describing private cloud availability zone distribution. - - :param strategy: The availability strategy for the private cloud. Possible values include: - "SingleZone", "DualZone". - :type strategy: str or ~avs_client.models.AvailabilityStrategy - :param zone: The primary availability zone for the private cloud. - :type zone: int - :param secondary_zone: The secondary availability zone for the private cloud. - :type secondary_zone: int - """ - - _attribute_map = { - 'strategy': {'key': 'strategy', 'type': 'str'}, - 'zone': {'key': 'zone', 'type': 'int'}, - 'secondary_zone': {'key': 'secondaryZone', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(AvailabilityProperties, self).__init__(**kwargs) - self.strategy = kwargs.get('strategy', None) - self.zone = kwargs.get('zone', None) - self.secondary_zone = kwargs.get('secondary_zone', None) - - -class Circuit(msrest.serialization.Model): - """An ExpressRoute Circuit. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar primary_subnet: CIDR of primary subnet. - :vartype primary_subnet: str - :ivar secondary_subnet: CIDR of secondary subnet. - :vartype secondary_subnet: str - :ivar express_route_id: Identifier of the ExpressRoute Circuit (Microsoft Colo only). - :vartype express_route_id: str - :ivar express_route_private_peering_id: ExpressRoute Circuit private peering identifier. - :vartype express_route_private_peering_id: str - """ - - _validation = { - 'primary_subnet': {'readonly': True}, - 'secondary_subnet': {'readonly': True}, - 'express_route_id': {'readonly': True}, - 'express_route_private_peering_id': {'readonly': True}, - } - - _attribute_map = { - 'primary_subnet': {'key': 'primarySubnet', 'type': 'str'}, - 'secondary_subnet': {'key': 'secondarySubnet', 'type': 'str'}, - 'express_route_id': {'key': 'expressRouteID', 'type': 'str'}, - 'express_route_private_peering_id': {'key': 'expressRoutePrivatePeeringID', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(Circuit, self).__init__(**kwargs) - self.primary_subnet = None - self.secondary_subnet = None - self.express_route_id = None - self.express_route_private_peering_id = None - - -class CloudLink(Resource): - """A cloud link resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar status: The state of the cloud link. Possible values include: "Active", "Building", - "Deleting", "Failed", "Disconnected". - :vartype status: str or ~avs_client.models.CloudLinkStatus - :param linked_cloud: Identifier of the other private cloud participating in the link. - :type linked_cloud: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'linked_cloud': {'key': 'properties.linkedCloud', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(CloudLink, self).__init__(**kwargs) - self.status = None - self.linked_cloud = kwargs.get('linked_cloud', None) - - -class CloudLinkList(msrest.serialization.Model): - """A paged list of cloud links. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The items on a page. - :vartype value: list[~avs_client.models.CloudLink] - :ivar next_link: URL to get the next page if any. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[CloudLink]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(CloudLinkList, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class Cluster(Resource): - """A cluster resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param sku: Required. The cluster SKU. - :type sku: ~avs_client.models.Sku - :param cluster_size: The cluster size. - :type cluster_size: int - :ivar provisioning_state: The state of the cluster provisioning. Possible values include: - "Succeeded", "Failed", "Cancelled", "Deleting", "Updating", "Canceled". - :vartype provisioning_state: str or ~avs_client.models.ClusterProvisioningState - :ivar cluster_id: The identity. - :vartype cluster_id: int - :param hosts: The hosts. - :type hosts: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'sku': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'cluster_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'cluster_size': {'key': 'properties.clusterSize', 'type': 'int'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'cluster_id': {'key': 'properties.clusterId', 'type': 'int'}, - 'hosts': {'key': 'properties.hosts', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - super(Cluster, self).__init__(**kwargs) - self.sku = kwargs['sku'] - self.cluster_size = kwargs.get('cluster_size', None) - self.provisioning_state = None - self.cluster_id = None - self.hosts = kwargs.get('hosts', None) - - -class ClusterList(msrest.serialization.Model): - """A paged list of clusters. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The items on a page. - :vartype value: list[~avs_client.models.Cluster] - :ivar next_link: URL to get the next page if any. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Cluster]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ClusterList, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class CommonClusterProperties(msrest.serialization.Model): - """The common properties of a cluster. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param cluster_size: The cluster size. - :type cluster_size: int - :ivar provisioning_state: The state of the cluster provisioning. Possible values include: - "Succeeded", "Failed", "Cancelled", "Deleting", "Updating", "Canceled". - :vartype provisioning_state: str or ~avs_client.models.ClusterProvisioningState - :ivar cluster_id: The identity. - :vartype cluster_id: int - :param hosts: The hosts. - :type hosts: list[str] - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - 'cluster_id': {'readonly': True}, - } - - _attribute_map = { - 'cluster_size': {'key': 'clusterSize', 'type': 'int'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'cluster_id': {'key': 'clusterId', 'type': 'int'}, - 'hosts': {'key': 'hosts', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - super(CommonClusterProperties, self).__init__(**kwargs) - self.cluster_size = kwargs.get('cluster_size', None) - self.provisioning_state = None - self.cluster_id = None - self.hosts = kwargs.get('hosts', None) - - -class ClusterProperties(CommonClusterProperties): - """The properties of a cluster. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param cluster_size: The cluster size. - :type cluster_size: int - :ivar provisioning_state: The state of the cluster provisioning. Possible values include: - "Succeeded", "Failed", "Cancelled", "Deleting", "Updating", "Canceled". - :vartype provisioning_state: str or ~avs_client.models.ClusterProvisioningState - :ivar cluster_id: The identity. - :vartype cluster_id: int - :param hosts: The hosts. - :type hosts: list[str] - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - 'cluster_id': {'readonly': True}, - } - - _attribute_map = { - 'cluster_size': {'key': 'clusterSize', 'type': 'int'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'cluster_id': {'key': 'clusterId', 'type': 'int'}, - 'hosts': {'key': 'hosts', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - super(ClusterProperties, self).__init__(**kwargs) - - -class ClusterUpdate(msrest.serialization.Model): - """An update of a cluster resource. - - :param cluster_size: The cluster size. - :type cluster_size: int - :param hosts: The hosts. - :type hosts: list[str] - """ - - _attribute_map = { - 'cluster_size': {'key': 'properties.clusterSize', 'type': 'int'}, - 'hosts': {'key': 'properties.hosts', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - super(ClusterUpdate, self).__init__(**kwargs) - self.cluster_size = kwargs.get('cluster_size', None) - self.hosts = kwargs.get('hosts', None) - - -class ClusterZone(msrest.serialization.Model): - """Zone and associated hosts info. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar hosts: List of hosts belonging to the availability zone in a cluster. - :vartype hosts: list[str] - :ivar zone: Availability zone identifier. - :vartype zone: str - """ - - _validation = { - 'hosts': {'readonly': True}, - 'zone': {'readonly': True}, - } - - _attribute_map = { - 'hosts': {'key': 'hosts', 'type': '[str]'}, - 'zone': {'key': 'zone', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ClusterZone, self).__init__(**kwargs) - self.hosts = None - self.zone = None - - -class ClusterZoneList(msrest.serialization.Model): - """List of all zones and associated hosts for a cluster. - - :param zones: Zone and associated hosts info. - :type zones: list[~avs_client.models.ClusterZone] - """ - - _attribute_map = { - 'zones': {'key': 'zones', 'type': '[ClusterZone]'}, - } - - def __init__( - self, - **kwargs - ): - super(ClusterZoneList, self).__init__(**kwargs) - self.zones = kwargs.get('zones', None) - - -class Datastore(Resource): - """A datastore resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar provisioning_state: The state of the datastore provisioning. Possible values include: - "Succeeded", "Failed", "Cancelled", "Pending", "Creating", "Updating", "Deleting", "Canceled". - :vartype provisioning_state: str or ~avs_client.models.DatastoreProvisioningState - :param net_app_volume: An Azure NetApp Files volume. - :type net_app_volume: ~avs_client.models.NetAppVolume - :param disk_pool_volume: An iSCSI volume. - :type disk_pool_volume: ~avs_client.models.DiskPoolVolume - :ivar status: The operational status of the datastore. Possible values include: "Unknown", - "Accessible", "Inaccessible", "Attached", "Detached", "LostCommunication", "DeadOrError". - :vartype status: str or ~avs_client.models.DatastoreStatus - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'net_app_volume': {'key': 'properties.netAppVolume', 'type': 'NetAppVolume'}, - 'disk_pool_volume': {'key': 'properties.diskPoolVolume', 'type': 'DiskPoolVolume'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(Datastore, self).__init__(**kwargs) - self.provisioning_state = None - self.net_app_volume = kwargs.get('net_app_volume', None) - self.disk_pool_volume = kwargs.get('disk_pool_volume', None) - self.status = None - - -class DatastoreList(msrest.serialization.Model): - """A paged list of datastores. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The items on a page. - :vartype value: list[~avs_client.models.Datastore] - :ivar next_link: URL to get the next page if any. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Datastore]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(DatastoreList, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class DiskPoolVolume(msrest.serialization.Model): - """An iSCSI volume from Microsoft.StoragePool provider. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param target_id: Required. Azure resource ID of the iSCSI target. - :type target_id: str - :param lun_name: Required. Name of the LUN to be used for datastore. - :type lun_name: str - :param mount_option: Mode that describes whether the LUN has to be mounted as a datastore or - attached as a LUN. Possible values include: "MOUNT", "ATTACH". Default value: "MOUNT". - :type mount_option: str or ~avs_client.models.MountOptionEnum - :ivar path: Device path. - :vartype path: str - """ - - _validation = { - 'target_id': {'required': True}, - 'lun_name': {'required': True}, - 'path': {'readonly': True}, - } - - _attribute_map = { - 'target_id': {'key': 'targetId', 'type': 'str'}, - 'lun_name': {'key': 'lunName', 'type': 'str'}, - 'mount_option': {'key': 'mountOption', 'type': 'str'}, - 'path': {'key': 'path', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(DiskPoolVolume, self).__init__(**kwargs) - self.target_id = kwargs['target_id'] - self.lun_name = kwargs['lun_name'] - self.mount_option = kwargs.get('mount_option', "MOUNT") - self.path = None - - -class Encryption(msrest.serialization.Model): - """The properties of customer managed encryption key. - - :param status: Status of customer managed encryption key. Possible values include: "Enabled", - "Disabled". - :type status: str or ~avs_client.models.EncryptionState - :param key_vault_properties: The key vault where the encryption key is stored. - :type key_vault_properties: ~avs_client.models.EncryptionKeyVaultProperties - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'key_vault_properties': {'key': 'keyVaultProperties', 'type': 'EncryptionKeyVaultProperties'}, - } - - def __init__( - self, - **kwargs - ): - super(Encryption, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.key_vault_properties = kwargs.get('key_vault_properties', None) - - -class EncryptionKeyVaultProperties(msrest.serialization.Model): - """An Encryption Key. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param key_name: The name of the key. - :type key_name: str - :param key_version: The version of the key. - :type key_version: str - :ivar auto_detected_key_version: The auto-detected version of the key if versionType is - auto-detected. - :vartype auto_detected_key_version: str - :param key_vault_url: The URL of the vault. - :type key_vault_url: str - :ivar key_state: The state of key provided. Possible values include: "Connected", - "AccessDenied". - :vartype key_state: str or ~avs_client.models.EncryptionKeyStatus - :ivar version_type: Property of the key if user provided or auto detected. Possible values - include: "Fixed", "AutoDetected". - :vartype version_type: str or ~avs_client.models.EncryptionVersionType - """ - - _validation = { - 'auto_detected_key_version': {'readonly': True}, - 'key_state': {'readonly': True}, - 'version_type': {'readonly': True}, - } - - _attribute_map = { - 'key_name': {'key': 'keyName', 'type': 'str'}, - 'key_version': {'key': 'keyVersion', 'type': 'str'}, - 'auto_detected_key_version': {'key': 'autoDetectedKeyVersion', 'type': 'str'}, - 'key_vault_url': {'key': 'keyVaultUrl', 'type': 'str'}, - 'key_state': {'key': 'keyState', 'type': 'str'}, - 'version_type': {'key': 'versionType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(EncryptionKeyVaultProperties, self).__init__(**kwargs) - self.key_name = kwargs.get('key_name', None) - self.key_version = kwargs.get('key_version', None) - self.auto_detected_key_version = None - self.key_vault_url = kwargs.get('key_vault_url', None) - self.key_state = None - self.version_type = None - - -class Endpoints(msrest.serialization.Model): - """Endpoint addresses. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar nsxt_manager: Endpoint for the NSX-T Data Center manager. - :vartype nsxt_manager: str - :ivar vcsa: Endpoint for Virtual Center Server Appliance. - :vartype vcsa: str - :ivar hcx_cloud_manager: Endpoint for the HCX Cloud Manager. - :vartype hcx_cloud_manager: str - """ - - _validation = { - 'nsxt_manager': {'readonly': True}, - 'vcsa': {'readonly': True}, - 'hcx_cloud_manager': {'readonly': True}, - } - - _attribute_map = { - 'nsxt_manager': {'key': 'nsxtManager', 'type': 'str'}, - 'vcsa': {'key': 'vcsa', 'type': 'str'}, - 'hcx_cloud_manager': {'key': 'hcxCloudManager', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(Endpoints, self).__init__(**kwargs) - self.nsxt_manager = None - self.vcsa = None - self.hcx_cloud_manager = None - - -class ErrorAdditionalInfo(msrest.serialization.Model): - """The resource management error additional info. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar type: The additional info type. - :vartype type: str - :ivar info: The additional info. - :vartype info: any - """ - - _validation = { - 'type': {'readonly': True}, - 'info': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'info': {'key': 'info', 'type': 'object'}, - } - - def __init__( - self, - **kwargs - ): - super(ErrorAdditionalInfo, self).__init__(**kwargs) - self.type = None - self.info = None - - -class ErrorResponse(msrest.serialization.Model): - """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar code: The error code. - :vartype code: str - :ivar message: The error message. - :vartype message: str - :ivar target: The error target. - :vartype target: str - :ivar details: The error details. - :vartype details: list[~avs_client.models.ErrorResponse] - :ivar additional_info: The error additional info. - :vartype additional_info: list[~avs_client.models.ErrorAdditionalInfo] - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - 'details': {'readonly': True}, - 'additional_info': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorResponse]'}, - 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, - } - - def __init__( - self, - **kwargs - ): - super(ErrorResponse, self).__init__(**kwargs) - self.code = None - self.message = None - self.target = None - self.details = None - self.additional_info = None - - -class ExpressRouteAuthorization(Resource): - """ExpressRoute Circuit Authorization. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar provisioning_state: The state of the ExpressRoute Circuit Authorization provisioning. - Possible values include: "Succeeded", "Failed", "Updating", "Canceled". - :vartype provisioning_state: str or - ~avs_client.models.ExpressRouteAuthorizationProvisioningState - :ivar express_route_authorization_id: The ID of the ExpressRoute Circuit Authorization. - :vartype express_route_authorization_id: str - :ivar express_route_authorization_key: The key of the ExpressRoute Circuit Authorization. - :vartype express_route_authorization_key: str - :param express_route_id: The ID of the ExpressRoute Circuit. - :type express_route_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'express_route_authorization_id': {'readonly': True}, - 'express_route_authorization_key': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'express_route_authorization_id': {'key': 'properties.expressRouteAuthorizationId', 'type': 'str'}, - 'express_route_authorization_key': {'key': 'properties.expressRouteAuthorizationKey', 'type': 'str'}, - 'express_route_id': {'key': 'properties.expressRouteId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteAuthorization, self).__init__(**kwargs) - self.provisioning_state = None - self.express_route_authorization_id = None - self.express_route_authorization_key = None - self.express_route_id = kwargs.get('express_route_id', None) - - -class ExpressRouteAuthorizationList(msrest.serialization.Model): - """A paged list of ExpressRoute Circuit Authorizations. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The items on a page. - :vartype value: list[~avs_client.models.ExpressRouteAuthorization] - :ivar next_link: URL to get the next page if any. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ExpressRouteAuthorization]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteAuthorizationList, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class GlobalReachConnection(Resource): - """A global reach connection resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar provisioning_state: The state of the ExpressRoute Circuit Authorization provisioning. - Possible values include: "Succeeded", "Failed", "Updating", "Canceled". - :vartype provisioning_state: str or ~avs_client.models.GlobalReachConnectionProvisioningState - :ivar address_prefix: The network used for global reach carved out from the original network - block provided for the private cloud. - :vartype address_prefix: str - :param authorization_key: Authorization key from the peer express route used for the global - reach connection. - :type authorization_key: str - :ivar circuit_connection_status: The connection status of the global reach connection. Possible - values include: "Connected", "Connecting", "Disconnected". - :vartype circuit_connection_status: str or ~avs_client.models.GlobalReachConnectionStatus - :param peer_express_route_circuit: Identifier of the ExpressRoute Circuit to peer with in the - global reach connection. - :type peer_express_route_circuit: str - :param express_route_id: The ID of the Private Cloud's ExpressRoute Circuit that is - participating in the global reach connection. - :type express_route_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'address_prefix': {'readonly': True}, - 'circuit_connection_status': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'address_prefix': {'key': 'properties.addressPrefix', 'type': 'str'}, - 'authorization_key': {'key': 'properties.authorizationKey', 'type': 'str'}, - 'circuit_connection_status': {'key': 'properties.circuitConnectionStatus', 'type': 'str'}, - 'peer_express_route_circuit': {'key': 'properties.peerExpressRouteCircuit', 'type': 'str'}, - 'express_route_id': {'key': 'properties.expressRouteId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(GlobalReachConnection, self).__init__(**kwargs) - self.provisioning_state = None - self.address_prefix = None - self.authorization_key = kwargs.get('authorization_key', None) - self.circuit_connection_status = None - self.peer_express_route_circuit = kwargs.get('peer_express_route_circuit', None) - self.express_route_id = kwargs.get('express_route_id', None) - - -class GlobalReachConnectionList(msrest.serialization.Model): - """A paged list of global reach connections. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The items on a page. - :vartype value: list[~avs_client.models.GlobalReachConnection] - :ivar next_link: URL to get the next page if any. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[GlobalReachConnection]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(GlobalReachConnectionList, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class HcxEnterpriseSite(Resource): - """An HCX Enterprise Site resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar activation_key: The activation key. - :vartype activation_key: str - :ivar status: The status of the HCX Enterprise Site. Possible values include: "Available", - "Consumed", "Deactivated", "Deleted". - :vartype status: str or ~avs_client.models.HcxEnterpriseSiteStatus - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'activation_key': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'activation_key': {'key': 'properties.activationKey', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(HcxEnterpriseSite, self).__init__(**kwargs) - self.activation_key = None - self.status = None - - -class HcxEnterpriseSiteList(msrest.serialization.Model): - """A paged list of HCX Enterprise Sites. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The items on a page. - :vartype value: list[~avs_client.models.HcxEnterpriseSite] - :ivar next_link: URL to get the next page if any. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[HcxEnterpriseSite]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(HcxEnterpriseSiteList, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class IdentitySource(msrest.serialization.Model): - """vCenter Single Sign On Identity Source. - - :param name: The name of the identity source. - :type name: str - :param alias: The domain's NetBIOS name. - :type alias: str - :param domain: The domain's dns name. - :type domain: str - :param base_user_dn: The base distinguished name for users. - :type base_user_dn: str - :param base_group_dn: The base distinguished name for groups. - :type base_group_dn: str - :param primary_server: Primary server URL. - :type primary_server: str - :param secondary_server: Secondary server URL. - :type secondary_server: str - :param ssl: Protect LDAP communication using SSL certificate (LDAPS). Possible values include: - "Enabled", "Disabled". - :type ssl: str or ~avs_client.models.SslEnum - :param username: The ID of an Active Directory user with a minimum of read-only access to Base - DN for users and group. - :type username: str - :param password: The password of the Active Directory user with a minimum of read-only access - to Base DN for users and groups. - :type password: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'alias': {'key': 'alias', 'type': 'str'}, - 'domain': {'key': 'domain', 'type': 'str'}, - 'base_user_dn': {'key': 'baseUserDN', 'type': 'str'}, - 'base_group_dn': {'key': 'baseGroupDN', 'type': 'str'}, - 'primary_server': {'key': 'primaryServer', 'type': 'str'}, - 'secondary_server': {'key': 'secondaryServer', 'type': 'str'}, - 'ssl': {'key': 'ssl', 'type': 'str'}, - 'username': {'key': 'username', 'type': 'str'}, - 'password': {'key': 'password', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(IdentitySource, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.alias = kwargs.get('alias', None) - self.domain = kwargs.get('domain', None) - self.base_user_dn = kwargs.get('base_user_dn', None) - self.base_group_dn = kwargs.get('base_group_dn', None) - self.primary_server = kwargs.get('primary_server', None) - self.secondary_server = kwargs.get('secondary_server', None) - self.ssl = kwargs.get('ssl', None) - self.username = kwargs.get('username', None) - self.password = kwargs.get('password', None) - - -class LogSpecification(msrest.serialization.Model): - """Specifications of the Log for Azure Monitoring. - - :param name: Name of the log. - :type name: str - :param display_name: Localized friendly display name of the log. - :type display_name: str - :param blob_duration: Blob duration of the log. - :type blob_duration: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(LogSpecification, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display_name = kwargs.get('display_name', None) - self.blob_duration = kwargs.get('blob_duration', None) - - -class ManagementCluster(CommonClusterProperties): - """The properties of a management cluster. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param cluster_size: The cluster size. - :type cluster_size: int - :ivar provisioning_state: The state of the cluster provisioning. Possible values include: - "Succeeded", "Failed", "Cancelled", "Deleting", "Updating", "Canceled". - :vartype provisioning_state: str or ~avs_client.models.ClusterProvisioningState - :ivar cluster_id: The identity. - :vartype cluster_id: int - :param hosts: The hosts. - :type hosts: list[str] - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - 'cluster_id': {'readonly': True}, - } - - _attribute_map = { - 'cluster_size': {'key': 'clusterSize', 'type': 'int'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'cluster_id': {'key': 'clusterId', 'type': 'int'}, - 'hosts': {'key': 'hosts', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - super(ManagementCluster, self).__init__(**kwargs) - - -class MetricDimension(msrest.serialization.Model): - """Specifications of the Dimension of metrics. - - :param name: Name of the dimension. - :type name: str - :param display_name: Localized friendly display name of the dimension. - :type display_name: str - :param internal_name: Name of the dimension as it appears in MDM. - :type internal_name: str - :param to_be_exported_for_shoebox: A boolean flag indicating whether this dimension should be - included for the shoebox export scenario. - :type to_be_exported_for_shoebox: bool - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'internal_name': {'key': 'internalName', 'type': 'str'}, - 'to_be_exported_for_shoebox': {'key': 'toBeExportedForShoebox', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - super(MetricDimension, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display_name = kwargs.get('display_name', None) - self.internal_name = kwargs.get('internal_name', None) - self.to_be_exported_for_shoebox = kwargs.get('to_be_exported_for_shoebox', None) - - -class MetricSpecification(msrest.serialization.Model): - """Specifications of the Metrics for Azure Monitoring. - - :param name: Name of the metric. - :type name: str - :param display_name: Localized friendly display name of the metric. - :type display_name: str - :param display_description: Localized friendly description of the metric. - :type display_description: str - :param unit: Unit that makes sense for the metric. - :type unit: str - :param category: Name of the metric category that the metric belongs to. A metric can only - belong to a single category. - :type category: str - :param aggregation_type: Only provide one value for this field. Valid values: Average, Minimum, - Maximum, Total, Count. - :type aggregation_type: str - :param supported_aggregation_types: Supported aggregation types. - :type supported_aggregation_types: list[str] - :param supported_time_grain_types: Supported time grain types. - :type supported_time_grain_types: list[str] - :param fill_gap_with_zero: Optional. If set to true, then zero will be returned for time - duration where no metric is emitted/published. - :type fill_gap_with_zero: bool - :param dimensions: Dimensions of the metric. - :type dimensions: list[~avs_client.models.MetricDimension] - :param enable_regional_mdm_account: Whether or not the service is using regional MDM accounts. - :type enable_regional_mdm_account: str - :param source_mdm_account: The name of the MDM account. - :type source_mdm_account: str - :param source_mdm_namespace: The name of the MDM namespace. - :type source_mdm_namespace: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'display_description': {'key': 'displayDescription', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'category': {'key': 'category', 'type': 'str'}, - 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, - 'supported_aggregation_types': {'key': 'supportedAggregationTypes', 'type': '[str]'}, - 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, - 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, - 'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'}, - 'enable_regional_mdm_account': {'key': 'enableRegionalMdmAccount', 'type': 'str'}, - 'source_mdm_account': {'key': 'sourceMdmAccount', 'type': 'str'}, - 'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(MetricSpecification, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display_name = kwargs.get('display_name', None) - self.display_description = kwargs.get('display_description', None) - self.unit = kwargs.get('unit', None) - self.category = kwargs.get('category', None) - self.aggregation_type = kwargs.get('aggregation_type', None) - self.supported_aggregation_types = kwargs.get('supported_aggregation_types', None) - self.supported_time_grain_types = kwargs.get('supported_time_grain_types', None) - self.fill_gap_with_zero = kwargs.get('fill_gap_with_zero', None) - self.dimensions = kwargs.get('dimensions', None) - self.enable_regional_mdm_account = kwargs.get('enable_regional_mdm_account', None) - self.source_mdm_account = kwargs.get('source_mdm_account', None) - self.source_mdm_namespace = kwargs.get('source_mdm_namespace', None) - - -class NetAppVolume(msrest.serialization.Model): - """An Azure NetApp Files volume from Microsoft.NetApp provider. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Azure resource ID of the NetApp volume. - :type id: str - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(NetAppVolume, self).__init__(**kwargs) - self.id = kwargs['id'] - - -class Operation(msrest.serialization.Model): - """A REST API operation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name: Name of the operation being performed on this object. - :vartype name: str - :ivar display: Contains the localized display information for this operation. - :vartype display: ~avs_client.models.OperationDisplay - :param is_data_action: Gets or sets a value indicating whether the operation is a data action - or not. - :type is_data_action: bool - :param origin: Origin of the operation. - :type origin: str - :param properties: Properties of the operation. - :type properties: ~avs_client.models.OperationProperties - """ - - _validation = { - 'name': {'readonly': True}, - 'display': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'OperationProperties'}, - } - - def __init__( - self, - **kwargs - ): - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = None - self.is_data_action = kwargs.get('is_data_action', None) - self.origin = kwargs.get('origin', None) - self.properties = kwargs.get('properties', None) - - -class OperationDisplay(msrest.serialization.Model): - """Contains the localized display information for this operation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar provider: Localized friendly form of the resource provider name. - :vartype provider: str - :ivar resource: Localized friendly form of the resource type related to this operation. - :vartype resource: str - :ivar operation: Localized friendly name for the operation. - :vartype operation: str - :ivar description: Localized friendly description for the operation. - :vartype description: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None - self.description = None - - -class OperationList(msrest.serialization.Model): - """Pageable list of operations. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of operations. - :vartype value: list[~avs_client.models.Operation] - :ivar next_link: URL to get the next page if any. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Operation]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(OperationList, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class OperationProperties(msrest.serialization.Model): - """Extra Operation properties. - - :param service_specification: Service specifications of the operation. - :type service_specification: ~avs_client.models.ServiceSpecification - """ - - _attribute_map = { - 'service_specification': {'key': 'serviceSpecification', 'type': 'ServiceSpecification'}, - } - - def __init__( - self, - **kwargs - ): - super(OperationProperties, self).__init__(**kwargs) - self.service_specification = kwargs.get('service_specification', None) - - -class PlacementPoliciesList(msrest.serialization.Model): - """Represents list of placement policies. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The items on the page. - :vartype value: list[~avs_client.models.PlacementPolicy] - :ivar next_link: URL to get the next page if any. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PlacementPolicy]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(PlacementPoliciesList, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class PlacementPolicy(Resource): - """A vSphere Distributed Resource Scheduler (DRS) placement policy. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param properties: placement policy properties. - :type properties: ~avs_client.models.PlacementPolicyProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'PlacementPolicyProperties'}, - } - - def __init__( - self, - **kwargs - ): - super(PlacementPolicy, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - - -class PlacementPolicyProperties(msrest.serialization.Model): - """Abstract placement policy properties. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: VmHostPlacementPolicyProperties, VmPlacementPolicyProperties. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. placement policy type.Constant filled by server. Possible values - include: "VmVm", "VmHost". - :type type: str or ~avs_client.models.PlacementPolicyType - :param state: Whether the placement policy is enabled or disabled. Possible values include: - "Enabled", "Disabled". - :type state: str or ~avs_client.models.PlacementPolicyState - :param display_name: Display name of the placement policy. - :type display_name: str - :ivar provisioning_state: The provisioning state. Possible values include: "Succeeded", - "Failed", "Building", "Deleting", "Updating", "Canceled". - :vartype provisioning_state: str or ~avs_client.models.PlacementPolicyProvisioningState - """ - - _validation = { - 'type': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'VmHost': 'VmHostPlacementPolicyProperties', 'VmVm': 'VmPlacementPolicyProperties'} - } - - def __init__( - self, - **kwargs - ): - super(PlacementPolicyProperties, self).__init__(**kwargs) - self.type = None # type: Optional[str] - self.state = kwargs.get('state', None) - self.display_name = kwargs.get('display_name', None) - self.provisioning_state = None - - -class PlacementPolicyUpdate(msrest.serialization.Model): - """An update of a DRS placement policy resource. - - :param state: Whether the placement policy is enabled or disabled. Possible values include: - "Enabled", "Disabled". - :type state: str or ~avs_client.models.PlacementPolicyState - :param vm_members: Virtual machine members list. - :type vm_members: list[str] - :param host_members: Host members list. - :type host_members: list[str] - :param affinity_strength: vm-host placement policy affinity strength (should/must). Possible - values include: "Should", "Must". - :type affinity_strength: str or ~avs_client.models.AffinityStrength - :param azure_hybrid_benefit_type: placement policy azure hybrid benefit opt-in type. Possible - values include: "SqlHost", "None". - :type azure_hybrid_benefit_type: str or ~avs_client.models.AzureHybridBenefitType - """ - - _attribute_map = { - 'state': {'key': 'properties.state', 'type': 'str'}, - 'vm_members': {'key': 'properties.vmMembers', 'type': '[str]'}, - 'host_members': {'key': 'properties.hostMembers', 'type': '[str]'}, - 'affinity_strength': {'key': 'properties.affinityStrength', 'type': 'str'}, - 'azure_hybrid_benefit_type': {'key': 'properties.azureHybridBenefitType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(PlacementPolicyUpdate, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.vm_members = kwargs.get('vm_members', None) - self.host_members = kwargs.get('host_members', None) - self.affinity_strength = kwargs.get('affinity_strength', None) - self.azure_hybrid_benefit_type = kwargs.get('azure_hybrid_benefit_type', None) - - -class TrackedResource(Resource): - """The resource model definition for a ARM tracked top level resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__( - self, - **kwargs - ): - super(TrackedResource, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) - - -class PrivateCloud(TrackedResource): - """A private cloud resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param sku: Required. The private cloud SKU. - :type sku: ~avs_client.models.Sku - :param identity: The identity of the private cloud, if configured. - :type identity: ~avs_client.models.PrivateCloudIdentity - :param management_cluster: The default cluster used for management. - :type management_cluster: ~avs_client.models.ManagementCluster - :param internet: Connectivity to internet is enabled or disabled. Possible values include: - "Enabled", "Disabled". Default value: "Disabled". - :type internet: str or ~avs_client.models.InternetEnum - :param identity_sources: vCenter Single Sign On Identity Sources. - :type identity_sources: list[~avs_client.models.IdentitySource] - :param availability: Properties describing how the cloud is distributed across availability - zones. - :type availability: ~avs_client.models.AvailabilityProperties - :param encryption: Customer managed key encryption, can be enabled or disabled. - :type encryption: ~avs_client.models.Encryption - :ivar provisioning_state: The provisioning state. Possible values include: "Succeeded", - "Failed", "Cancelled", "Pending", "Building", "Deleting", "Updating", "Canceled". - :vartype provisioning_state: str or ~avs_client.models.PrivateCloudProvisioningState - :param circuit: An ExpressRoute Circuit. - :type circuit: ~avs_client.models.Circuit - :ivar endpoints: The endpoints. - :vartype endpoints: ~avs_client.models.Endpoints - :param network_block: The block of addresses should be unique across VNet in your subscription - as well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where A,B,C,D are - between 0 and 255, and X is between 0 and 22. - :type network_block: str - :ivar management_network: Network used to access vCenter Server and NSX-T Manager. - :vartype management_network: str - :ivar provisioning_network: Used for virtual machine cold migration, cloning, and snapshot - migration. - :vartype provisioning_network: str - :ivar vmotion_network: Used for live migration of virtual machines. - :vartype vmotion_network: str - :param vcenter_password: Optionally, set the vCenter admin password when the private cloud is - created. - :type vcenter_password: str - :param nsxt_password: Optionally, set the NSX-T Manager password when the private cloud is - created. - :type nsxt_password: str - :ivar vcenter_certificate_thumbprint: Thumbprint of the vCenter Server SSL certificate. - :vartype vcenter_certificate_thumbprint: str - :ivar nsxt_certificate_thumbprint: Thumbprint of the NSX-T Manager SSL certificate. - :vartype nsxt_certificate_thumbprint: str - :ivar external_cloud_links: Array of cloud link IDs from other clouds that connect to this one. - :vartype external_cloud_links: list[str] - :param secondary_circuit: A secondary expressRoute circuit from a separate AZ. Only present in - a stretched private cloud. - :type secondary_circuit: ~avs_client.models.Circuit - :ivar nsx_public_ip_quota_raised: Flag to indicate whether the private cloud has the quota for - provisioned NSX Public IP count raised from 64 to 1024. Possible values include: "Enabled", - "Disabled". - :vartype nsx_public_ip_quota_raised: str or ~avs_client.models.NsxPublicIpQuotaRaisedEnum - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'sku': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'endpoints': {'readonly': True}, - 'management_network': {'readonly': True}, - 'provisioning_network': {'readonly': True}, - 'vmotion_network': {'readonly': True}, - 'vcenter_certificate_thumbprint': {'readonly': True}, - 'nsxt_certificate_thumbprint': {'readonly': True}, - 'external_cloud_links': {'readonly': True}, - 'nsx_public_ip_quota_raised': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'identity': {'key': 'identity', 'type': 'PrivateCloudIdentity'}, - 'management_cluster': {'key': 'properties.managementCluster', 'type': 'ManagementCluster'}, - 'internet': {'key': 'properties.internet', 'type': 'str'}, - 'identity_sources': {'key': 'properties.identitySources', 'type': '[IdentitySource]'}, - 'availability': {'key': 'properties.availability', 'type': 'AvailabilityProperties'}, - 'encryption': {'key': 'properties.encryption', 'type': 'Encryption'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'circuit': {'key': 'properties.circuit', 'type': 'Circuit'}, - 'endpoints': {'key': 'properties.endpoints', 'type': 'Endpoints'}, - 'network_block': {'key': 'properties.networkBlock', 'type': 'str'}, - 'management_network': {'key': 'properties.managementNetwork', 'type': 'str'}, - 'provisioning_network': {'key': 'properties.provisioningNetwork', 'type': 'str'}, - 'vmotion_network': {'key': 'properties.vmotionNetwork', 'type': 'str'}, - 'vcenter_password': {'key': 'properties.vcenterPassword', 'type': 'str'}, - 'nsxt_password': {'key': 'properties.nsxtPassword', 'type': 'str'}, - 'vcenter_certificate_thumbprint': {'key': 'properties.vcenterCertificateThumbprint', 'type': 'str'}, - 'nsxt_certificate_thumbprint': {'key': 'properties.nsxtCertificateThumbprint', 'type': 'str'}, - 'external_cloud_links': {'key': 'properties.externalCloudLinks', 'type': '[str]'}, - 'secondary_circuit': {'key': 'properties.secondaryCircuit', 'type': 'Circuit'}, - 'nsx_public_ip_quota_raised': {'key': 'properties.nsxPublicIpQuotaRaised', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(PrivateCloud, self).__init__(**kwargs) - self.sku = kwargs['sku'] - self.identity = kwargs.get('identity', None) - self.management_cluster = kwargs.get('management_cluster', None) - self.internet = kwargs.get('internet', "Disabled") - self.identity_sources = kwargs.get('identity_sources', None) - self.availability = kwargs.get('availability', None) - self.encryption = kwargs.get('encryption', None) - self.provisioning_state = None - self.circuit = kwargs.get('circuit', None) - self.endpoints = None - self.network_block = kwargs.get('network_block', None) - self.management_network = None - self.provisioning_network = None - self.vmotion_network = None - self.vcenter_password = kwargs.get('vcenter_password', None) - self.nsxt_password = kwargs.get('nsxt_password', None) - self.vcenter_certificate_thumbprint = None - self.nsxt_certificate_thumbprint = None - self.external_cloud_links = None - self.secondary_circuit = kwargs.get('secondary_circuit', None) - self.nsx_public_ip_quota_raised = None - - -class PrivateCloudIdentity(msrest.serialization.Model): - """Identity for the virtual machine. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar principal_id: The principal ID of private cloud identity. This property will only be - provided for a system assigned identity. - :vartype principal_id: str - :ivar tenant_id: The tenant ID associated with the private cloud. This property will only be - provided for a system assigned identity. - :vartype tenant_id: str - :param type: The type of identity used for the private cloud. The type 'SystemAssigned' refers - to an implicitly created identity. The type 'None' will remove any identities from the Private - Cloud. Possible values include: "SystemAssigned", "None". - :type type: str or ~avs_client.models.ResourceIdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(PrivateCloudIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = kwargs.get('type', None) - - -class PrivateCloudList(msrest.serialization.Model): - """A paged list of private clouds. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The items on the page. - :vartype value: list[~avs_client.models.PrivateCloud] - :ivar next_link: URL to get the next page if any. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateCloud]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(PrivateCloudList, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class PrivateCloudUpdateProperties(msrest.serialization.Model): - """The properties of a private cloud resource that may be updated. - - :param management_cluster: The default cluster used for management. - :type management_cluster: ~avs_client.models.ManagementCluster - :param internet: Connectivity to internet is enabled or disabled. Possible values include: - "Enabled", "Disabled". Default value: "Disabled". - :type internet: str or ~avs_client.models.InternetEnum - :param identity_sources: vCenter Single Sign On Identity Sources. - :type identity_sources: list[~avs_client.models.IdentitySource] - :param availability: Properties describing how the cloud is distributed across availability - zones. - :type availability: ~avs_client.models.AvailabilityProperties - :param encryption: Customer managed key encryption, can be enabled or disabled. - :type encryption: ~avs_client.models.Encryption - """ - - _attribute_map = { - 'management_cluster': {'key': 'managementCluster', 'type': 'ManagementCluster'}, - 'internet': {'key': 'internet', 'type': 'str'}, - 'identity_sources': {'key': 'identitySources', 'type': '[IdentitySource]'}, - 'availability': {'key': 'availability', 'type': 'AvailabilityProperties'}, - 'encryption': {'key': 'encryption', 'type': 'Encryption'}, - } - - def __init__( - self, - **kwargs - ): - super(PrivateCloudUpdateProperties, self).__init__(**kwargs) - self.management_cluster = kwargs.get('management_cluster', None) - self.internet = kwargs.get('internet', "Disabled") - self.identity_sources = kwargs.get('identity_sources', None) - self.availability = kwargs.get('availability', None) - self.encryption = kwargs.get('encryption', None) - - -class PrivateCloudProperties(PrivateCloudUpdateProperties): - """The properties of a private cloud resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param management_cluster: The default cluster used for management. - :type management_cluster: ~avs_client.models.ManagementCluster - :param internet: Connectivity to internet is enabled or disabled. Possible values include: - "Enabled", "Disabled". Default value: "Disabled". - :type internet: str or ~avs_client.models.InternetEnum - :param identity_sources: vCenter Single Sign On Identity Sources. - :type identity_sources: list[~avs_client.models.IdentitySource] - :param availability: Properties describing how the cloud is distributed across availability - zones. - :type availability: ~avs_client.models.AvailabilityProperties - :param encryption: Customer managed key encryption, can be enabled or disabled. - :type encryption: ~avs_client.models.Encryption - :ivar provisioning_state: The provisioning state. Possible values include: "Succeeded", - "Failed", "Cancelled", "Pending", "Building", "Deleting", "Updating", "Canceled". - :vartype provisioning_state: str or ~avs_client.models.PrivateCloudProvisioningState - :param circuit: An ExpressRoute Circuit. - :type circuit: ~avs_client.models.Circuit - :ivar endpoints: The endpoints. - :vartype endpoints: ~avs_client.models.Endpoints - :param network_block: Required. The block of addresses should be unique across VNet in your - subscription as well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where - A,B,C,D are between 0 and 255, and X is between 0 and 22. - :type network_block: str - :ivar management_network: Network used to access vCenter Server and NSX-T Manager. - :vartype management_network: str - :ivar provisioning_network: Used for virtual machine cold migration, cloning, and snapshot - migration. - :vartype provisioning_network: str - :ivar vmotion_network: Used for live migration of virtual machines. - :vartype vmotion_network: str - :param vcenter_password: Optionally, set the vCenter admin password when the private cloud is - created. - :type vcenter_password: str - :param nsxt_password: Optionally, set the NSX-T Manager password when the private cloud is - created. - :type nsxt_password: str - :ivar vcenter_certificate_thumbprint: Thumbprint of the vCenter Server SSL certificate. - :vartype vcenter_certificate_thumbprint: str - :ivar nsxt_certificate_thumbprint: Thumbprint of the NSX-T Manager SSL certificate. - :vartype nsxt_certificate_thumbprint: str - :ivar external_cloud_links: Array of cloud link IDs from other clouds that connect to this one. - :vartype external_cloud_links: list[str] - :param secondary_circuit: A secondary expressRoute circuit from a separate AZ. Only present in - a stretched private cloud. - :type secondary_circuit: ~avs_client.models.Circuit - :ivar nsx_public_ip_quota_raised: Flag to indicate whether the private cloud has the quota for - provisioned NSX Public IP count raised from 64 to 1024. Possible values include: "Enabled", - "Disabled". - :vartype nsx_public_ip_quota_raised: str or ~avs_client.models.NsxPublicIpQuotaRaisedEnum - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - 'endpoints': {'readonly': True}, - 'network_block': {'required': True}, - 'management_network': {'readonly': True}, - 'provisioning_network': {'readonly': True}, - 'vmotion_network': {'readonly': True}, - 'vcenter_certificate_thumbprint': {'readonly': True}, - 'nsxt_certificate_thumbprint': {'readonly': True}, - 'external_cloud_links': {'readonly': True}, - 'nsx_public_ip_quota_raised': {'readonly': True}, - } - - _attribute_map = { - 'management_cluster': {'key': 'managementCluster', 'type': 'ManagementCluster'}, - 'internet': {'key': 'internet', 'type': 'str'}, - 'identity_sources': {'key': 'identitySources', 'type': '[IdentitySource]'}, - 'availability': {'key': 'availability', 'type': 'AvailabilityProperties'}, - 'encryption': {'key': 'encryption', 'type': 'Encryption'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'circuit': {'key': 'circuit', 'type': 'Circuit'}, - 'endpoints': {'key': 'endpoints', 'type': 'Endpoints'}, - 'network_block': {'key': 'networkBlock', 'type': 'str'}, - 'management_network': {'key': 'managementNetwork', 'type': 'str'}, - 'provisioning_network': {'key': 'provisioningNetwork', 'type': 'str'}, - 'vmotion_network': {'key': 'vmotionNetwork', 'type': 'str'}, - 'vcenter_password': {'key': 'vcenterPassword', 'type': 'str'}, - 'nsxt_password': {'key': 'nsxtPassword', 'type': 'str'}, - 'vcenter_certificate_thumbprint': {'key': 'vcenterCertificateThumbprint', 'type': 'str'}, - 'nsxt_certificate_thumbprint': {'key': 'nsxtCertificateThumbprint', 'type': 'str'}, - 'external_cloud_links': {'key': 'externalCloudLinks', 'type': '[str]'}, - 'secondary_circuit': {'key': 'secondaryCircuit', 'type': 'Circuit'}, - 'nsx_public_ip_quota_raised': {'key': 'nsxPublicIpQuotaRaised', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(PrivateCloudProperties, self).__init__(**kwargs) - self.provisioning_state = None - self.circuit = kwargs.get('circuit', None) - self.endpoints = None - self.network_block = kwargs['network_block'] - self.management_network = None - self.provisioning_network = None - self.vmotion_network = None - self.vcenter_password = kwargs.get('vcenter_password', None) - self.nsxt_password = kwargs.get('nsxt_password', None) - self.vcenter_certificate_thumbprint = None - self.nsxt_certificate_thumbprint = None - self.external_cloud_links = None - self.secondary_circuit = kwargs.get('secondary_circuit', None) - self.nsx_public_ip_quota_raised = None - - -class PrivateCloudUpdate(msrest.serialization.Model): - """An update to a private cloud resource. - - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param identity: The identity of the private cloud, if configured. - :type identity: ~avs_client.models.PrivateCloudIdentity - :param management_cluster: The default cluster used for management. - :type management_cluster: ~avs_client.models.ManagementCluster - :param internet: Connectivity to internet is enabled or disabled. Possible values include: - "Enabled", "Disabled". Default value: "Disabled". - :type internet: str or ~avs_client.models.InternetEnum - :param identity_sources: vCenter Single Sign On Identity Sources. - :type identity_sources: list[~avs_client.models.IdentitySource] - :param availability: Properties describing how the cloud is distributed across availability - zones. - :type availability: ~avs_client.models.AvailabilityProperties - :param encryption: Customer managed key encryption, can be enabled or disabled. - :type encryption: ~avs_client.models.Encryption - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'PrivateCloudIdentity'}, - 'management_cluster': {'key': 'properties.managementCluster', 'type': 'ManagementCluster'}, - 'internet': {'key': 'properties.internet', 'type': 'str'}, - 'identity_sources': {'key': 'properties.identitySources', 'type': '[IdentitySource]'}, - 'availability': {'key': 'properties.availability', 'type': 'AvailabilityProperties'}, - 'encryption': {'key': 'properties.encryption', 'type': 'Encryption'}, - } - - def __init__( - self, - **kwargs - ): - super(PrivateCloudUpdate, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - self.identity = kwargs.get('identity', None) - self.management_cluster = kwargs.get('management_cluster', None) - self.internet = kwargs.get('internet', "Disabled") - self.identity_sources = kwargs.get('identity_sources', None) - self.availability = kwargs.get('availability', None) - self.encryption = kwargs.get('encryption', None) - - -class ProxyResource(Resource): - """The resource model definition for a ARM proxy resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ProxyResource, self).__init__(**kwargs) - - -class ScriptExecutionParameter(msrest.serialization.Model): - """The arguments passed in to the execution. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: PSCredentialExecutionParameter, ScriptSecureStringExecutionParameter, ScriptStringExecutionParameter. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The parameter name. - :type name: str - :param type: Required. The type of execution parameter.Constant filled by server. Possible - values include: "Value", "SecureValue", "Credential". - :type type: str or ~avs_client.models.ScriptExecutionParameterType - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'Credential': 'PSCredentialExecutionParameter', 'SecureValue': 'ScriptSecureStringExecutionParameter', 'Value': 'ScriptStringExecutionParameter'} - } - - def __init__( - self, - **kwargs - ): - super(ScriptExecutionParameter, self).__init__(**kwargs) - self.name = kwargs['name'] - self.type = None # type: Optional[str] - - -class PSCredentialExecutionParameter(ScriptExecutionParameter): - """a powershell credential object. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The parameter name. - :type name: str - :param type: Required. The type of execution parameter.Constant filled by server. Possible - values include: "Value", "SecureValue", "Credential". - :type type: str or ~avs_client.models.ScriptExecutionParameterType - :param username: username for login. - :type username: str - :param password: password for login. - :type password: str - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'username': {'key': 'username', 'type': 'str'}, - 'password': {'key': 'password', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(PSCredentialExecutionParameter, self).__init__(**kwargs) - self.type = 'Credential' # type: str - self.username = kwargs.get('username', None) - self.password = kwargs.get('password', None) - - -class Quota(msrest.serialization.Model): - """Subscription quotas. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar hosts_remaining: Remaining hosts quota by sku type. - :vartype hosts_remaining: dict[str, int] - :ivar quota_enabled: Host quota is active for current subscription. Possible values include: - "Enabled", "Disabled". - :vartype quota_enabled: str or ~avs_client.models.QuotaEnabled - """ - - _validation = { - 'hosts_remaining': {'readonly': True}, - 'quota_enabled': {'readonly': True}, - } - - _attribute_map = { - 'hosts_remaining': {'key': 'hostsRemaining', 'type': '{int}'}, - 'quota_enabled': {'key': 'quotaEnabled', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(Quota, self).__init__(**kwargs) - self.hosts_remaining = None - self.quota_enabled = None - - -class ScriptCmdlet(ProxyResource): - """A cmdlet available for script execution. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar description: Description of the scripts functionality. - :vartype description: str - :ivar timeout: Recommended time limit for execution. - :vartype timeout: str - :ivar parameters: Parameters the script will accept. - :vartype parameters: list[~avs_client.models.ScriptParameter] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'description': {'readonly': True}, - 'timeout': {'readonly': True}, - 'parameters': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'timeout': {'key': 'properties.timeout', 'type': 'str'}, - 'parameters': {'key': 'properties.parameters', 'type': '[ScriptParameter]'}, - } - - def __init__( - self, - **kwargs - ): - super(ScriptCmdlet, self).__init__(**kwargs) - self.description = None - self.timeout = None - self.parameters = None - - -class ScriptCmdletsList(msrest.serialization.Model): - """Pageable list of scripts/cmdlets. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of scripts. - :vartype value: list[~avs_client.models.ScriptCmdlet] - :ivar next_link: URL to get the next page if any. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ScriptCmdlet]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ScriptCmdletsList, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class ScriptExecution(ProxyResource): - """An instance of a script executed by a user - custom or AVS. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param script_cmdlet_id: A reference to the script cmdlet resource if user is running a AVS - script. - :type script_cmdlet_id: str - :param parameters: Parameters the script will accept. - :type parameters: list[~avs_client.models.ScriptExecutionParameter] - :param hidden_parameters: Parameters that will be hidden/not visible to ARM, such as passwords - and credentials. - :type hidden_parameters: list[~avs_client.models.ScriptExecutionParameter] - :param failure_reason: Error message if the script was able to run, but if the script itself - had errors or powershell threw an exception. - :type failure_reason: str - :param timeout: Time limit for execution. - :type timeout: str - :param retention: Time to live for the resource. If not provided, will be available for 60 - days. - :type retention: str - :ivar submitted_at: Time the script execution was submitted. - :vartype submitted_at: ~datetime.datetime - :ivar started_at: Time the script execution was started. - :vartype started_at: ~datetime.datetime - :ivar finished_at: Time the script execution was finished. - :vartype finished_at: ~datetime.datetime - :ivar provisioning_state: The state of the script execution resource. Possible values include: - "Pending", "Running", "Succeeded", "Failed", "Cancelling", "Cancelled", "Deleting", "Canceled". - :vartype provisioning_state: str or ~avs_client.models.ScriptExecutionProvisioningState - :param output: Standard output stream from the powershell execution. - :type output: list[str] - :param named_outputs: User-defined dictionary. - :type named_outputs: dict[str, any] - :ivar information: Standard information out stream from the powershell execution. - :vartype information: list[str] - :ivar warnings: Standard warning out stream from the powershell execution. - :vartype warnings: list[str] - :ivar errors: Standard error output stream from the powershell execution. - :vartype errors: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'submitted_at': {'readonly': True}, - 'started_at': {'readonly': True}, - 'finished_at': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'information': {'readonly': True}, - 'warnings': {'readonly': True}, - 'errors': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'script_cmdlet_id': {'key': 'properties.scriptCmdletId', 'type': 'str'}, - 'parameters': {'key': 'properties.parameters', 'type': '[ScriptExecutionParameter]'}, - 'hidden_parameters': {'key': 'properties.hiddenParameters', 'type': '[ScriptExecutionParameter]'}, - 'failure_reason': {'key': 'properties.failureReason', 'type': 'str'}, - 'timeout': {'key': 'properties.timeout', 'type': 'str'}, - 'retention': {'key': 'properties.retention', 'type': 'str'}, - 'submitted_at': {'key': 'properties.submittedAt', 'type': 'iso-8601'}, - 'started_at': {'key': 'properties.startedAt', 'type': 'iso-8601'}, - 'finished_at': {'key': 'properties.finishedAt', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'output': {'key': 'properties.output', 'type': '[str]'}, - 'named_outputs': {'key': 'properties.namedOutputs', 'type': '{object}'}, - 'information': {'key': 'properties.information', 'type': '[str]'}, - 'warnings': {'key': 'properties.warnings', 'type': '[str]'}, - 'errors': {'key': 'properties.errors', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - super(ScriptExecution, self).__init__(**kwargs) - self.script_cmdlet_id = kwargs.get('script_cmdlet_id', None) - self.parameters = kwargs.get('parameters', None) - self.hidden_parameters = kwargs.get('hidden_parameters', None) - self.failure_reason = kwargs.get('failure_reason', None) - self.timeout = kwargs.get('timeout', None) - self.retention = kwargs.get('retention', None) - self.submitted_at = None - self.started_at = None - self.finished_at = None - self.provisioning_state = None - self.output = kwargs.get('output', None) - self.named_outputs = kwargs.get('named_outputs', None) - self.information = None - self.warnings = None - self.errors = None - - -class ScriptExecutionsList(msrest.serialization.Model): - """Pageable list of script executions. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of scripts. - :vartype value: list[~avs_client.models.ScriptExecution] - :ivar next_link: URL to get the next page if any. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ScriptExecution]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ScriptExecutionsList, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class ScriptPackage(ProxyResource): - """Script Package resources available for execution. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar description: User friendly description of the package. - :vartype description: str - :ivar version: Module version. - :vartype version: str - :ivar company: Company that created and supports the package. - :vartype company: str - :ivar uri: Link to support by the package vendor. - :vartype uri: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'description': {'readonly': True}, - 'version': {'readonly': True}, - 'company': {'readonly': True}, - 'uri': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'company': {'key': 'properties.company', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ScriptPackage, self).__init__(**kwargs) - self.description = None - self.version = None - self.company = None - self.uri = None - - -class ScriptPackagesList(msrest.serialization.Model): - """A list of the available script packages. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of script package resources. - :vartype value: list[~avs_client.models.ScriptPackage] - :ivar next_link: URL to get the next page if any. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ScriptPackage]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ScriptPackagesList, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class ScriptParameter(msrest.serialization.Model): - """An parameter that the script will accept. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar type: The type of parameter the script is expecting. psCredential is a - PSCredentialObject. Possible values include: "String", "SecureString", "Credential", "Int", - "Bool", "Float". - :vartype type: str or ~avs_client.models.ScriptParameterTypes - :param name: The parameter name that the script will expect a parameter value for. - :type name: str - :ivar description: User friendly description of the parameter. - :vartype description: str - :ivar visibility: Should this parameter be visible to arm and passed in the parameters argument - when executing. Possible values include: "Visible", "Hidden". - :vartype visibility: str or ~avs_client.models.VisibilityParameterEnum - :ivar optional: Is this parameter required or optional. Possible values include: "Optional", - "Required". - :vartype optional: str or ~avs_client.models.OptionalParamEnum - """ - - _validation = { - 'type': {'readonly': True}, - 'description': {'readonly': True}, - 'visibility': {'readonly': True}, - 'optional': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'visibility': {'key': 'visibility', 'type': 'str'}, - 'optional': {'key': 'optional', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ScriptParameter, self).__init__(**kwargs) - self.type = None - self.name = kwargs.get('name', None) - self.description = None - self.visibility = None - self.optional = None - - -class ScriptSecureStringExecutionParameter(ScriptExecutionParameter): - """a plain text value execution parameter. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The parameter name. - :type name: str - :param type: Required. The type of execution parameter.Constant filled by server. Possible - values include: "Value", "SecureValue", "Credential". - :type type: str or ~avs_client.models.ScriptExecutionParameterType - :param secure_value: A secure value for the passed parameter, not to be stored in logs. - :type secure_value: str - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'secure_value': {'key': 'secureValue', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ScriptSecureStringExecutionParameter, self).__init__(**kwargs) - self.type = 'SecureValue' # type: str - self.secure_value = kwargs.get('secure_value', None) - - -class ScriptStringExecutionParameter(ScriptExecutionParameter): - """a plain text value execution parameter. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The parameter name. - :type name: str - :param type: Required. The type of execution parameter.Constant filled by server. Possible - values include: "Value", "SecureValue", "Credential". - :type type: str or ~avs_client.models.ScriptExecutionParameterType - :param value: The value for the passed parameter. - :type value: str - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ScriptStringExecutionParameter, self).__init__(**kwargs) - self.type = 'Value' # type: str - self.value = kwargs.get('value', None) - - -class ServiceSpecification(msrest.serialization.Model): - """Service specification payload. - - :param log_specifications: Specifications of the Log for Azure Monitoring. - :type log_specifications: list[~avs_client.models.LogSpecification] - :param metric_specifications: Specifications of the Metrics for Azure Monitoring. - :type metric_specifications: list[~avs_client.models.MetricSpecification] - """ - - _attribute_map = { - 'log_specifications': {'key': 'logSpecifications', 'type': '[LogSpecification]'}, - 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, - } - - def __init__( - self, - **kwargs - ): - super(ServiceSpecification, self).__init__(**kwargs) - self.log_specifications = kwargs.get('log_specifications', None) - self.metric_specifications = kwargs.get('metric_specifications', None) - - -class Sku(msrest.serialization.Model): - """The resource model definition representing SKU. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the SKU. - :type name: str - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(Sku, self).__init__(**kwargs) - self.name = kwargs['name'] - - -class Trial(msrest.serialization.Model): - """Subscription trial availability. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar status: Trial status. Possible values include: "TrialAvailable", "TrialUsed", - "TrialDisabled". - :vartype status: str or ~avs_client.models.TrialStatus - :ivar available_hosts: Number of trial hosts available. - :vartype available_hosts: int - """ - - _validation = { - 'status': {'readonly': True}, - 'available_hosts': {'readonly': True}, - } - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'available_hosts': {'key': 'availableHosts', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(Trial, self).__init__(**kwargs) - self.status = None - self.available_hosts = None - - -class VirtualMachine(ProxyResource): - """Virtual Machine. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar display_name: Display name of the VM. - :vartype display_name: str - :ivar mo_ref_id: Virtual machine managed object reference id. - :vartype mo_ref_id: str - :ivar folder_path: Path to virtual machine's folder starting from datacenter virtual machine - folder. - :vartype folder_path: str - :ivar restrict_movement: Whether VM DRS-driven movement is restricted (enabled) or not - (disabled). Possible values include: "Enabled", "Disabled". - :vartype restrict_movement: str or ~avs_client.models.VirtualMachineRestrictMovementState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'display_name': {'readonly': True}, - 'mo_ref_id': {'readonly': True}, - 'folder_path': {'readonly': True}, - 'restrict_movement': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'mo_ref_id': {'key': 'properties.moRefId', 'type': 'str'}, - 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, - 'restrict_movement': {'key': 'properties.restrictMovement', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualMachine, self).__init__(**kwargs) - self.display_name = None - self.mo_ref_id = None - self.folder_path = None - self.restrict_movement = None - - -class VirtualMachineRestrictMovement(msrest.serialization.Model): - """Set VM DRS-driven movement to restricted (enabled) or not (disabled). - - :param restrict_movement: Whether VM DRS-driven movement is restricted (enabled) or not - (disabled). Possible values include: "Enabled", "Disabled". - :type restrict_movement: str or ~avs_client.models.VirtualMachineRestrictMovementState - """ - - _attribute_map = { - 'restrict_movement': {'key': 'restrictMovement', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualMachineRestrictMovement, self).__init__(**kwargs) - self.restrict_movement = kwargs.get('restrict_movement', None) - - -class VirtualMachinesList(msrest.serialization.Model): - """A list of Virtual Machines. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The items to be displayed on the page. - :vartype value: list[~avs_client.models.VirtualMachine] - :ivar next_link: URL to get the next page if any. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualMachine]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualMachinesList, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class VmHostPlacementPolicyProperties(PlacementPolicyProperties): - """VM-Host placement policy properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. placement policy type.Constant filled by server. Possible values - include: "VmVm", "VmHost". - :type type: str or ~avs_client.models.PlacementPolicyType - :param state: Whether the placement policy is enabled or disabled. Possible values include: - "Enabled", "Disabled". - :type state: str or ~avs_client.models.PlacementPolicyState - :param display_name: Display name of the placement policy. - :type display_name: str - :ivar provisioning_state: The provisioning state. Possible values include: "Succeeded", - "Failed", "Building", "Deleting", "Updating", "Canceled". - :vartype provisioning_state: str or ~avs_client.models.PlacementPolicyProvisioningState - :param vm_members: Required. Virtual machine members list. - :type vm_members: list[str] - :param host_members: Required. Host members list. - :type host_members: list[str] - :param affinity_type: Required. placement policy affinity type. Possible values include: - "Affinity", "AntiAffinity". - :type affinity_type: str or ~avs_client.models.AffinityType - :param affinity_strength: vm-host placement policy affinity strength (should/must). Possible - values include: "Should", "Must". - :type affinity_strength: str or ~avs_client.models.AffinityStrength - :param azure_hybrid_benefit_type: placement policy azure hybrid benefit opt-in type. Possible - values include: "SqlHost", "None". - :type azure_hybrid_benefit_type: str or ~avs_client.models.AzureHybridBenefitType - """ - - _validation = { - 'type': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'vm_members': {'required': True}, - 'host_members': {'required': True}, - 'affinity_type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'vm_members': {'key': 'vmMembers', 'type': '[str]'}, - 'host_members': {'key': 'hostMembers', 'type': '[str]'}, - 'affinity_type': {'key': 'affinityType', 'type': 'str'}, - 'affinity_strength': {'key': 'affinityStrength', 'type': 'str'}, - 'azure_hybrid_benefit_type': {'key': 'azureHybridBenefitType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VmHostPlacementPolicyProperties, self).__init__(**kwargs) - self.type = 'VmHost' # type: str - self.vm_members = kwargs['vm_members'] - self.host_members = kwargs['host_members'] - self.affinity_type = kwargs['affinity_type'] - self.affinity_strength = kwargs.get('affinity_strength', None) - self.azure_hybrid_benefit_type = kwargs.get('azure_hybrid_benefit_type', None) - - -class VmPlacementPolicyProperties(PlacementPolicyProperties): - """VM-VM placement policy properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. placement policy type.Constant filled by server. Possible values - include: "VmVm", "VmHost". - :type type: str or ~avs_client.models.PlacementPolicyType - :param state: Whether the placement policy is enabled or disabled. Possible values include: - "Enabled", "Disabled". - :type state: str or ~avs_client.models.PlacementPolicyState - :param display_name: Display name of the placement policy. - :type display_name: str - :ivar provisioning_state: The provisioning state. Possible values include: "Succeeded", - "Failed", "Building", "Deleting", "Updating", "Canceled". - :vartype provisioning_state: str or ~avs_client.models.PlacementPolicyProvisioningState - :param vm_members: Required. Virtual machine members list. - :type vm_members: list[str] - :param affinity_type: Required. placement policy affinity type. Possible values include: - "Affinity", "AntiAffinity". - :type affinity_type: str or ~avs_client.models.AffinityType - """ - - _validation = { - 'type': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'vm_members': {'required': True}, - 'affinity_type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'vm_members': {'key': 'vmMembers', 'type': '[str]'}, - 'affinity_type': {'key': 'affinityType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VmPlacementPolicyProperties, self).__init__(**kwargs) - self.type = 'VmVm' # type: str - self.vm_members = kwargs['vm_members'] - self.affinity_type = kwargs['affinity_type'] - - -class WorkloadNetwork(ProxyResource): - """Workload Network. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkloadNetwork, self).__init__(**kwargs) - - -class WorkloadNetworkDhcp(ProxyResource): - """NSX DHCP. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param properties: DHCP properties. - :type properties: ~avs_client.models.WorkloadNetworkDhcpEntity - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'WorkloadNetworkDhcpEntity'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkloadNetworkDhcp, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - - -class WorkloadNetworkDhcpEntity(msrest.serialization.Model): - """Base class for WorkloadNetworkDhcpServer and WorkloadNetworkDhcpRelay to inherit from. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: WorkloadNetworkDhcpRelay, WorkloadNetworkDhcpServer. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param dhcp_type: Required. Type of DHCP: SERVER or RELAY.Constant filled by server. Possible - values include: "SERVER", "RELAY". - :type dhcp_type: str or ~avs_client.models.DhcpTypeEnum - :param display_name: Display name of the DHCP entity. - :type display_name: str - :ivar segments: NSX Segments consuming DHCP. - :vartype segments: list[str] - :ivar provisioning_state: The provisioning state. Possible values include: "Succeeded", - "Failed", "Building", "Deleting", "Updating", "Canceled". - :vartype provisioning_state: str or ~avs_client.models.WorkloadNetworkDhcpProvisioningState - :param revision: NSX revision number. - :type revision: long - """ - - _validation = { - 'dhcp_type': {'required': True}, - 'segments': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'dhcp_type': {'key': 'dhcpType', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'segments': {'key': 'segments', 'type': '[str]'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'revision': {'key': 'revision', 'type': 'long'}, - } - - _subtype_map = { - 'dhcp_type': {'RELAY': 'WorkloadNetworkDhcpRelay', 'SERVER': 'WorkloadNetworkDhcpServer'} - } - - def __init__( - self, - **kwargs - ): - super(WorkloadNetworkDhcpEntity, self).__init__(**kwargs) - self.dhcp_type = None # type: Optional[str] - self.display_name = kwargs.get('display_name', None) - self.segments = None - self.provisioning_state = None - self.revision = kwargs.get('revision', None) - - -class WorkloadNetworkDhcpList(msrest.serialization.Model): - """A list of NSX dhcp entities. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The items on the page. - :vartype value: list[~avs_client.models.WorkloadNetworkDhcp] - :ivar next_link: URL to get the next page if any. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[WorkloadNetworkDhcp]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkloadNetworkDhcpList, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class WorkloadNetworkDhcpRelay(WorkloadNetworkDhcpEntity): - """NSX DHCP Relay. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param dhcp_type: Required. Type of DHCP: SERVER or RELAY.Constant filled by server. Possible - values include: "SERVER", "RELAY". - :type dhcp_type: str or ~avs_client.models.DhcpTypeEnum - :param display_name: Display name of the DHCP entity. - :type display_name: str - :ivar segments: NSX Segments consuming DHCP. - :vartype segments: list[str] - :ivar provisioning_state: The provisioning state. Possible values include: "Succeeded", - "Failed", "Building", "Deleting", "Updating", "Canceled". - :vartype provisioning_state: str or ~avs_client.models.WorkloadNetworkDhcpProvisioningState - :param revision: NSX revision number. - :type revision: long - :param server_addresses: DHCP Relay Addresses. Max 3. - :type server_addresses: list[str] - """ - - _validation = { - 'dhcp_type': {'required': True}, - 'segments': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'server_addresses': {'max_items': 3, 'min_items': 1}, - } - - _attribute_map = { - 'dhcp_type': {'key': 'dhcpType', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'segments': {'key': 'segments', 'type': '[str]'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'revision': {'key': 'revision', 'type': 'long'}, - 'server_addresses': {'key': 'serverAddresses', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkloadNetworkDhcpRelay, self).__init__(**kwargs) - self.dhcp_type = 'RELAY' # type: str - self.server_addresses = kwargs.get('server_addresses', None) - - -class WorkloadNetworkDhcpServer(WorkloadNetworkDhcpEntity): - """NSX DHCP Server. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param dhcp_type: Required. Type of DHCP: SERVER or RELAY.Constant filled by server. Possible - values include: "SERVER", "RELAY". - :type dhcp_type: str or ~avs_client.models.DhcpTypeEnum - :param display_name: Display name of the DHCP entity. - :type display_name: str - :ivar segments: NSX Segments consuming DHCP. - :vartype segments: list[str] - :ivar provisioning_state: The provisioning state. Possible values include: "Succeeded", - "Failed", "Building", "Deleting", "Updating", "Canceled". - :vartype provisioning_state: str or ~avs_client.models.WorkloadNetworkDhcpProvisioningState - :param revision: NSX revision number. - :type revision: long - :param server_address: DHCP Server Address. - :type server_address: str - :param lease_time: DHCP Server Lease Time. - :type lease_time: long - """ - - _validation = { - 'dhcp_type': {'required': True}, - 'segments': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'dhcp_type': {'key': 'dhcpType', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'segments': {'key': 'segments', 'type': '[str]'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'revision': {'key': 'revision', 'type': 'long'}, - 'server_address': {'key': 'serverAddress', 'type': 'str'}, - 'lease_time': {'key': 'leaseTime', 'type': 'long'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkloadNetworkDhcpServer, self).__init__(**kwargs) - self.dhcp_type = 'SERVER' # type: str - self.server_address = kwargs.get('server_address', None) - self.lease_time = kwargs.get('lease_time', None) - - -class WorkloadNetworkDnsService(ProxyResource): - """NSX DNS Service. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param display_name: Display name of the DNS Service. - :type display_name: str - :param dns_service_ip: DNS service IP of the DNS Service. - :type dns_service_ip: str - :param default_dns_zone: Default DNS zone of the DNS Service. - :type default_dns_zone: str - :param fqdn_zones: FQDN zones of the DNS Service. - :type fqdn_zones: list[str] - :param log_level: DNS Service log level. Possible values include: "DEBUG", "INFO", "WARNING", - "ERROR", "FATAL". - :type log_level: str or ~avs_client.models.DnsServiceLogLevelEnum - :ivar status: DNS Service status. Possible values include: "SUCCESS", "FAILURE". - :vartype status: str or ~avs_client.models.DnsServiceStatusEnum - :ivar provisioning_state: The provisioning state. Possible values include: "Succeeded", - "Failed", "Building", "Deleting", "Updating", "Canceled". - :vartype provisioning_state: str or - ~avs_client.models.WorkloadNetworkDnsServiceProvisioningState - :param revision: NSX revision number. - :type revision: long - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'status': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'dns_service_ip': {'key': 'properties.dnsServiceIp', 'type': 'str'}, - 'default_dns_zone': {'key': 'properties.defaultDnsZone', 'type': 'str'}, - 'fqdn_zones': {'key': 'properties.fqdnZones', 'type': '[str]'}, - 'log_level': {'key': 'properties.logLevel', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'revision': {'key': 'properties.revision', 'type': 'long'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkloadNetworkDnsService, self).__init__(**kwargs) - self.display_name = kwargs.get('display_name', None) - self.dns_service_ip = kwargs.get('dns_service_ip', None) - self.default_dns_zone = kwargs.get('default_dns_zone', None) - self.fqdn_zones = kwargs.get('fqdn_zones', None) - self.log_level = kwargs.get('log_level', None) - self.status = None - self.provisioning_state = None - self.revision = kwargs.get('revision', None) - - -class WorkloadNetworkDnsServicesList(msrest.serialization.Model): - """A list of NSX DNS Services. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The items on the page. - :vartype value: list[~avs_client.models.WorkloadNetworkDnsService] - :ivar next_link: URL to get the next page if any. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[WorkloadNetworkDnsService]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkloadNetworkDnsServicesList, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class WorkloadNetworkDnsZone(ProxyResource): - """NSX DNS Zone. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param display_name: Display name of the DNS Zone. - :type display_name: str - :param domain: Domain names of the DNS Zone. - :type domain: list[str] - :param dns_server_ips: DNS Server IP array of the DNS Zone. - :type dns_server_ips: list[str] - :param source_ip: Source IP of the DNS Zone. - :type source_ip: str - :param dns_services: Number of DNS Services using the DNS zone. - :type dns_services: long - :ivar provisioning_state: The provisioning state. Possible values include: "Succeeded", - "Failed", "Building", "Deleting", "Updating", "Canceled". - :vartype provisioning_state: str or ~avs_client.models.WorkloadNetworkDnsZoneProvisioningState - :param revision: NSX revision number. - :type revision: long - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'domain': {'key': 'properties.domain', 'type': '[str]'}, - 'dns_server_ips': {'key': 'properties.dnsServerIps', 'type': '[str]'}, - 'source_ip': {'key': 'properties.sourceIp', 'type': 'str'}, - 'dns_services': {'key': 'properties.dnsServices', 'type': 'long'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'revision': {'key': 'properties.revision', 'type': 'long'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkloadNetworkDnsZone, self).__init__(**kwargs) - self.display_name = kwargs.get('display_name', None) - self.domain = kwargs.get('domain', None) - self.dns_server_ips = kwargs.get('dns_server_ips', None) - self.source_ip = kwargs.get('source_ip', None) - self.dns_services = kwargs.get('dns_services', None) - self.provisioning_state = None - self.revision = kwargs.get('revision', None) - - -class WorkloadNetworkDnsZonesList(msrest.serialization.Model): - """A list of NSX DNS Zones. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The items on the page. - :vartype value: list[~avs_client.models.WorkloadNetworkDnsZone] - :ivar next_link: URL to get the next page if any. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[WorkloadNetworkDnsZone]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkloadNetworkDnsZonesList, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class WorkloadNetworkGateway(ProxyResource): - """NSX Gateway. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param display_name: Display name of the DHCP entity. - :type display_name: str - :ivar path: NSX Gateway Path. - :vartype path: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'path': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'path': {'key': 'properties.path', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkloadNetworkGateway, self).__init__(**kwargs) - self.display_name = kwargs.get('display_name', None) - self.path = None - - -class WorkloadNetworkGatewayList(msrest.serialization.Model): - """A list of NSX Gateways. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The items on the page. - :vartype value: list[~avs_client.models.WorkloadNetworkGateway] - :ivar next_link: URL to get the next page if any. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[WorkloadNetworkGateway]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkloadNetworkGatewayList, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class WorkloadNetworkList(msrest.serialization.Model): - """A list of workload networks. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The items on the page. - :vartype value: list[~avs_client.models.WorkloadNetwork] - :ivar next_link: URL to get the next page if any. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[WorkloadNetwork]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkloadNetworkList, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class WorkloadNetworkPortMirroring(ProxyResource): - """NSX Port Mirroring. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param display_name: Display name of the port mirroring profile. - :type display_name: str - :param direction: Direction of port mirroring profile. Possible values include: "INGRESS", - "EGRESS", "BIDIRECTIONAL". - :type direction: str or ~avs_client.models.PortMirroringDirectionEnum - :param source: Source VM Group. - :type source: str - :param destination: Destination VM Group. - :type destination: str - :ivar status: Port Mirroring Status. Possible values include: "SUCCESS", "FAILURE". - :vartype status: str or ~avs_client.models.PortMirroringStatusEnum - :ivar provisioning_state: The provisioning state. Possible values include: "Succeeded", - "Failed", "Building", "Deleting", "Updating", "Canceled". - :vartype provisioning_state: str or - ~avs_client.models.WorkloadNetworkPortMirroringProvisioningState - :param revision: NSX revision number. - :type revision: long - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'status': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'direction': {'key': 'properties.direction', 'type': 'str'}, - 'source': {'key': 'properties.source', 'type': 'str'}, - 'destination': {'key': 'properties.destination', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'revision': {'key': 'properties.revision', 'type': 'long'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkloadNetworkPortMirroring, self).__init__(**kwargs) - self.display_name = kwargs.get('display_name', None) - self.direction = kwargs.get('direction', None) - self.source = kwargs.get('source', None) - self.destination = kwargs.get('destination', None) - self.status = None - self.provisioning_state = None - self.revision = kwargs.get('revision', None) - - -class WorkloadNetworkPortMirroringList(msrest.serialization.Model): - """A list of NSX Port Mirroring. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The items on the page. - :vartype value: list[~avs_client.models.WorkloadNetworkPortMirroring] - :ivar next_link: URL to get the next page if any. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[WorkloadNetworkPortMirroring]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkloadNetworkPortMirroringList, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class WorkloadNetworkPublicIP(ProxyResource): - """NSX Public IP Block. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param display_name: Display name of the Public IP Block. - :type display_name: str - :param number_of_public_i_ps: Number of Public IPs requested. - :type number_of_public_i_ps: long - :ivar public_ip_block: CIDR Block of the Public IP Block. - :vartype public_ip_block: str - :ivar provisioning_state: The provisioning state. Possible values include: "Succeeded", - "Failed", "Building", "Deleting", "Updating", "Canceled". - :vartype provisioning_state: str or ~avs_client.models.WorkloadNetworkPublicIPProvisioningState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'public_ip_block': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'number_of_public_i_ps': {'key': 'properties.numberOfPublicIPs', 'type': 'long'}, - 'public_ip_block': {'key': 'properties.publicIPBlock', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkloadNetworkPublicIP, self).__init__(**kwargs) - self.display_name = kwargs.get('display_name', None) - self.number_of_public_i_ps = kwargs.get('number_of_public_i_ps', None) - self.public_ip_block = None - self.provisioning_state = None - - -class WorkloadNetworkPublicIPsList(msrest.serialization.Model): - """A list of NSX Public IP Blocks. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The items on the page. - :vartype value: list[~avs_client.models.WorkloadNetworkPublicIP] - :ivar next_link: URL to get the next page if any. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[WorkloadNetworkPublicIP]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkloadNetworkPublicIPsList, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class WorkloadNetworkSegment(ProxyResource): - """NSX Segment. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param display_name: Display name of the segment. - :type display_name: str - :param connected_gateway: Gateway which to connect segment to. - :type connected_gateway: str - :param subnet: Subnet which to connect segment to. - :type subnet: ~avs_client.models.WorkloadNetworkSegmentSubnet - :ivar port_vif: Port Vif which segment is associated with. - :vartype port_vif: list[~avs_client.models.WorkloadNetworkSegmentPortVif] - :ivar status: Segment status. Possible values include: "SUCCESS", "FAILURE". - :vartype status: str or ~avs_client.models.SegmentStatusEnum - :ivar provisioning_state: The provisioning state. Possible values include: "Succeeded", - "Failed", "Building", "Deleting", "Updating", "Canceled". - :vartype provisioning_state: str or ~avs_client.models.WorkloadNetworkSegmentProvisioningState - :param revision: NSX revision number. - :type revision: long - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'port_vif': {'readonly': True}, - 'status': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'connected_gateway': {'key': 'properties.connectedGateway', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'WorkloadNetworkSegmentSubnet'}, - 'port_vif': {'key': 'properties.portVif', 'type': '[WorkloadNetworkSegmentPortVif]'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'revision': {'key': 'properties.revision', 'type': 'long'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkloadNetworkSegment, self).__init__(**kwargs) - self.display_name = kwargs.get('display_name', None) - self.connected_gateway = kwargs.get('connected_gateway', None) - self.subnet = kwargs.get('subnet', None) - self.port_vif = None - self.status = None - self.provisioning_state = None - self.revision = kwargs.get('revision', None) - - -class WorkloadNetworkSegmentPortVif(msrest.serialization.Model): - """Ports and any VIF attached to segment. - - :param port_name: Name of port or VIF attached to segment. - :type port_name: str - """ - - _attribute_map = { - 'port_name': {'key': 'portName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkloadNetworkSegmentPortVif, self).__init__(**kwargs) - self.port_name = kwargs.get('port_name', None) - - -class WorkloadNetworkSegmentsList(msrest.serialization.Model): - """A list of NSX Segments. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The items on the page. - :vartype value: list[~avs_client.models.WorkloadNetworkSegment] - :ivar next_link: URL to get the next page if any. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[WorkloadNetworkSegment]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkloadNetworkSegmentsList, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class WorkloadNetworkSegmentSubnet(msrest.serialization.Model): - """Subnet configuration for segment. - - :param dhcp_ranges: DHCP Range assigned for subnet. - :type dhcp_ranges: list[str] - :param gateway_address: Gateway address. - :type gateway_address: str - """ - - _attribute_map = { - 'dhcp_ranges': {'key': 'dhcpRanges', 'type': '[str]'}, - 'gateway_address': {'key': 'gatewayAddress', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkloadNetworkSegmentSubnet, self).__init__(**kwargs) - self.dhcp_ranges = kwargs.get('dhcp_ranges', None) - self.gateway_address = kwargs.get('gateway_address', None) - - -class WorkloadNetworkVirtualMachine(ProxyResource): - """NSX Virtual Machine. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param display_name: Display name of the VM. - :type display_name: str - :ivar vm_type: Virtual machine type. Possible values include: "REGULAR", "EDGE", "SERVICE". - :vartype vm_type: str or ~avs_client.models.VMTypeEnum - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'vm_type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'vm_type': {'key': 'properties.vmType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkloadNetworkVirtualMachine, self).__init__(**kwargs) - self.display_name = kwargs.get('display_name', None) - self.vm_type = None - - -class WorkloadNetworkVirtualMachinesList(msrest.serialization.Model): - """A list of NSX Virtual Machines. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The items on the page. - :vartype value: list[~avs_client.models.WorkloadNetworkVirtualMachine] - :ivar next_link: URL to get the next page if any. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[WorkloadNetworkVirtualMachine]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkloadNetworkVirtualMachinesList, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class WorkloadNetworkVMGroup(ProxyResource): - """NSX VM Group. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param display_name: Display name of the VM group. - :type display_name: str - :param members: Virtual machine members of this group. - :type members: list[str] - :ivar status: VM Group status. Possible values include: "SUCCESS", "FAILURE". - :vartype status: str or ~avs_client.models.VMGroupStatusEnum - :ivar provisioning_state: The provisioning state. Possible values include: "Succeeded", - "Failed", "Building", "Deleting", "Updating", "Canceled". - :vartype provisioning_state: str or ~avs_client.models.WorkloadNetworkVMGroupProvisioningState - :param revision: NSX revision number. - :type revision: long - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'status': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'members': {'key': 'properties.members', 'type': '[str]'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'revision': {'key': 'properties.revision', 'type': 'long'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkloadNetworkVMGroup, self).__init__(**kwargs) - self.display_name = kwargs.get('display_name', None) - self.members = kwargs.get('members', None) - self.status = None - self.provisioning_state = None - self.revision = kwargs.get('revision', None) - - -class WorkloadNetworkVMGroupsList(msrest.serialization.Model): - """A list of NSX VM Groups. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The items on the page. - :vartype value: list[~avs_client.models.WorkloadNetworkVMGroup] - :ivar next_link: URL to get the next page if any. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[WorkloadNetworkVMGroup]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkloadNetworkVMGroupsList, self).__init__(**kwargs) - self.value = None - self.next_link = None diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/models/_models_py3.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/models/_models_py3.py deleted file mode 100644 index 142ba858629..00000000000 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/models/_models_py3.py +++ /dev/null @@ -1,4369 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import Any, Dict, List, Optional, Union - -import msrest.serialization - -from ._avs_client_enums import * - - -class Resource(msrest.serialization.Model): - """The core properties of ARM resources. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class Addon(Resource): - """An addon resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param properties: The properties of an addon resource. - :type properties: ~avs_client.models.AddonProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AddonProperties'}, - } - - def __init__( - self, - *, - properties: Optional["AddonProperties"] = None, - **kwargs - ): - super(Addon, self).__init__(**kwargs) - self.properties = properties - - -class AddonProperties(msrest.serialization.Model): - """The properties of an addon. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AddonArcProperties, AddonHcxProperties, AddonSrmProperties, AddonVrProperties. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param addon_type: Required. The type of private cloud addon.Constant filled by server. - Possible values include: "SRM", "VR", "HCX", "Arc". - :type addon_type: str or ~avs_client.models.AddonType - :ivar provisioning_state: The state of the addon provisioning. Possible values include: - "Succeeded", "Failed", "Cancelled", "Building", "Deleting", "Updating", "Canceled". - :vartype provisioning_state: str or ~avs_client.models.AddonProvisioningState - """ - - _validation = { - 'addon_type': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'addon_type': {'key': 'addonType', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - } - - _subtype_map = { - 'addon_type': {'Arc': 'AddonArcProperties', 'HCX': 'AddonHcxProperties', 'SRM': 'AddonSrmProperties', 'VR': 'AddonVrProperties'} - } - - def __init__( - self, - **kwargs - ): - super(AddonProperties, self).__init__(**kwargs) - self.addon_type = None # type: Optional[str] - self.provisioning_state = None - - -class AddonArcProperties(AddonProperties): - """The properties of an Arc addon. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param addon_type: Required. The type of private cloud addon.Constant filled by server. - Possible values include: "SRM", "VR", "HCX", "Arc". - :type addon_type: str or ~avs_client.models.AddonType - :ivar provisioning_state: The state of the addon provisioning. Possible values include: - "Succeeded", "Failed", "Cancelled", "Building", "Deleting", "Updating", "Canceled". - :vartype provisioning_state: str or ~avs_client.models.AddonProvisioningState - :param v_center: The VMware vCenter resource ID. - :type v_center: str - """ - - _validation = { - 'addon_type': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'addon_type': {'key': 'addonType', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'v_center': {'key': 'vCenter', 'type': 'str'}, - } - - def __init__( - self, - *, - v_center: Optional[str] = None, - **kwargs - ): - super(AddonArcProperties, self).__init__(**kwargs) - self.addon_type = 'Arc' # type: str - self.v_center = v_center - - -class AddonHcxProperties(AddonProperties): - """The properties of an HCX addon. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param addon_type: Required. The type of private cloud addon.Constant filled by server. - Possible values include: "SRM", "VR", "HCX", "Arc". - :type addon_type: str or ~avs_client.models.AddonType - :ivar provisioning_state: The state of the addon provisioning. Possible values include: - "Succeeded", "Failed", "Cancelled", "Building", "Deleting", "Updating", "Canceled". - :vartype provisioning_state: str or ~avs_client.models.AddonProvisioningState - :param offer: Required. The HCX offer, example VMware MaaS Cloud Provider (Enterprise). - :type offer: str - """ - - _validation = { - 'addon_type': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'offer': {'required': True}, - } - - _attribute_map = { - 'addon_type': {'key': 'addonType', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'offer': {'key': 'offer', 'type': 'str'}, - } - - def __init__( - self, - *, - offer: str, - **kwargs - ): - super(AddonHcxProperties, self).__init__(**kwargs) - self.addon_type = 'HCX' # type: str - self.offer = offer - - -class AddonList(msrest.serialization.Model): - """A paged list of addons. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The items on a page. - :vartype value: list[~avs_client.models.Addon] - :ivar next_link: URL to get the next page if any. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Addon]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(AddonList, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class AddonSrmProperties(AddonProperties): - """The properties of a Site Recovery Manager (SRM) addon. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param addon_type: Required. The type of private cloud addon.Constant filled by server. - Possible values include: "SRM", "VR", "HCX", "Arc". - :type addon_type: str or ~avs_client.models.AddonType - :ivar provisioning_state: The state of the addon provisioning. Possible values include: - "Succeeded", "Failed", "Cancelled", "Building", "Deleting", "Updating", "Canceled". - :vartype provisioning_state: str or ~avs_client.models.AddonProvisioningState - :param license_key: The Site Recovery Manager (SRM) license. - :type license_key: str - """ - - _validation = { - 'addon_type': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'addon_type': {'key': 'addonType', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'license_key': {'key': 'licenseKey', 'type': 'str'}, - } - - def __init__( - self, - *, - license_key: Optional[str] = None, - **kwargs - ): - super(AddonSrmProperties, self).__init__(**kwargs) - self.addon_type = 'SRM' # type: str - self.license_key = license_key - - -class AddonVrProperties(AddonProperties): - """The properties of a vSphere Replication (VR) addon. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param addon_type: Required. The type of private cloud addon.Constant filled by server. - Possible values include: "SRM", "VR", "HCX", "Arc". - :type addon_type: str or ~avs_client.models.AddonType - :ivar provisioning_state: The state of the addon provisioning. Possible values include: - "Succeeded", "Failed", "Cancelled", "Building", "Deleting", "Updating", "Canceled". - :vartype provisioning_state: str or ~avs_client.models.AddonProvisioningState - :param vrs_count: Required. The vSphere Replication Server (VRS) count. - :type vrs_count: int - """ - - _validation = { - 'addon_type': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'vrs_count': {'required': True}, - } - - _attribute_map = { - 'addon_type': {'key': 'addonType', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'vrs_count': {'key': 'vrsCount', 'type': 'int'}, - } - - def __init__( - self, - *, - vrs_count: int, - **kwargs - ): - super(AddonVrProperties, self).__init__(**kwargs) - self.addon_type = 'VR' # type: str - self.vrs_count = vrs_count - - -class AdminCredentials(msrest.serialization.Model): - """Administrative credentials for accessing vCenter and NSX-T. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar nsxt_username: NSX-T Manager username. - :vartype nsxt_username: str - :ivar nsxt_password: NSX-T Manager password. - :vartype nsxt_password: str - :ivar vcenter_username: vCenter admin username. - :vartype vcenter_username: str - :ivar vcenter_password: vCenter admin password. - :vartype vcenter_password: str - """ - - _validation = { - 'nsxt_username': {'readonly': True}, - 'nsxt_password': {'readonly': True}, - 'vcenter_username': {'readonly': True}, - 'vcenter_password': {'readonly': True}, - } - - _attribute_map = { - 'nsxt_username': {'key': 'nsxtUsername', 'type': 'str'}, - 'nsxt_password': {'key': 'nsxtPassword', 'type': 'str'}, - 'vcenter_username': {'key': 'vcenterUsername', 'type': 'str'}, - 'vcenter_password': {'key': 'vcenterPassword', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(AdminCredentials, self).__init__(**kwargs) - self.nsxt_username = None - self.nsxt_password = None - self.vcenter_username = None - self.vcenter_password = None - - -class AvailabilityProperties(msrest.serialization.Model): - """The properties describing private cloud availability zone distribution. - - :param strategy: The availability strategy for the private cloud. Possible values include: - "SingleZone", "DualZone". - :type strategy: str or ~avs_client.models.AvailabilityStrategy - :param zone: The primary availability zone for the private cloud. - :type zone: int - :param secondary_zone: The secondary availability zone for the private cloud. - :type secondary_zone: int - """ - - _attribute_map = { - 'strategy': {'key': 'strategy', 'type': 'str'}, - 'zone': {'key': 'zone', 'type': 'int'}, - 'secondary_zone': {'key': 'secondaryZone', 'type': 'int'}, - } - - def __init__( - self, - *, - strategy: Optional[Union[str, "AvailabilityStrategy"]] = None, - zone: Optional[int] = None, - secondary_zone: Optional[int] = None, - **kwargs - ): - super(AvailabilityProperties, self).__init__(**kwargs) - self.strategy = strategy - self.zone = zone - self.secondary_zone = secondary_zone - - -class Circuit(msrest.serialization.Model): - """An ExpressRoute Circuit. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar primary_subnet: CIDR of primary subnet. - :vartype primary_subnet: str - :ivar secondary_subnet: CIDR of secondary subnet. - :vartype secondary_subnet: str - :ivar express_route_id: Identifier of the ExpressRoute Circuit (Microsoft Colo only). - :vartype express_route_id: str - :ivar express_route_private_peering_id: ExpressRoute Circuit private peering identifier. - :vartype express_route_private_peering_id: str - """ - - _validation = { - 'primary_subnet': {'readonly': True}, - 'secondary_subnet': {'readonly': True}, - 'express_route_id': {'readonly': True}, - 'express_route_private_peering_id': {'readonly': True}, - } - - _attribute_map = { - 'primary_subnet': {'key': 'primarySubnet', 'type': 'str'}, - 'secondary_subnet': {'key': 'secondarySubnet', 'type': 'str'}, - 'express_route_id': {'key': 'expressRouteID', 'type': 'str'}, - 'express_route_private_peering_id': {'key': 'expressRoutePrivatePeeringID', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(Circuit, self).__init__(**kwargs) - self.primary_subnet = None - self.secondary_subnet = None - self.express_route_id = None - self.express_route_private_peering_id = None - - -class CloudLink(Resource): - """A cloud link resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar status: The state of the cloud link. Possible values include: "Active", "Building", - "Deleting", "Failed", "Disconnected". - :vartype status: str or ~avs_client.models.CloudLinkStatus - :param linked_cloud: Identifier of the other private cloud participating in the link. - :type linked_cloud: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'linked_cloud': {'key': 'properties.linkedCloud', 'type': 'str'}, - } - - def __init__( - self, - *, - linked_cloud: Optional[str] = None, - **kwargs - ): - super(CloudLink, self).__init__(**kwargs) - self.status = None - self.linked_cloud = linked_cloud - - -class CloudLinkList(msrest.serialization.Model): - """A paged list of cloud links. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The items on a page. - :vartype value: list[~avs_client.models.CloudLink] - :ivar next_link: URL to get the next page if any. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[CloudLink]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(CloudLinkList, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class Cluster(Resource): - """A cluster resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param sku: Required. The cluster SKU. - :type sku: ~avs_client.models.Sku - :param cluster_size: The cluster size. - :type cluster_size: int - :ivar provisioning_state: The state of the cluster provisioning. Possible values include: - "Succeeded", "Failed", "Cancelled", "Deleting", "Updating", "Canceled". - :vartype provisioning_state: str or ~avs_client.models.ClusterProvisioningState - :ivar cluster_id: The identity. - :vartype cluster_id: int - :param hosts: The hosts. - :type hosts: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'sku': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'cluster_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'cluster_size': {'key': 'properties.clusterSize', 'type': 'int'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'cluster_id': {'key': 'properties.clusterId', 'type': 'int'}, - 'hosts': {'key': 'properties.hosts', 'type': '[str]'}, - } - - def __init__( - self, - *, - sku: "Sku", - cluster_size: Optional[int] = None, - hosts: Optional[List[str]] = None, - **kwargs - ): - super(Cluster, self).__init__(**kwargs) - self.sku = sku - self.cluster_size = cluster_size - self.provisioning_state = None - self.cluster_id = None - self.hosts = hosts - - -class ClusterList(msrest.serialization.Model): - """A paged list of clusters. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The items on a page. - :vartype value: list[~avs_client.models.Cluster] - :ivar next_link: URL to get the next page if any. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Cluster]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ClusterList, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class CommonClusterProperties(msrest.serialization.Model): - """The common properties of a cluster. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param cluster_size: The cluster size. - :type cluster_size: int - :ivar provisioning_state: The state of the cluster provisioning. Possible values include: - "Succeeded", "Failed", "Cancelled", "Deleting", "Updating", "Canceled". - :vartype provisioning_state: str or ~avs_client.models.ClusterProvisioningState - :ivar cluster_id: The identity. - :vartype cluster_id: int - :param hosts: The hosts. - :type hosts: list[str] - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - 'cluster_id': {'readonly': True}, - } - - _attribute_map = { - 'cluster_size': {'key': 'clusterSize', 'type': 'int'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'cluster_id': {'key': 'clusterId', 'type': 'int'}, - 'hosts': {'key': 'hosts', 'type': '[str]'}, - } - - def __init__( - self, - *, - cluster_size: Optional[int] = None, - hosts: Optional[List[str]] = None, - **kwargs - ): - super(CommonClusterProperties, self).__init__(**kwargs) - self.cluster_size = cluster_size - self.provisioning_state = None - self.cluster_id = None - self.hosts = hosts - - -class ClusterProperties(CommonClusterProperties): - """The properties of a cluster. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param cluster_size: The cluster size. - :type cluster_size: int - :ivar provisioning_state: The state of the cluster provisioning. Possible values include: - "Succeeded", "Failed", "Cancelled", "Deleting", "Updating", "Canceled". - :vartype provisioning_state: str or ~avs_client.models.ClusterProvisioningState - :ivar cluster_id: The identity. - :vartype cluster_id: int - :param hosts: The hosts. - :type hosts: list[str] - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - 'cluster_id': {'readonly': True}, - } - - _attribute_map = { - 'cluster_size': {'key': 'clusterSize', 'type': 'int'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'cluster_id': {'key': 'clusterId', 'type': 'int'}, - 'hosts': {'key': 'hosts', 'type': '[str]'}, - } - - def __init__( - self, - *, - cluster_size: Optional[int] = None, - hosts: Optional[List[str]] = None, - **kwargs - ): - super(ClusterProperties, self).__init__(cluster_size=cluster_size, hosts=hosts, **kwargs) - - -class ClusterUpdate(msrest.serialization.Model): - """An update of a cluster resource. - - :param cluster_size: The cluster size. - :type cluster_size: int - :param hosts: The hosts. - :type hosts: list[str] - """ - - _attribute_map = { - 'cluster_size': {'key': 'properties.clusterSize', 'type': 'int'}, - 'hosts': {'key': 'properties.hosts', 'type': '[str]'}, - } - - def __init__( - self, - *, - cluster_size: Optional[int] = None, - hosts: Optional[List[str]] = None, - **kwargs - ): - super(ClusterUpdate, self).__init__(**kwargs) - self.cluster_size = cluster_size - self.hosts = hosts - - -class ClusterZone(msrest.serialization.Model): - """Zone and associated hosts info. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar hosts: List of hosts belonging to the availability zone in a cluster. - :vartype hosts: list[str] - :ivar zone: Availability zone identifier. - :vartype zone: str - """ - - _validation = { - 'hosts': {'readonly': True}, - 'zone': {'readonly': True}, - } - - _attribute_map = { - 'hosts': {'key': 'hosts', 'type': '[str]'}, - 'zone': {'key': 'zone', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ClusterZone, self).__init__(**kwargs) - self.hosts = None - self.zone = None - - -class ClusterZoneList(msrest.serialization.Model): - """List of all zones and associated hosts for a cluster. - - :param zones: Zone and associated hosts info. - :type zones: list[~avs_client.models.ClusterZone] - """ - - _attribute_map = { - 'zones': {'key': 'zones', 'type': '[ClusterZone]'}, - } - - def __init__( - self, - *, - zones: Optional[List["ClusterZone"]] = None, - **kwargs - ): - super(ClusterZoneList, self).__init__(**kwargs) - self.zones = zones - - -class Datastore(Resource): - """A datastore resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar provisioning_state: The state of the datastore provisioning. Possible values include: - "Succeeded", "Failed", "Cancelled", "Pending", "Creating", "Updating", "Deleting", "Canceled". - :vartype provisioning_state: str or ~avs_client.models.DatastoreProvisioningState - :param net_app_volume: An Azure NetApp Files volume. - :type net_app_volume: ~avs_client.models.NetAppVolume - :param disk_pool_volume: An iSCSI volume. - :type disk_pool_volume: ~avs_client.models.DiskPoolVolume - :ivar status: The operational status of the datastore. Possible values include: "Unknown", - "Accessible", "Inaccessible", "Attached", "Detached", "LostCommunication", "DeadOrError". - :vartype status: str or ~avs_client.models.DatastoreStatus - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'net_app_volume': {'key': 'properties.netAppVolume', 'type': 'NetAppVolume'}, - 'disk_pool_volume': {'key': 'properties.diskPoolVolume', 'type': 'DiskPoolVolume'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - } - - def __init__( - self, - *, - net_app_volume: Optional["NetAppVolume"] = None, - disk_pool_volume: Optional["DiskPoolVolume"] = None, - **kwargs - ): - super(Datastore, self).__init__(**kwargs) - self.provisioning_state = None - self.net_app_volume = net_app_volume - self.disk_pool_volume = disk_pool_volume - self.status = None - - -class DatastoreList(msrest.serialization.Model): - """A paged list of datastores. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The items on a page. - :vartype value: list[~avs_client.models.Datastore] - :ivar next_link: URL to get the next page if any. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Datastore]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(DatastoreList, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class DiskPoolVolume(msrest.serialization.Model): - """An iSCSI volume from Microsoft.StoragePool provider. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param target_id: Required. Azure resource ID of the iSCSI target. - :type target_id: str - :param lun_name: Required. Name of the LUN to be used for datastore. - :type lun_name: str - :param mount_option: Mode that describes whether the LUN has to be mounted as a datastore or - attached as a LUN. Possible values include: "MOUNT", "ATTACH". Default value: "MOUNT". - :type mount_option: str or ~avs_client.models.MountOptionEnum - :ivar path: Device path. - :vartype path: str - """ - - _validation = { - 'target_id': {'required': True}, - 'lun_name': {'required': True}, - 'path': {'readonly': True}, - } - - _attribute_map = { - 'target_id': {'key': 'targetId', 'type': 'str'}, - 'lun_name': {'key': 'lunName', 'type': 'str'}, - 'mount_option': {'key': 'mountOption', 'type': 'str'}, - 'path': {'key': 'path', 'type': 'str'}, - } - - def __init__( - self, - *, - target_id: str, - lun_name: str, - mount_option: Optional[Union[str, "MountOptionEnum"]] = "MOUNT", - **kwargs - ): - super(DiskPoolVolume, self).__init__(**kwargs) - self.target_id = target_id - self.lun_name = lun_name - self.mount_option = mount_option - self.path = None - - -class Encryption(msrest.serialization.Model): - """The properties of customer managed encryption key. - - :param status: Status of customer managed encryption key. Possible values include: "Enabled", - "Disabled". - :type status: str or ~avs_client.models.EncryptionState - :param key_vault_properties: The key vault where the encryption key is stored. - :type key_vault_properties: ~avs_client.models.EncryptionKeyVaultProperties - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'key_vault_properties': {'key': 'keyVaultProperties', 'type': 'EncryptionKeyVaultProperties'}, - } - - def __init__( - self, - *, - status: Optional[Union[str, "EncryptionState"]] = None, - key_vault_properties: Optional["EncryptionKeyVaultProperties"] = None, - **kwargs - ): - super(Encryption, self).__init__(**kwargs) - self.status = status - self.key_vault_properties = key_vault_properties - - -class EncryptionKeyVaultProperties(msrest.serialization.Model): - """An Encryption Key. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param key_name: The name of the key. - :type key_name: str - :param key_version: The version of the key. - :type key_version: str - :ivar auto_detected_key_version: The auto-detected version of the key if versionType is - auto-detected. - :vartype auto_detected_key_version: str - :param key_vault_url: The URL of the vault. - :type key_vault_url: str - :ivar key_state: The state of key provided. Possible values include: "Connected", - "AccessDenied". - :vartype key_state: str or ~avs_client.models.EncryptionKeyStatus - :ivar version_type: Property of the key if user provided or auto detected. Possible values - include: "Fixed", "AutoDetected". - :vartype version_type: str or ~avs_client.models.EncryptionVersionType - """ - - _validation = { - 'auto_detected_key_version': {'readonly': True}, - 'key_state': {'readonly': True}, - 'version_type': {'readonly': True}, - } - - _attribute_map = { - 'key_name': {'key': 'keyName', 'type': 'str'}, - 'key_version': {'key': 'keyVersion', 'type': 'str'}, - 'auto_detected_key_version': {'key': 'autoDetectedKeyVersion', 'type': 'str'}, - 'key_vault_url': {'key': 'keyVaultUrl', 'type': 'str'}, - 'key_state': {'key': 'keyState', 'type': 'str'}, - 'version_type': {'key': 'versionType', 'type': 'str'}, - } - - def __init__( - self, - *, - key_name: Optional[str] = None, - key_version: Optional[str] = None, - key_vault_url: Optional[str] = None, - **kwargs - ): - super(EncryptionKeyVaultProperties, self).__init__(**kwargs) - self.key_name = key_name - self.key_version = key_version - self.auto_detected_key_version = None - self.key_vault_url = key_vault_url - self.key_state = None - self.version_type = None - - -class Endpoints(msrest.serialization.Model): - """Endpoint addresses. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar nsxt_manager: Endpoint for the NSX-T Data Center manager. - :vartype nsxt_manager: str - :ivar vcsa: Endpoint for Virtual Center Server Appliance. - :vartype vcsa: str - :ivar hcx_cloud_manager: Endpoint for the HCX Cloud Manager. - :vartype hcx_cloud_manager: str - """ - - _validation = { - 'nsxt_manager': {'readonly': True}, - 'vcsa': {'readonly': True}, - 'hcx_cloud_manager': {'readonly': True}, - } - - _attribute_map = { - 'nsxt_manager': {'key': 'nsxtManager', 'type': 'str'}, - 'vcsa': {'key': 'vcsa', 'type': 'str'}, - 'hcx_cloud_manager': {'key': 'hcxCloudManager', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(Endpoints, self).__init__(**kwargs) - self.nsxt_manager = None - self.vcsa = None - self.hcx_cloud_manager = None - - -class ErrorAdditionalInfo(msrest.serialization.Model): - """The resource management error additional info. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar type: The additional info type. - :vartype type: str - :ivar info: The additional info. - :vartype info: any - """ - - _validation = { - 'type': {'readonly': True}, - 'info': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'info': {'key': 'info', 'type': 'object'}, - } - - def __init__( - self, - **kwargs - ): - super(ErrorAdditionalInfo, self).__init__(**kwargs) - self.type = None - self.info = None - - -class ErrorResponse(msrest.serialization.Model): - """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar code: The error code. - :vartype code: str - :ivar message: The error message. - :vartype message: str - :ivar target: The error target. - :vartype target: str - :ivar details: The error details. - :vartype details: list[~avs_client.models.ErrorResponse] - :ivar additional_info: The error additional info. - :vartype additional_info: list[~avs_client.models.ErrorAdditionalInfo] - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - 'details': {'readonly': True}, - 'additional_info': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorResponse]'}, - 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, - } - - def __init__( - self, - **kwargs - ): - super(ErrorResponse, self).__init__(**kwargs) - self.code = None - self.message = None - self.target = None - self.details = None - self.additional_info = None - - -class ExpressRouteAuthorization(Resource): - """ExpressRoute Circuit Authorization. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar provisioning_state: The state of the ExpressRoute Circuit Authorization provisioning. - Possible values include: "Succeeded", "Failed", "Updating", "Canceled". - :vartype provisioning_state: str or - ~avs_client.models.ExpressRouteAuthorizationProvisioningState - :ivar express_route_authorization_id: The ID of the ExpressRoute Circuit Authorization. - :vartype express_route_authorization_id: str - :ivar express_route_authorization_key: The key of the ExpressRoute Circuit Authorization. - :vartype express_route_authorization_key: str - :param express_route_id: The ID of the ExpressRoute Circuit. - :type express_route_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'express_route_authorization_id': {'readonly': True}, - 'express_route_authorization_key': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'express_route_authorization_id': {'key': 'properties.expressRouteAuthorizationId', 'type': 'str'}, - 'express_route_authorization_key': {'key': 'properties.expressRouteAuthorizationKey', 'type': 'str'}, - 'express_route_id': {'key': 'properties.expressRouteId', 'type': 'str'}, - } - - def __init__( - self, - *, - express_route_id: Optional[str] = None, - **kwargs - ): - super(ExpressRouteAuthorization, self).__init__(**kwargs) - self.provisioning_state = None - self.express_route_authorization_id = None - self.express_route_authorization_key = None - self.express_route_id = express_route_id - - -class ExpressRouteAuthorizationList(msrest.serialization.Model): - """A paged list of ExpressRoute Circuit Authorizations. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The items on a page. - :vartype value: list[~avs_client.models.ExpressRouteAuthorization] - :ivar next_link: URL to get the next page if any. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ExpressRouteAuthorization]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteAuthorizationList, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class GlobalReachConnection(Resource): - """A global reach connection resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar provisioning_state: The state of the ExpressRoute Circuit Authorization provisioning. - Possible values include: "Succeeded", "Failed", "Updating", "Canceled". - :vartype provisioning_state: str or ~avs_client.models.GlobalReachConnectionProvisioningState - :ivar address_prefix: The network used for global reach carved out from the original network - block provided for the private cloud. - :vartype address_prefix: str - :param authorization_key: Authorization key from the peer express route used for the global - reach connection. - :type authorization_key: str - :ivar circuit_connection_status: The connection status of the global reach connection. Possible - values include: "Connected", "Connecting", "Disconnected". - :vartype circuit_connection_status: str or ~avs_client.models.GlobalReachConnectionStatus - :param peer_express_route_circuit: Identifier of the ExpressRoute Circuit to peer with in the - global reach connection. - :type peer_express_route_circuit: str - :param express_route_id: The ID of the Private Cloud's ExpressRoute Circuit that is - participating in the global reach connection. - :type express_route_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'address_prefix': {'readonly': True}, - 'circuit_connection_status': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'address_prefix': {'key': 'properties.addressPrefix', 'type': 'str'}, - 'authorization_key': {'key': 'properties.authorizationKey', 'type': 'str'}, - 'circuit_connection_status': {'key': 'properties.circuitConnectionStatus', 'type': 'str'}, - 'peer_express_route_circuit': {'key': 'properties.peerExpressRouteCircuit', 'type': 'str'}, - 'express_route_id': {'key': 'properties.expressRouteId', 'type': 'str'}, - } - - def __init__( - self, - *, - authorization_key: Optional[str] = None, - peer_express_route_circuit: Optional[str] = None, - express_route_id: Optional[str] = None, - **kwargs - ): - super(GlobalReachConnection, self).__init__(**kwargs) - self.provisioning_state = None - self.address_prefix = None - self.authorization_key = authorization_key - self.circuit_connection_status = None - self.peer_express_route_circuit = peer_express_route_circuit - self.express_route_id = express_route_id - - -class GlobalReachConnectionList(msrest.serialization.Model): - """A paged list of global reach connections. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The items on a page. - :vartype value: list[~avs_client.models.GlobalReachConnection] - :ivar next_link: URL to get the next page if any. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[GlobalReachConnection]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(GlobalReachConnectionList, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class HcxEnterpriseSite(Resource): - """An HCX Enterprise Site resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar activation_key: The activation key. - :vartype activation_key: str - :ivar status: The status of the HCX Enterprise Site. Possible values include: "Available", - "Consumed", "Deactivated", "Deleted". - :vartype status: str or ~avs_client.models.HcxEnterpriseSiteStatus - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'activation_key': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'activation_key': {'key': 'properties.activationKey', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(HcxEnterpriseSite, self).__init__(**kwargs) - self.activation_key = None - self.status = None - - -class HcxEnterpriseSiteList(msrest.serialization.Model): - """A paged list of HCX Enterprise Sites. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The items on a page. - :vartype value: list[~avs_client.models.HcxEnterpriseSite] - :ivar next_link: URL to get the next page if any. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[HcxEnterpriseSite]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(HcxEnterpriseSiteList, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class IdentitySource(msrest.serialization.Model): - """vCenter Single Sign On Identity Source. - - :param name: The name of the identity source. - :type name: str - :param alias: The domain's NetBIOS name. - :type alias: str - :param domain: The domain's dns name. - :type domain: str - :param base_user_dn: The base distinguished name for users. - :type base_user_dn: str - :param base_group_dn: The base distinguished name for groups. - :type base_group_dn: str - :param primary_server: Primary server URL. - :type primary_server: str - :param secondary_server: Secondary server URL. - :type secondary_server: str - :param ssl: Protect LDAP communication using SSL certificate (LDAPS). Possible values include: - "Enabled", "Disabled". - :type ssl: str or ~avs_client.models.SslEnum - :param username: The ID of an Active Directory user with a minimum of read-only access to Base - DN for users and group. - :type username: str - :param password: The password of the Active Directory user with a minimum of read-only access - to Base DN for users and groups. - :type password: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'alias': {'key': 'alias', 'type': 'str'}, - 'domain': {'key': 'domain', 'type': 'str'}, - 'base_user_dn': {'key': 'baseUserDN', 'type': 'str'}, - 'base_group_dn': {'key': 'baseGroupDN', 'type': 'str'}, - 'primary_server': {'key': 'primaryServer', 'type': 'str'}, - 'secondary_server': {'key': 'secondaryServer', 'type': 'str'}, - 'ssl': {'key': 'ssl', 'type': 'str'}, - 'username': {'key': 'username', 'type': 'str'}, - 'password': {'key': 'password', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - alias: Optional[str] = None, - domain: Optional[str] = None, - base_user_dn: Optional[str] = None, - base_group_dn: Optional[str] = None, - primary_server: Optional[str] = None, - secondary_server: Optional[str] = None, - ssl: Optional[Union[str, "SslEnum"]] = None, - username: Optional[str] = None, - password: Optional[str] = None, - **kwargs - ): - super(IdentitySource, self).__init__(**kwargs) - self.name = name - self.alias = alias - self.domain = domain - self.base_user_dn = base_user_dn - self.base_group_dn = base_group_dn - self.primary_server = primary_server - self.secondary_server = secondary_server - self.ssl = ssl - self.username = username - self.password = password - - -class LogSpecification(msrest.serialization.Model): - """Specifications of the Log for Azure Monitoring. - - :param name: Name of the log. - :type name: str - :param display_name: Localized friendly display name of the log. - :type display_name: str - :param blob_duration: Blob duration of the log. - :type blob_duration: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - display_name: Optional[str] = None, - blob_duration: Optional[str] = None, - **kwargs - ): - super(LogSpecification, self).__init__(**kwargs) - self.name = name - self.display_name = display_name - self.blob_duration = blob_duration - - -class ManagementCluster(CommonClusterProperties): - """The properties of a management cluster. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param cluster_size: The cluster size. - :type cluster_size: int - :ivar provisioning_state: The state of the cluster provisioning. Possible values include: - "Succeeded", "Failed", "Cancelled", "Deleting", "Updating", "Canceled". - :vartype provisioning_state: str or ~avs_client.models.ClusterProvisioningState - :ivar cluster_id: The identity. - :vartype cluster_id: int - :param hosts: The hosts. - :type hosts: list[str] - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - 'cluster_id': {'readonly': True}, - } - - _attribute_map = { - 'cluster_size': {'key': 'clusterSize', 'type': 'int'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'cluster_id': {'key': 'clusterId', 'type': 'int'}, - 'hosts': {'key': 'hosts', 'type': '[str]'}, - } - - def __init__( - self, - *, - cluster_size: Optional[int] = None, - hosts: Optional[List[str]] = None, - **kwargs - ): - super(ManagementCluster, self).__init__(cluster_size=cluster_size, hosts=hosts, **kwargs) - - -class MetricDimension(msrest.serialization.Model): - """Specifications of the Dimension of metrics. - - :param name: Name of the dimension. - :type name: str - :param display_name: Localized friendly display name of the dimension. - :type display_name: str - :param internal_name: Name of the dimension as it appears in MDM. - :type internal_name: str - :param to_be_exported_for_shoebox: A boolean flag indicating whether this dimension should be - included for the shoebox export scenario. - :type to_be_exported_for_shoebox: bool - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'internal_name': {'key': 'internalName', 'type': 'str'}, - 'to_be_exported_for_shoebox': {'key': 'toBeExportedForShoebox', 'type': 'bool'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - display_name: Optional[str] = None, - internal_name: Optional[str] = None, - to_be_exported_for_shoebox: Optional[bool] = None, - **kwargs - ): - super(MetricDimension, self).__init__(**kwargs) - self.name = name - self.display_name = display_name - self.internal_name = internal_name - self.to_be_exported_for_shoebox = to_be_exported_for_shoebox - - -class MetricSpecification(msrest.serialization.Model): - """Specifications of the Metrics for Azure Monitoring. - - :param name: Name of the metric. - :type name: str - :param display_name: Localized friendly display name of the metric. - :type display_name: str - :param display_description: Localized friendly description of the metric. - :type display_description: str - :param unit: Unit that makes sense for the metric. - :type unit: str - :param category: Name of the metric category that the metric belongs to. A metric can only - belong to a single category. - :type category: str - :param aggregation_type: Only provide one value for this field. Valid values: Average, Minimum, - Maximum, Total, Count. - :type aggregation_type: str - :param supported_aggregation_types: Supported aggregation types. - :type supported_aggregation_types: list[str] - :param supported_time_grain_types: Supported time grain types. - :type supported_time_grain_types: list[str] - :param fill_gap_with_zero: Optional. If set to true, then zero will be returned for time - duration where no metric is emitted/published. - :type fill_gap_with_zero: bool - :param dimensions: Dimensions of the metric. - :type dimensions: list[~avs_client.models.MetricDimension] - :param enable_regional_mdm_account: Whether or not the service is using regional MDM accounts. - :type enable_regional_mdm_account: str - :param source_mdm_account: The name of the MDM account. - :type source_mdm_account: str - :param source_mdm_namespace: The name of the MDM namespace. - :type source_mdm_namespace: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'display_description': {'key': 'displayDescription', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'category': {'key': 'category', 'type': 'str'}, - 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, - 'supported_aggregation_types': {'key': 'supportedAggregationTypes', 'type': '[str]'}, - 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, - 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, - 'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'}, - 'enable_regional_mdm_account': {'key': 'enableRegionalMdmAccount', 'type': 'str'}, - 'source_mdm_account': {'key': 'sourceMdmAccount', 'type': 'str'}, - 'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - display_name: Optional[str] = None, - display_description: Optional[str] = None, - unit: Optional[str] = None, - category: Optional[str] = None, - aggregation_type: Optional[str] = None, - supported_aggregation_types: Optional[List[str]] = None, - supported_time_grain_types: Optional[List[str]] = None, - fill_gap_with_zero: Optional[bool] = None, - dimensions: Optional[List["MetricDimension"]] = None, - enable_regional_mdm_account: Optional[str] = None, - source_mdm_account: Optional[str] = None, - source_mdm_namespace: Optional[str] = None, - **kwargs - ): - super(MetricSpecification, self).__init__(**kwargs) - self.name = name - self.display_name = display_name - self.display_description = display_description - self.unit = unit - self.category = category - self.aggregation_type = aggregation_type - self.supported_aggregation_types = supported_aggregation_types - self.supported_time_grain_types = supported_time_grain_types - self.fill_gap_with_zero = fill_gap_with_zero - self.dimensions = dimensions - self.enable_regional_mdm_account = enable_regional_mdm_account - self.source_mdm_account = source_mdm_account - self.source_mdm_namespace = source_mdm_namespace - - -class NetAppVolume(msrest.serialization.Model): - """An Azure NetApp Files volume from Microsoft.NetApp provider. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Azure resource ID of the NetApp volume. - :type id: str - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__( - self, - *, - id: str, - **kwargs - ): - super(NetAppVolume, self).__init__(**kwargs) - self.id = id - - -class Operation(msrest.serialization.Model): - """A REST API operation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name: Name of the operation being performed on this object. - :vartype name: str - :ivar display: Contains the localized display information for this operation. - :vartype display: ~avs_client.models.OperationDisplay - :param is_data_action: Gets or sets a value indicating whether the operation is a data action - or not. - :type is_data_action: bool - :param origin: Origin of the operation. - :type origin: str - :param properties: Properties of the operation. - :type properties: ~avs_client.models.OperationProperties - """ - - _validation = { - 'name': {'readonly': True}, - 'display': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'OperationProperties'}, - } - - def __init__( - self, - *, - is_data_action: Optional[bool] = None, - origin: Optional[str] = None, - properties: Optional["OperationProperties"] = None, - **kwargs - ): - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = None - self.is_data_action = is_data_action - self.origin = origin - self.properties = properties - - -class OperationDisplay(msrest.serialization.Model): - """Contains the localized display information for this operation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar provider: Localized friendly form of the resource provider name. - :vartype provider: str - :ivar resource: Localized friendly form of the resource type related to this operation. - :vartype resource: str - :ivar operation: Localized friendly name for the operation. - :vartype operation: str - :ivar description: Localized friendly description for the operation. - :vartype description: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None - self.description = None - - -class OperationList(msrest.serialization.Model): - """Pageable list of operations. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of operations. - :vartype value: list[~avs_client.models.Operation] - :ivar next_link: URL to get the next page if any. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Operation]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(OperationList, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class OperationProperties(msrest.serialization.Model): - """Extra Operation properties. - - :param service_specification: Service specifications of the operation. - :type service_specification: ~avs_client.models.ServiceSpecification - """ - - _attribute_map = { - 'service_specification': {'key': 'serviceSpecification', 'type': 'ServiceSpecification'}, - } - - def __init__( - self, - *, - service_specification: Optional["ServiceSpecification"] = None, - **kwargs - ): - super(OperationProperties, self).__init__(**kwargs) - self.service_specification = service_specification - - -class PlacementPoliciesList(msrest.serialization.Model): - """Represents list of placement policies. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The items on the page. - :vartype value: list[~avs_client.models.PlacementPolicy] - :ivar next_link: URL to get the next page if any. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PlacementPolicy]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(PlacementPoliciesList, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class PlacementPolicy(Resource): - """A vSphere Distributed Resource Scheduler (DRS) placement policy. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param properties: placement policy properties. - :type properties: ~avs_client.models.PlacementPolicyProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'PlacementPolicyProperties'}, - } - - def __init__( - self, - *, - properties: Optional["PlacementPolicyProperties"] = None, - **kwargs - ): - super(PlacementPolicy, self).__init__(**kwargs) - self.properties = properties - - -class PlacementPolicyProperties(msrest.serialization.Model): - """Abstract placement policy properties. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: VmHostPlacementPolicyProperties, VmPlacementPolicyProperties. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. placement policy type.Constant filled by server. Possible values - include: "VmVm", "VmHost". - :type type: str or ~avs_client.models.PlacementPolicyType - :param state: Whether the placement policy is enabled or disabled. Possible values include: - "Enabled", "Disabled". - :type state: str or ~avs_client.models.PlacementPolicyState - :param display_name: Display name of the placement policy. - :type display_name: str - :ivar provisioning_state: The provisioning state. Possible values include: "Succeeded", - "Failed", "Building", "Deleting", "Updating", "Canceled". - :vartype provisioning_state: str or ~avs_client.models.PlacementPolicyProvisioningState - """ - - _validation = { - 'type': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'VmHost': 'VmHostPlacementPolicyProperties', 'VmVm': 'VmPlacementPolicyProperties'} - } - - def __init__( - self, - *, - state: Optional[Union[str, "PlacementPolicyState"]] = None, - display_name: Optional[str] = None, - **kwargs - ): - super(PlacementPolicyProperties, self).__init__(**kwargs) - self.type = None # type: Optional[str] - self.state = state - self.display_name = display_name - self.provisioning_state = None - - -class PlacementPolicyUpdate(msrest.serialization.Model): - """An update of a DRS placement policy resource. - - :param state: Whether the placement policy is enabled or disabled. Possible values include: - "Enabled", "Disabled". - :type state: str or ~avs_client.models.PlacementPolicyState - :param vm_members: Virtual machine members list. - :type vm_members: list[str] - :param host_members: Host members list. - :type host_members: list[str] - :param affinity_strength: vm-host placement policy affinity strength (should/must). Possible - values include: "Should", "Must". - :type affinity_strength: str or ~avs_client.models.AffinityStrength - :param azure_hybrid_benefit_type: placement policy azure hybrid benefit opt-in type. Possible - values include: "SqlHost", "None". - :type azure_hybrid_benefit_type: str or ~avs_client.models.AzureHybridBenefitType - """ - - _attribute_map = { - 'state': {'key': 'properties.state', 'type': 'str'}, - 'vm_members': {'key': 'properties.vmMembers', 'type': '[str]'}, - 'host_members': {'key': 'properties.hostMembers', 'type': '[str]'}, - 'affinity_strength': {'key': 'properties.affinityStrength', 'type': 'str'}, - 'azure_hybrid_benefit_type': {'key': 'properties.azureHybridBenefitType', 'type': 'str'}, - } - - def __init__( - self, - *, - state: Optional[Union[str, "PlacementPolicyState"]] = None, - vm_members: Optional[List[str]] = None, - host_members: Optional[List[str]] = None, - affinity_strength: Optional[Union[str, "AffinityStrength"]] = None, - azure_hybrid_benefit_type: Optional[Union[str, "AzureHybridBenefitType"]] = None, - **kwargs - ): - super(PlacementPolicyUpdate, self).__init__(**kwargs) - self.state = state - self.vm_members = vm_members - self.host_members = host_members - self.affinity_strength = affinity_strength - self.azure_hybrid_benefit_type = azure_hybrid_benefit_type - - -class TrackedResource(Resource): - """The resource model definition for a ARM tracked top level resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__( - self, - *, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - **kwargs - ): - super(TrackedResource, self).__init__(**kwargs) - self.location = location - self.tags = tags - - -class PrivateCloud(TrackedResource): - """A private cloud resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param sku: Required. The private cloud SKU. - :type sku: ~avs_client.models.Sku - :param identity: The identity of the private cloud, if configured. - :type identity: ~avs_client.models.PrivateCloudIdentity - :param management_cluster: The default cluster used for management. - :type management_cluster: ~avs_client.models.ManagementCluster - :param internet: Connectivity to internet is enabled or disabled. Possible values include: - "Enabled", "Disabled". Default value: "Disabled". - :type internet: str or ~avs_client.models.InternetEnum - :param identity_sources: vCenter Single Sign On Identity Sources. - :type identity_sources: list[~avs_client.models.IdentitySource] - :param availability: Properties describing how the cloud is distributed across availability - zones. - :type availability: ~avs_client.models.AvailabilityProperties - :param encryption: Customer managed key encryption, can be enabled or disabled. - :type encryption: ~avs_client.models.Encryption - :ivar provisioning_state: The provisioning state. Possible values include: "Succeeded", - "Failed", "Cancelled", "Pending", "Building", "Deleting", "Updating", "Canceled". - :vartype provisioning_state: str or ~avs_client.models.PrivateCloudProvisioningState - :param circuit: An ExpressRoute Circuit. - :type circuit: ~avs_client.models.Circuit - :ivar endpoints: The endpoints. - :vartype endpoints: ~avs_client.models.Endpoints - :param network_block: The block of addresses should be unique across VNet in your subscription - as well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where A,B,C,D are - between 0 and 255, and X is between 0 and 22. - :type network_block: str - :ivar management_network: Network used to access vCenter Server and NSX-T Manager. - :vartype management_network: str - :ivar provisioning_network: Used for virtual machine cold migration, cloning, and snapshot - migration. - :vartype provisioning_network: str - :ivar vmotion_network: Used for live migration of virtual machines. - :vartype vmotion_network: str - :param vcenter_password: Optionally, set the vCenter admin password when the private cloud is - created. - :type vcenter_password: str - :param nsxt_password: Optionally, set the NSX-T Manager password when the private cloud is - created. - :type nsxt_password: str - :ivar vcenter_certificate_thumbprint: Thumbprint of the vCenter Server SSL certificate. - :vartype vcenter_certificate_thumbprint: str - :ivar nsxt_certificate_thumbprint: Thumbprint of the NSX-T Manager SSL certificate. - :vartype nsxt_certificate_thumbprint: str - :ivar external_cloud_links: Array of cloud link IDs from other clouds that connect to this one. - :vartype external_cloud_links: list[str] - :param secondary_circuit: A secondary expressRoute circuit from a separate AZ. Only present in - a stretched private cloud. - :type secondary_circuit: ~avs_client.models.Circuit - :ivar nsx_public_ip_quota_raised: Flag to indicate whether the private cloud has the quota for - provisioned NSX Public IP count raised from 64 to 1024. Possible values include: "Enabled", - "Disabled". - :vartype nsx_public_ip_quota_raised: str or ~avs_client.models.NsxPublicIpQuotaRaisedEnum - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'sku': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'endpoints': {'readonly': True}, - 'management_network': {'readonly': True}, - 'provisioning_network': {'readonly': True}, - 'vmotion_network': {'readonly': True}, - 'vcenter_certificate_thumbprint': {'readonly': True}, - 'nsxt_certificate_thumbprint': {'readonly': True}, - 'external_cloud_links': {'readonly': True}, - 'nsx_public_ip_quota_raised': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'identity': {'key': 'identity', 'type': 'PrivateCloudIdentity'}, - 'management_cluster': {'key': 'properties.managementCluster', 'type': 'ManagementCluster'}, - 'internet': {'key': 'properties.internet', 'type': 'str'}, - 'identity_sources': {'key': 'properties.identitySources', 'type': '[IdentitySource]'}, - 'availability': {'key': 'properties.availability', 'type': 'AvailabilityProperties'}, - 'encryption': {'key': 'properties.encryption', 'type': 'Encryption'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'circuit': {'key': 'properties.circuit', 'type': 'Circuit'}, - 'endpoints': {'key': 'properties.endpoints', 'type': 'Endpoints'}, - 'network_block': {'key': 'properties.networkBlock', 'type': 'str'}, - 'management_network': {'key': 'properties.managementNetwork', 'type': 'str'}, - 'provisioning_network': {'key': 'properties.provisioningNetwork', 'type': 'str'}, - 'vmotion_network': {'key': 'properties.vmotionNetwork', 'type': 'str'}, - 'vcenter_password': {'key': 'properties.vcenterPassword', 'type': 'str'}, - 'nsxt_password': {'key': 'properties.nsxtPassword', 'type': 'str'}, - 'vcenter_certificate_thumbprint': {'key': 'properties.vcenterCertificateThumbprint', 'type': 'str'}, - 'nsxt_certificate_thumbprint': {'key': 'properties.nsxtCertificateThumbprint', 'type': 'str'}, - 'external_cloud_links': {'key': 'properties.externalCloudLinks', 'type': '[str]'}, - 'secondary_circuit': {'key': 'properties.secondaryCircuit', 'type': 'Circuit'}, - 'nsx_public_ip_quota_raised': {'key': 'properties.nsxPublicIpQuotaRaised', 'type': 'str'}, - } - - def __init__( - self, - *, - sku: "Sku", - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - identity: Optional["PrivateCloudIdentity"] = None, - management_cluster: Optional["ManagementCluster"] = None, - internet: Optional[Union[str, "InternetEnum"]] = "Disabled", - identity_sources: Optional[List["IdentitySource"]] = None, - availability: Optional["AvailabilityProperties"] = None, - encryption: Optional["Encryption"] = None, - circuit: Optional["Circuit"] = None, - network_block: Optional[str] = None, - vcenter_password: Optional[str] = None, - nsxt_password: Optional[str] = None, - secondary_circuit: Optional["Circuit"] = None, - **kwargs - ): - super(PrivateCloud, self).__init__(location=location, tags=tags, **kwargs) - self.sku = sku - self.identity = identity - self.management_cluster = management_cluster - self.internet = internet - self.identity_sources = identity_sources - self.availability = availability - self.encryption = encryption - self.provisioning_state = None - self.circuit = circuit - self.endpoints = None - self.network_block = network_block - self.management_network = None - self.provisioning_network = None - self.vmotion_network = None - self.vcenter_password = vcenter_password - self.nsxt_password = nsxt_password - self.vcenter_certificate_thumbprint = None - self.nsxt_certificate_thumbprint = None - self.external_cloud_links = None - self.secondary_circuit = secondary_circuit - self.nsx_public_ip_quota_raised = None - - -class PrivateCloudIdentity(msrest.serialization.Model): - """Identity for the virtual machine. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar principal_id: The principal ID of private cloud identity. This property will only be - provided for a system assigned identity. - :vartype principal_id: str - :ivar tenant_id: The tenant ID associated with the private cloud. This property will only be - provided for a system assigned identity. - :vartype tenant_id: str - :param type: The type of identity used for the private cloud. The type 'SystemAssigned' refers - to an implicitly created identity. The type 'None' will remove any identities from the Private - Cloud. Possible values include: "SystemAssigned", "None". - :type type: str or ~avs_client.models.ResourceIdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__( - self, - *, - type: Optional[Union[str, "ResourceIdentityType"]] = None, - **kwargs - ): - super(PrivateCloudIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = type - - -class PrivateCloudList(msrest.serialization.Model): - """A paged list of private clouds. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The items on the page. - :vartype value: list[~avs_client.models.PrivateCloud] - :ivar next_link: URL to get the next page if any. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateCloud]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(PrivateCloudList, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class PrivateCloudUpdateProperties(msrest.serialization.Model): - """The properties of a private cloud resource that may be updated. - - :param management_cluster: The default cluster used for management. - :type management_cluster: ~avs_client.models.ManagementCluster - :param internet: Connectivity to internet is enabled or disabled. Possible values include: - "Enabled", "Disabled". Default value: "Disabled". - :type internet: str or ~avs_client.models.InternetEnum - :param identity_sources: vCenter Single Sign On Identity Sources. - :type identity_sources: list[~avs_client.models.IdentitySource] - :param availability: Properties describing how the cloud is distributed across availability - zones. - :type availability: ~avs_client.models.AvailabilityProperties - :param encryption: Customer managed key encryption, can be enabled or disabled. - :type encryption: ~avs_client.models.Encryption - """ - - _attribute_map = { - 'management_cluster': {'key': 'managementCluster', 'type': 'ManagementCluster'}, - 'internet': {'key': 'internet', 'type': 'str'}, - 'identity_sources': {'key': 'identitySources', 'type': '[IdentitySource]'}, - 'availability': {'key': 'availability', 'type': 'AvailabilityProperties'}, - 'encryption': {'key': 'encryption', 'type': 'Encryption'}, - } - - def __init__( - self, - *, - management_cluster: Optional["ManagementCluster"] = None, - internet: Optional[Union[str, "InternetEnum"]] = "Disabled", - identity_sources: Optional[List["IdentitySource"]] = None, - availability: Optional["AvailabilityProperties"] = None, - encryption: Optional["Encryption"] = None, - **kwargs - ): - super(PrivateCloudUpdateProperties, self).__init__(**kwargs) - self.management_cluster = management_cluster - self.internet = internet - self.identity_sources = identity_sources - self.availability = availability - self.encryption = encryption - - -class PrivateCloudProperties(PrivateCloudUpdateProperties): - """The properties of a private cloud resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param management_cluster: The default cluster used for management. - :type management_cluster: ~avs_client.models.ManagementCluster - :param internet: Connectivity to internet is enabled or disabled. Possible values include: - "Enabled", "Disabled". Default value: "Disabled". - :type internet: str or ~avs_client.models.InternetEnum - :param identity_sources: vCenter Single Sign On Identity Sources. - :type identity_sources: list[~avs_client.models.IdentitySource] - :param availability: Properties describing how the cloud is distributed across availability - zones. - :type availability: ~avs_client.models.AvailabilityProperties - :param encryption: Customer managed key encryption, can be enabled or disabled. - :type encryption: ~avs_client.models.Encryption - :ivar provisioning_state: The provisioning state. Possible values include: "Succeeded", - "Failed", "Cancelled", "Pending", "Building", "Deleting", "Updating", "Canceled". - :vartype provisioning_state: str or ~avs_client.models.PrivateCloudProvisioningState - :param circuit: An ExpressRoute Circuit. - :type circuit: ~avs_client.models.Circuit - :ivar endpoints: The endpoints. - :vartype endpoints: ~avs_client.models.Endpoints - :param network_block: Required. The block of addresses should be unique across VNet in your - subscription as well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where - A,B,C,D are between 0 and 255, and X is between 0 and 22. - :type network_block: str - :ivar management_network: Network used to access vCenter Server and NSX-T Manager. - :vartype management_network: str - :ivar provisioning_network: Used for virtual machine cold migration, cloning, and snapshot - migration. - :vartype provisioning_network: str - :ivar vmotion_network: Used for live migration of virtual machines. - :vartype vmotion_network: str - :param vcenter_password: Optionally, set the vCenter admin password when the private cloud is - created. - :type vcenter_password: str - :param nsxt_password: Optionally, set the NSX-T Manager password when the private cloud is - created. - :type nsxt_password: str - :ivar vcenter_certificate_thumbprint: Thumbprint of the vCenter Server SSL certificate. - :vartype vcenter_certificate_thumbprint: str - :ivar nsxt_certificate_thumbprint: Thumbprint of the NSX-T Manager SSL certificate. - :vartype nsxt_certificate_thumbprint: str - :ivar external_cloud_links: Array of cloud link IDs from other clouds that connect to this one. - :vartype external_cloud_links: list[str] - :param secondary_circuit: A secondary expressRoute circuit from a separate AZ. Only present in - a stretched private cloud. - :type secondary_circuit: ~avs_client.models.Circuit - :ivar nsx_public_ip_quota_raised: Flag to indicate whether the private cloud has the quota for - provisioned NSX Public IP count raised from 64 to 1024. Possible values include: "Enabled", - "Disabled". - :vartype nsx_public_ip_quota_raised: str or ~avs_client.models.NsxPublicIpQuotaRaisedEnum - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - 'endpoints': {'readonly': True}, - 'network_block': {'required': True}, - 'management_network': {'readonly': True}, - 'provisioning_network': {'readonly': True}, - 'vmotion_network': {'readonly': True}, - 'vcenter_certificate_thumbprint': {'readonly': True}, - 'nsxt_certificate_thumbprint': {'readonly': True}, - 'external_cloud_links': {'readonly': True}, - 'nsx_public_ip_quota_raised': {'readonly': True}, - } - - _attribute_map = { - 'management_cluster': {'key': 'managementCluster', 'type': 'ManagementCluster'}, - 'internet': {'key': 'internet', 'type': 'str'}, - 'identity_sources': {'key': 'identitySources', 'type': '[IdentitySource]'}, - 'availability': {'key': 'availability', 'type': 'AvailabilityProperties'}, - 'encryption': {'key': 'encryption', 'type': 'Encryption'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'circuit': {'key': 'circuit', 'type': 'Circuit'}, - 'endpoints': {'key': 'endpoints', 'type': 'Endpoints'}, - 'network_block': {'key': 'networkBlock', 'type': 'str'}, - 'management_network': {'key': 'managementNetwork', 'type': 'str'}, - 'provisioning_network': {'key': 'provisioningNetwork', 'type': 'str'}, - 'vmotion_network': {'key': 'vmotionNetwork', 'type': 'str'}, - 'vcenter_password': {'key': 'vcenterPassword', 'type': 'str'}, - 'nsxt_password': {'key': 'nsxtPassword', 'type': 'str'}, - 'vcenter_certificate_thumbprint': {'key': 'vcenterCertificateThumbprint', 'type': 'str'}, - 'nsxt_certificate_thumbprint': {'key': 'nsxtCertificateThumbprint', 'type': 'str'}, - 'external_cloud_links': {'key': 'externalCloudLinks', 'type': '[str]'}, - 'secondary_circuit': {'key': 'secondaryCircuit', 'type': 'Circuit'}, - 'nsx_public_ip_quota_raised': {'key': 'nsxPublicIpQuotaRaised', 'type': 'str'}, - } - - def __init__( - self, - *, - network_block: str, - management_cluster: Optional["ManagementCluster"] = None, - internet: Optional[Union[str, "InternetEnum"]] = "Disabled", - identity_sources: Optional[List["IdentitySource"]] = None, - availability: Optional["AvailabilityProperties"] = None, - encryption: Optional["Encryption"] = None, - circuit: Optional["Circuit"] = None, - vcenter_password: Optional[str] = None, - nsxt_password: Optional[str] = None, - secondary_circuit: Optional["Circuit"] = None, - **kwargs - ): - super(PrivateCloudProperties, self).__init__(management_cluster=management_cluster, internet=internet, identity_sources=identity_sources, availability=availability, encryption=encryption, **kwargs) - self.provisioning_state = None - self.circuit = circuit - self.endpoints = None - self.network_block = network_block - self.management_network = None - self.provisioning_network = None - self.vmotion_network = None - self.vcenter_password = vcenter_password - self.nsxt_password = nsxt_password - self.vcenter_certificate_thumbprint = None - self.nsxt_certificate_thumbprint = None - self.external_cloud_links = None - self.secondary_circuit = secondary_circuit - self.nsx_public_ip_quota_raised = None - - -class PrivateCloudUpdate(msrest.serialization.Model): - """An update to a private cloud resource. - - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param identity: The identity of the private cloud, if configured. - :type identity: ~avs_client.models.PrivateCloudIdentity - :param management_cluster: The default cluster used for management. - :type management_cluster: ~avs_client.models.ManagementCluster - :param internet: Connectivity to internet is enabled or disabled. Possible values include: - "Enabled", "Disabled". Default value: "Disabled". - :type internet: str or ~avs_client.models.InternetEnum - :param identity_sources: vCenter Single Sign On Identity Sources. - :type identity_sources: list[~avs_client.models.IdentitySource] - :param availability: Properties describing how the cloud is distributed across availability - zones. - :type availability: ~avs_client.models.AvailabilityProperties - :param encryption: Customer managed key encryption, can be enabled or disabled. - :type encryption: ~avs_client.models.Encryption - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'PrivateCloudIdentity'}, - 'management_cluster': {'key': 'properties.managementCluster', 'type': 'ManagementCluster'}, - 'internet': {'key': 'properties.internet', 'type': 'str'}, - 'identity_sources': {'key': 'properties.identitySources', 'type': '[IdentitySource]'}, - 'availability': {'key': 'properties.availability', 'type': 'AvailabilityProperties'}, - 'encryption': {'key': 'properties.encryption', 'type': 'Encryption'}, - } - - def __init__( - self, - *, - tags: Optional[Dict[str, str]] = None, - identity: Optional["PrivateCloudIdentity"] = None, - management_cluster: Optional["ManagementCluster"] = None, - internet: Optional[Union[str, "InternetEnum"]] = "Disabled", - identity_sources: Optional[List["IdentitySource"]] = None, - availability: Optional["AvailabilityProperties"] = None, - encryption: Optional["Encryption"] = None, - **kwargs - ): - super(PrivateCloudUpdate, self).__init__(**kwargs) - self.tags = tags - self.identity = identity - self.management_cluster = management_cluster - self.internet = internet - self.identity_sources = identity_sources - self.availability = availability - self.encryption = encryption - - -class ProxyResource(Resource): - """The resource model definition for a ARM proxy resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ProxyResource, self).__init__(**kwargs) - - -class ScriptExecutionParameter(msrest.serialization.Model): - """The arguments passed in to the execution. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: PSCredentialExecutionParameter, ScriptSecureStringExecutionParameter, ScriptStringExecutionParameter. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The parameter name. - :type name: str - :param type: Required. The type of execution parameter.Constant filled by server. Possible - values include: "Value", "SecureValue", "Credential". - :type type: str or ~avs_client.models.ScriptExecutionParameterType - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'Credential': 'PSCredentialExecutionParameter', 'SecureValue': 'ScriptSecureStringExecutionParameter', 'Value': 'ScriptStringExecutionParameter'} - } - - def __init__( - self, - *, - name: str, - **kwargs - ): - super(ScriptExecutionParameter, self).__init__(**kwargs) - self.name = name - self.type = None # type: Optional[str] - - -class PSCredentialExecutionParameter(ScriptExecutionParameter): - """a powershell credential object. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The parameter name. - :type name: str - :param type: Required. The type of execution parameter.Constant filled by server. Possible - values include: "Value", "SecureValue", "Credential". - :type type: str or ~avs_client.models.ScriptExecutionParameterType - :param username: username for login. - :type username: str - :param password: password for login. - :type password: str - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'username': {'key': 'username', 'type': 'str'}, - 'password': {'key': 'password', 'type': 'str'}, - } - - def __init__( - self, - *, - name: str, - username: Optional[str] = None, - password: Optional[str] = None, - **kwargs - ): - super(PSCredentialExecutionParameter, self).__init__(name=name, **kwargs) - self.type = 'Credential' # type: str - self.username = username - self.password = password - - -class Quota(msrest.serialization.Model): - """Subscription quotas. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar hosts_remaining: Remaining hosts quota by sku type. - :vartype hosts_remaining: dict[str, int] - :ivar quota_enabled: Host quota is active for current subscription. Possible values include: - "Enabled", "Disabled". - :vartype quota_enabled: str or ~avs_client.models.QuotaEnabled - """ - - _validation = { - 'hosts_remaining': {'readonly': True}, - 'quota_enabled': {'readonly': True}, - } - - _attribute_map = { - 'hosts_remaining': {'key': 'hostsRemaining', 'type': '{int}'}, - 'quota_enabled': {'key': 'quotaEnabled', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(Quota, self).__init__(**kwargs) - self.hosts_remaining = None - self.quota_enabled = None - - -class ScriptCmdlet(ProxyResource): - """A cmdlet available for script execution. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar description: Description of the scripts functionality. - :vartype description: str - :ivar timeout: Recommended time limit for execution. - :vartype timeout: str - :ivar parameters: Parameters the script will accept. - :vartype parameters: list[~avs_client.models.ScriptParameter] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'description': {'readonly': True}, - 'timeout': {'readonly': True}, - 'parameters': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'timeout': {'key': 'properties.timeout', 'type': 'str'}, - 'parameters': {'key': 'properties.parameters', 'type': '[ScriptParameter]'}, - } - - def __init__( - self, - **kwargs - ): - super(ScriptCmdlet, self).__init__(**kwargs) - self.description = None - self.timeout = None - self.parameters = None - - -class ScriptCmdletsList(msrest.serialization.Model): - """Pageable list of scripts/cmdlets. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of scripts. - :vartype value: list[~avs_client.models.ScriptCmdlet] - :ivar next_link: URL to get the next page if any. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ScriptCmdlet]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ScriptCmdletsList, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class ScriptExecution(ProxyResource): - """An instance of a script executed by a user - custom or AVS. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param script_cmdlet_id: A reference to the script cmdlet resource if user is running a AVS - script. - :type script_cmdlet_id: str - :param parameters: Parameters the script will accept. - :type parameters: list[~avs_client.models.ScriptExecutionParameter] - :param hidden_parameters: Parameters that will be hidden/not visible to ARM, such as passwords - and credentials. - :type hidden_parameters: list[~avs_client.models.ScriptExecutionParameter] - :param failure_reason: Error message if the script was able to run, but if the script itself - had errors or powershell threw an exception. - :type failure_reason: str - :param timeout: Time limit for execution. - :type timeout: str - :param retention: Time to live for the resource. If not provided, will be available for 60 - days. - :type retention: str - :ivar submitted_at: Time the script execution was submitted. - :vartype submitted_at: ~datetime.datetime - :ivar started_at: Time the script execution was started. - :vartype started_at: ~datetime.datetime - :ivar finished_at: Time the script execution was finished. - :vartype finished_at: ~datetime.datetime - :ivar provisioning_state: The state of the script execution resource. Possible values include: - "Pending", "Running", "Succeeded", "Failed", "Cancelling", "Cancelled", "Deleting", "Canceled". - :vartype provisioning_state: str or ~avs_client.models.ScriptExecutionProvisioningState - :param output: Standard output stream from the powershell execution. - :type output: list[str] - :param named_outputs: User-defined dictionary. - :type named_outputs: dict[str, any] - :ivar information: Standard information out stream from the powershell execution. - :vartype information: list[str] - :ivar warnings: Standard warning out stream from the powershell execution. - :vartype warnings: list[str] - :ivar errors: Standard error output stream from the powershell execution. - :vartype errors: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'submitted_at': {'readonly': True}, - 'started_at': {'readonly': True}, - 'finished_at': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'information': {'readonly': True}, - 'warnings': {'readonly': True}, - 'errors': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'script_cmdlet_id': {'key': 'properties.scriptCmdletId', 'type': 'str'}, - 'parameters': {'key': 'properties.parameters', 'type': '[ScriptExecutionParameter]'}, - 'hidden_parameters': {'key': 'properties.hiddenParameters', 'type': '[ScriptExecutionParameter]'}, - 'failure_reason': {'key': 'properties.failureReason', 'type': 'str'}, - 'timeout': {'key': 'properties.timeout', 'type': 'str'}, - 'retention': {'key': 'properties.retention', 'type': 'str'}, - 'submitted_at': {'key': 'properties.submittedAt', 'type': 'iso-8601'}, - 'started_at': {'key': 'properties.startedAt', 'type': 'iso-8601'}, - 'finished_at': {'key': 'properties.finishedAt', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'output': {'key': 'properties.output', 'type': '[str]'}, - 'named_outputs': {'key': 'properties.namedOutputs', 'type': '{object}'}, - 'information': {'key': 'properties.information', 'type': '[str]'}, - 'warnings': {'key': 'properties.warnings', 'type': '[str]'}, - 'errors': {'key': 'properties.errors', 'type': '[str]'}, - } - - def __init__( - self, - *, - script_cmdlet_id: Optional[str] = None, - parameters: Optional[List["ScriptExecutionParameter"]] = None, - hidden_parameters: Optional[List["ScriptExecutionParameter"]] = None, - failure_reason: Optional[str] = None, - timeout: Optional[str] = None, - retention: Optional[str] = None, - output: Optional[List[str]] = None, - named_outputs: Optional[Dict[str, Any]] = None, - **kwargs - ): - super(ScriptExecution, self).__init__(**kwargs) - self.script_cmdlet_id = script_cmdlet_id - self.parameters = parameters - self.hidden_parameters = hidden_parameters - self.failure_reason = failure_reason - self.timeout = timeout - self.retention = retention - self.submitted_at = None - self.started_at = None - self.finished_at = None - self.provisioning_state = None - self.output = output - self.named_outputs = named_outputs - self.information = None - self.warnings = None - self.errors = None - - -class ScriptExecutionsList(msrest.serialization.Model): - """Pageable list of script executions. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of scripts. - :vartype value: list[~avs_client.models.ScriptExecution] - :ivar next_link: URL to get the next page if any. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ScriptExecution]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ScriptExecutionsList, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class ScriptPackage(ProxyResource): - """Script Package resources available for execution. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar description: User friendly description of the package. - :vartype description: str - :ivar version: Module version. - :vartype version: str - :ivar company: Company that created and supports the package. - :vartype company: str - :ivar uri: Link to support by the package vendor. - :vartype uri: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'description': {'readonly': True}, - 'version': {'readonly': True}, - 'company': {'readonly': True}, - 'uri': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'company': {'key': 'properties.company', 'type': 'str'}, - 'uri': {'key': 'properties.uri', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ScriptPackage, self).__init__(**kwargs) - self.description = None - self.version = None - self.company = None - self.uri = None - - -class ScriptPackagesList(msrest.serialization.Model): - """A list of the available script packages. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of script package resources. - :vartype value: list[~avs_client.models.ScriptPackage] - :ivar next_link: URL to get the next page if any. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ScriptPackage]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ScriptPackagesList, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class ScriptParameter(msrest.serialization.Model): - """An parameter that the script will accept. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar type: The type of parameter the script is expecting. psCredential is a - PSCredentialObject. Possible values include: "String", "SecureString", "Credential", "Int", - "Bool", "Float". - :vartype type: str or ~avs_client.models.ScriptParameterTypes - :param name: The parameter name that the script will expect a parameter value for. - :type name: str - :ivar description: User friendly description of the parameter. - :vartype description: str - :ivar visibility: Should this parameter be visible to arm and passed in the parameters argument - when executing. Possible values include: "Visible", "Hidden". - :vartype visibility: str or ~avs_client.models.VisibilityParameterEnum - :ivar optional: Is this parameter required or optional. Possible values include: "Optional", - "Required". - :vartype optional: str or ~avs_client.models.OptionalParamEnum - """ - - _validation = { - 'type': {'readonly': True}, - 'description': {'readonly': True}, - 'visibility': {'readonly': True}, - 'optional': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'visibility': {'key': 'visibility', 'type': 'str'}, - 'optional': {'key': 'optional', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - **kwargs - ): - super(ScriptParameter, self).__init__(**kwargs) - self.type = None - self.name = name - self.description = None - self.visibility = None - self.optional = None - - -class ScriptSecureStringExecutionParameter(ScriptExecutionParameter): - """a plain text value execution parameter. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The parameter name. - :type name: str - :param type: Required. The type of execution parameter.Constant filled by server. Possible - values include: "Value", "SecureValue", "Credential". - :type type: str or ~avs_client.models.ScriptExecutionParameterType - :param secure_value: A secure value for the passed parameter, not to be stored in logs. - :type secure_value: str - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'secure_value': {'key': 'secureValue', 'type': 'str'}, - } - - def __init__( - self, - *, - name: str, - secure_value: Optional[str] = None, - **kwargs - ): - super(ScriptSecureStringExecutionParameter, self).__init__(name=name, **kwargs) - self.type = 'SecureValue' # type: str - self.secure_value = secure_value - - -class ScriptStringExecutionParameter(ScriptExecutionParameter): - """a plain text value execution parameter. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The parameter name. - :type name: str - :param type: Required. The type of execution parameter.Constant filled by server. Possible - values include: "Value", "SecureValue", "Credential". - :type type: str or ~avs_client.models.ScriptExecutionParameterType - :param value: The value for the passed parameter. - :type value: str - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__( - self, - *, - name: str, - value: Optional[str] = None, - **kwargs - ): - super(ScriptStringExecutionParameter, self).__init__(name=name, **kwargs) - self.type = 'Value' # type: str - self.value = value - - -class ServiceSpecification(msrest.serialization.Model): - """Service specification payload. - - :param log_specifications: Specifications of the Log for Azure Monitoring. - :type log_specifications: list[~avs_client.models.LogSpecification] - :param metric_specifications: Specifications of the Metrics for Azure Monitoring. - :type metric_specifications: list[~avs_client.models.MetricSpecification] - """ - - _attribute_map = { - 'log_specifications': {'key': 'logSpecifications', 'type': '[LogSpecification]'}, - 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, - } - - def __init__( - self, - *, - log_specifications: Optional[List["LogSpecification"]] = None, - metric_specifications: Optional[List["MetricSpecification"]] = None, - **kwargs - ): - super(ServiceSpecification, self).__init__(**kwargs) - self.log_specifications = log_specifications - self.metric_specifications = metric_specifications - - -class Sku(msrest.serialization.Model): - """The resource model definition representing SKU. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the SKU. - :type name: str - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__( - self, - *, - name: str, - **kwargs - ): - super(Sku, self).__init__(**kwargs) - self.name = name - - -class Trial(msrest.serialization.Model): - """Subscription trial availability. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar status: Trial status. Possible values include: "TrialAvailable", "TrialUsed", - "TrialDisabled". - :vartype status: str or ~avs_client.models.TrialStatus - :ivar available_hosts: Number of trial hosts available. - :vartype available_hosts: int - """ - - _validation = { - 'status': {'readonly': True}, - 'available_hosts': {'readonly': True}, - } - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'available_hosts': {'key': 'availableHosts', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(Trial, self).__init__(**kwargs) - self.status = None - self.available_hosts = None - - -class VirtualMachine(ProxyResource): - """Virtual Machine. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar display_name: Display name of the VM. - :vartype display_name: str - :ivar mo_ref_id: Virtual machine managed object reference id. - :vartype mo_ref_id: str - :ivar folder_path: Path to virtual machine's folder starting from datacenter virtual machine - folder. - :vartype folder_path: str - :ivar restrict_movement: Whether VM DRS-driven movement is restricted (enabled) or not - (disabled). Possible values include: "Enabled", "Disabled". - :vartype restrict_movement: str or ~avs_client.models.VirtualMachineRestrictMovementState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'display_name': {'readonly': True}, - 'mo_ref_id': {'readonly': True}, - 'folder_path': {'readonly': True}, - 'restrict_movement': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'mo_ref_id': {'key': 'properties.moRefId', 'type': 'str'}, - 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, - 'restrict_movement': {'key': 'properties.restrictMovement', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualMachine, self).__init__(**kwargs) - self.display_name = None - self.mo_ref_id = None - self.folder_path = None - self.restrict_movement = None - - -class VirtualMachineRestrictMovement(msrest.serialization.Model): - """Set VM DRS-driven movement to restricted (enabled) or not (disabled). - - :param restrict_movement: Whether VM DRS-driven movement is restricted (enabled) or not - (disabled). Possible values include: "Enabled", "Disabled". - :type restrict_movement: str or ~avs_client.models.VirtualMachineRestrictMovementState - """ - - _attribute_map = { - 'restrict_movement': {'key': 'restrictMovement', 'type': 'str'}, - } - - def __init__( - self, - *, - restrict_movement: Optional[Union[str, "VirtualMachineRestrictMovementState"]] = None, - **kwargs - ): - super(VirtualMachineRestrictMovement, self).__init__(**kwargs) - self.restrict_movement = restrict_movement - - -class VirtualMachinesList(msrest.serialization.Model): - """A list of Virtual Machines. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The items to be displayed on the page. - :vartype value: list[~avs_client.models.VirtualMachine] - :ivar next_link: URL to get the next page if any. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualMachine]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualMachinesList, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class VmHostPlacementPolicyProperties(PlacementPolicyProperties): - """VM-Host placement policy properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. placement policy type.Constant filled by server. Possible values - include: "VmVm", "VmHost". - :type type: str or ~avs_client.models.PlacementPolicyType - :param state: Whether the placement policy is enabled or disabled. Possible values include: - "Enabled", "Disabled". - :type state: str or ~avs_client.models.PlacementPolicyState - :param display_name: Display name of the placement policy. - :type display_name: str - :ivar provisioning_state: The provisioning state. Possible values include: "Succeeded", - "Failed", "Building", "Deleting", "Updating", "Canceled". - :vartype provisioning_state: str or ~avs_client.models.PlacementPolicyProvisioningState - :param vm_members: Required. Virtual machine members list. - :type vm_members: list[str] - :param host_members: Required. Host members list. - :type host_members: list[str] - :param affinity_type: Required. placement policy affinity type. Possible values include: - "Affinity", "AntiAffinity". - :type affinity_type: str or ~avs_client.models.AffinityType - :param affinity_strength: vm-host placement policy affinity strength (should/must). Possible - values include: "Should", "Must". - :type affinity_strength: str or ~avs_client.models.AffinityStrength - :param azure_hybrid_benefit_type: placement policy azure hybrid benefit opt-in type. Possible - values include: "SqlHost", "None". - :type azure_hybrid_benefit_type: str or ~avs_client.models.AzureHybridBenefitType - """ - - _validation = { - 'type': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'vm_members': {'required': True}, - 'host_members': {'required': True}, - 'affinity_type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'vm_members': {'key': 'vmMembers', 'type': '[str]'}, - 'host_members': {'key': 'hostMembers', 'type': '[str]'}, - 'affinity_type': {'key': 'affinityType', 'type': 'str'}, - 'affinity_strength': {'key': 'affinityStrength', 'type': 'str'}, - 'azure_hybrid_benefit_type': {'key': 'azureHybridBenefitType', 'type': 'str'}, - } - - def __init__( - self, - *, - vm_members: List[str], - host_members: List[str], - affinity_type: Union[str, "AffinityType"], - state: Optional[Union[str, "PlacementPolicyState"]] = None, - display_name: Optional[str] = None, - affinity_strength: Optional[Union[str, "AffinityStrength"]] = None, - azure_hybrid_benefit_type: Optional[Union[str, "AzureHybridBenefitType"]] = None, - **kwargs - ): - super(VmHostPlacementPolicyProperties, self).__init__(state=state, display_name=display_name, **kwargs) - self.type = 'VmHost' # type: str - self.vm_members = vm_members - self.host_members = host_members - self.affinity_type = affinity_type - self.affinity_strength = affinity_strength - self.azure_hybrid_benefit_type = azure_hybrid_benefit_type - - -class VmPlacementPolicyProperties(PlacementPolicyProperties): - """VM-VM placement policy properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. placement policy type.Constant filled by server. Possible values - include: "VmVm", "VmHost". - :type type: str or ~avs_client.models.PlacementPolicyType - :param state: Whether the placement policy is enabled or disabled. Possible values include: - "Enabled", "Disabled". - :type state: str or ~avs_client.models.PlacementPolicyState - :param display_name: Display name of the placement policy. - :type display_name: str - :ivar provisioning_state: The provisioning state. Possible values include: "Succeeded", - "Failed", "Building", "Deleting", "Updating", "Canceled". - :vartype provisioning_state: str or ~avs_client.models.PlacementPolicyProvisioningState - :param vm_members: Required. Virtual machine members list. - :type vm_members: list[str] - :param affinity_type: Required. placement policy affinity type. Possible values include: - "Affinity", "AntiAffinity". - :type affinity_type: str or ~avs_client.models.AffinityType - """ - - _validation = { - 'type': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'vm_members': {'required': True}, - 'affinity_type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'vm_members': {'key': 'vmMembers', 'type': '[str]'}, - 'affinity_type': {'key': 'affinityType', 'type': 'str'}, - } - - def __init__( - self, - *, - vm_members: List[str], - affinity_type: Union[str, "AffinityType"], - state: Optional[Union[str, "PlacementPolicyState"]] = None, - display_name: Optional[str] = None, - **kwargs - ): - super(VmPlacementPolicyProperties, self).__init__(state=state, display_name=display_name, **kwargs) - self.type = 'VmVm' # type: str - self.vm_members = vm_members - self.affinity_type = affinity_type - - -class WorkloadNetwork(ProxyResource): - """Workload Network. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkloadNetwork, self).__init__(**kwargs) - - -class WorkloadNetworkDhcp(ProxyResource): - """NSX DHCP. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param properties: DHCP properties. - :type properties: ~avs_client.models.WorkloadNetworkDhcpEntity - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'WorkloadNetworkDhcpEntity'}, - } - - def __init__( - self, - *, - properties: Optional["WorkloadNetworkDhcpEntity"] = None, - **kwargs - ): - super(WorkloadNetworkDhcp, self).__init__(**kwargs) - self.properties = properties - - -class WorkloadNetworkDhcpEntity(msrest.serialization.Model): - """Base class for WorkloadNetworkDhcpServer and WorkloadNetworkDhcpRelay to inherit from. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: WorkloadNetworkDhcpRelay, WorkloadNetworkDhcpServer. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param dhcp_type: Required. Type of DHCP: SERVER or RELAY.Constant filled by server. Possible - values include: "SERVER", "RELAY". - :type dhcp_type: str or ~avs_client.models.DhcpTypeEnum - :param display_name: Display name of the DHCP entity. - :type display_name: str - :ivar segments: NSX Segments consuming DHCP. - :vartype segments: list[str] - :ivar provisioning_state: The provisioning state. Possible values include: "Succeeded", - "Failed", "Building", "Deleting", "Updating", "Canceled". - :vartype provisioning_state: str or ~avs_client.models.WorkloadNetworkDhcpProvisioningState - :param revision: NSX revision number. - :type revision: long - """ - - _validation = { - 'dhcp_type': {'required': True}, - 'segments': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'dhcp_type': {'key': 'dhcpType', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'segments': {'key': 'segments', 'type': '[str]'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'revision': {'key': 'revision', 'type': 'long'}, - } - - _subtype_map = { - 'dhcp_type': {'RELAY': 'WorkloadNetworkDhcpRelay', 'SERVER': 'WorkloadNetworkDhcpServer'} - } - - def __init__( - self, - *, - display_name: Optional[str] = None, - revision: Optional[int] = None, - **kwargs - ): - super(WorkloadNetworkDhcpEntity, self).__init__(**kwargs) - self.dhcp_type = None # type: Optional[str] - self.display_name = display_name - self.segments = None - self.provisioning_state = None - self.revision = revision - - -class WorkloadNetworkDhcpList(msrest.serialization.Model): - """A list of NSX dhcp entities. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The items on the page. - :vartype value: list[~avs_client.models.WorkloadNetworkDhcp] - :ivar next_link: URL to get the next page if any. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[WorkloadNetworkDhcp]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkloadNetworkDhcpList, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class WorkloadNetworkDhcpRelay(WorkloadNetworkDhcpEntity): - """NSX DHCP Relay. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param dhcp_type: Required. Type of DHCP: SERVER or RELAY.Constant filled by server. Possible - values include: "SERVER", "RELAY". - :type dhcp_type: str or ~avs_client.models.DhcpTypeEnum - :param display_name: Display name of the DHCP entity. - :type display_name: str - :ivar segments: NSX Segments consuming DHCP. - :vartype segments: list[str] - :ivar provisioning_state: The provisioning state. Possible values include: "Succeeded", - "Failed", "Building", "Deleting", "Updating", "Canceled". - :vartype provisioning_state: str or ~avs_client.models.WorkloadNetworkDhcpProvisioningState - :param revision: NSX revision number. - :type revision: long - :param server_addresses: DHCP Relay Addresses. Max 3. - :type server_addresses: list[str] - """ - - _validation = { - 'dhcp_type': {'required': True}, - 'segments': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'server_addresses': {'max_items': 3, 'min_items': 1}, - } - - _attribute_map = { - 'dhcp_type': {'key': 'dhcpType', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'segments': {'key': 'segments', 'type': '[str]'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'revision': {'key': 'revision', 'type': 'long'}, - 'server_addresses': {'key': 'serverAddresses', 'type': '[str]'}, - } - - def __init__( - self, - *, - display_name: Optional[str] = None, - revision: Optional[int] = None, - server_addresses: Optional[List[str]] = None, - **kwargs - ): - super(WorkloadNetworkDhcpRelay, self).__init__(display_name=display_name, revision=revision, **kwargs) - self.dhcp_type = 'RELAY' # type: str - self.server_addresses = server_addresses - - -class WorkloadNetworkDhcpServer(WorkloadNetworkDhcpEntity): - """NSX DHCP Server. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param dhcp_type: Required. Type of DHCP: SERVER or RELAY.Constant filled by server. Possible - values include: "SERVER", "RELAY". - :type dhcp_type: str or ~avs_client.models.DhcpTypeEnum - :param display_name: Display name of the DHCP entity. - :type display_name: str - :ivar segments: NSX Segments consuming DHCP. - :vartype segments: list[str] - :ivar provisioning_state: The provisioning state. Possible values include: "Succeeded", - "Failed", "Building", "Deleting", "Updating", "Canceled". - :vartype provisioning_state: str or ~avs_client.models.WorkloadNetworkDhcpProvisioningState - :param revision: NSX revision number. - :type revision: long - :param server_address: DHCP Server Address. - :type server_address: str - :param lease_time: DHCP Server Lease Time. - :type lease_time: long - """ - - _validation = { - 'dhcp_type': {'required': True}, - 'segments': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'dhcp_type': {'key': 'dhcpType', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'segments': {'key': 'segments', 'type': '[str]'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'revision': {'key': 'revision', 'type': 'long'}, - 'server_address': {'key': 'serverAddress', 'type': 'str'}, - 'lease_time': {'key': 'leaseTime', 'type': 'long'}, - } - - def __init__( - self, - *, - display_name: Optional[str] = None, - revision: Optional[int] = None, - server_address: Optional[str] = None, - lease_time: Optional[int] = None, - **kwargs - ): - super(WorkloadNetworkDhcpServer, self).__init__(display_name=display_name, revision=revision, **kwargs) - self.dhcp_type = 'SERVER' # type: str - self.server_address = server_address - self.lease_time = lease_time - - -class WorkloadNetworkDnsService(ProxyResource): - """NSX DNS Service. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param display_name: Display name of the DNS Service. - :type display_name: str - :param dns_service_ip: DNS service IP of the DNS Service. - :type dns_service_ip: str - :param default_dns_zone: Default DNS zone of the DNS Service. - :type default_dns_zone: str - :param fqdn_zones: FQDN zones of the DNS Service. - :type fqdn_zones: list[str] - :param log_level: DNS Service log level. Possible values include: "DEBUG", "INFO", "WARNING", - "ERROR", "FATAL". - :type log_level: str or ~avs_client.models.DnsServiceLogLevelEnum - :ivar status: DNS Service status. Possible values include: "SUCCESS", "FAILURE". - :vartype status: str or ~avs_client.models.DnsServiceStatusEnum - :ivar provisioning_state: The provisioning state. Possible values include: "Succeeded", - "Failed", "Building", "Deleting", "Updating", "Canceled". - :vartype provisioning_state: str or - ~avs_client.models.WorkloadNetworkDnsServiceProvisioningState - :param revision: NSX revision number. - :type revision: long - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'status': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'dns_service_ip': {'key': 'properties.dnsServiceIp', 'type': 'str'}, - 'default_dns_zone': {'key': 'properties.defaultDnsZone', 'type': 'str'}, - 'fqdn_zones': {'key': 'properties.fqdnZones', 'type': '[str]'}, - 'log_level': {'key': 'properties.logLevel', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'revision': {'key': 'properties.revision', 'type': 'long'}, - } - - def __init__( - self, - *, - display_name: Optional[str] = None, - dns_service_ip: Optional[str] = None, - default_dns_zone: Optional[str] = None, - fqdn_zones: Optional[List[str]] = None, - log_level: Optional[Union[str, "DnsServiceLogLevelEnum"]] = None, - revision: Optional[int] = None, - **kwargs - ): - super(WorkloadNetworkDnsService, self).__init__(**kwargs) - self.display_name = display_name - self.dns_service_ip = dns_service_ip - self.default_dns_zone = default_dns_zone - self.fqdn_zones = fqdn_zones - self.log_level = log_level - self.status = None - self.provisioning_state = None - self.revision = revision - - -class WorkloadNetworkDnsServicesList(msrest.serialization.Model): - """A list of NSX DNS Services. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The items on the page. - :vartype value: list[~avs_client.models.WorkloadNetworkDnsService] - :ivar next_link: URL to get the next page if any. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[WorkloadNetworkDnsService]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkloadNetworkDnsServicesList, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class WorkloadNetworkDnsZone(ProxyResource): - """NSX DNS Zone. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param display_name: Display name of the DNS Zone. - :type display_name: str - :param domain: Domain names of the DNS Zone. - :type domain: list[str] - :param dns_server_ips: DNS Server IP array of the DNS Zone. - :type dns_server_ips: list[str] - :param source_ip: Source IP of the DNS Zone. - :type source_ip: str - :param dns_services: Number of DNS Services using the DNS zone. - :type dns_services: long - :ivar provisioning_state: The provisioning state. Possible values include: "Succeeded", - "Failed", "Building", "Deleting", "Updating", "Canceled". - :vartype provisioning_state: str or ~avs_client.models.WorkloadNetworkDnsZoneProvisioningState - :param revision: NSX revision number. - :type revision: long - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'domain': {'key': 'properties.domain', 'type': '[str]'}, - 'dns_server_ips': {'key': 'properties.dnsServerIps', 'type': '[str]'}, - 'source_ip': {'key': 'properties.sourceIp', 'type': 'str'}, - 'dns_services': {'key': 'properties.dnsServices', 'type': 'long'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'revision': {'key': 'properties.revision', 'type': 'long'}, - } - - def __init__( - self, - *, - display_name: Optional[str] = None, - domain: Optional[List[str]] = None, - dns_server_ips: Optional[List[str]] = None, - source_ip: Optional[str] = None, - dns_services: Optional[int] = None, - revision: Optional[int] = None, - **kwargs - ): - super(WorkloadNetworkDnsZone, self).__init__(**kwargs) - self.display_name = display_name - self.domain = domain - self.dns_server_ips = dns_server_ips - self.source_ip = source_ip - self.dns_services = dns_services - self.provisioning_state = None - self.revision = revision - - -class WorkloadNetworkDnsZonesList(msrest.serialization.Model): - """A list of NSX DNS Zones. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The items on the page. - :vartype value: list[~avs_client.models.WorkloadNetworkDnsZone] - :ivar next_link: URL to get the next page if any. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[WorkloadNetworkDnsZone]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkloadNetworkDnsZonesList, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class WorkloadNetworkGateway(ProxyResource): - """NSX Gateway. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param display_name: Display name of the DHCP entity. - :type display_name: str - :ivar path: NSX Gateway Path. - :vartype path: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'path': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'path': {'key': 'properties.path', 'type': 'str'}, - } - - def __init__( - self, - *, - display_name: Optional[str] = None, - **kwargs - ): - super(WorkloadNetworkGateway, self).__init__(**kwargs) - self.display_name = display_name - self.path = None - - -class WorkloadNetworkGatewayList(msrest.serialization.Model): - """A list of NSX Gateways. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The items on the page. - :vartype value: list[~avs_client.models.WorkloadNetworkGateway] - :ivar next_link: URL to get the next page if any. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[WorkloadNetworkGateway]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkloadNetworkGatewayList, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class WorkloadNetworkList(msrest.serialization.Model): - """A list of workload networks. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The items on the page. - :vartype value: list[~avs_client.models.WorkloadNetwork] - :ivar next_link: URL to get the next page if any. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[WorkloadNetwork]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkloadNetworkList, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class WorkloadNetworkPortMirroring(ProxyResource): - """NSX Port Mirroring. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param display_name: Display name of the port mirroring profile. - :type display_name: str - :param direction: Direction of port mirroring profile. Possible values include: "INGRESS", - "EGRESS", "BIDIRECTIONAL". - :type direction: str or ~avs_client.models.PortMirroringDirectionEnum - :param source: Source VM Group. - :type source: str - :param destination: Destination VM Group. - :type destination: str - :ivar status: Port Mirroring Status. Possible values include: "SUCCESS", "FAILURE". - :vartype status: str or ~avs_client.models.PortMirroringStatusEnum - :ivar provisioning_state: The provisioning state. Possible values include: "Succeeded", - "Failed", "Building", "Deleting", "Updating", "Canceled". - :vartype provisioning_state: str or - ~avs_client.models.WorkloadNetworkPortMirroringProvisioningState - :param revision: NSX revision number. - :type revision: long - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'status': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'direction': {'key': 'properties.direction', 'type': 'str'}, - 'source': {'key': 'properties.source', 'type': 'str'}, - 'destination': {'key': 'properties.destination', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'revision': {'key': 'properties.revision', 'type': 'long'}, - } - - def __init__( - self, - *, - display_name: Optional[str] = None, - direction: Optional[Union[str, "PortMirroringDirectionEnum"]] = None, - source: Optional[str] = None, - destination: Optional[str] = None, - revision: Optional[int] = None, - **kwargs - ): - super(WorkloadNetworkPortMirroring, self).__init__(**kwargs) - self.display_name = display_name - self.direction = direction - self.source = source - self.destination = destination - self.status = None - self.provisioning_state = None - self.revision = revision - - -class WorkloadNetworkPortMirroringList(msrest.serialization.Model): - """A list of NSX Port Mirroring. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The items on the page. - :vartype value: list[~avs_client.models.WorkloadNetworkPortMirroring] - :ivar next_link: URL to get the next page if any. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[WorkloadNetworkPortMirroring]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkloadNetworkPortMirroringList, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class WorkloadNetworkPublicIP(ProxyResource): - """NSX Public IP Block. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param display_name: Display name of the Public IP Block. - :type display_name: str - :param number_of_public_i_ps: Number of Public IPs requested. - :type number_of_public_i_ps: long - :ivar public_ip_block: CIDR Block of the Public IP Block. - :vartype public_ip_block: str - :ivar provisioning_state: The provisioning state. Possible values include: "Succeeded", - "Failed", "Building", "Deleting", "Updating", "Canceled". - :vartype provisioning_state: str or ~avs_client.models.WorkloadNetworkPublicIPProvisioningState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'public_ip_block': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'number_of_public_i_ps': {'key': 'properties.numberOfPublicIPs', 'type': 'long'}, - 'public_ip_block': {'key': 'properties.publicIPBlock', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - display_name: Optional[str] = None, - number_of_public_i_ps: Optional[int] = None, - **kwargs - ): - super(WorkloadNetworkPublicIP, self).__init__(**kwargs) - self.display_name = display_name - self.number_of_public_i_ps = number_of_public_i_ps - self.public_ip_block = None - self.provisioning_state = None - - -class WorkloadNetworkPublicIPsList(msrest.serialization.Model): - """A list of NSX Public IP Blocks. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The items on the page. - :vartype value: list[~avs_client.models.WorkloadNetworkPublicIP] - :ivar next_link: URL to get the next page if any. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[WorkloadNetworkPublicIP]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkloadNetworkPublicIPsList, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class WorkloadNetworkSegment(ProxyResource): - """NSX Segment. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param display_name: Display name of the segment. - :type display_name: str - :param connected_gateway: Gateway which to connect segment to. - :type connected_gateway: str - :param subnet: Subnet which to connect segment to. - :type subnet: ~avs_client.models.WorkloadNetworkSegmentSubnet - :ivar port_vif: Port Vif which segment is associated with. - :vartype port_vif: list[~avs_client.models.WorkloadNetworkSegmentPortVif] - :ivar status: Segment status. Possible values include: "SUCCESS", "FAILURE". - :vartype status: str or ~avs_client.models.SegmentStatusEnum - :ivar provisioning_state: The provisioning state. Possible values include: "Succeeded", - "Failed", "Building", "Deleting", "Updating", "Canceled". - :vartype provisioning_state: str or ~avs_client.models.WorkloadNetworkSegmentProvisioningState - :param revision: NSX revision number. - :type revision: long - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'port_vif': {'readonly': True}, - 'status': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'connected_gateway': {'key': 'properties.connectedGateway', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'WorkloadNetworkSegmentSubnet'}, - 'port_vif': {'key': 'properties.portVif', 'type': '[WorkloadNetworkSegmentPortVif]'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'revision': {'key': 'properties.revision', 'type': 'long'}, - } - - def __init__( - self, - *, - display_name: Optional[str] = None, - connected_gateway: Optional[str] = None, - subnet: Optional["WorkloadNetworkSegmentSubnet"] = None, - revision: Optional[int] = None, - **kwargs - ): - super(WorkloadNetworkSegment, self).__init__(**kwargs) - self.display_name = display_name - self.connected_gateway = connected_gateway - self.subnet = subnet - self.port_vif = None - self.status = None - self.provisioning_state = None - self.revision = revision - - -class WorkloadNetworkSegmentPortVif(msrest.serialization.Model): - """Ports and any VIF attached to segment. - - :param port_name: Name of port or VIF attached to segment. - :type port_name: str - """ - - _attribute_map = { - 'port_name': {'key': 'portName', 'type': 'str'}, - } - - def __init__( - self, - *, - port_name: Optional[str] = None, - **kwargs - ): - super(WorkloadNetworkSegmentPortVif, self).__init__(**kwargs) - self.port_name = port_name - - -class WorkloadNetworkSegmentsList(msrest.serialization.Model): - """A list of NSX Segments. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The items on the page. - :vartype value: list[~avs_client.models.WorkloadNetworkSegment] - :ivar next_link: URL to get the next page if any. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[WorkloadNetworkSegment]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkloadNetworkSegmentsList, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class WorkloadNetworkSegmentSubnet(msrest.serialization.Model): - """Subnet configuration for segment. - - :param dhcp_ranges: DHCP Range assigned for subnet. - :type dhcp_ranges: list[str] - :param gateway_address: Gateway address. - :type gateway_address: str - """ - - _attribute_map = { - 'dhcp_ranges': {'key': 'dhcpRanges', 'type': '[str]'}, - 'gateway_address': {'key': 'gatewayAddress', 'type': 'str'}, - } - - def __init__( - self, - *, - dhcp_ranges: Optional[List[str]] = None, - gateway_address: Optional[str] = None, - **kwargs - ): - super(WorkloadNetworkSegmentSubnet, self).__init__(**kwargs) - self.dhcp_ranges = dhcp_ranges - self.gateway_address = gateway_address - - -class WorkloadNetworkVirtualMachine(ProxyResource): - """NSX Virtual Machine. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param display_name: Display name of the VM. - :type display_name: str - :ivar vm_type: Virtual machine type. Possible values include: "REGULAR", "EDGE", "SERVICE". - :vartype vm_type: str or ~avs_client.models.VMTypeEnum - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'vm_type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'vm_type': {'key': 'properties.vmType', 'type': 'str'}, - } - - def __init__( - self, - *, - display_name: Optional[str] = None, - **kwargs - ): - super(WorkloadNetworkVirtualMachine, self).__init__(**kwargs) - self.display_name = display_name - self.vm_type = None - - -class WorkloadNetworkVirtualMachinesList(msrest.serialization.Model): - """A list of NSX Virtual Machines. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The items on the page. - :vartype value: list[~avs_client.models.WorkloadNetworkVirtualMachine] - :ivar next_link: URL to get the next page if any. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[WorkloadNetworkVirtualMachine]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkloadNetworkVirtualMachinesList, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class WorkloadNetworkVMGroup(ProxyResource): - """NSX VM Group. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param display_name: Display name of the VM group. - :type display_name: str - :param members: Virtual machine members of this group. - :type members: list[str] - :ivar status: VM Group status. Possible values include: "SUCCESS", "FAILURE". - :vartype status: str or ~avs_client.models.VMGroupStatusEnum - :ivar provisioning_state: The provisioning state. Possible values include: "Succeeded", - "Failed", "Building", "Deleting", "Updating", "Canceled". - :vartype provisioning_state: str or ~avs_client.models.WorkloadNetworkVMGroupProvisioningState - :param revision: NSX revision number. - :type revision: long - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'status': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'members': {'key': 'properties.members', 'type': '[str]'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'revision': {'key': 'properties.revision', 'type': 'long'}, - } - - def __init__( - self, - *, - display_name: Optional[str] = None, - members: Optional[List[str]] = None, - revision: Optional[int] = None, - **kwargs - ): - super(WorkloadNetworkVMGroup, self).__init__(**kwargs) - self.display_name = display_name - self.members = members - self.status = None - self.provisioning_state = None - self.revision = revision - - -class WorkloadNetworkVMGroupsList(msrest.serialization.Model): - """A list of NSX VM Groups. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The items on the page. - :vartype value: list[~avs_client.models.WorkloadNetworkVMGroup] - :ivar next_link: URL to get the next page if any. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[WorkloadNetworkVMGroup]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkloadNetworkVMGroupsList, self).__init__(**kwargs) - self.value = None - self.next_link = None diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/__init__.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/__init__.py deleted file mode 100644 index d6090880195..00000000000 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/__init__.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from ._operations import Operations -from ._locations_operations import LocationsOperations -from ._private_clouds_operations import PrivateCloudsOperations -from ._clusters_operations import ClustersOperations -from ._datastores_operations import DatastoresOperations -from ._hcx_enterprise_sites_operations import HcxEnterpriseSitesOperations -from ._authorizations_operations import AuthorizationsOperations -from ._global_reach_connections_operations import GlobalReachConnectionsOperations -from ._workload_networks_operations import WorkloadNetworksOperations -from ._cloud_links_operations import CloudLinksOperations -from ._addons_operations import AddonsOperations -from ._virtual_machines_operations import VirtualMachinesOperations -from ._placement_policies_operations import PlacementPoliciesOperations -from ._script_packages_operations import ScriptPackagesOperations -from ._script_cmdlets_operations import ScriptCmdletsOperations -from ._script_executions_operations import ScriptExecutionsOperations - -__all__ = [ - 'Operations', - 'LocationsOperations', - 'PrivateCloudsOperations', - 'ClustersOperations', - 'DatastoresOperations', - 'HcxEnterpriseSitesOperations', - 'AuthorizationsOperations', - 'GlobalReachConnectionsOperations', - 'WorkloadNetworksOperations', - 'CloudLinksOperations', - 'AddonsOperations', - 'VirtualMachinesOperations', - 'PlacementPoliciesOperations', - 'ScriptPackagesOperations', - 'ScriptCmdletsOperations', - 'ScriptExecutionsOperations', -] diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_addons_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_addons_operations.py deleted file mode 100644 index 69080ac22a4..00000000000 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_addons_operations.py +++ /dev/null @@ -1,448 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class AddonsOperations(object): - """AddonsOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~avs_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.AddonList"] - """List addons in a private cloud. - - List addons in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either AddonList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~avs_client.models.AddonList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.AddonList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('AddonList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons'} # type: ignore - - def get( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - addon_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.Addon" - """Get an addon by name in a private cloud. - - Get an addon by name in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param addon_name: Name of the addon for the private cloud. - :type addon_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: Addon, or the result of cls(response) - :rtype: ~avs_client.models.Addon - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.Addon"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'addonName': self._serialize.url("addon_name", addon_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('Addon', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}'} # type: ignore - - def _create_or_update_initial( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - addon_name, # type: str - addon, # type: "_models.Addon" - **kwargs # type: Any - ): - # type: (...) -> "_models.Addon" - cls = kwargs.pop('cls', None) # type: ClsType["_models.Addon"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'addonName': self._serialize.url("addon_name", addon_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(addon, 'Addon') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('Addon', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('Addon', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}'} # type: ignore - - def begin_create_or_update( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - addon_name, # type: str - addon, # type: "_models.Addon" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.Addon"] - """Create or update a addon in a private cloud. - - Create or update a addon in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: The name of the private cloud. - :type private_cloud_name: str - :param addon_name: Name of the addon for the private cloud. - :type addon_name: str - :param addon: A addon in the private cloud. - :type addon: ~avs_client.models.Addon - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either Addon or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~avs_client.models.Addon] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.Addon"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - addon_name=addon_name, - addon=addon, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('Addon', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'addonName': self._serialize.url("addon_name", addon_name, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}'} # type: ignore - - def _delete_initial( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - addon_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'addonName': self._serialize.url("addon_name", addon_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}'} # type: ignore - - def begin_delete( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - addon_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] - """Delete a addon in a private cloud. - - Delete a addon in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param addon_name: Name of the addon for the private cloud. - :type addon_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - addon_name=addon_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'addonName': self._serialize.url("addon_name", addon_name, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}'} # type: ignore diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_authorizations_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_authorizations_operations.py deleted file mode 100644 index a2e10705168..00000000000 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_authorizations_operations.py +++ /dev/null @@ -1,448 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class AuthorizationsOperations(object): - """AuthorizationsOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~avs_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.ExpressRouteAuthorizationList"] - """List ExpressRoute Circuit Authorizations in a private cloud. - - List ExpressRoute Circuit Authorizations in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ExpressRouteAuthorizationList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~avs_client.models.ExpressRouteAuthorizationList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteAuthorizationList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('ExpressRouteAuthorizationList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations'} # type: ignore - - def get( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - authorization_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.ExpressRouteAuthorization" - """Get an ExpressRoute Circuit Authorization by name in a private cloud. - - Get an ExpressRoute Circuit Authorization by name in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param authorization_name: Name of the ExpressRoute Circuit Authorization in the private cloud. - :type authorization_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ExpressRouteAuthorization, or the result of cls(response) - :rtype: ~avs_client.models.ExpressRouteAuthorization - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteAuthorization"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'authorizationName': self._serialize.url("authorization_name", authorization_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ExpressRouteAuthorization', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}'} # type: ignore - - def _create_or_update_initial( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - authorization_name, # type: str - authorization, # type: "_models.ExpressRouteAuthorization" - **kwargs # type: Any - ): - # type: (...) -> "_models.ExpressRouteAuthorization" - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteAuthorization"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'authorizationName': self._serialize.url("authorization_name", authorization_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(authorization, 'ExpressRouteAuthorization') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('ExpressRouteAuthorization', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('ExpressRouteAuthorization', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}'} # type: ignore - - def begin_create_or_update( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - authorization_name, # type: str - authorization, # type: "_models.ExpressRouteAuthorization" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.ExpressRouteAuthorization"] - """Create or update an ExpressRoute Circuit Authorization in a private cloud. - - Create or update an ExpressRoute Circuit Authorization in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: The name of the private cloud. - :type private_cloud_name: str - :param authorization_name: Name of the ExpressRoute Circuit Authorization in the private cloud. - :type authorization_name: str - :param authorization: An ExpressRoute Circuit Authorization. - :type authorization: ~avs_client.models.ExpressRouteAuthorization - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either ExpressRouteAuthorization or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~avs_client.models.ExpressRouteAuthorization] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteAuthorization"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - authorization_name=authorization_name, - authorization=authorization, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ExpressRouteAuthorization', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'authorizationName': self._serialize.url("authorization_name", authorization_name, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}'} # type: ignore - - def _delete_initial( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - authorization_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'authorizationName': self._serialize.url("authorization_name", authorization_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}'} # type: ignore - - def begin_delete( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - authorization_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] - """Delete an ExpressRoute Circuit Authorization in a private cloud. - - Delete an ExpressRoute Circuit Authorization in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param authorization_name: Name of the ExpressRoute Circuit Authorization in the private cloud. - :type authorization_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - authorization_name=authorization_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'authorizationName': self._serialize.url("authorization_name", authorization_name, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}'} # type: ignore diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_cloud_links_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_cloud_links_operations.py deleted file mode 100644 index a8e91f51df3..00000000000 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_cloud_links_operations.py +++ /dev/null @@ -1,448 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class CloudLinksOperations(object): - """CloudLinksOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~avs_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.CloudLinkList"] - """List cloud link in a private cloud. - - List cloud link in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either CloudLinkList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~avs_client.models.CloudLinkList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.CloudLinkList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('CloudLinkList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks'} # type: ignore - - def get( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - cloud_link_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.CloudLink" - """Get an cloud link by name in a private cloud. - - Get an cloud link by name in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param cloud_link_name: Name of the cloud link resource. - :type cloud_link_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: CloudLink, or the result of cls(response) - :rtype: ~avs_client.models.CloudLink - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.CloudLink"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'cloudLinkName': self._serialize.url("cloud_link_name", cloud_link_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('CloudLink', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}'} # type: ignore - - def _create_or_update_initial( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - cloud_link_name, # type: str - cloud_link, # type: "_models.CloudLink" - **kwargs # type: Any - ): - # type: (...) -> "_models.CloudLink" - cls = kwargs.pop('cls', None) # type: ClsType["_models.CloudLink"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'cloudLinkName': self._serialize.url("cloud_link_name", cloud_link_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(cloud_link, 'CloudLink') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('CloudLink', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('CloudLink', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}'} # type: ignore - - def begin_create_or_update( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - cloud_link_name, # type: str - cloud_link, # type: "_models.CloudLink" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.CloudLink"] - """Create or update a cloud link in a private cloud. - - Create or update a cloud link in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: The name of the private cloud. - :type private_cloud_name: str - :param cloud_link_name: Name of the cloud link resource. - :type cloud_link_name: str - :param cloud_link: A cloud link in the private cloud. - :type cloud_link: ~avs_client.models.CloudLink - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either CloudLink or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~avs_client.models.CloudLink] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.CloudLink"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - cloud_link_name=cloud_link_name, - cloud_link=cloud_link, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('CloudLink', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'cloudLinkName': self._serialize.url("cloud_link_name", cloud_link_name, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}'} # type: ignore - - def _delete_initial( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - cloud_link_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'cloudLinkName': self._serialize.url("cloud_link_name", cloud_link_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}'} # type: ignore - - def begin_delete( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - cloud_link_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] - """Delete a cloud link in a private cloud. - - Delete a cloud link in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param cloud_link_name: Name of the cloud link resource. - :type cloud_link_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - cloud_link_name=cloud_link_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'cloudLinkName': self._serialize.url("cloud_link_name", cloud_link_name, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}'} # type: ignore diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_clusters_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_clusters_operations.py deleted file mode 100644 index c7b7853f116..00000000000 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_clusters_operations.py +++ /dev/null @@ -1,652 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class ClustersOperations(object): - """ClustersOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~avs_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.ClusterList"] - """List clusters in a private cloud. - - List clusters in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ClusterList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~avs_client.models.ClusterList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('ClusterList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters'} # type: ignore - - def get( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - cluster_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.Cluster" - """Get a cluster by name in a private cloud. - - Get a cluster by name in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param cluster_name: Name of the cluster in the private cloud. - :type cluster_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: Cluster, or the result of cls(response) - :rtype: ~avs_client.models.Cluster - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.Cluster"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('Cluster', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}'} # type: ignore - - def _create_or_update_initial( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - cluster_name, # type: str - cluster, # type: "_models.Cluster" - **kwargs # type: Any - ): - # type: (...) -> "_models.Cluster" - cls = kwargs.pop('cls', None) # type: ClsType["_models.Cluster"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(cluster, 'Cluster') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('Cluster', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('Cluster', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}'} # type: ignore - - def begin_create_or_update( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - cluster_name, # type: str - cluster, # type: "_models.Cluster" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.Cluster"] - """Create or update a cluster in a private cloud. - - Create or update a cluster in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: The name of the private cloud. - :type private_cloud_name: str - :param cluster_name: Name of the cluster in the private cloud. - :type cluster_name: str - :param cluster: A cluster in the private cloud. - :type cluster: ~avs_client.models.Cluster - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either Cluster or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~avs_client.models.Cluster] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.Cluster"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - cluster_name=cluster_name, - cluster=cluster, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('Cluster', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}'} # type: ignore - - def _update_initial( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - cluster_name, # type: str - cluster_update, # type: "_models.ClusterUpdate" - **kwargs # type: Any - ): - # type: (...) -> "_models.Cluster" - cls = kwargs.pop('cls', None) # type: ClsType["_models.Cluster"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._update_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(cluster_update, 'ClusterUpdate') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('Cluster', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('Cluster', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}'} # type: ignore - - def begin_update( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - cluster_name, # type: str - cluster_update, # type: "_models.ClusterUpdate" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.Cluster"] - """Update a cluster in a private cloud. - - Update a cluster in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param cluster_name: Name of the cluster in the private cloud. - :type cluster_name: str - :param cluster_update: The cluster properties to be updated. - :type cluster_update: ~avs_client.models.ClusterUpdate - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either Cluster or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~avs_client.models.Cluster] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.Cluster"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - cluster_name=cluster_name, - cluster_update=cluster_update, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('Cluster', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}'} # type: ignore - - def _delete_initial( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - cluster_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}'} # type: ignore - - def begin_delete( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - cluster_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] - """Delete a cluster in a private cloud. - - Delete a cluster in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param cluster_name: Name of the cluster in the private cloud. - :type cluster_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - cluster_name=cluster_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}'} # type: ignore - - def list_zones( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - cluster_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.ClusterZoneList" - """List hosts by zone in a cluster. - - List hosts by zone in a cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param cluster_name: Name of the cluster in the private cloud. - :type cluster_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ClusterZoneList, or the result of cls(response) - :rtype: ~avs_client.models.ClusterZoneList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterZoneList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.list_zones.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ClusterZoneList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - list_zones.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/listZones'} # type: ignore diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_datastores_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_datastores_operations.py deleted file mode 100644 index d3738141478..00000000000 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_datastores_operations.py +++ /dev/null @@ -1,470 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class DatastoresOperations(object): - """DatastoresOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~avs_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - cluster_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.DatastoreList"] - """List datastores in a private cloud cluster. - - List datastores in a private cloud cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param cluster_name: Name of the cluster in the private cloud. - :type cluster_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either DatastoreList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~avs_client.models.DatastoreList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DatastoreList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('DatastoreList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores'} # type: ignore - - def get( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - cluster_name, # type: str - datastore_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.Datastore" - """Get a datastore in a private cloud cluster. - - Get a datastore in a private cloud cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param cluster_name: Name of the cluster in the private cloud. - :type cluster_name: str - :param datastore_name: Name of the datastore in the private cloud cluster. - :type datastore_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: Datastore, or the result of cls(response) - :rtype: ~avs_client.models.Datastore - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.Datastore"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'datastoreName': self._serialize.url("datastore_name", datastore_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('Datastore', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}'} # type: ignore - - def _create_or_update_initial( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - cluster_name, # type: str - datastore_name, # type: str - datastore, # type: "_models.Datastore" - **kwargs # type: Any - ): - # type: (...) -> "_models.Datastore" - cls = kwargs.pop('cls', None) # type: ClsType["_models.Datastore"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'datastoreName': self._serialize.url("datastore_name", datastore_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(datastore, 'Datastore') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('Datastore', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('Datastore', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}'} # type: ignore - - def begin_create_or_update( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - cluster_name, # type: str - datastore_name, # type: str - datastore, # type: "_models.Datastore" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.Datastore"] - """Create or update a datastore in a private cloud cluster. - - Create or update a datastore in a private cloud cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param cluster_name: Name of the cluster in the private cloud. - :type cluster_name: str - :param datastore_name: Name of the datastore in the private cloud cluster. - :type datastore_name: str - :param datastore: A datastore in a private cloud cluster. - :type datastore: ~avs_client.models.Datastore - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either Datastore or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~avs_client.models.Datastore] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.Datastore"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - cluster_name=cluster_name, - datastore_name=datastore_name, - datastore=datastore, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('Datastore', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'datastoreName': self._serialize.url("datastore_name", datastore_name, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}'} # type: ignore - - def _delete_initial( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - cluster_name, # type: str - datastore_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'datastoreName': self._serialize.url("datastore_name", datastore_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}'} # type: ignore - - def begin_delete( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - cluster_name, # type: str - datastore_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] - """Delete a datastore in a private cloud cluster. - - Delete a datastore in a private cloud cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param cluster_name: Name of the cluster in the private cloud. - :type cluster_name: str - :param datastore_name: Name of the datastore in the private cloud cluster. - :type datastore_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - cluster_name=cluster_name, - datastore_name=datastore_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'datastoreName': self._serialize.url("datastore_name", datastore_name, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}'} # type: ignore diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_global_reach_connections_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_global_reach_connections_operations.py deleted file mode 100644 index fbd593d126e..00000000000 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_global_reach_connections_operations.py +++ /dev/null @@ -1,448 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class GlobalReachConnectionsOperations(object): - """GlobalReachConnectionsOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~avs_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.GlobalReachConnectionList"] - """List global reach connections in a private cloud. - - List global reach connections in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either GlobalReachConnectionList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~avs_client.models.GlobalReachConnectionList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.GlobalReachConnectionList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('GlobalReachConnectionList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections'} # type: ignore - - def get( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - global_reach_connection_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.GlobalReachConnection" - """Get a global reach connection by name in a private cloud. - - Get a global reach connection by name in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param global_reach_connection_name: Name of the global reach connection in the private cloud. - :type global_reach_connection_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: GlobalReachConnection, or the result of cls(response) - :rtype: ~avs_client.models.GlobalReachConnection - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.GlobalReachConnection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'globalReachConnectionName': self._serialize.url("global_reach_connection_name", global_reach_connection_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('GlobalReachConnection', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}'} # type: ignore - - def _create_or_update_initial( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - global_reach_connection_name, # type: str - global_reach_connection, # type: "_models.GlobalReachConnection" - **kwargs # type: Any - ): - # type: (...) -> "_models.GlobalReachConnection" - cls = kwargs.pop('cls', None) # type: ClsType["_models.GlobalReachConnection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'globalReachConnectionName': self._serialize.url("global_reach_connection_name", global_reach_connection_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(global_reach_connection, 'GlobalReachConnection') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('GlobalReachConnection', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('GlobalReachConnection', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}'} # type: ignore - - def begin_create_or_update( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - global_reach_connection_name, # type: str - global_reach_connection, # type: "_models.GlobalReachConnection" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.GlobalReachConnection"] - """Create or update a global reach connection in a private cloud. - - Create or update a global reach connection in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: The name of the private cloud. - :type private_cloud_name: str - :param global_reach_connection_name: Name of the global reach connection in the private cloud. - :type global_reach_connection_name: str - :param global_reach_connection: A global reach connection in the private cloud. - :type global_reach_connection: ~avs_client.models.GlobalReachConnection - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either GlobalReachConnection or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~avs_client.models.GlobalReachConnection] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.GlobalReachConnection"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - global_reach_connection_name=global_reach_connection_name, - global_reach_connection=global_reach_connection, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('GlobalReachConnection', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'globalReachConnectionName': self._serialize.url("global_reach_connection_name", global_reach_connection_name, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}'} # type: ignore - - def _delete_initial( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - global_reach_connection_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'globalReachConnectionName': self._serialize.url("global_reach_connection_name", global_reach_connection_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}'} # type: ignore - - def begin_delete( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - global_reach_connection_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] - """Delete a global reach connection in a private cloud. - - Delete a global reach connection in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param global_reach_connection_name: Name of the global reach connection in the private cloud. - :type global_reach_connection_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - global_reach_connection_name=global_reach_connection_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'globalReachConnectionName': self._serialize.url("global_reach_connection_name", global_reach_connection_name, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}'} # type: ignore diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_hcx_enterprise_sites_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_hcx_enterprise_sites_operations.py deleted file mode 100644 index f745b5c412f..00000000000 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_hcx_enterprise_sites_operations.py +++ /dev/null @@ -1,327 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class HcxEnterpriseSitesOperations(object): - """HcxEnterpriseSitesOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~avs_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.HcxEnterpriseSiteList"] - """List HCX Enterprise Sites in a private cloud. - - List HCX Enterprise Sites in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either HcxEnterpriseSiteList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~avs_client.models.HcxEnterpriseSiteList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.HcxEnterpriseSiteList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('HcxEnterpriseSiteList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites'} # type: ignore - - def get( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - hcx_enterprise_site_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.HcxEnterpriseSite" - """Get an HCX Enterprise Site by name in a private cloud. - - Get an HCX Enterprise Site by name in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param hcx_enterprise_site_name: Name of the HCX Enterprise Site in the private cloud. - :type hcx_enterprise_site_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: HcxEnterpriseSite, or the result of cls(response) - :rtype: ~avs_client.models.HcxEnterpriseSite - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.HcxEnterpriseSite"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'hcxEnterpriseSiteName': self._serialize.url("hcx_enterprise_site_name", hcx_enterprise_site_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('HcxEnterpriseSite', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites/{hcxEnterpriseSiteName}'} # type: ignore - - def create_or_update( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - hcx_enterprise_site_name, # type: str - hcx_enterprise_site, # type: "_models.HcxEnterpriseSite" - **kwargs # type: Any - ): - # type: (...) -> "_models.HcxEnterpriseSite" - """Create or update an HCX Enterprise Site in a private cloud. - - Create or update an HCX Enterprise Site in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: The name of the private cloud. - :type private_cloud_name: str - :param hcx_enterprise_site_name: Name of the HCX Enterprise Site in the private cloud. - :type hcx_enterprise_site_name: str - :param hcx_enterprise_site: The HCX Enterprise Site. - :type hcx_enterprise_site: ~avs_client.models.HcxEnterpriseSite - :keyword callable cls: A custom type or function that will be passed the direct response - :return: HcxEnterpriseSite, or the result of cls(response) - :rtype: ~avs_client.models.HcxEnterpriseSite - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.HcxEnterpriseSite"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'hcxEnterpriseSiteName': self._serialize.url("hcx_enterprise_site_name", hcx_enterprise_site_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(hcx_enterprise_site, 'HcxEnterpriseSite') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('HcxEnterpriseSite', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('HcxEnterpriseSite', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites/{hcxEnterpriseSiteName}'} # type: ignore - - def delete( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - hcx_enterprise_site_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - """Delete an HCX Enterprise Site in a private cloud. - - Delete an HCX Enterprise Site in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param hcx_enterprise_site_name: Name of the HCX Enterprise Site in the private cloud. - :type hcx_enterprise_site_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.delete.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'hcxEnterpriseSiteName': self._serialize.url("hcx_enterprise_site_name", hcx_enterprise_site_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites/{hcxEnterpriseSiteName}'} # type: ignore diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_locations_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_locations_operations.py deleted file mode 100644 index a971b45e66f..00000000000 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_locations_operations.py +++ /dev/null @@ -1,166 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class LocationsOperations(object): - """LocationsOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~avs_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def check_trial_availability( - self, - location, # type: str - sku=None, # type: Optional["_models.Sku"] - **kwargs # type: Any - ): - # type: (...) -> "_models.Trial" - """Return trial status for subscription by region. - - :param location: Azure region. - :type location: str - :param sku: The sku to check for trial availability. - :type sku: ~avs_client.models.Sku - :keyword callable cls: A custom type or function that will be passed the direct response - :return: Trial, or the result of cls(response) - :rtype: ~avs_client.models.Trial - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.Trial"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.check_trial_availability.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'location': self._serialize.url("location", location, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - if sku is not None: - body_content = self._serialize.body(sku, 'Sku') - else: - body_content = None - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('Trial', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - check_trial_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/checkTrialAvailability'} # type: ignore - - def check_quota_availability( - self, - location, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.Quota" - """Return quota for subscription by region. - - :param location: Azure region. - :type location: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: Quota, or the result of cls(response) - :rtype: ~avs_client.models.Quota - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.Quota"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.check_quota_availability.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'location': self._serialize.url("location", location, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('Quota', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - check_quota_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/checkQuotaAvailability'} # type: ignore diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_operations.py deleted file mode 100644 index 09cc2fa408c..00000000000 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_operations.py +++ /dev/null @@ -1,109 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class Operations(object): - """Operations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~avs_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.OperationList"] - """Lists all of the available operations. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either OperationList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~avs_client.models.OperationList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('OperationList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/providers/Microsoft.AVS/operations'} # type: ignore diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_placement_policies_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_placement_policies_operations.py deleted file mode 100644 index 72ae744d3a7..00000000000 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_placement_policies_operations.py +++ /dev/null @@ -1,620 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class PlacementPoliciesOperations(object): - """PlacementPoliciesOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~avs_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - cluster_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.PlacementPoliciesList"] - """List placement policies in a private cloud cluster. - - List placement policies in a private cloud cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param cluster_name: Name of the cluster in the private cloud. - :type cluster_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PlacementPoliciesList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~avs_client.models.PlacementPoliciesList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PlacementPoliciesList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('PlacementPoliciesList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies'} # type: ignore - - def get( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - cluster_name, # type: str - placement_policy_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.PlacementPolicy" - """Get a placement policy by name in a private cloud cluster. - - Get a placement policy by name in a private cloud cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param cluster_name: Name of the cluster in the private cloud. - :type cluster_name: str - :param placement_policy_name: Name of the VMware vSphere Distributed Resource Scheduler (DRS) - placement policy. - :type placement_policy_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PlacementPolicy, or the result of cls(response) - :rtype: ~avs_client.models.PlacementPolicy - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PlacementPolicy"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'placementPolicyName': self._serialize.url("placement_policy_name", placement_policy_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PlacementPolicy', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}'} # type: ignore - - def _create_or_update_initial( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - cluster_name, # type: str - placement_policy_name, # type: str - placement_policy, # type: "_models.PlacementPolicy" - **kwargs # type: Any - ): - # type: (...) -> "_models.PlacementPolicy" - cls = kwargs.pop('cls', None) # type: ClsType["_models.PlacementPolicy"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'placementPolicyName': self._serialize.url("placement_policy_name", placement_policy_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(placement_policy, 'PlacementPolicy') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('PlacementPolicy', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('PlacementPolicy', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}'} # type: ignore - - def begin_create_or_update( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - cluster_name, # type: str - placement_policy_name, # type: str - placement_policy, # type: "_models.PlacementPolicy" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.PlacementPolicy"] - """Create or update a placement policy in a private cloud cluster. - - Create or update a placement policy in a private cloud cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param cluster_name: Name of the cluster in the private cloud. - :type cluster_name: str - :param placement_policy_name: Name of the VMware vSphere Distributed Resource Scheduler (DRS) - placement policy. - :type placement_policy_name: str - :param placement_policy: A placement policy in the private cloud cluster. - :type placement_policy: ~avs_client.models.PlacementPolicy - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either PlacementPolicy or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~avs_client.models.PlacementPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PlacementPolicy"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - cluster_name=cluster_name, - placement_policy_name=placement_policy_name, - placement_policy=placement_policy, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('PlacementPolicy', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'placementPolicyName': self._serialize.url("placement_policy_name", placement_policy_name, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}'} # type: ignore - - def _update_initial( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - cluster_name, # type: str - placement_policy_name, # type: str - placement_policy_update, # type: "_models.PlacementPolicyUpdate" - **kwargs # type: Any - ): - # type: (...) -> "_models.PlacementPolicy" - cls = kwargs.pop('cls', None) # type: ClsType["_models.PlacementPolicy"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._update_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'placementPolicyName': self._serialize.url("placement_policy_name", placement_policy_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(placement_policy_update, 'PlacementPolicyUpdate') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('PlacementPolicy', pipeline_response) - - if response.status_code == 202: - deserialized = self._deserialize('PlacementPolicy', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}'} # type: ignore - - def begin_update( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - cluster_name, # type: str - placement_policy_name, # type: str - placement_policy_update, # type: "_models.PlacementPolicyUpdate" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.PlacementPolicy"] - """Update a placement policy in a private cloud cluster. - - Update a placement policy in a private cloud cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param cluster_name: Name of the cluster in the private cloud. - :type cluster_name: str - :param placement_policy_name: Name of the VMware vSphere Distributed Resource Scheduler (DRS) - placement policy. - :type placement_policy_name: str - :param placement_policy_update: The placement policy properties that may be updated. - :type placement_policy_update: ~avs_client.models.PlacementPolicyUpdate - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either PlacementPolicy or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~avs_client.models.PlacementPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PlacementPolicy"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - cluster_name=cluster_name, - placement_policy_name=placement_policy_name, - placement_policy_update=placement_policy_update, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('PlacementPolicy', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'placementPolicyName': self._serialize.url("placement_policy_name", placement_policy_name, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}'} # type: ignore - - def _delete_initial( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - cluster_name, # type: str - placement_policy_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'placementPolicyName': self._serialize.url("placement_policy_name", placement_policy_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}'} # type: ignore - - def begin_delete( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - cluster_name, # type: str - placement_policy_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] - """Delete a placement policy in a private cloud cluster. - - Delete a placement policy in a private cloud cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param cluster_name: Name of the cluster in the private cloud. - :type cluster_name: str - :param placement_policy_name: Name of the VMware vSphere Distributed Resource Scheduler (DRS) - placement policy. - :type placement_policy_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - cluster_name=cluster_name, - placement_policy_name=placement_policy_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'placementPolicyName': self._serialize.url("placement_policy_name", placement_policy_name, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}'} # type: ignore diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_private_clouds_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_private_clouds_operations.py deleted file mode 100644 index 7f0ea3cf332..00000000000 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_private_clouds_operations.py +++ /dev/null @@ -1,912 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class PrivateCloudsOperations(object): - """PrivateCloudsOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~avs_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.PrivateCloudList"] - """List private clouds in a resource group. - - List private clouds in a resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PrivateCloudList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~avs_client.models.PrivateCloudList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateCloudList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('PrivateCloudList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds'} # type: ignore - - def list_in_subscription( - self, - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.PrivateCloudList"] - """List private clouds in a subscription. - - List private clouds in a subscription. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PrivateCloudList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~avs_client.models.PrivateCloudList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateCloudList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_in_subscription.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('PrivateCloudList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list_in_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AVS/privateClouds'} # type: ignore - - def get( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.PrivateCloud" - """Get a private cloud. - - Get a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PrivateCloud, or the result of cls(response) - :rtype: ~avs_client.models.PrivateCloud - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateCloud"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PrivateCloud', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}'} # type: ignore - - def _create_or_update_initial( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - private_cloud, # type: "_models.PrivateCloud" - **kwargs # type: Any - ): - # type: (...) -> "_models.PrivateCloud" - cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateCloud"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(private_cloud, 'PrivateCloud') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('PrivateCloud', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('PrivateCloud', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}'} # type: ignore - - def begin_create_or_update( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - private_cloud, # type: "_models.PrivateCloud" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.PrivateCloud"] - """Create or update a private cloud. - - Create or update a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param private_cloud: The private cloud. - :type private_cloud: ~avs_client.models.PrivateCloud - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either PrivateCloud or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~avs_client.models.PrivateCloud] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateCloud"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - private_cloud=private_cloud, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('PrivateCloud', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}'} # type: ignore - - def _update_initial( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - private_cloud_update, # type: "_models.PrivateCloudUpdate" - **kwargs # type: Any - ): - # type: (...) -> "_models.PrivateCloud" - cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateCloud"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._update_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(private_cloud_update, 'PrivateCloudUpdate') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('PrivateCloud', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('PrivateCloud', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}'} # type: ignore - - def begin_update( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - private_cloud_update, # type: "_models.PrivateCloudUpdate" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.PrivateCloud"] - """Update a private cloud. - - Update a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param private_cloud_update: The private cloud properties to be updated. - :type private_cloud_update: ~avs_client.models.PrivateCloudUpdate - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either PrivateCloud or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~avs_client.models.PrivateCloud] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateCloud"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - private_cloud_update=private_cloud_update, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('PrivateCloud', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}'} # type: ignore - - def _delete_initial( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}'} # type: ignore - - def begin_delete( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] - """Delete a private cloud. - - Delete a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}'} # type: ignore - - def _rotate_vcenter_password_initial( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self._rotate_vcenter_password_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _rotate_vcenter_password_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/rotateVcenterPassword'} # type: ignore - - def begin_rotate_vcenter_password( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] - """Rotate the vCenter password. - - Rotate the vCenter password. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._rotate_vcenter_password_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_rotate_vcenter_password.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/rotateVcenterPassword'} # type: ignore - - def _rotate_nsxt_password_initial( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self._rotate_nsxt_password_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _rotate_nsxt_password_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/rotateNsxtPassword'} # type: ignore - - def begin_rotate_nsxt_password( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] - """Rotate the NSX-T Manager password. - - Rotate the NSX-T Manager password. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._rotate_nsxt_password_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_rotate_nsxt_password.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/rotateNsxtPassword'} # type: ignore - - def list_admin_credentials( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.AdminCredentials" - """List the admin credentials for the private cloud. - - List the admin credentials for the private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: AdminCredentials, or the result of cls(response) - :rtype: ~avs_client.models.AdminCredentials - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.AdminCredentials"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.list_admin_credentials.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('AdminCredentials', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - list_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/listAdminCredentials'} # type: ignore diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_script_cmdlets_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_script_cmdlets_operations.py deleted file mode 100644 index cc0210af790..00000000000 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_script_cmdlets_operations.py +++ /dev/null @@ -1,194 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class ScriptCmdletsOperations(object): - """ScriptCmdletsOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~avs_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - script_package_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.ScriptCmdletsList"] - """List script cmdlet resources available for a private cloud to create a script execution - resource on a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param script_package_name: Name of the script package in the private cloud. - :type script_package_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ScriptCmdletsList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~avs_client.models.ScriptCmdletsList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ScriptCmdletsList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'scriptPackageName': self._serialize.url("script_package_name", script_package_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('ScriptCmdletsList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}/scriptCmdlets'} # type: ignore - - def get( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - script_package_name, # type: str - script_cmdlet_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.ScriptCmdlet" - """Return information about a script cmdlet resource in a specific package on a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param script_package_name: Name of the script package in the private cloud. - :type script_package_name: str - :param script_cmdlet_name: Name of the script cmdlet resource in the script package in the - private cloud. - :type script_cmdlet_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ScriptCmdlet, or the result of cls(response) - :rtype: ~avs_client.models.ScriptCmdlet - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ScriptCmdlet"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'scriptPackageName': self._serialize.url("script_package_name", script_package_name, 'str'), - 'scriptCmdletName': self._serialize.url("script_cmdlet_name", script_cmdlet_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ScriptCmdlet', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}/scriptCmdlets/{scriptCmdletName}'} # type: ignore diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_script_executions_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_script_executions_operations.py deleted file mode 100644 index 4810dd8960b..00000000000 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_script_executions_operations.py +++ /dev/null @@ -1,523 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, List, Optional, TypeVar, Union - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class ScriptExecutionsOperations(object): - """ScriptExecutionsOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~avs_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.ScriptExecutionsList"] - """List script executions in a private cloud. - - List script executions in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ScriptExecutionsList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~avs_client.models.ScriptExecutionsList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ScriptExecutionsList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('ScriptExecutionsList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions'} # type: ignore - - def get( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - script_execution_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.ScriptExecution" - """Get an script execution by name in a private cloud. - - Get an script execution by name in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param script_execution_name: Name of the user-invoked script execution resource. - :type script_execution_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ScriptExecution, or the result of cls(response) - :rtype: ~avs_client.models.ScriptExecution - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ScriptExecution"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'scriptExecutionName': self._serialize.url("script_execution_name", script_execution_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ScriptExecution', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}'} # type: ignore - - def _create_or_update_initial( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - script_execution_name, # type: str - script_execution, # type: "_models.ScriptExecution" - **kwargs # type: Any - ): - # type: (...) -> "_models.ScriptExecution" - cls = kwargs.pop('cls', None) # type: ClsType["_models.ScriptExecution"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'scriptExecutionName': self._serialize.url("script_execution_name", script_execution_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(script_execution, 'ScriptExecution') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('ScriptExecution', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('ScriptExecution', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}'} # type: ignore - - def begin_create_or_update( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - script_execution_name, # type: str - script_execution, # type: "_models.ScriptExecution" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.ScriptExecution"] - """Create or update a script execution in a private cloud. - - Create or update a script execution in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: The name of the private cloud. - :type private_cloud_name: str - :param script_execution_name: Name of the user-invoked script execution resource. - :type script_execution_name: str - :param script_execution: A script running in the private cloud. - :type script_execution: ~avs_client.models.ScriptExecution - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either ScriptExecution or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~avs_client.models.ScriptExecution] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ScriptExecution"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - script_execution_name=script_execution_name, - script_execution=script_execution, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ScriptExecution', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'scriptExecutionName': self._serialize.url("script_execution_name", script_execution_name, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}'} # type: ignore - - def _delete_initial( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - script_execution_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'scriptExecutionName': self._serialize.url("script_execution_name", script_execution_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}'} # type: ignore - - def begin_delete( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - script_execution_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] - """Cancel a ScriptExecution in a private cloud. - - Cancel a ScriptExecution in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param script_execution_name: Name of the user-invoked script execution resource. - :type script_execution_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - script_execution_name=script_execution_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'scriptExecutionName': self._serialize.url("script_execution_name", script_execution_name, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}'} # type: ignore - - def get_execution_logs( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - script_execution_name, # type: str - script_output_stream_type=None, # type: Optional[List[Union[str, "_models.ScriptOutputStreamType"]]] - **kwargs # type: Any - ): - # type: (...) -> "_models.ScriptExecution" - """Return the logs for a script execution resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param script_execution_name: Name of the user-invoked script execution resource. - :type script_execution_name: str - :param script_output_stream_type: Name of the desired output stream to return. If not provided, - will return all. An empty array will return nothing. - :type script_output_stream_type: list[str or ~avs_client.models.ScriptOutputStreamType] - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ScriptExecution, or the result of cls(response) - :rtype: ~avs_client.models.ScriptExecution - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ScriptExecution"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.get_execution_logs.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'scriptExecutionName': self._serialize.url("script_execution_name", script_execution_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - if script_output_stream_type is not None: - body_content = self._serialize.body(script_output_stream_type, '[str]') - else: - body_content = None - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ScriptExecution', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_execution_logs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}/getExecutionLogs'} # type: ignore diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_script_packages_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_script_packages_operations.py deleted file mode 100644 index 7cec2703aa6..00000000000 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_script_packages_operations.py +++ /dev/null @@ -1,184 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class ScriptPackagesOperations(object): - """ScriptPackagesOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~avs_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.ScriptPackagesList"] - """List script packages available to run on the private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ScriptPackagesList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~avs_client.models.ScriptPackagesList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ScriptPackagesList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('ScriptPackagesList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages'} # type: ignore - - def get( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - script_package_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.ScriptPackage" - """Get a script package available to run on a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param script_package_name: Name of the script package in the private cloud. - :type script_package_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ScriptPackage, or the result of cls(response) - :rtype: ~avs_client.models.ScriptPackage - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ScriptPackage"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'scriptPackageName': self._serialize.url("script_package_name", script_package_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ScriptPackage', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}'} # type: ignore diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_virtual_machines_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_virtual_machines_operations.py deleted file mode 100644 index b299fac014a..00000000000 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_virtual_machines_operations.py +++ /dev/null @@ -1,335 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class VirtualMachinesOperations(object): - """VirtualMachinesOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~avs_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - cluster_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.VirtualMachinesList"] - """List of virtual machines in a private cloud cluster. - - List of virtual machines in a private cloud cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param cluster_name: Name of the cluster in the private cloud. - :type cluster_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either VirtualMachinesList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~avs_client.models.VirtualMachinesList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachinesList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('VirtualMachinesList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines'} # type: ignore - - def get( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - cluster_name, # type: str - virtual_machine_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.VirtualMachine" - """Get a virtual machine by id in a private cloud cluster. - - Get a virtual machine by id in a private cloud cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param cluster_name: Name of the cluster in the private cloud. - :type cluster_name: str - :param virtual_machine_id: Virtual Machine identifier. - :type virtual_machine_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: VirtualMachine, or the result of cls(response) - :rtype: ~avs_client.models.VirtualMachine - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachine"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'virtualMachineId': self._serialize.url("virtual_machine_id", virtual_machine_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('VirtualMachine', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines/{virtualMachineId}'} # type: ignore - - def _restrict_movement_initial( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - cluster_name, # type: str - virtual_machine_id, # type: str - restrict_movement, # type: "_models.VirtualMachineRestrictMovement" - **kwargs # type: Any - ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._restrict_movement_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'virtualMachineId': self._serialize.url("virtual_machine_id", virtual_machine_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(restrict_movement, 'VirtualMachineRestrictMovement') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _restrict_movement_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines/{virtualMachineId}/restrictMovement'} # type: ignore - - def begin_restrict_movement( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - cluster_name, # type: str - virtual_machine_id, # type: str - restrict_movement, # type: "_models.VirtualMachineRestrictMovement" - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] - """Enable or disable DRS-driven VM movement restriction. - - Enable or disable DRS-driven VM movement restriction. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param cluster_name: Name of the cluster in the private cloud. - :type cluster_name: str - :param virtual_machine_id: Virtual Machine identifier. - :type virtual_machine_id: str - :param restrict_movement: Whether VM DRS-driven movement is restricted (Enabled) or not - (Disabled). - :type restrict_movement: ~avs_client.models.VirtualMachineRestrictMovement - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._restrict_movement_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - cluster_name=cluster_name, - virtual_machine_id=virtual_machine_id, - restrict_movement=restrict_movement, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'virtualMachineId': self._serialize.url("virtual_machine_id", virtual_machine_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restrict_movement.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines/{virtualMachineId}/restrictMovement'} # type: ignore diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_workload_networks_operations.py b/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_workload_networks_operations.py deleted file mode 100644 index dab13170213..00000000000 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_workload_networks_operations.py +++ /dev/null @@ -1,4107 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class WorkloadNetworksOperations(object): - """WorkloadNetworksOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~avs_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def get( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - workload_network_name, # type: Union[str, "_models.WorkloadNetworkName"] - **kwargs # type: Any - ): - # type: (...) -> "_models.WorkloadNetwork" - """Get a private cloud workload network. - - Get a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param workload_network_name: Name for the workload network in the private cloud. - :type workload_network_name: str or ~avs_client.models.WorkloadNetworkName - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkloadNetwork, or the result of cls(response) - :rtype: ~avs_client.models.WorkloadNetwork - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetwork"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'workloadNetworkName': self._serialize.url("workload_network_name", workload_network_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('WorkloadNetwork', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}'} # type: ignore - - def list( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.WorkloadNetworkList"] - """List of workload networks in a private cloud. - - List of workload networks in a private cloud. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either WorkloadNetworkList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~avs_client.models.WorkloadNetworkList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('WorkloadNetworkList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks'} # type: ignore - - def list_segments( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.WorkloadNetworkSegmentsList"] - """List of segments in a private cloud workload network. - - List of segments in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either WorkloadNetworkSegmentsList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~avs_client.models.WorkloadNetworkSegmentsList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkSegmentsList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_segments.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('WorkloadNetworkSegmentsList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list_segments.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments'} # type: ignore - - def get_segment( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - segment_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.WorkloadNetworkSegment" - """Get a segment by id in a private cloud workload network. - - Get a segment by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param segment_id: NSX Segment identifier. Generally the same as the Segment's display name. - :type segment_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkloadNetworkSegment, or the result of cls(response) - :rtype: ~avs_client.models.WorkloadNetworkSegment - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkSegment"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.get_segment.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'segmentId': self._serialize.url("segment_id", segment_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('WorkloadNetworkSegment', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_segment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}'} # type: ignore - - def _create_segments_initial( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - segment_id, # type: str - workload_network_segment, # type: "_models.WorkloadNetworkSegment" - **kwargs # type: Any - ): - # type: (...) -> "_models.WorkloadNetworkSegment" - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkSegment"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._create_segments_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'segmentId': self._serialize.url("segment_id", segment_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(workload_network_segment, 'WorkloadNetworkSegment') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('WorkloadNetworkSegment', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('WorkloadNetworkSegment', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _create_segments_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}'} # type: ignore - - def begin_create_segments( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - segment_id, # type: str - workload_network_segment, # type: "_models.WorkloadNetworkSegment" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.WorkloadNetworkSegment"] - """Create a segment by id in a private cloud workload network. - - Create a segment by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param segment_id: NSX Segment identifier. Generally the same as the Segment's display name. - :type segment_id: str - :param workload_network_segment: NSX Segment. - :type workload_network_segment: ~avs_client.models.WorkloadNetworkSegment - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either WorkloadNetworkSegment or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~avs_client.models.WorkloadNetworkSegment] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkSegment"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._create_segments_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - segment_id=segment_id, - workload_network_segment=workload_network_segment, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('WorkloadNetworkSegment', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'segmentId': self._serialize.url("segment_id", segment_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_segments.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}'} # type: ignore - - def _update_segments_initial( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - segment_id, # type: str - workload_network_segment, # type: "_models.WorkloadNetworkSegment" - **kwargs # type: Any - ): - # type: (...) -> Optional["_models.WorkloadNetworkSegment"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.WorkloadNetworkSegment"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._update_segments_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'segmentId': self._serialize.url("segment_id", segment_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(workload_network_segment, 'WorkloadNetworkSegment') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WorkloadNetworkSegment', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _update_segments_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}'} # type: ignore - - def begin_update_segments( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - segment_id, # type: str - workload_network_segment, # type: "_models.WorkloadNetworkSegment" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.WorkloadNetworkSegment"] - """Create or update a segment by id in a private cloud workload network. - - Create or update a segment by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param segment_id: NSX Segment identifier. Generally the same as the Segment's display name. - :type segment_id: str - :param workload_network_segment: NSX Segment. - :type workload_network_segment: ~avs_client.models.WorkloadNetworkSegment - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either WorkloadNetworkSegment or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~avs_client.models.WorkloadNetworkSegment] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkSegment"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._update_segments_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - segment_id=segment_id, - workload_network_segment=workload_network_segment, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('WorkloadNetworkSegment', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'segmentId': self._serialize.url("segment_id", segment_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_segments.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}'} # type: ignore - - def _delete_segment_initial( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - segment_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self._delete_segment_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'segmentId': self._serialize.url("segment_id", segment_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_segment_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}'} # type: ignore - - def begin_delete_segment( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - segment_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] - """Delete a segment by id in a private cloud workload network. - - Delete a segment by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param segment_id: NSX Segment identifier. Generally the same as the Segment's display name. - :type segment_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._delete_segment_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - segment_id=segment_id, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'segmentId': self._serialize.url("segment_id", segment_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_segment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}'} # type: ignore - - def list_dhcp( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.WorkloadNetworkDhcpList"] - """List dhcp in a private cloud workload network. - - List dhcp in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either WorkloadNetworkDhcpList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~avs_client.models.WorkloadNetworkDhcpList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkDhcpList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_dhcp.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('WorkloadNetworkDhcpList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list_dhcp.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations'} # type: ignore - - def get_dhcp( - self, - resource_group_name, # type: str - dhcp_id, # type: str - private_cloud_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.WorkloadNetworkDhcp" - """Get dhcp by id in a private cloud workload network. - - Get dhcp by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param dhcp_id: NSX DHCP identifier. Generally the same as the DHCP display name. - :type dhcp_id: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkloadNetworkDhcp, or the result of cls(response) - :rtype: ~avs_client.models.WorkloadNetworkDhcp - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkDhcp"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.get_dhcp.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'dhcpId': self._serialize.url("dhcp_id", dhcp_id, 'str'), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('WorkloadNetworkDhcp', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_dhcp.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}'} # type: ignore - - def _create_dhcp_initial( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - dhcp_id, # type: str - workload_network_dhcp, # type: "_models.WorkloadNetworkDhcp" - **kwargs # type: Any - ): - # type: (...) -> "_models.WorkloadNetworkDhcp" - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkDhcp"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._create_dhcp_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'dhcpId': self._serialize.url("dhcp_id", dhcp_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(workload_network_dhcp, 'WorkloadNetworkDhcp') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('WorkloadNetworkDhcp', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('WorkloadNetworkDhcp', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _create_dhcp_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}'} # type: ignore - - def begin_create_dhcp( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - dhcp_id, # type: str - workload_network_dhcp, # type: "_models.WorkloadNetworkDhcp" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.WorkloadNetworkDhcp"] - """Create dhcp by id in a private cloud workload network. - - Create dhcp by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param dhcp_id: NSX DHCP identifier. Generally the same as the DHCP display name. - :type dhcp_id: str - :param workload_network_dhcp: NSX DHCP. - :type workload_network_dhcp: ~avs_client.models.WorkloadNetworkDhcp - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either WorkloadNetworkDhcp or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~avs_client.models.WorkloadNetworkDhcp] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkDhcp"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._create_dhcp_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - dhcp_id=dhcp_id, - workload_network_dhcp=workload_network_dhcp, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('WorkloadNetworkDhcp', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'dhcpId': self._serialize.url("dhcp_id", dhcp_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_dhcp.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}'} # type: ignore - - def _update_dhcp_initial( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - dhcp_id, # type: str - workload_network_dhcp, # type: "_models.WorkloadNetworkDhcp" - **kwargs # type: Any - ): - # type: (...) -> Optional["_models.WorkloadNetworkDhcp"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.WorkloadNetworkDhcp"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._update_dhcp_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'dhcpId': self._serialize.url("dhcp_id", dhcp_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(workload_network_dhcp, 'WorkloadNetworkDhcp') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WorkloadNetworkDhcp', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _update_dhcp_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}'} # type: ignore - - def begin_update_dhcp( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - dhcp_id, # type: str - workload_network_dhcp, # type: "_models.WorkloadNetworkDhcp" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.WorkloadNetworkDhcp"] - """Create or update dhcp by id in a private cloud workload network. - - Create or update dhcp by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param dhcp_id: NSX DHCP identifier. Generally the same as the DHCP display name. - :type dhcp_id: str - :param workload_network_dhcp: NSX DHCP. - :type workload_network_dhcp: ~avs_client.models.WorkloadNetworkDhcp - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either WorkloadNetworkDhcp or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~avs_client.models.WorkloadNetworkDhcp] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkDhcp"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._update_dhcp_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - dhcp_id=dhcp_id, - workload_network_dhcp=workload_network_dhcp, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('WorkloadNetworkDhcp', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'dhcpId': self._serialize.url("dhcp_id", dhcp_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_dhcp.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}'} # type: ignore - - def _delete_dhcp_initial( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - dhcp_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self._delete_dhcp_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'dhcpId': self._serialize.url("dhcp_id", dhcp_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_dhcp_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}'} # type: ignore - - def begin_delete_dhcp( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - dhcp_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] - """Delete dhcp by id in a private cloud workload network. - - Delete dhcp by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param dhcp_id: NSX DHCP identifier. Generally the same as the DHCP display name. - :type dhcp_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._delete_dhcp_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - dhcp_id=dhcp_id, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'dhcpId': self._serialize.url("dhcp_id", dhcp_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_dhcp.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}'} # type: ignore - - def list_gateways( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.WorkloadNetworkGatewayList"] - """List of gateways in a private cloud workload network. - - List of gateways in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either WorkloadNetworkGatewayList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~avs_client.models.WorkloadNetworkGatewayList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkGatewayList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_gateways.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('WorkloadNetworkGatewayList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list_gateways.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/gateways'} # type: ignore - - def get_gateway( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - gateway_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.WorkloadNetworkGateway" - """Get a gateway by id in a private cloud workload network. - - Get a gateway by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param gateway_id: NSX Gateway identifier. Generally the same as the Gateway's display name. - :type gateway_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkloadNetworkGateway, or the result of cls(response) - :rtype: ~avs_client.models.WorkloadNetworkGateway - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkGateway"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.get_gateway.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'gatewayId': self._serialize.url("gateway_id", gateway_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('WorkloadNetworkGateway', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/gateways/{gatewayId}'} # type: ignore - - def list_port_mirroring( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.WorkloadNetworkPortMirroringList"] - """List of port mirroring profiles in a private cloud workload network. - - List of port mirroring profiles in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either WorkloadNetworkPortMirroringList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~avs_client.models.WorkloadNetworkPortMirroringList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkPortMirroringList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_port_mirroring.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('WorkloadNetworkPortMirroringList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list_port_mirroring.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles'} # type: ignore - - def get_port_mirroring( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - port_mirroring_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.WorkloadNetworkPortMirroring" - """Get a port mirroring profile by id in a private cloud workload network. - - Get a port mirroring profile by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param port_mirroring_id: NSX Port Mirroring identifier. Generally the same as the Port - Mirroring display name. - :type port_mirroring_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkloadNetworkPortMirroring, or the result of cls(response) - :rtype: ~avs_client.models.WorkloadNetworkPortMirroring - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkPortMirroring"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.get_port_mirroring.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'portMirroringId': self._serialize.url("port_mirroring_id", port_mirroring_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('WorkloadNetworkPortMirroring', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_port_mirroring.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}'} # type: ignore - - def _create_port_mirroring_initial( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - port_mirroring_id, # type: str - workload_network_port_mirroring, # type: "_models.WorkloadNetworkPortMirroring" - **kwargs # type: Any - ): - # type: (...) -> "_models.WorkloadNetworkPortMirroring" - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkPortMirroring"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._create_port_mirroring_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'portMirroringId': self._serialize.url("port_mirroring_id", port_mirroring_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(workload_network_port_mirroring, 'WorkloadNetworkPortMirroring') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('WorkloadNetworkPortMirroring', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('WorkloadNetworkPortMirroring', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _create_port_mirroring_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}'} # type: ignore - - def begin_create_port_mirroring( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - port_mirroring_id, # type: str - workload_network_port_mirroring, # type: "_models.WorkloadNetworkPortMirroring" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.WorkloadNetworkPortMirroring"] - """Create a port mirroring profile by id in a private cloud workload network. - - Create a port mirroring profile by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param port_mirroring_id: NSX Port Mirroring identifier. Generally the same as the Port - Mirroring display name. - :type port_mirroring_id: str - :param workload_network_port_mirroring: NSX port mirroring. - :type workload_network_port_mirroring: ~avs_client.models.WorkloadNetworkPortMirroring - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either WorkloadNetworkPortMirroring or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~avs_client.models.WorkloadNetworkPortMirroring] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkPortMirroring"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._create_port_mirroring_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - port_mirroring_id=port_mirroring_id, - workload_network_port_mirroring=workload_network_port_mirroring, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('WorkloadNetworkPortMirroring', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'portMirroringId': self._serialize.url("port_mirroring_id", port_mirroring_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_port_mirroring.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}'} # type: ignore - - def _update_port_mirroring_initial( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - port_mirroring_id, # type: str - workload_network_port_mirroring, # type: "_models.WorkloadNetworkPortMirroring" - **kwargs # type: Any - ): - # type: (...) -> Optional["_models.WorkloadNetworkPortMirroring"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.WorkloadNetworkPortMirroring"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._update_port_mirroring_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'portMirroringId': self._serialize.url("port_mirroring_id", port_mirroring_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(workload_network_port_mirroring, 'WorkloadNetworkPortMirroring') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WorkloadNetworkPortMirroring', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _update_port_mirroring_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}'} # type: ignore - - def begin_update_port_mirroring( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - port_mirroring_id, # type: str - workload_network_port_mirroring, # type: "_models.WorkloadNetworkPortMirroring" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.WorkloadNetworkPortMirroring"] - """Create or update a port mirroring profile by id in a private cloud workload network. - - Create or update a port mirroring profile by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param port_mirroring_id: NSX Port Mirroring identifier. Generally the same as the Port - Mirroring display name. - :type port_mirroring_id: str - :param workload_network_port_mirroring: NSX port mirroring. - :type workload_network_port_mirroring: ~avs_client.models.WorkloadNetworkPortMirroring - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either WorkloadNetworkPortMirroring or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~avs_client.models.WorkloadNetworkPortMirroring] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkPortMirroring"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._update_port_mirroring_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - port_mirroring_id=port_mirroring_id, - workload_network_port_mirroring=workload_network_port_mirroring, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('WorkloadNetworkPortMirroring', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'portMirroringId': self._serialize.url("port_mirroring_id", port_mirroring_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_port_mirroring.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}'} # type: ignore - - def _delete_port_mirroring_initial( - self, - resource_group_name, # type: str - port_mirroring_id, # type: str - private_cloud_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self._delete_port_mirroring_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'portMirroringId': self._serialize.url("port_mirroring_id", port_mirroring_id, 'str'), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_port_mirroring_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}'} # type: ignore - - def begin_delete_port_mirroring( - self, - resource_group_name, # type: str - port_mirroring_id, # type: str - private_cloud_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] - """Delete a port mirroring profile by id in a private cloud workload network. - - Delete a port mirroring profile by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param port_mirroring_id: NSX Port Mirroring identifier. Generally the same as the Port - Mirroring display name. - :type port_mirroring_id: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._delete_port_mirroring_initial( - resource_group_name=resource_group_name, - port_mirroring_id=port_mirroring_id, - private_cloud_name=private_cloud_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'portMirroringId': self._serialize.url("port_mirroring_id", port_mirroring_id, 'str'), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_port_mirroring.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}'} # type: ignore - - def list_vm_groups( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.WorkloadNetworkVMGroupsList"] - """List of vm groups in a private cloud workload network. - - List of vm groups in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either WorkloadNetworkVMGroupsList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~avs_client.models.WorkloadNetworkVMGroupsList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkVMGroupsList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_vm_groups.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('WorkloadNetworkVMGroupsList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list_vm_groups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups'} # type: ignore - - def get_vm_group( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - vm_group_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.WorkloadNetworkVMGroup" - """Get a vm group by id in a private cloud workload network. - - Get a vm group by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param vm_group_id: NSX VM Group identifier. Generally the same as the VM Group's display name. - :type vm_group_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkloadNetworkVMGroup, or the result of cls(response) - :rtype: ~avs_client.models.WorkloadNetworkVMGroup - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkVMGroup"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.get_vm_group.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'vmGroupId': self._serialize.url("vm_group_id", vm_group_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('WorkloadNetworkVMGroup', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_vm_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}'} # type: ignore - - def _create_vm_group_initial( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - vm_group_id, # type: str - workload_network_vm_group, # type: "_models.WorkloadNetworkVMGroup" - **kwargs # type: Any - ): - # type: (...) -> "_models.WorkloadNetworkVMGroup" - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkVMGroup"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._create_vm_group_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'vmGroupId': self._serialize.url("vm_group_id", vm_group_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(workload_network_vm_group, 'WorkloadNetworkVMGroup') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('WorkloadNetworkVMGroup', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('WorkloadNetworkVMGroup', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _create_vm_group_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}'} # type: ignore - - def begin_create_vm_group( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - vm_group_id, # type: str - workload_network_vm_group, # type: "_models.WorkloadNetworkVMGroup" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.WorkloadNetworkVMGroup"] - """Create a vm group by id in a private cloud workload network. - - Create a vm group by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param vm_group_id: NSX VM Group identifier. Generally the same as the VM Group's display name. - :type vm_group_id: str - :param workload_network_vm_group: NSX VM Group. - :type workload_network_vm_group: ~avs_client.models.WorkloadNetworkVMGroup - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either WorkloadNetworkVMGroup or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~avs_client.models.WorkloadNetworkVMGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkVMGroup"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._create_vm_group_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - vm_group_id=vm_group_id, - workload_network_vm_group=workload_network_vm_group, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('WorkloadNetworkVMGroup', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'vmGroupId': self._serialize.url("vm_group_id", vm_group_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_vm_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}'} # type: ignore - - def _update_vm_group_initial( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - vm_group_id, # type: str - workload_network_vm_group, # type: "_models.WorkloadNetworkVMGroup" - **kwargs # type: Any - ): - # type: (...) -> Optional["_models.WorkloadNetworkVMGroup"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.WorkloadNetworkVMGroup"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._update_vm_group_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'vmGroupId': self._serialize.url("vm_group_id", vm_group_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(workload_network_vm_group, 'WorkloadNetworkVMGroup') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WorkloadNetworkVMGroup', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _update_vm_group_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}'} # type: ignore - - def begin_update_vm_group( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - vm_group_id, # type: str - workload_network_vm_group, # type: "_models.WorkloadNetworkVMGroup" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.WorkloadNetworkVMGroup"] - """Create or update a vm group by id in a private cloud workload network. - - Create or update a vm group by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param vm_group_id: NSX VM Group identifier. Generally the same as the VM Group's display name. - :type vm_group_id: str - :param workload_network_vm_group: NSX VM Group. - :type workload_network_vm_group: ~avs_client.models.WorkloadNetworkVMGroup - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either WorkloadNetworkVMGroup or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~avs_client.models.WorkloadNetworkVMGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkVMGroup"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._update_vm_group_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - vm_group_id=vm_group_id, - workload_network_vm_group=workload_network_vm_group, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('WorkloadNetworkVMGroup', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'vmGroupId': self._serialize.url("vm_group_id", vm_group_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_vm_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}'} # type: ignore - - def _delete_vm_group_initial( - self, - resource_group_name, # type: str - vm_group_id, # type: str - private_cloud_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self._delete_vm_group_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'vmGroupId': self._serialize.url("vm_group_id", vm_group_id, 'str'), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_vm_group_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}'} # type: ignore - - def begin_delete_vm_group( - self, - resource_group_name, # type: str - vm_group_id, # type: str - private_cloud_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] - """Delete a vm group by id in a private cloud workload network. - - Delete a vm group by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param vm_group_id: NSX VM Group identifier. Generally the same as the VM Group's display name. - :type vm_group_id: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._delete_vm_group_initial( - resource_group_name=resource_group_name, - vm_group_id=vm_group_id, - private_cloud_name=private_cloud_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'vmGroupId': self._serialize.url("vm_group_id", vm_group_id, 'str'), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_vm_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}'} # type: ignore - - def list_virtual_machines( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.WorkloadNetworkVirtualMachinesList"] - """List of virtual machines in a private cloud workload network. - - List of virtual machines in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either WorkloadNetworkVirtualMachinesList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~avs_client.models.WorkloadNetworkVirtualMachinesList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkVirtualMachinesList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_virtual_machines.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('WorkloadNetworkVirtualMachinesList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list_virtual_machines.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/virtualMachines'} # type: ignore - - def get_virtual_machine( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - virtual_machine_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.WorkloadNetworkVirtualMachine" - """Get a virtual machine by id in a private cloud workload network. - - Get a virtual machine by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param virtual_machine_id: Virtual Machine identifier. - :type virtual_machine_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkloadNetworkVirtualMachine, or the result of cls(response) - :rtype: ~avs_client.models.WorkloadNetworkVirtualMachine - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkVirtualMachine"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.get_virtual_machine.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'virtualMachineId': self._serialize.url("virtual_machine_id", virtual_machine_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('WorkloadNetworkVirtualMachine', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_virtual_machine.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/virtualMachines/{virtualMachineId}'} # type: ignore - - def list_dns_services( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.WorkloadNetworkDnsServicesList"] - """List of DNS services in a private cloud workload network. - - List of DNS services in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either WorkloadNetworkDnsServicesList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~avs_client.models.WorkloadNetworkDnsServicesList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkDnsServicesList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_dns_services.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('WorkloadNetworkDnsServicesList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list_dns_services.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices'} # type: ignore - - def get_dns_service( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - dns_service_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.WorkloadNetworkDnsService" - """Get a DNS service by id in a private cloud workload network. - - Get a DNS service by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param dns_service_id: NSX DNS Service identifier. Generally the same as the DNS Service's - display name. - :type dns_service_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkloadNetworkDnsService, or the result of cls(response) - :rtype: ~avs_client.models.WorkloadNetworkDnsService - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkDnsService"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.get_dns_service.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'dnsServiceId': self._serialize.url("dns_service_id", dns_service_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('WorkloadNetworkDnsService', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_dns_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}'} # type: ignore - - def _create_dns_service_initial( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - dns_service_id, # type: str - workload_network_dns_service, # type: "_models.WorkloadNetworkDnsService" - **kwargs # type: Any - ): - # type: (...) -> "_models.WorkloadNetworkDnsService" - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkDnsService"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._create_dns_service_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'dnsServiceId': self._serialize.url("dns_service_id", dns_service_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(workload_network_dns_service, 'WorkloadNetworkDnsService') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('WorkloadNetworkDnsService', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('WorkloadNetworkDnsService', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _create_dns_service_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}'} # type: ignore - - def begin_create_dns_service( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - dns_service_id, # type: str - workload_network_dns_service, # type: "_models.WorkloadNetworkDnsService" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.WorkloadNetworkDnsService"] - """Create a DNS service by id in a private cloud workload network. - - Create a DNS service by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param dns_service_id: NSX DNS Service identifier. Generally the same as the DNS Service's - display name. - :type dns_service_id: str - :param workload_network_dns_service: NSX DNS Service. - :type workload_network_dns_service: ~avs_client.models.WorkloadNetworkDnsService - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either WorkloadNetworkDnsService or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~avs_client.models.WorkloadNetworkDnsService] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkDnsService"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._create_dns_service_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - dns_service_id=dns_service_id, - workload_network_dns_service=workload_network_dns_service, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('WorkloadNetworkDnsService', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'dnsServiceId': self._serialize.url("dns_service_id", dns_service_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_dns_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}'} # type: ignore - - def _update_dns_service_initial( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - dns_service_id, # type: str - workload_network_dns_service, # type: "_models.WorkloadNetworkDnsService" - **kwargs # type: Any - ): - # type: (...) -> Optional["_models.WorkloadNetworkDnsService"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.WorkloadNetworkDnsService"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._update_dns_service_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'dnsServiceId': self._serialize.url("dns_service_id", dns_service_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(workload_network_dns_service, 'WorkloadNetworkDnsService') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WorkloadNetworkDnsService', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _update_dns_service_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}'} # type: ignore - - def begin_update_dns_service( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - dns_service_id, # type: str - workload_network_dns_service, # type: "_models.WorkloadNetworkDnsService" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.WorkloadNetworkDnsService"] - """Create or update a DNS service by id in a private cloud workload network. - - Create or update a DNS service by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param dns_service_id: NSX DNS Service identifier. Generally the same as the DNS Service's - display name. - :type dns_service_id: str - :param workload_network_dns_service: NSX DNS Service. - :type workload_network_dns_service: ~avs_client.models.WorkloadNetworkDnsService - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either WorkloadNetworkDnsService or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~avs_client.models.WorkloadNetworkDnsService] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkDnsService"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._update_dns_service_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - dns_service_id=dns_service_id, - workload_network_dns_service=workload_network_dns_service, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('WorkloadNetworkDnsService', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'dnsServiceId': self._serialize.url("dns_service_id", dns_service_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_dns_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}'} # type: ignore - - def _delete_dns_service_initial( - self, - resource_group_name, # type: str - dns_service_id, # type: str - private_cloud_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self._delete_dns_service_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'dnsServiceId': self._serialize.url("dns_service_id", dns_service_id, 'str'), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_dns_service_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}'} # type: ignore - - def begin_delete_dns_service( - self, - resource_group_name, # type: str - dns_service_id, # type: str - private_cloud_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] - """Delete a DNS service by id in a private cloud workload network. - - Delete a DNS service by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param dns_service_id: NSX DNS Service identifier. Generally the same as the DNS Service's - display name. - :type dns_service_id: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._delete_dns_service_initial( - resource_group_name=resource_group_name, - dns_service_id=dns_service_id, - private_cloud_name=private_cloud_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'dnsServiceId': self._serialize.url("dns_service_id", dns_service_id, 'str'), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_dns_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}'} # type: ignore - - def list_dns_zones( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.WorkloadNetworkDnsZonesList"] - """List of DNS zones in a private cloud workload network. - - List of DNS zones in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either WorkloadNetworkDnsZonesList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~avs_client.models.WorkloadNetworkDnsZonesList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkDnsZonesList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_dns_zones.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('WorkloadNetworkDnsZonesList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list_dns_zones.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones'} # type: ignore - - def get_dns_zone( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - dns_zone_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.WorkloadNetworkDnsZone" - """Get a DNS zone by id in a private cloud workload network. - - Get a DNS zone by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param dns_zone_id: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - :type dns_zone_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkloadNetworkDnsZone, or the result of cls(response) - :rtype: ~avs_client.models.WorkloadNetworkDnsZone - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkDnsZone"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.get_dns_zone.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'dnsZoneId': self._serialize.url("dns_zone_id", dns_zone_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('WorkloadNetworkDnsZone', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_dns_zone.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}'} # type: ignore - - def _create_dns_zone_initial( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - dns_zone_id, # type: str - workload_network_dns_zone, # type: "_models.WorkloadNetworkDnsZone" - **kwargs # type: Any - ): - # type: (...) -> "_models.WorkloadNetworkDnsZone" - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkDnsZone"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._create_dns_zone_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'dnsZoneId': self._serialize.url("dns_zone_id", dns_zone_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(workload_network_dns_zone, 'WorkloadNetworkDnsZone') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('WorkloadNetworkDnsZone', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('WorkloadNetworkDnsZone', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _create_dns_zone_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}'} # type: ignore - - def begin_create_dns_zone( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - dns_zone_id, # type: str - workload_network_dns_zone, # type: "_models.WorkloadNetworkDnsZone" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.WorkloadNetworkDnsZone"] - """Create a DNS zone by id in a private cloud workload network. - - Create a DNS zone by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param dns_zone_id: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - :type dns_zone_id: str - :param workload_network_dns_zone: NSX DNS Zone. - :type workload_network_dns_zone: ~avs_client.models.WorkloadNetworkDnsZone - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either WorkloadNetworkDnsZone or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~avs_client.models.WorkloadNetworkDnsZone] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkDnsZone"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._create_dns_zone_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - dns_zone_id=dns_zone_id, - workload_network_dns_zone=workload_network_dns_zone, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('WorkloadNetworkDnsZone', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'dnsZoneId': self._serialize.url("dns_zone_id", dns_zone_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_dns_zone.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}'} # type: ignore - - def _update_dns_zone_initial( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - dns_zone_id, # type: str - workload_network_dns_zone, # type: "_models.WorkloadNetworkDnsZone" - **kwargs # type: Any - ): - # type: (...) -> Optional["_models.WorkloadNetworkDnsZone"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.WorkloadNetworkDnsZone"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._update_dns_zone_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'dnsZoneId': self._serialize.url("dns_zone_id", dns_zone_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(workload_network_dns_zone, 'WorkloadNetworkDnsZone') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('WorkloadNetworkDnsZone', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _update_dns_zone_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}'} # type: ignore - - def begin_update_dns_zone( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - dns_zone_id, # type: str - workload_network_dns_zone, # type: "_models.WorkloadNetworkDnsZone" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.WorkloadNetworkDnsZone"] - """Create or update a DNS zone by id in a private cloud workload network. - - Create or update a DNS zone by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param dns_zone_id: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - :type dns_zone_id: str - :param workload_network_dns_zone: NSX DNS Zone. - :type workload_network_dns_zone: ~avs_client.models.WorkloadNetworkDnsZone - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either WorkloadNetworkDnsZone or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~avs_client.models.WorkloadNetworkDnsZone] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkDnsZone"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._update_dns_zone_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - dns_zone_id=dns_zone_id, - workload_network_dns_zone=workload_network_dns_zone, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('WorkloadNetworkDnsZone', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'dnsZoneId': self._serialize.url("dns_zone_id", dns_zone_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_dns_zone.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}'} # type: ignore - - def _delete_dns_zone_initial( - self, - resource_group_name, # type: str - dns_zone_id, # type: str - private_cloud_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self._delete_dns_zone_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'dnsZoneId': self._serialize.url("dns_zone_id", dns_zone_id, 'str'), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_dns_zone_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}'} # type: ignore - - def begin_delete_dns_zone( - self, - resource_group_name, # type: str - dns_zone_id, # type: str - private_cloud_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] - """Delete a DNS zone by id in a private cloud workload network. - - Delete a DNS zone by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param dns_zone_id: NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - :type dns_zone_id: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._delete_dns_zone_initial( - resource_group_name=resource_group_name, - dns_zone_id=dns_zone_id, - private_cloud_name=private_cloud_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'dnsZoneId': self._serialize.url("dns_zone_id", dns_zone_id, 'str'), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_dns_zone.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}'} # type: ignore - - def list_public_i_ps( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.WorkloadNetworkPublicIPsList"] - """List of Public IP Blocks in a private cloud workload network. - - List of Public IP Blocks in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either WorkloadNetworkPublicIPsList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~avs_client.models.WorkloadNetworkPublicIPsList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkPublicIPsList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_public_i_ps.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('WorkloadNetworkPublicIPsList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list_public_i_ps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs'} # type: ignore - - def get_public_ip( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - public_ip_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.WorkloadNetworkPublicIP" - """Get a Public IP Block by id in a private cloud workload network. - - Get a Public IP Block by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param public_ip_id: NSX Public IP Block identifier. Generally the same as the Public IP - Block's display name. - :type public_ip_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkloadNetworkPublicIP, or the result of cls(response) - :rtype: ~avs_client.models.WorkloadNetworkPublicIP - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkPublicIP"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self.get_public_ip.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'publicIPId': self._serialize.url("public_ip_id", public_ip_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('WorkloadNetworkPublicIP', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_public_ip.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}'} # type: ignore - - def _create_public_ip_initial( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - public_ip_id, # type: str - workload_network_public_ip, # type: "_models.WorkloadNetworkPublicIP" - **kwargs # type: Any - ): - # type: (...) -> "_models.WorkloadNetworkPublicIP" - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkPublicIP"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._create_public_ip_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'publicIPId': self._serialize.url("public_ip_id", public_ip_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(workload_network_public_ip, 'WorkloadNetworkPublicIP') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('WorkloadNetworkPublicIP', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('WorkloadNetworkPublicIP', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _create_public_ip_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}'} # type: ignore - - def begin_create_public_ip( - self, - resource_group_name, # type: str - private_cloud_name, # type: str - public_ip_id, # type: str - workload_network_public_ip, # type: "_models.WorkloadNetworkPublicIP" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.WorkloadNetworkPublicIP"] - """Create a Public IP Block by id in a private cloud workload network. - - Create a Public IP Block by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :param public_ip_id: NSX Public IP Block identifier. Generally the same as the Public IP - Block's display name. - :type public_ip_id: str - :param workload_network_public_ip: NSX Public IP Block. - :type workload_network_public_ip: ~avs_client.models.WorkloadNetworkPublicIP - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either WorkloadNetworkPublicIP or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~avs_client.models.WorkloadNetworkPublicIP] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadNetworkPublicIP"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._create_public_ip_initial( - resource_group_name=resource_group_name, - private_cloud_name=private_cloud_name, - public_ip_id=public_ip_id, - workload_network_public_ip=workload_network_public_ip, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('WorkloadNetworkPublicIP', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - 'publicIPId': self._serialize.url("public_ip_id", public_ip_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_public_ip.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}'} # type: ignore - - def _delete_public_ip_initial( - self, - resource_group_name, # type: str - public_ip_id, # type: str - private_cloud_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2022-05-01" - accept = "application/json" - - # Construct URL - url = self._delete_public_ip_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'publicIPId': self._serialize.url("public_ip_id", public_ip_id, 'str'), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_public_ip_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}'} # type: ignore - - def begin_delete_public_ip( - self, - resource_group_name, # type: str - public_ip_id, # type: str - private_cloud_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] - """Delete a Public IP Block by id in a private cloud workload network. - - Delete a Public IP Block by id in a private cloud workload network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param public_ip_id: NSX Public IP Block identifier. Generally the same as the Public IP - Block's display name. - :type public_ip_id: str - :param private_cloud_name: Name of the private cloud. - :type private_cloud_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._delete_public_ip_initial( - resource_group_name=resource_group_name, - public_ip_id=public_ip_id, - private_cloud_name=private_cloud_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'publicIPId': self._serialize.url("public_ip_id", public_ip_id, 'str'), - 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_public_ip.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}'} # type: ignore diff --git a/src/vmware/azext_vmware/vendored_sdks/avs_client/py.typed b/src/vmware/azext_vmware/vendored_sdks/avs_client/py.typed deleted file mode 100644 index e5aff4f83af..00000000000 --- a/src/vmware/azext_vmware/vendored_sdks/avs_client/py.typed +++ /dev/null @@ -1 +0,0 @@ -# Marker file for PEP 561. \ No newline at end of file