Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/vmware/DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
```powershell
rm ..\azure-cli-extensions\src\vmware\azext_vmware\vendored_sdks -Recurse
autorest --python --output-folder=..\azure-cli-extensions\src\vmware\azext_vmware\vendored_sdks --use=@autorest/python@5.9.3 --tag=package-2021-06-01 --azure-arm=true --namespace=avs_client --override-client-name=AVSClient specification\vmware\resource-manager\readme.md
autorest --python --output-folder=..\azure-cli-extensions\src\vmware\azext_vmware\vendored_sdks\avs_client --use=@autorest/python@5.8.0 --tag=package-2022-05-01 --azure-arm=true --namespace=avs_client --override-client-name=AVSClient specification\vmware\resource-manager\readme.md
```

It was run from a git clone of [azure-rest-api-specs](https://github.com/Azure/azure-rest-api-specs) within the python virtual environment (env\scripts\Activate.ps1). Ensure that no proxy has been set.
Expand Down
15 changes: 15 additions & 0 deletions src/vmware/HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Release History

## 5.0.0 (2022-10)

- Update to AVS 2022-05-01 API
- Add `az vmware cluster list-zones`
- Add `--affinity-strength` and `--azure-hybrid-benefit-type` parameters to `az vmware placement-policy vm-host create`
- Add `--affinity-strength` and `--azure-hybrid-benefit-type` parameters to `az vmware placement-policy vm-host update`
- Add `--express-route-id` parameter to `az vmware authorization create`
- Add `vmware addon arc` command group
- Add `az vmware location check-trial-availability`
- Add `az vmware location check-quota-availability`
Comment on lines +6 to +12
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add some description for these new commands and new parameters?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a separate help.py file that contains help for each of these commands and parameters. I'd also like to keep the HISTORY.md file minimal for readability.

- Deprecate `az vmware location checktrialavailability`
- Deprecate `az vmware location checkquotaavailability`
- [BREAKING CHANGE] `az vmware private-cloud add-availability-zone` has been removed. Availability zone cannot be modified after private cloud creation
- [BREAKING CHANGE] `az vmware private-cloud delete-availability-zone` has been removed. Availability zone cannot be modified after private cloud creation.

## 4.1.0 (2022-07)

- Add `az vmware private-cloud enable-cmk-encryption`
Expand Down
62 changes: 52 additions & 10 deletions src/vmware/azext_vmware/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@
short-summary: Commands to manage a vSphere Replication (VR) addon.
"""

helps['vmware addon arc'] = """
type: group
short-summary: Commands to manage a Arc addon.
"""

helps['vmware private-cloud'] = """
type: group
short-summary: Commands to manage private clouds.
Expand Down Expand Up @@ -87,24 +92,19 @@
short-summary: Update a cluster in a private cloud.
"""

helps['vmware private-cloud add-identity-source'] = """
helps['vmware cluster list-zones'] = """
type: command
short-summary: Add a vCenter Single Sign On Identity Source to a private cloud.
short-summary: List hosts by zone in a cluster.
"""

helps['vmware private-cloud addidentitysource'] = """
helps['vmware private-cloud add-identity-source'] = """
type: command
short-summary: Add a vCenter Single Sign On Identity Source to a private cloud.
"""

helps['vmware private-cloud add-availability-zone'] = """
type: command
short-summary: Add an Availability Zone to a private cloud.
"""

helps['vmware private-cloud delete-availability-zone'] = """
helps['vmware private-cloud addidentitysource'] = """
type: command
short-summary: Delete an Availability Zone from a private cloud.
short-summary: Add a vCenter Single Sign On Identity Source to a private cloud.
"""

helps['vmware private-cloud add-cmk-encryption'] = """
Expand Down Expand Up @@ -252,12 +252,21 @@
type: command
short-summary: Return quota for subscription by region.
"""
helps['vmware location check-quota-availability'] = """
type: command
short-summary: Return quota for subscription by region.
"""

helps['vmware location checktrialavailability'] = """
type: command
short-summary: Return trial status for subscription by region.
"""

helps['vmware location check-trial-availability'] = """
type: command
short-summary: Return trial status for subscription by region.
"""

helps['vmware datastore create'] = """
type: command
short-summary: Please use "netapp-volume create" or "disk-pool-volume create" instead.
Expand Down Expand Up @@ -345,6 +354,14 @@
text: az vmware addon srm create --resource-group MyResourceGroup --private-cloud MyPrivateCloud --license-key "41915-178A8-FF4A4-DB683-6D735"
"""

helps['vmware addon arc create'] = """
type: command
short-summary: Create an Arc addon for a private cloud.
examples:
- name: Create an Arc addon.
text: az vmware addon arc create --resource-group MyResourceGroup --private-cloud MyPrivateCloud --vcenter "00000000-0000-0000-0000-000000000000"
"""

helps['vmware addon vr show'] = """
type: command
short-summary: Show details of a vSphere Replication (VR) addon for a private cloud.
Expand All @@ -369,6 +386,14 @@
text: az vmware addon srm show --resource-group MyResourceGroup --private-cloud MyPrivateCloud
"""

helps['vmware addon arc show'] = """
type: command
short-summary: Show details of an Arc addon for a private cloud.
examples:
- name: Show details of an Arc addon.
text: az vmware addon arc show --resource-group MyResourceGroup --private-cloud MyPrivateCloud
"""

helps['vmware addon vr update'] = """
type: command
short-summary: Update a vSphere Replication (VR) addon for a private cloud.
Expand All @@ -393,6 +418,14 @@
text: az vmware addon srm update --resource-group MyResourceGroup --private-cloud MyPrivateCloud --license-key "41915-178A8-FF4A4-DB683-6D735"
"""

helps['vmware addon arc update'] = """
type: command
short-summary: Update an Arc addon for a private cloud.
examples:
- name: Update an Arc addon.
text: az vmware addon arc update --resource-group MyResourceGroup --private-cloud MyPrivateCloud --vcenter "00000000-0000-0000-0000-000000000000"
"""

helps['vmware addon vr delete'] = """
type: command
short-summary: Delete a vSphere Replication (VR) addon for a private cloud.
Expand All @@ -417,6 +450,14 @@
text: az vmware addon srm delete --resource-group MyResourceGroup --private-cloud MyPrivateCloud
"""

helps['vmware addon arc delete'] = """
type: command
short-summary: Delete an Arc addon for a private cloud.
examples:
- name: Delete an Arc addon.
text: az vmware addon arc delete --resource-group MyResourceGroup --private-cloud MyPrivateCloud
"""

helps['vmware global-reach-connection'] = """
type: group
short-summary: Commands to manage global reach connections in a private cloud.
Expand Down Expand Up @@ -557,6 +598,7 @@
- name: Delete a script execution.
text: az vmware script-execution delete --resource-group group1 --private-cloud cloud1 --name addSsoServer
"""

helps['vmware workload-network'] = """
type: group
short-summary: Commands to manage workload-networks in a private cloud.
Expand Down
24 changes: 15 additions & 9 deletions src/vmware/azext_vmware/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ def load_arguments(self, _):
c.argument('location', validator=get_default_location_from_resource_group)
c.argument('private_cloud', options_list=['--private-cloud', '-c'], help='Name of the private cloud.')

with self.argument_context('vmware location') as c:
c.argument('sku', help='The name of the SKU')

with self.argument_context('vmware private-cloud') as c:
c.argument('cluster_size', help='Number of hosts for the default management cluster. Minimum of 3 and maximum of 16.')
c.argument('internet', help='Connectivity to internet. Specify "Enabled" or "Disabled".')
Expand All @@ -40,6 +43,9 @@ def load_arguments(self, _):
c.argument('accept_eula', help='Accept the end-user license agreement without prompting.')
c.argument('network_block', help='A subnet at least of size /22. Make sure the CIDR format is conformed to (A.B.C.D/X) where A,B,C,D are between 0 and 255, and X is between 0 and 22.')
c.argument('mi_system_assigned', help='Enable a system assigned identity.')
c.argument('strategy', arg_type=get_enum_type(['SingleZone', 'DualZone']), help='The availability strategy for the private cloud.')
c.argument('zone', help='The primary availability zone for the private cloud')
c.argument('secondary_zone', help='The secondary availability zone for the private cloud.')

with self.argument_context('vmware private-cloud show') as c:
c.argument('name', options_list=['--name', '-n'], help='Name of the private cloud.')
Expand All @@ -52,13 +58,9 @@ def load_arguments(self, _):

with self.argument_context('vmware authorization') as c:
c.argument('name', options_list=['--name', '-n'], help='Name of the authorization.')
c.argument('express_route_id', help='The ID of the ExpressRoute Circuit.')
c.argument('yes', help='Delete without confirmation.')

with self.argument_context('vmware private-cloud add-availability-zone') as c:
c.argument('strategy', help='The availability strategy for the private cloud. Possible values include: "SingleZone", "DualZone".')
c.argument('zone', help='The primary availability zone for the private cloud')
c.argument('secondary_zone', help='The secondary availability zone for the private cloud.')

with self.argument_context('vmware private-cloud add-cmk-encryption') as c:
c.argument('enc_kv_key_name', help='The name of the encryption key vault key.')
c.argument('enc_kv_url', help='The URL of the encryption key vault.')
Expand Down Expand Up @@ -133,7 +135,6 @@ def load_arguments(self, _):
with self.argument_context('vmware datastore disk-pool-volume create') as c:
c.argument('target_id', help='Azure resource ID of the iSCSI target.')
c.argument('mount_option', arg_type=get_enum_type(['MOUNT', 'ATTACH']), default="MOUNT", help='Mode that describes whether the LUN has to be mounted as a datastore or attached as a LUN.')
c.argument('path', help='Device path.')

with self.argument_context('vmware addon') as c:
c.argument('name', options_list=['--name', '-n'], help='Name of the addon.')
Expand All @@ -148,6 +149,9 @@ def load_arguments(self, _):
with self.argument_context('vmware addon srm') as c:
c.argument('license_key', help='The Site Recovery Manager (SRM) license.')

with self.argument_context('vmware addon arc') as c:
c.argument('vcenter', help='The VMware vCenter resource ID.')

with self.argument_context('vmware global-reach-connection') as c:
c.argument('name', options_list=['--name', '-n'], help='Name of the global reach connection.')
c.argument('yes', help='Delete without confirmation.')
Expand Down Expand Up @@ -257,14 +261,16 @@ def load_arguments(self, _):
with self.argument_context('vmware placement-policy') as c:
c.argument('cluster_name', help="Name of the cluster in the private cloud.")
c.argument('placement_policy_name', help="Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy.")
c.argument('state', help="Whether the placement policy is enabled or disabled. Possible values include: 'Enabled', 'Disabled'.")
c.argument('state', arg_type=get_enum_type(['Enabled', 'Disabled']), help="Whether the placement policy is enabled or disabled.")
c.argument('display_name', help="Display name of the placement policy.")
c.argument('vm_members', nargs='+', help="Virtual machine members list.")
c.argument('affinity_type', help="Placement policy affinity type. Possible values include: 'Affinity', 'AntiAffinity'.")
c.argument('affinity_type', arg_type=get_enum_type(['Affinity', 'AntiAffinity']), help="Placement policy affinity type.")
c.argument('host_members', nargs='+', help='Host members list.')
c.argument('affinity_strength', arg_type=get_enum_type(['Should', 'Must']), help='Vm host placement policy affinity strength (should/must).')
c.argument('azure_hybrid_benefit', arg_type=get_enum_type(['SqlHost', 'None']), help='Placement policy azure hybrid benefit opt-in type.')
c.argument('yes', help='Delete without confirmation.')

with self.argument_context('vmware vm') as c:
c.argument('cluster_name', help='Name of the cluster in the private cloud.')
c.argument('virtual_machine', help='Virtual Machine identifier.')
c.argument('restrict_movement', help='Whether VM DRS-driven movement is restricted (enabled) or not (disabled).')
c.argument('restrict_movement', arg_type=get_enum_type(['Enabled', 'Disabled']), help='Whether VM DRS-driven movement is restricted (enabled) or not (disabled).')
15 changes: 11 additions & 4 deletions src/vmware/azext_vmware/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ def load_command_table(self, _):
g.custom_command('add-identity-source', 'privatecloud_addidentitysource')
g.custom_command('deleteidentitysource', 'privatecloud_deleteidentitysource', deprecate_info=g.deprecate(redirect='az vmware private-cloud delete-identity-source', hide=True))
g.custom_command('delete-identity-source', 'privatecloud_deleteidentitysource')
g.custom_command('add-availability-zone', 'privatecloud_addavailabilityzone')
g.custom_command('delete-availability-zone', 'privatecloud_deleteavailabilityzone')
g.custom_command('add-cmk-encryption', 'privatecloud_addcmkencryption', deprecate_info=g.deprecate(redirect='az vmware private-cloud enable-cmk-encryption', hide=True))
g.custom_command('delete-cmk-encryption', 'privatecloud_deletecmkenryption', deprecate_info=g.deprecate(redirect='az vmware private-cloud disable-cmk-encryption', hide=True))
g.custom_command('enable-cmk-encryption', 'privatecloud_addcmkencryption')
Expand All @@ -45,6 +43,7 @@ def load_command_table(self, _):
g.custom_command('update', 'cluster_update')
g.custom_command('list', 'cluster_list')
g.custom_command('delete', 'cluster_delete')
g.custom_command('list-zones', 'cluster_list_zones')
g.custom_show_command('show', 'cluster_show')

with self.command_group('vmware authorization', vmware_sdk, client_factory=cf_vmware) as g:
Expand All @@ -60,8 +59,10 @@ def load_command_table(self, _):
g.custom_show_command('show', 'hcxenterprisesite_show')

with self.command_group('vmware location', vmware_sdk, client_factory=cf_vmware) as g:
g.custom_command('checkquotaavailability', 'check_quota_availability')
g.custom_command('checktrialavailability', 'check_trial_availability')
g.custom_command('checkquotaavailability', 'check_quota_availability', deprecate_info=g.deprecate(redirect='az vmware location check-quota-availability', hide=True))
g.custom_command('checktrialavailability', 'check_trial_availability', deprecate_info=g.deprecate(redirect='az vmware location check-trial-availability', hide=True))
g.custom_command('check-quota-availability', 'check_quota_availability')
g.custom_command('check-trial-availability', 'check_trial_availability')

with self.command_group('vmware datastore', vmware_sdk, client_factory=cf_vmware) as g:
g.custom_command('create', 'datastore_create', deprecate_info=g.deprecate(redirect='"az vmware datastore netapp-volume create" or "az vmware datastore disk-pool-volume create"', hide=True))
Expand Down Expand Up @@ -96,6 +97,12 @@ def load_command_table(self, _):
g.custom_command('update', 'addon_srm_update')
g.custom_command('delete', 'addon_srm_delete')

with self.command_group('vmware addon arc', vmware_sdk, client_factory=cf_vmware) as g:
g.custom_command('create', 'addon_arc_create')
g.custom_show_command('show', 'addon_arc_show')
g.custom_command('update', 'addon_arc_update')
g.custom_command('delete', 'addon_arc_delete')

with self.command_group('vmware global-reach-connection', vmware_sdk, client_factory=cf_vmware) as g:
g.custom_command('create', 'globalreachconnection_create')
g.custom_command('list', 'globalreachconnection_list')
Expand Down
Loading