Skip to content

Commit

Permalink
[Compute] Feature issue #11203 Add new reapply command action for az …
Browse files Browse the repository at this point in the history
…vm (#11733)

* [Compute] Feature issue #11203 Add new reapply command action for az vm

* update HISTORY.rst, add examples in help.py
  • Loading branch information
arrownj authored Jan 3, 2020
1 parent 71a4ff6 commit c8b028d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/azure-cli/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Release History

* Fix `vm create` failure in Azure Stack profile.
* vm monitor metrics tail/list-definitions: support query metric and list definitions for a vm.
* Add new reapply command action for az vm

**Storage**

Expand Down
12 changes: 12 additions & 0 deletions src/azure-cli/azure/cli/command_modules/vm/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -1606,6 +1606,18 @@
"""

helps['vm reapply'] = """
type: command
short-summary: Reapply VMs.
examples:
- name: Reapply a VM.
text: az vm reapply -g MyResourceGroup -n MyVm
- name: Reapply all VMs in a resource group.
text: >
az vm reapply --ids $(az vm list -g MyResourceGroup --query "[].id" -o tsv)
"""

helps['vm redeploy'] = """
type: command
short-summary: Redeploy an existing VM.
Expand Down
1 change: 1 addition & 0 deletions src/azure-cli/azure/cli/command_modules/vm/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ def load_command_table(self, _):
g.custom_show_command('show', 'show_vm', table_transformer=transform_vm)
g.command('start', 'start', supports_no_wait=True)
g.command('stop', 'power_off', supports_no_wait=True, validator=process_vm_vmss_stop)
g.command('reapply', 'reapply', supports_no_wait=True, min_api='2019-07-01')
g.generic_update_command('update', setter_name='update_vm', setter_type=compute_custom, supports_no_wait=True)
g.wait_command('wait', getter_name='get_instance_view', getter_type=compute_custom)

Expand Down

0 comments on commit c8b028d

Please sign in to comment.