Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Jan 3, 2020
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions src/azure-cli/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,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