diff --git a/src/vmware/CHANGELOG.md b/src/vmware/CHANGELOG.md index 394a9b02e67..38928dd3af7 100644 --- a/src/vmware/CHANGELOG.md +++ b/src/vmware/CHANGELOG.md @@ -6,6 +6,11 @@ - Add `az vmware workload-network dns-service` command group - Add `az vmware workload-network dns-zone` command group - Add `az vmware workload-network port-mirroring` command group +- Add `az vmware workload-network segment` command group +- Add `az vmware workload-network public-ip` command group +- Add `az vmware workload-network vm-group` command group +- Add `az vmware workload-network vm` command group +- Add `az vmware workload-network gateway` command group ## 3.1.0 (2021-08) diff --git a/src/vmware/azext_vmware/_help.py b/src/vmware/azext_vmware/_help.py index 43fd98a6331..c47582fa75b 100644 --- a/src/vmware/azext_vmware/_help.py +++ b/src/vmware/azext_vmware/_help.py @@ -515,7 +515,7 @@ short-summary: Get DHCP by ID in a private cloud workload network. examples: - name: Get DHCP by ID in a workload network. - text: az vmware workload-network dhcp show --resource-group group1 --private-cloud cloud1 --dhcp-id dhcp1 + text: az vmware workload-network dhcp show --resource-group group1 --private-cloud cloud1 --dhcp dhcp1 """ helps['vmware workload-network dhcp relay'] = """ @@ -528,7 +528,7 @@ short-summary: Create DHCP by ID in a private cloud workload network. examples: - name: Create DHCP by ID in a workload network. - text: az vmware workload-network dhcp relay create --resource-group group1 --private-cloud cloud1 --dhcp-id dhcp1 --display-name dhcpConfigurations1 --revision 1 --server-addresses 40.1.5.1/24 + text: 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 """ helps['vmware workload-network dhcp relay delete'] = """ @@ -536,7 +536,7 @@ short-summary: Delete DHCP by ID in a private cloud workload network. examples: - name: Delete DHCP by ID in a workload network. - text: az vmware workload-network dhcp relay delete --resource-group group1 --private-cloud cloud1 --dhcp-id dhcp1 + text: az vmware workload-network dhcp relay delete --resource-group group1 --private-cloud cloud1 --dhcp dhcp1 """ helps['vmware workload-network dhcp relay update'] = """ @@ -544,7 +544,7 @@ short-summary: Update DHCP by ID in a private cloud workload network. examples: - name: Update DHCP by ID in a workload network. - text: az vmware workload-network dhcp relay update --resource-group group1 --private-cloud cloud1 --dhcp-id dhcp1 --display-name dhcpConfigurations1 --revision 1 --server-addresses 40.1.5.1/24 + text: 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 """ helps['vmware workload-network dhcp server'] = """ @@ -557,7 +557,7 @@ short-summary: Create DHCP by ID in a private cloud workload network. examples: - name: Create DHCP by ID in a workload network. - text: az vmware workload-network dhcp server create --resource-group group1 --private-cloud cloud1 --dhcp-id dhcp1 --display-name dhcpConfigurations1 --revision 1 --server-address 40.1.5.1/24 --lease-time 86400 + text: 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 """ helps['vmware workload-network dhcp server delete'] = """ @@ -565,7 +565,7 @@ short-summary: Delete DHCP by ID in a private cloud workload network. examples: - name: Delete DHCP by ID in a workload network. - text: az vmware workload-network dhcp server delete --resource-group group1 --private-cloud cloud1 --dhcp-id dhcp1 + text: az vmware workload-network dhcp server delete --resource-group group1 --private-cloud cloud1 --dhcp dhcp1 """ helps['vmware workload-network dhcp server update'] = """ @@ -573,7 +573,7 @@ short-summary: Update DHCP by ID in a private cloud workload network. examples: - name: Update DHCP by ID in a workload network. - text: az vmware workload-network dhcp server update --resource-group group1 --private-cloud cloud1 --dhcp-id dhcp1 --display-name dhcpConfigurations1 --revision 1 --server-address 40.1.5.1/24 --lease-time 86400 + text: 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 """ @@ -596,7 +596,7 @@ short-summary: Get a DNS service by ID in a private cloud workload network. examples: - name: Get a DNS service by ID in a workload network. - text: az vmware workload-network dns-service show --resource-group group1 --private-cloud cloud1 --dns-service-id dnsService1 + text: az vmware workload-network dns-service show --resource-group group1 --private-cloud cloud1 --dns-service dnsService1 """ helps['vmware workload-network dns-service create'] = """ @@ -604,7 +604,7 @@ short-summary: Create a DNS service by ID in a private cloud workload network. examples: - name: Create a DNS service by ID in a workload network. - text: az vmware workload-network dns-service create --resource-group group1 --private-cloud cloud1 --dns-service-id dnsService1 --display-name dnsService1 --dns-service-ip 5.5.5.5 --default-dns-zone defaultDnsZone1 --fqdn-zones fqdnZone1 --log-level INFO --revision 1 + text: 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 """ helps['vmware workload-network dns-service update'] = """ @@ -612,7 +612,7 @@ short-summary: Update a DNS service by ID in a private cloud workload network. examples: - name: Update a DNS service by ID in a workload network. - text: az vmware workload-network dns-service update --resource-group group1 --private-cloud cloud1 --dns-service-id dnsService1 --display-name dnsService1 --dns-service-ip 5.5.5.5 --default-dns-zone defaultDnsZone1 --fqdn-zones fqdnZone1 --log-level INFO --revision 1 + text: 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 """ helps['vmware workload-network dns-service delete'] = """ @@ -620,7 +620,7 @@ short-summary: Delete a DNS service by ID in a private cloud workload network. examples: - name: Delete a DNS service by ID in a workload network. - text: az vmware workload-network dns-service delete --resource-group group1 --private-cloud cloud1 --dns-service-id dnsService1 + text: az vmware workload-network dns-service delete --resource-group group1 --private-cloud cloud1 --dns-service dnsService1 """ helps['vmware workload-network dns-zone'] = """ @@ -641,7 +641,7 @@ short-summary: Get a DNS zone by ID in a private cloud workload network. examples: - name: Get a DNS zone by ID in a workload network. - text: az vmware workload-network dns-zone show --resource-group group1 --private-cloud cloud1 --dns-zone-id dnsZone1 + text: az vmware workload-network dns-zone show --resource-group group1 --private-cloud cloud1 --dns-zone dnsZone1 """ helps['vmware workload-network dns-zone create'] = """ @@ -649,7 +649,7 @@ short-summary: Create a DNS zone by ID in a private cloud workload network. examples: - name: Create a DNS zone by ID in a workload network. - text: az vmware workload-network dns-zone create --resource-group group1 --private-cloud cloud1 --dns-zone-id dnsZone1 --display-name dnsZone1 --domain domain1 --dns-server-ips 1.1.1.1 --source-ip 8.8.8.8 --dns-services 1 --revision 1 + text: 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 """ helps['vmware workload-network dns-zone update'] = """ @@ -657,7 +657,7 @@ short-summary: Update a DNS zone by ID in a private cloud workload network. examples: - name: Update a DNS zone by ID in a workload network. - text: az vmware workload-network dns-zone update --resource-group group1 --private-cloud cloud1 --dns-zone-id dnsZone1 --display-name dnsZone1 --domain domain1 --dns-server-ips 1.1.1.1 --source-ip 8.8.8.8 --dns-services 1 --revision 1 + text: 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 """ helps['vmware workload-network dns-zone delete'] = """ @@ -665,7 +665,7 @@ short-summary: Delete a DNS zone by ID in a private cloud workload network. examples: - name: Delete a DNS zone by ID in a workload network. - text: az vmware workload-network dns-zone delete --resource-group group1 --private-cloud cloud1 --dns-zone-id dnsZone1 + text: az vmware workload-network dns-zone delete --resource-group group1 --private-cloud cloud1 --dns-zone dnsZone1 """ helps['vmware workload-network port-mirroring'] = """ @@ -686,7 +686,7 @@ short-summary: Get a port mirroring profile by ID in a private cloud workload network. examples: - name: Get a port mirroring profile by ID in a workload network. - text: az vmware workload-network port-mirroring show --resource-group group1 --private-cloud cloud1 --port-mirroring-id portMirroring1 + text: az vmware workload-network port-mirroring show --resource-group group1 --private-cloud cloud1 --port-mirroring portMirroring1 """ helps['vmware workload-network port-mirroring create'] = """ @@ -694,7 +694,7 @@ short-summary: Create a port mirroring profile by ID in a private cloud workload network. examples: - name: Create a port mirroring profile by ID in a workload network. - text: az vmware workload-network port-mirroring create --resource-group group1 --private-cloud cloud1 --port-mirroring-id portMirroring1 --display-name portMirroring1 --direction BIDIRECTIONAL --source vmGroup1 --destination vmGroup2 --revision 1 + text: 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 """ helps['vmware workload-network port-mirroring update'] = """ @@ -702,7 +702,7 @@ short-summary: Update a port mirroring profile by ID in a private cloud workload network. examples: - name: Update a port mirroring profile by ID in a workload network. - text: az vmware workload-network port-mirroring update --resource-group group1 --private-cloud cloud1 --port-mirroring-id portMirroring1 --display-name portMirroring1 --direction BIDIRECTIONAL --source vmGroup1 --destination vmGroup2 --revision 1 + text: 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 """ helps['vmware workload-network port-mirroring delete'] = """ @@ -710,5 +710,174 @@ short-summary: Delete a port mirroring profile by ID in a private cloud workload network. examples: - name: Delete a port mirroring profile by ID in a workload network. - text: az vmware workload-network port-mirroring delete --resource-group group1 --private-cloud cloud1 --port-mirroring-id portMirroring1 + text: az vmware workload-network port-mirroring delete --resource-group group1 --private-cloud cloud1 --port-mirroring portMirroring1 +""" + +helps['vmware workload-network segment'] = """ + type: group + short-summary: Commands to manage a Segment workload network. +""" + +helps['vmware workload-network segment list'] = """ + type: command + short-summary: List of segments in a private cloud workload network. + examples: + - name: List of segments in a workload network. + text: az vmware workload-network segment list --resource-group group1 --private-cloud cloud1 +""" + +helps['vmware workload-network segment show'] = """ + type: command + short-summary: Get a segment by ID in a private cloud workload network. + examples: + - name: Get a segment by ID in a workload network. + text: az vmware workload-network segment show --resource-group group1 --private-cloud cloud1 --segment segment1 +""" + +helps['vmware workload-network segment create'] = """ + type: command + 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 +""" + +helps['vmware workload-network segment update'] = """ + type: command + 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 +""" + +helps['vmware workload-network segment delete'] = """ + type: command + short-summary: Delete a segment by ID in a private cloud workload network. + examples: + - name: Delete a segment by ID in a workload network. + text: az vmware workload-network segment delete --resource-group group1 --private-cloud cloud1 --segment segment1 +""" + +helps['vmware workload-network public-ip'] = """ + type: group + short-summary: Commands to manage a Public-IP workload network. +""" + +helps['vmware workload-network public-ip list'] = """ + type: command + short-summary: List of Public IP Blocks in a private cloud workload network. + examples: + - name: List of Public IP Blocks in a workload network. + text: az vmware workload-network public-ip list --resource-group group1 --private-cloud cloud1 +""" + +helps['vmware workload-network public-ip show'] = """ + type: command + short-summary: Get a Public IP Block by ID in a private cloud workload network. + examples: + - name: Get a Public IP Block by ID in a workload network. + text: az vmware workload-network public-ip show --resource-group group1 --private-cloud cloud1 --public-ip publicIP1 +""" + +helps['vmware workload-network public-ip create'] = """ + type: command + short-summary: Create a Public IP Block by ID in a private cloud workload network. + examples: + - name: Create a Public IP Block by ID in a workload network. + text: az vmware workload-network public-ip create --resource-group group1 --private-cloud cloud1 --public-ip publicIP1 --display-name publicIP1 --number-of-public-ips 32 +""" + +helps['vmware workload-network public-ip delete'] = """ + type: command + short-summary: Delete a Public IP Block by ID in a private cloud workload network. + examples: + - name: Delete a Public IP Block by ID in a workload network. + text: az vmware workload-network public-ip delete --resource-group group1 --private-cloud cloud1 --public-ip publicIP1 +""" + +helps['vmware workload-network vm-group'] = """ + type: group + short-summary: Commands to manage a VM Group workload network. +""" + +helps['vmware workload-network vm-group list'] = """ + type: command + short-summary: List of VM Groups in a private cloud workload network. + examples: + - name: List of VM Groups in a workload network. + text: az vmware workload-network vm-group list --resource-group group1 --private-cloud cloud1 +""" + +helps['vmware workload-network vm-group show'] = """ + type: command + short-summary: Get a VM Group by ID in a private cloud workload network. + examples: + - name: Get a VM Group by ID in a workload network. + text: az vmware workload-network vm-group show --resource-group group1 --private-cloud cloud1 --vm-group vmGroup1 +""" + +helps['vmware workload-network vm-group create'] = """ + type: command + short-summary: Create a VM Group by ID in a private cloud workload network. + examples: + - name: Create a VM Group by ID in a workload network. + text: 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 +""" + +helps['vmware workload-network vm-group update'] = """ + type: command + short-summary: Update a VM Group by ID in a private cloud workload network. + examples: + - name: Update a VM Group by ID in a workload network. + text: 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 +""" + +helps['vmware workload-network vm-group delete'] = """ + type: command + short-summary: Delete a VM Group by ID in a private cloud workload network. + examples: + - name: Delete a VM Group by ID in a private cloud workload network. + text: az vmware workload-network vm-group delete --resource-group group1 --private-cloud cloud1 --vm-group vmGroup1 +""" + +helps['vmware workload-network vm'] = """ + type: group + short-summary: Commands to manage a Virtual Machine workload network. +""" + +helps['vmware workload-network vm list'] = """ + type: command + short-summary: List of Virtual Machines in a private cloud workload network. + examples: + - name: List of Virtual Machines in a workload network. + text: az vmware workload-network vm list --resource-group group1 --private-cloud cloud1 +""" + +helps['vmware workload-network vm show'] = """ + type: command + short-summary: Get a Virtual Machines by ID in a private cloud workload network. + examples: + - name: Get a Virtual Machines by ID in a workload network. + text: az vmware workload-network vm show --resource-group group1 --private-cloud cloud1 --virtual-machine vm1 +""" + +helps['vmware workload-network gateway'] = """ + type: group + short-summary: Commands to manage a Gateway workload network. +""" + +helps['vmware workload-network gateway list'] = """ + type: command + short-summary: List of Gateways in a private cloud workload network. + examples: + - name: List of Gateways in a workload network. + text: az vmware workload-network gateway list --resource-group group1 --private-cloud cloud1 +""" + +helps['vmware workload-network gateway show'] = """ + type: command + short-summary: Get a Gateway by ID in a private cloud workload network. + examples: + - name: Get a Gateway by ID in a workload network. + text: az vmware workload-network gateway show --resource-group group1 --private-cloud cloud1 --gateway gateway1 """ diff --git a/src/vmware/azext_vmware/_params.py b/src/vmware/azext_vmware/_params.py index 84c31f39e15..09291de257f 100644 --- a/src/vmware/azext_vmware/_params.py +++ b/src/vmware/azext_vmware/_params.py @@ -138,7 +138,7 @@ def load_arguments(self, _): 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_id', help='NSX DHCP identifier. Generally the same as the DHCP display name.') + 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.') @@ -150,7 +150,7 @@ def load_arguments(self, _): 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_id', help="NSX DNS service identifier. Generally the same as the DNS service's display name.") + 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.') @@ -159,7 +159,7 @@ def load_arguments(self, _): c.argument('revision', help='NSX revision number.') with self.argument_context('vmware workload-network dns-zone') as c: - c.argument('dns_zone_id', help="NSX DNS zone identifier. Generally the same as the DNS zone's display name.") + 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.') @@ -168,9 +168,35 @@ def load_arguments(self, _): c.argument('revision', help='NSX revision number.') with self.argument_context('vmware workload-network port-mirroring') as c: - c.argument('port_mirroring_id', help="NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name.") + 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.') + + 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.') + + 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.') + + 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.') + + 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.") diff --git a/src/vmware/azext_vmware/commands.py b/src/vmware/azext_vmware/commands.py index 6e474306b07..6dd9f07bf9e 100644 --- a/src/vmware/azext_vmware/commands.py +++ b/src/vmware/azext_vmware/commands.py @@ -142,3 +142,31 @@ def load_command_table(self, _): 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') diff --git a/src/vmware/azext_vmware/custom.py b/src/vmware/azext_vmware/custom.py index 61c80e1ef63..6d282a5a7e3 100644 --- a/src/vmware/azext_vmware/custom.py +++ b/src/vmware/azext_vmware/custom.py @@ -331,109 +331,197 @@ def script_execution_logs(client: AVSClient, resource_group_name, private_cloud, 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_id: str, display_name=None, revision=None, server_address=None, lease_time=None): +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 properties = WorkloadNetworkDhcpServer(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_id, properties=properties) + return client.workload_networks.begin_create_dhcp(resource_group_name=resource_group_name, private_cloud_name=private_cloud, dhcp_id=dhcp, properties=properties) -def workload_network_dhcp_relay_create(client: AVSClient, resource_group_name, private_cloud, dhcp_id: str, display_name=None, revision=None, server_addresses=None): +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 properties = WorkloadNetworkDhcpRelay(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_id, properties=properties) + return client.workload_networks.begin_create_dhcp(resource_group_name=resource_group_name, private_cloud_name=private_cloud, dhcp_id=dhcp, properties=properties) -def workload_network_dhcp_server_update(client: AVSClient, resource_group_name, private_cloud, dhcp_id: str, display_name=None, revision=None, server_address=None, lease_time=None): +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 properties = WorkloadNetworkDhcpServer(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_id, properties=properties) + return client.workload_networks.begin_update_dhcp(resource_group_name=resource_group_name, private_cloud_name=private_cloud, dhcp_id=dhcp, properties=properties) -def workload_network_dhcp_relay_update(client: AVSClient, resource_group_name, private_cloud, dhcp_id: str, display_name=None, revision=None, server_addresses=None): +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 properties = WorkloadNetworkDhcpRelay(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_id, properties=properties) + return client.workload_networks.begin_update_dhcp(resource_group_name=resource_group_name, private_cloud_name=private_cloud, dhcp_id=dhcp, properties=properties) -def workload_network_dhcp_delete(client: AVSClient, resource_group_name, private_cloud, dhcp_id: str): - return client.workload_networks.begin_delete_dhcp(resource_group_name=resource_group_name, private_cloud_name=private_cloud, dhcp_id=dhcp_id) +def workload_network_dhcp_delete(client: AVSClient, resource_group_name, private_cloud, dhcp: str): + 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_id: str): - return client.workload_networks.get_dhcp(resource_group_name=resource_group_name, private_cloud_name=private_cloud, dhcp_id=dhcp_id) +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_id): - return client.workload_networks.get_dns_service(resource_group_name=resource_group_name, private_cloud_name=private_cloud, dns_service_id=dns_service_id) +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_id, display_name=None, dns_service_ip=None, default_dns_zone=None, fqdn_zones=None, log_level=None, revision=None): +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_id, workload_network_dns_service=prop) + 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_id, display_name=None, dns_service_ip=None, default_dns_zone=None, fqdn_zones=None, log_level=None, revision=None): +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_id, workload_network_dns_service=prop) + 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_id): - return client.workload_networks.begin_delete_dns_service(resource_group_name=resource_group_name, private_cloud_name=private_cloud, dns_service_id=dns_service_id) +def workload_network_dns_services_delete(client: AVSClient, resource_group_name, private_cloud, dns_service): + 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_id): - return client.workload_networks.get_dns_zone(resource_group_name=resource_group_name, private_cloud_name=private_cloud, dns_zone_id=dns_zone_id) +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_id, display_name=None, domain=None, dns_server_ips=None, source_ip=None, dns_services=None, revision=None): +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_id, workload_network_dns_zone=prop) + 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_id, display_name=None, domain=None, dns_server_ips=None, source_ip=None, dns_services=None, revision=None): +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_id, workload_network_dns_zone=prop) + 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_id): - return client.workload_networks.begin_delete_dns_zone(resource_group_name=resource_group_name, private_cloud_name=private_cloud, dns_zone_id=dns_zone_id) +def workload_network_dns_zone_delete(client: AVSClient, resource_group_name, private_cloud, dns_zone): + 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_id): - return client.workload_networks.get_port_mirroring(resource_group_name=resource_group_name, private_cloud_name=private_cloud, port_mirroring_id=port_mirroring_id) +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_id, display_name=None, direction=None, source=None, destination=None, revision=None): +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_id, workload_network_port_mirroring=prop) + 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_id, display_name=None, direction=None, source=None, destination=None, revision=None): +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_id, workload_network_port_mirroring=prop) + 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_id): - return client.workload_networks.begin_delete_port_mirroring(resource_group_name=resource_group_name, private_cloud_name=private_cloud, port_mirroring_id=port_mirroring_id) +def workload_network_port_mirroring_delete(client: AVSClient, resource_group_name, private_cloud, port_mirroring): + 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): + 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): + return client.workload_networks.begin_create_public_ip(resource_group_name=resource_group_name, private_cloud_name=private_cloud, public_ip_id=public_ip, 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): + 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): + 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) diff --git a/src/vmware/azext_vmware/tests/latest/recordings/test_vmware_workload_network.yaml b/src/vmware/azext_vmware/tests/latest/recordings/test_vmware_workload_network.yaml index 8bb97f5cba7..74270b89d7a 100644 --- a/src/vmware/azext_vmware/tests/latest/recordings/test_vmware_workload_network.yaml +++ b/src/vmware/azext_vmware/tests/latest/recordings/test_vmware_workload_network.yaml @@ -25,7 +25,7 @@ interactions: content-type: - application/json date: - - Thu, 16 Sep 2021 20:19:25 GMT + - Fri, 08 Oct 2021 17:17:24 GMT server: - Rocket status: @@ -43,7 +43,7 @@ interactions: Connection: - keep-alive ParameterSetName: - - --resource-group --private-cloud --dhcp-id + - --resource-group --private-cloud --dhcp User-Agent: - AZURECLI/2.27.2 azsdk-python-mgmt-avs/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: GET @@ -57,7 +57,7 @@ interactions: content-type: - application/json date: - - Thu, 16 Sep 2021 20:19:29 GMT + - Fri, 08 Oct 2021 17:17:28 GMT server: - Rocket status: @@ -80,7 +80,7 @@ interactions: Content-Type: - application/json ParameterSetName: - - --resource-group --private-cloud --dhcp-id --display-name --revision --server-addresses + - --resource-group --private-cloud --dhcp --display-name --revision --server-addresses User-Agent: - AZURECLI/2.27.2 azsdk-python-mgmt-avs/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: PUT @@ -94,7 +94,7 @@ interactions: content-type: - application/json date: - - Thu, 16 Sep 2021 20:19:34 GMT + - Fri, 08 Oct 2021 17:17:32 GMT server: - Rocket status: @@ -114,7 +114,7 @@ interactions: Content-Length: - '0' ParameterSetName: - - --resource-group --private-cloud --dhcp-id + - --resource-group --private-cloud --dhcp User-Agent: - AZURECLI/2.27.2 azsdk-python-mgmt-avs/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: DELETE @@ -126,7 +126,7 @@ interactions: content-length: - '0' date: - - Thu, 16 Sep 2021 20:19:38 GMT + - Fri, 08 Oct 2021 17:17:37 GMT server: - Rocket status: @@ -149,7 +149,7 @@ interactions: Content-Type: - application/json ParameterSetName: - - --resource-group --private-cloud --dhcp-id --display-name --revision --server-addresses + - --resource-group --private-cloud --dhcp --display-name --revision --server-addresses User-Agent: - AZURECLI/2.27.2 azsdk-python-mgmt-avs/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: PATCH @@ -163,7 +163,7 @@ interactions: content-type: - application/json date: - - Thu, 16 Sep 2021 20:19:42 GMT + - Fri, 08 Oct 2021 17:17:41 GMT server: - Rocket status: @@ -186,7 +186,7 @@ interactions: Content-Type: - application/json ParameterSetName: - - --resource-group --private-cloud --dhcp-id --display-name --revision --server-address + - --resource-group --private-cloud --dhcp --display-name --revision --server-address --lease-time User-Agent: - AZURECLI/2.27.2 azsdk-python-mgmt-avs/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) @@ -201,7 +201,7 @@ interactions: content-type: - application/json date: - - Thu, 16 Sep 2021 20:19:46 GMT + - Fri, 08 Oct 2021 17:17:45 GMT server: - Rocket status: @@ -221,7 +221,7 @@ interactions: Content-Length: - '0' ParameterSetName: - - --resource-group --private-cloud --dhcp-id + - --resource-group --private-cloud --dhcp User-Agent: - AZURECLI/2.27.2 azsdk-python-mgmt-avs/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: DELETE @@ -233,7 +233,7 @@ interactions: content-length: - '0' date: - - Thu, 16 Sep 2021 20:19:50 GMT + - Fri, 08 Oct 2021 17:17:50 GMT server: - Rocket status: @@ -256,7 +256,7 @@ interactions: Content-Type: - application/json ParameterSetName: - - --resource-group --private-cloud --dhcp-id --display-name --revision --server-address + - --resource-group --private-cloud --dhcp --display-name --revision --server-address --lease-time User-Agent: - AZURECLI/2.27.2 azsdk-python-mgmt-avs/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) @@ -271,7 +271,7 @@ interactions: content-type: - application/json date: - - Thu, 16 Sep 2021 20:19:55 GMT + - Fri, 08 Oct 2021 17:17:54 GMT server: - Rocket status: @@ -303,7 +303,7 @@ interactions: content-type: - application/json date: - - Thu, 16 Sep 2021 20:19:59 GMT + - Fri, 08 Oct 2021 17:17:58 GMT server: - Rocket status: @@ -321,7 +321,7 @@ interactions: Connection: - keep-alive ParameterSetName: - - --resource-group --private-cloud --dns-service-id + - --resource-group --private-cloud --dns-service User-Agent: - AZURECLI/2.27.2 azsdk-python-mgmt-avs/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: GET @@ -335,7 +335,7 @@ interactions: content-type: - application/json date: - - Thu, 16 Sep 2021 20:20:03 GMT + - Fri, 08 Oct 2021 17:18:02 GMT server: - Rocket status: @@ -359,7 +359,7 @@ interactions: Content-Type: - application/json ParameterSetName: - - --resource-group --private-cloud --dns-service-id --display-name --dns-service-ip + - --resource-group --private-cloud --dns-service --display-name --dns-service-ip --default-dns-zone --fqdn-zones --log-level --revision User-Agent: - AZURECLI/2.27.2 azsdk-python-mgmt-avs/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) @@ -374,7 +374,7 @@ interactions: content-type: - application/json date: - - Thu, 16 Sep 2021 20:20:07 GMT + - Fri, 08 Oct 2021 17:18:07 GMT server: - Rocket status: @@ -398,7 +398,7 @@ interactions: Content-Type: - application/json ParameterSetName: - - --resource-group --private-cloud --dns-service-id --display-name --dns-service-ip + - --resource-group --private-cloud --dns-service --display-name --dns-service-ip --default-dns-zone --fqdn-zones --log-level --revision User-Agent: - AZURECLI/2.27.2 azsdk-python-mgmt-avs/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) @@ -413,7 +413,7 @@ interactions: content-type: - application/json date: - - Thu, 16 Sep 2021 20:20:11 GMT + - Fri, 08 Oct 2021 17:18:11 GMT server: - Rocket status: @@ -433,7 +433,7 @@ interactions: Content-Length: - '0' ParameterSetName: - - --resource-group --private-cloud --dns-service-id + - --resource-group --private-cloud --dns-service User-Agent: - AZURECLI/2.27.2 azsdk-python-mgmt-avs/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: DELETE @@ -445,7 +445,7 @@ interactions: content-length: - '0' date: - - Thu, 16 Sep 2021 20:20:16 GMT + - Fri, 08 Oct 2021 17:18:15 GMT server: - Rocket status: @@ -477,7 +477,7 @@ interactions: content-type: - application/json date: - - Thu, 16 Sep 2021 20:20:20 GMT + - Fri, 08 Oct 2021 17:18:20 GMT server: - Rocket status: @@ -495,7 +495,7 @@ interactions: Connection: - keep-alive ParameterSetName: - - --resource-group --private-cloud --dns-zone-id + - --resource-group --private-cloud --dns-zone User-Agent: - AZURECLI/2.27.2 azsdk-python-mgmt-avs/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: GET @@ -509,7 +509,7 @@ interactions: content-type: - application/json date: - - Thu, 16 Sep 2021 20:20:24 GMT + - Fri, 08 Oct 2021 17:18:24 GMT server: - Rocket status: @@ -517,7 +517,8 @@ interactions: message: OK - request: body: '{"properties": {"displayName": "testDisplayName", "domain": ["domain1"], - "dnsServerIps": ["1.1.1.1"], "sourceIp": "8.8.8.8", "dnsServices": 1}}' + "dnsServerIps": ["1.1.1.1"], "sourceIp": "8.8.8.8", "dnsServices": 1, "revision": + 1}}' headers: Accept: - application/json @@ -528,11 +529,11 @@ interactions: Connection: - keep-alive Content-Length: - - '143' + - '158' Content-Type: - application/json ParameterSetName: - - --resource-group --private-cloud --dns-zone-id --display-name --domain --dns-server-ips + - --resource-group --private-cloud --dns-zone --display-name --domain --dns-server-ips --source-ip --dns-services --revision User-Agent: - AZURECLI/2.27.2 azsdk-python-mgmt-avs/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) @@ -547,7 +548,7 @@ interactions: content-type: - application/json date: - - Thu, 16 Sep 2021 20:20:28 GMT + - Fri, 08 Oct 2021 17:18:28 GMT server: - Rocket status: @@ -555,7 +556,8 @@ interactions: message: OK - request: body: '{"properties": {"displayName": "testDisplayName", "domain": ["domain1"], - "dnsServerIps": ["1.1.1.1"], "sourceIp": "8.8.8.8", "dnsServices": 1}}' + "dnsServerIps": ["1.1.1.1"], "sourceIp": "8.8.8.8", "dnsServices": 1, "revision": + 1}}' headers: Accept: - application/json @@ -566,11 +568,11 @@ interactions: Connection: - keep-alive Content-Length: - - '143' + - '158' Content-Type: - application/json ParameterSetName: - - --resource-group --private-cloud --dns-zone-id --display-name --domain --dns-server-ips + - --resource-group --private-cloud --dns-zone --display-name --domain --dns-server-ips --source-ip --dns-services --revision User-Agent: - AZURECLI/2.27.2 azsdk-python-mgmt-avs/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) @@ -585,7 +587,7 @@ interactions: content-type: - application/json date: - - Thu, 16 Sep 2021 20:20:32 GMT + - Fri, 08 Oct 2021 17:18:33 GMT server: - Rocket status: @@ -605,7 +607,7 @@ interactions: Content-Length: - '0' ParameterSetName: - - --resource-group --private-cloud --dns-zone-id + - --resource-group --private-cloud --dns-zone User-Agent: - AZURECLI/2.27.2 azsdk-python-mgmt-avs/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: DELETE @@ -617,7 +619,7 @@ interactions: content-length: - '0' date: - - Thu, 16 Sep 2021 20:20:36 GMT + - Fri, 08 Oct 2021 17:18:37 GMT server: - Rocket status: @@ -651,7 +653,7 @@ interactions: content-type: - application/json date: - - Thu, 16 Sep 2021 20:20:41 GMT + - Fri, 08 Oct 2021 17:18:41 GMT server: - Rocket status: @@ -669,7 +671,7 @@ interactions: Connection: - keep-alive ParameterSetName: - - --resource-group --private-cloud --port-mirroring-id + - --resource-group --private-cloud --port-mirroring User-Agent: - AZURECLI/2.27.2 azsdk-python-mgmt-avs/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: GET @@ -685,7 +687,7 @@ interactions: content-type: - application/json date: - - Thu, 16 Sep 2021 20:20:45 GMT + - Fri, 08 Oct 2021 17:18:46 GMT server: - Rocket status: @@ -705,7 +707,7 @@ interactions: Content-Length: - '0' ParameterSetName: - - --resource-group --private-cloud --port-mirroring-id + - --resource-group --private-cloud --port-mirroring User-Agent: - AZURECLI/2.27.2 azsdk-python-mgmt-avs/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: DELETE @@ -717,7 +719,622 @@ interactions: content-length: - '0' date: - - Thu, 16 Sep 2021 20:20:49 GMT + - Fri, 08 Oct 2021 17:18:50 GMT + server: + - Rocket + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware workload-network segment list + Connection: + - keep-alive + ParameterSetName: + - --resource-group --private-cloud + User-Agent: + - AZURECLI/2.27.2 azsdk-python-mgmt-avs/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) + method: GET + uri: https://localhost:8888/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_workload_network000001/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/segments?api-version=2021-06-01 + response: + body: + string: '{"value":[{"id":"/subscriptions/{subscription-id}/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/segments/segment1","name":"segment1","type":"Microsoft.AVS/privateClouds/workloadNetworks/segments","properties":{"displayName":"segment1","connectedGateway":"/infra/tier-1s/gateway","subnet":{"dhcpRanges":["40.20.0.0-40.20.0.1"],"gatewayAddress":"40.20.20.20/16"},"portVif":[{"portName":"vm1"}],"status":"SUCCESS, + FAILURE","revision":1}}]}' + headers: + content-length: + - '482' + content-type: + - application/json + date: + - Fri, 08 Oct 2021 17:18:54 GMT + server: + - Rocket + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware workload-network segment show + Connection: + - keep-alive + ParameterSetName: + - --resource-group --private-cloud --segment + User-Agent: + - AZURECLI/2.27.2 azsdk-python-mgmt-avs/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) + method: GET + uri: https://localhost:8888/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_workload_network000001/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/segments/segment1?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/{subscription-id}/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/segments/segment1","name":"segment1","type":"Microsoft.AVS/privateClouds/workloadNetworks/segments","properties":{"displayName":"segment1","connectedGateway":"/infra/tier-1s/gateway","subnet":{"dhcpRanges":["40.20.0.0-40.20.0.1"],"gatewayAddress":"40.20.20.20/16"},"portVif":[{"portName":"vm1"}],"status":"SUCCESS, + FAILURE","revision":1}}' + headers: + content-length: + - '470' + content-type: + - application/json + date: + - Fri, 08 Oct 2021 17:18:59 GMT + server: + - Rocket + status: + code: 200 + message: OK +- request: + body: '{"properties": {"displayName": "testDisplayName", "connectedGateway": "/infra/tier-1s/gateway", + "subnet": {"dhcpRanges": ["40.20.0.0", "40.20.0.1"], "gatewayAddress": "40.20.20.20/16"}, + "revision": 1}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware workload-network segment create + Connection: + - keep-alive + Content-Length: + - '201' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --private-cloud --segment --display-name --connected-gateway + --revision --dhcp-ranges --gateway-address + User-Agent: + - AZURECLI/2.27.2 azsdk-python-mgmt-avs/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) + method: PUT + uri: https://localhost:8888/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_workload_network000001/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/segments/segment1?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/{subscription-id}/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/segments/segment1","name":"segment1","type":"Microsoft.AVS/privateClouds/workloadNetworks/segments","properties":{"displayName":"segment1","connectedGateway":"/infra/tier-1s/gateway","subnet":{"dhcpRanges":["40.20.0.0-40.20.0.1"],"gatewayAddress":"40.20.20.20/16"},"status":"SUCCESS, + FAILURE","revision":1}}' + headers: + content-length: + - '439' + content-type: + - application/json + date: + - Fri, 08 Oct 2021 17:19:03 GMT + server: + - Rocket + status: + code: 200 + message: OK +- request: + body: '{"properties": {"displayName": "testDisplayName", "connectedGateway": "/infra/tier-1s/gateway", + "subnet": {"dhcpRanges": ["40.20.0.0", "40.20.0.1"], "gatewayAddress": "40.20.20.20/16"}, + "revision": 1}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware workload-network segment update + Connection: + - keep-alive + Content-Length: + - '201' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --private-cloud --segment --display-name --connected-gateway + --revision --dhcp-ranges --gateway-address + User-Agent: + - AZURECLI/2.27.2 azsdk-python-mgmt-avs/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) + method: PATCH + uri: https://localhost:8888/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_workload_network000001/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/segments/segment1?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/{subscription-id}/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/segments/segment1","name":"segment1","type":"Microsoft.AVS/privateClouds/workloadNetworks/segments","properties":{"displayName":"segment1","connectedGateway":"/infra/tier-1s/gateway","subnet":{"dhcpRanges":["40.20.0.0-40.20.0.1"],"gatewayAddress":"40.20.20.20/16"},"portVif":[{"portName":"vm1"}],"status":"SUCCESS, + FAILURE","revision":2}}' + headers: + content-length: + - '470' + content-type: + - application/json + date: + - Fri, 08 Oct 2021 17:19:07 GMT + server: + - Rocket + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware workload-network segment delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --resource-group --private-cloud --segment + User-Agent: + - AZURECLI/2.27.2 azsdk-python-mgmt-avs/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) + method: DELETE + uri: https://localhost:8888/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_workload_network000001/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/segments/segment1?api-version=2021-06-01 + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Fri, 08 Oct 2021 17:19:11 GMT + server: + - Rocket + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware workload-network public-ip list + Connection: + - keep-alive + ParameterSetName: + - --resource-group --private-cloud + User-Agent: + - AZURECLI/2.27.2 azsdk-python-mgmt-avs/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) + method: GET + uri: https://localhost:8888/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_workload_network000001/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/publicIPs?api-version=2021-06-01 + response: + body: + string: '{"value":[{"id":"/subscriptions/{subscription-id}/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/publicIPs/publicIP1","name":"publicIP1","type":"Microsoft.AVS/privateClouds/workloadNetworks/publicIPs","properties":{"displayName":"publicIP1","publicIPBlock":"20.20.40.50/32"}}]}' + headers: + content-length: + - '322' + content-type: + - application/json + date: + - Fri, 08 Oct 2021 17:19:16 GMT + server: + - Rocket + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware workload-network public-ip show + Connection: + - keep-alive + ParameterSetName: + - --resource-group --private-cloud --public-ip + User-Agent: + - AZURECLI/2.27.2 azsdk-python-mgmt-avs/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) + method: GET + uri: https://localhost:8888/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_workload_network000001/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/publicIPs/publicIP1?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/{subscription-id}/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/publicIPs/publicIP1","name":"publicIP1","type":"Microsoft.AVS/privateClouds/workloadNetworks/publicIPs","properties":{"displayName":"publicIP1","publicIPBlock":"20.20.40.50/32"}}' + headers: + content-length: + - '310' + content-type: + - application/json + date: + - Fri, 08 Oct 2021 17:19:20 GMT + server: + - Rocket + status: + code: 200 + message: OK +- request: + body: '{"properties": {"displayName": "testDisplayName", "numberOfPublicIPs": + 32}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware workload-network public-ip create + Connection: + - keep-alive + Content-Length: + - '75' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --private-cloud --public-ip --display-name --number-of-public-ips + User-Agent: + - AZURECLI/2.27.2 azsdk-python-mgmt-avs/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) + method: PUT + uri: https://localhost:8888/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_workload_network000001/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/publicIPs/publicIP1?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/{subscription-id}/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/publicIPs/publicIP1","name":"publicIP1","type":"Microsoft.AVS/privateClouds/workloadNetworks/publicIPs","properties":{"displayName":"publicIP1","publicIPBlock":"20.20.40.50/32"}}' + headers: + content-length: + - '310' + content-type: + - application/json + date: + - Fri, 08 Oct 2021 17:19:23 GMT + server: + - Rocket + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware workload-network public-ip delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --resource-group --private-cloud --public-ip + User-Agent: + - AZURECLI/2.27.2 azsdk-python-mgmt-avs/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) + method: DELETE + uri: https://localhost:8888/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_workload_network000001/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/publicIPs/publicIP1?api-version=2021-06-01 + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Fri, 08 Oct 2021 17:19:29 GMT + server: + - Rocket + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware workload-network vm-group list + Connection: + - keep-alive + ParameterSetName: + - --resource-group --private-cloud + User-Agent: + - AZURECLI/2.27.2 azsdk-python-mgmt-avs/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) + method: GET + uri: https://localhost:8888/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_workload_network000001/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/vmGroups?api-version=2021-06-01 + response: + body: + string: '{"value":[{"id":"/subscriptions/{subscription-id}/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/vmGroups/vmGroup1","name":"cloud1","type":"Microsoft.AVS/privateClouds/workloadNetworks/vmGroups","properties":{"displayName":"vmGroup1","members":["564d43da-fefc-2a3b-1d92-42855622fa50"],"status":"SUCCESS, + FAILURE","revision":1}}]}' + headers: + content-length: + - '374' + content-type: + - application/json + date: + - Fri, 08 Oct 2021 17:19:33 GMT + server: + - Rocket + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware workload-network vm-group show + Connection: + - keep-alive + ParameterSetName: + - --resource-group --private-cloud --vm-group + User-Agent: + - AZURECLI/2.27.2 azsdk-python-mgmt-avs/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) + method: GET + uri: https://localhost:8888/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_workload_network000001/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/vmGroups/vmGroup1?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/{subscription-id}/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/vmGroups/vmGroup1","name":"cloud1","type":"Microsoft.AVS/privateClouds/workloadNetworks/vmGroups","properties":{"displayName":"vmGroup1","members":["564d43da-fefc-2a3b-1d92-42855622fa50"],"status":"SUCCESS, + FAILURE","revision":1}}' + headers: + content-length: + - '362' + content-type: + - application/json + date: + - Fri, 08 Oct 2021 17:19:37 GMT + server: + - Rocket + status: + code: 200 + message: OK +- request: + body: '{"properties": {"displayName": "testDisplayName", "members": ["564d43da-fefc-2a3b-1d92-42855622fa50"], + "revision": 1}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware workload-network vm-group create + Connection: + - keep-alive + Content-Length: + - '118' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --private-cloud --vm-group --display-name --members --revision + User-Agent: + - AZURECLI/2.27.2 azsdk-python-mgmt-avs/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) + method: PUT + uri: https://localhost:8888/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_workload_network000001/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/vmGroups/vmGroup1?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/{subscription-id}/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/vmGroups/vmGroup1","name":"vmGroup1","type":"Microsoft.AVS/privateClouds/workloadNetworks/vmGroups","properties":{"displayName":"vmGroup1","members":["564d43da-fefc-2a3b-1d92-42855622fa50"],"status":"SUCCESS, + FAILURE","revision":1}}' + headers: + content-length: + - '364' + content-type: + - application/json + date: + - Fri, 08 Oct 2021 17:19:41 GMT + server: + - Rocket + status: + code: 200 + message: OK +- request: + body: '{"properties": {"displayName": "testDisplayName", "members": ["564d43da-fefc-2a3b-1d92-42855622fa50"], + "revision": 1}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware workload-network vm-group update + Connection: + - keep-alive + Content-Length: + - '118' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --private-cloud --vm-group --display-name --members --revision + User-Agent: + - AZURECLI/2.27.2 azsdk-python-mgmt-avs/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) + method: PATCH + uri: https://localhost:8888/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_workload_network000001/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/vmGroups/vmGroup1?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/{subscription-id}/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/vmGroups/vmGroup1","name":"cloud1","type":"Microsoft.AVS/privateClouds/workloadNetworks/vmGroups","properties":{"displayName":"vmGroup1","members":["564d43da-fefc-2a3b-1d92-42855622fa50"],"status":"SUCCESS, + FAILURE","revision":2}}' + headers: + content-length: + - '362' + content-type: + - application/json + date: + - Fri, 08 Oct 2021 17:19:46 GMT + server: + - Rocket + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware workload-network vm-group delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --resource-group --private-cloud --vm-group + User-Agent: + - AZURECLI/2.27.2 azsdk-python-mgmt-avs/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) + method: DELETE + uri: https://localhost:8888/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_workload_network000001/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/vmGroups/vmGroup1?api-version=2021-06-01 + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Fri, 08 Oct 2021 17:19:50 GMT + server: + - Rocket + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware workload-network vm list + Connection: + - keep-alive + ParameterSetName: + - --resource-group --private-cloud + User-Agent: + - AZURECLI/2.27.2 azsdk-python-mgmt-avs/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) + method: GET + uri: https://localhost:8888/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_workload_network000001/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/virtualMachines?api-version=2021-06-01 + response: + body: + string: '{"value":[{"id":"/subscriptions/{subscription-id}/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/virtualMachines/vm1","name":"vm1","type":"Microsoft.AVS/privateClouds/workloadNetworks/virtualMachines","properties":{"displayName":"vm1","vmType":"REGULAR, + EDGE, SERVICE"}}]}' + headers: + content-length: + - '317' + content-type: + - application/json + date: + - Fri, 08 Oct 2021 17:19:54 GMT + server: + - Rocket + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware workload-network vm show + Connection: + - keep-alive + ParameterSetName: + - --resource-group --private-cloud --virtual-machine + User-Agent: + - AZURECLI/2.27.2 azsdk-python-mgmt-avs/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) + method: GET + uri: https://localhost:8888/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_workload_network000001/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/virtualMachines/vm1?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/{subscription-id}/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/virtualMachines/vm1","name":"vm1","type":"Microsoft.AVS/privateClouds/workloadNetworks/virtualMachines","properties":{"displayName":"vm1","vmType":"REGULAR, + EDGE, SERVICE"}}' + headers: + content-length: + - '305' + content-type: + - application/json + date: + - Fri, 08 Oct 2021 17:19:59 GMT + server: + - Rocket + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware workload-network gateway list + Connection: + - keep-alive + ParameterSetName: + - --resource-group --private-cloud + User-Agent: + - AZURECLI/2.27.2 azsdk-python-mgmt-avs/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) + method: GET + uri: https://localhost:8888/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_workload_network000001/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/gateways?api-version=2021-06-01 + response: + body: + string: '{"value":[{"id":"/subscriptions/{subscription-id}/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/gateways/gateway1","name":"gateway1","type":"Microsoft.AVS/privateClouds/workloadNetworks/segments","properties":{"displayName":"gateway1","path":"/infra/tier-1s/gateway1"}}]}' + headers: + content-length: + - '317' + content-type: + - application/json + date: + - Fri, 08 Oct 2021 17:20:03 GMT + server: + - Rocket + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmware workload-network gateway show + Connection: + - keep-alive + ParameterSetName: + - --resource-group --private-cloud --gateway + User-Agent: + - AZURECLI/2.27.2 azsdk-python-mgmt-avs/0.1.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) + method: GET + uri: https://localhost:8888/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_workload_network000001/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/gateways/gateway1?api-version=2021-06-01 + response: + body: + string: '{"id":"/subscriptions/{subscription-id}/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/gateways/gateway1","name":"gateway1","type":"Microsoft.AVS/privateClouds/workloadNetworks/gateways","properties":{"displayName":"gateway1","path":"/infra/tier-1s/gateway1"}}' + headers: + content-length: + - '305' + content-type: + - application/json + date: + - Fri, 08 Oct 2021 17:20:07 GMT server: - Rocket status: 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 69ee77d23cf..0903efd025a 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 @@ -17,95 +17,159 @@ def setUp(self): def test_vmware_workload_network(self): self.kwargs.update({ 'privatecloud': 'cloud1', - 'dhcp_id': 'dhcp1', + 'dhcp': 'dhcp1', 'display_name': 'testDisplayName', 'revision': '1', 'server_address': '40.1.5.1/24', 'lease_time': '86400', 'server_addresses': '40.1.5.1/24', - 'dns_service_id': 'dnsService1', + 'dns_service': 'dnsService1', 'dns_service_ip': '5.5.5.5', 'default_dns_zone': 'defaultDnsZone1', 'fqdn_zones': 'fqdnZone1', 'log_level': 'INFO', - 'dns_zone_id': 'dnsZone1', + 'dns_zone': 'dnsZone1', 'domain': 'domain1', 'dns_server_ips': '1.1.1.1', 'source_ip': '8.8.8.8', 'dns_services': '1', - 'port_mirroring_id': 'portMirroring1', + 'port_mirroring': 'portMirroring1', 'direction': 'BIDIRECTIONAL', 'source': 'vmGroup1', - 'destination': 'vmGroup2' + 'segment': 'segment1', + 'destination': 'vmGroup2', + 'connected_gateway': '/infra/tier-1s/gateway', + 'dhcp_ranges': '40.20.0.0 40.20.0.1', + 'gateway_address': '40.20.20.20/16', + 'public_ip': 'publicIP1', + 'number_of_public_i_ps': '32', + 'vm_group': 'vmGroup1', + 'members': '564d43da-fefc-2a3b-1d92-42855622fa50', + 'virtual_machine': 'vm1', + 'gateway': 'gateway1' }) count = len(self.cmd('az vmware workload-network dhcp list --resource-group {rg} --private-cloud {privatecloud}').get_output_in_json()) self.assertEqual(count, 1, 'count expected to be 1') - dhcpShow = self.cmd('az vmware workload-network dhcp show --resource-group {rg} --private-cloud {privatecloud} --dhcp-id {dhcp_id}').get_output_in_json() + dhcpShow = self.cmd('az vmware workload-network dhcp show --resource-group {rg} --private-cloud {privatecloud} --dhcp {dhcp}').get_output_in_json() self.assertEqual(dhcpShow['name'], 'dhcp1') - dhcpRelayCreate = self.cmd('az vmware workload-network dhcp relay create --resource-group {rg} --private-cloud {privatecloud} --dhcp-id {dhcp_id} --display-name {display_name} --revision {revision} --server-addresses {server_addresses}').get_output_in_json() + dhcpRelayCreate = self.cmd('az vmware workload-network dhcp relay create --resource-group {rg} --private-cloud {privatecloud} --dhcp {dhcp} --display-name {display_name} --revision {revision} --server-addresses {server_addresses}').get_output_in_json() self.assertEqual(dhcpRelayCreate['name'], 'dhcp1') - dhcpRelayDelete = self.cmd('az vmware workload-network dhcp relay delete --resource-group {rg} --private-cloud {privatecloud} --dhcp-id {dhcp_id}').output + dhcpRelayDelete = self.cmd('az vmware workload-network dhcp relay delete --resource-group {rg} --private-cloud {privatecloud} --dhcp {dhcp}').output self.assertEqual(len(dhcpRelayDelete), 0) - dhcpRelayUpdate = self.cmd('az vmware workload-network dhcp relay update --resource-group {rg} --private-cloud {privatecloud} --dhcp-id {dhcp_id} --display-name {display_name} --revision {revision} --server-addresses {server_addresses}').get_output_in_json() + 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-id {dhcp_id} --display-name {display_name} --revision {revision} --server-address {server_address} --lease-time {lease_time}').get_output_in_json() + 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') - dhcpServerDelete = self.cmd('az vmware workload-network dhcp server delete --resource-group {rg} --private-cloud {privatecloud} --dhcp-id {dhcp_id}').output + dhcpServerDelete = self.cmd('az vmware workload-network dhcp server delete --resource-group {rg} --private-cloud {privatecloud} --dhcp {dhcp}').output self.assertEqual(len(dhcpServerDelete), 0) - dhcpServerUpdate = self.cmd('az vmware workload-network dhcp server update --resource-group {rg} --private-cloud {privatecloud} --dhcp-id {dhcp_id} --display-name {display_name} --revision {revision} --server-address {server_address} --lease-time {lease_time}').get_output_in_json() + 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') - dnsServiceGet = self.cmd('az vmware workload-network dns-service show --resource-group {rg} --private-cloud {privatecloud} --dns-service-id {dns_service_id}').get_output_in_json() + dnsServiceGet = self.cmd('az vmware workload-network dns-service show --resource-group {rg} --private-cloud {privatecloud} --dns-service {dns_service}').get_output_in_json() self.assertEqual(dnsServiceGet['name'], 'portMirroring1') - dnsServiceCreate = self.cmd('az vmware workload-network dns-service create --resource-group {rg} --private-cloud {privatecloud} --dns-service-id {dns_service_id} --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() + 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-id {dns_service_id} --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() + 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-id {dns_service_id}').output + dnsServiceDelete = self.cmd('az vmware workload-network dns-service delete --resource-group {rg} --private-cloud {privatecloud} --dns-service {dns_service}').output self.assertEqual(len(dnsServiceDelete), 0) dnsZoneList = self.cmd('az vmware workload-network dns-zone list --resource-group {rg} --private-cloud {privatecloud}').get_output_in_json() self.assertEqual(len(dnsZoneList), 1, 'count expected to be 1') - dnsZoneGet = self.cmd('az vmware workload-network dns-zone show --resource-group {rg} --private-cloud {privatecloud} --dns-zone-id {dns_zone_id}').get_output_in_json() + dnsZoneGet = self.cmd('az vmware workload-network dns-zone show --resource-group {rg} --private-cloud {privatecloud} --dns-zone {dns_zone}').get_output_in_json() self.assertEqual(dnsZoneGet['name'], 'portMirroring1') - dnsZoneCreate = self.cmd('az vmware workload-network dns-zone create --resource-group {rg} --private-cloud {privatecloud} --dns-zone-id {dns_zone_id} --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() + 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-id {dns_zone_id} --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() + 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-id {dns_zone_id}').output + dnsZoneDelete = self.cmd('az vmware workload-network dns-zone delete --resource-group {rg} --private-cloud {privatecloud} --dns-zone {dns_zone}').output self.assertEqual(len(dnsZoneDelete), 0) portMirroringList = self.cmd('az vmware workload-network port-mirroring list --resource-group {rg} --private-cloud {privatecloud}').get_output_in_json() self.assertEqual(len(portMirroringList), 1, 'count expected to be 1') - portMirroringGet = self.cmd('az vmware workload-network port-mirroring show --resource-group {rg} --private-cloud {privatecloud} --port-mirroring-id {port_mirroring_id}').get_output_in_json() + portMirroringGet = self.cmd('az vmware workload-network port-mirroring show --resource-group {rg} --private-cloud {privatecloud} --port-mirroring {port_mirroring}').get_output_in_json() self.assertEqual(portMirroringGet['name'], 'portMirroring1') # Uncomment these unit tests once swagger is fixed - # portMirroringCreate = self.cmd('az vmware workload-network port-mirroring create --resource-group {rg} --private-cloud {privatecloud} --port-mirroring-id {port_mirroring_id} --display-name {display_name} --direction {direction} --source {source} --destination {destination} --revision {revision}').get_output_in_json() + # 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-id {port_mirroring_id} --display-name {display_name} --direction {direction} --source {source} --destination {destination} --revision {revision}').get_output_in_json() + # 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-id {port_mirroring_id}').output + portMirroringDelete = self.cmd('az vmware workload-network port-mirroring delete --resource-group {rg} --private-cloud {privatecloud} --port-mirroring {port_mirroring}').output self.assertEqual(len(portMirroringDelete), 0) + + segmentList = self.cmd('az vmware workload-network segment list --resource-group {rg} --private-cloud {privatecloud}').get_output_in_json() + self.assertEqual(len(segmentList), 1, 'count expected to be 1') + + segmentGet = self.cmd('az vmware workload-network segment show --resource-group {rg} --private-cloud {privatecloud} --segment {segment}').get_output_in_json() + self.assertEqual(segmentGet['name'], 'segment1') + + 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') + + segmentDelete = self.cmd('az vmware workload-network segment delete --resource-group {rg} --private-cloud {privatecloud} --segment {segment}').output + self.assertEqual(len(segmentDelete), 0) + + publicIpList = self.cmd('az vmware workload-network public-ip list --resource-group {rg} --private-cloud {privatecloud}').get_output_in_json() + self.assertEqual(len(publicIpList), 1, 'count expected to be 1') + + publicIpGet = self.cmd('az vmware workload-network public-ip show --resource-group {rg} --private-cloud {privatecloud} --public-ip {public_ip}').get_output_in_json() + self.assertEqual(publicIpGet['name'], 'publicIP1') + + publicIpCreate = self.cmd('az vmware workload-network public-ip create --resource-group {rg} --private-cloud {privatecloud} --public-ip {public_ip} --display-name {display_name} --number-of-public-ips {number_of_public_i_ps}').get_output_in_json() + self.assertEqual(publicIpCreate['name'], 'publicIP1') + + publicIpDelete = self.cmd('az vmware workload-network public-ip delete --resource-group {rg} --private-cloud {privatecloud} --public-ip {public_ip}').output + self.assertEqual(len(publicIpDelete), 0) + + vmGroupList = self.cmd('az vmware workload-network vm-group list --resource-group {rg} --private-cloud {privatecloud}').get_output_in_json() + self.assertEqual(len(vmGroupList), 1, 'count expected to be 1') + + vmGroupGet = self.cmd('az vmware workload-network vm-group show --resource-group {rg} --private-cloud {privatecloud} --vm-group {vm_group}').get_output_in_json() + self.assertEqual(vmGroupGet['name'], 'cloud1') + + 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') + + vmGroupDelete = self.cmd('az vmware workload-network vm-group delete --resource-group {rg} --private-cloud {privatecloud} --vm-group {vm_group}').output + self.assertEqual(len(vmGroupDelete), 0) + + vmList = self.cmd('az vmware workload-network vm list --resource-group {rg} --private-cloud {privatecloud}').get_output_in_json() + self.assertEqual(len(vmList), 1, 'count expected to be 1') + + vmGet = self.cmd('az vmware workload-network vm show --resource-group {rg} --private-cloud {privatecloud} --virtual-machine {virtual_machine}').get_output_in_json() + self.assertEqual(vmGet['name'], 'vm1') + + gatewayList = self.cmd('az vmware workload-network gateway list --resource-group {rg} --private-cloud {privatecloud}').get_output_in_json() + self.assertEqual(len(gatewayList), 1, 'count expected to be 1') + + gatewayGet = self.cmd('az vmware workload-network gateway show --resource-group {rg} --private-cloud {privatecloud} --gateway {gateway}').get_output_in_json() + self.assertEqual(gatewayGet['name'], 'gateway1')