Skip to content

Commit 2ced00c

Browse files
authored
{Compute} az vm run-command: Migrate to AAZ (#32026)
1 parent 84dbc7f commit 2ced00c

File tree

19 files changed

+6652
-3416
lines changed

19 files changed

+6652
-3416
lines changed

src/azure-cli/azure/cli/command_modules/vm/_client_factory.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,6 @@ def cf_images(cli_ctx, _):
6767
return _compute_client_factory(cli_ctx).images
6868

6969

70-
def cf_run_commands(cli_ctx, _):
71-
return _compute_client_factory(cli_ctx).virtual_machine_run_commands
72-
73-
7470
def cf_vmss_run_commands(cli_ctx, _):
7571
return _compute_client_factory(cli_ctx).virtual_machine_scale_set_vm_run_commands
7672

src/azure-cli/azure/cli/command_modules/vm/_help.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1957,16 +1957,6 @@
19571957
"https://mystorageaccount.blob.core.windows.net/mycontainer/RuncommandOutput.txt?sp=racw&st=2022-10-17T19:02:15Z&se=2022-10-18T03:02:15Z&spr=https&sv=2021-06-08&sr=b&sig=3BxtEasfdasdfasdfdYki9yvYsqc60V0%3D"
19581958
"""
19591959

1960-
helps['vm run-command delete'] = """
1961-
type: command
1962-
short-summary: "The operation to delete the run command."
1963-
examples:
1964-
- name: Delete a run command.
1965-
text: |-
1966-
az vm run-command delete --resource-group "myResourceGroup" --run-command-name \
1967-
"myRunCommand" --vm-name "myVM"
1968-
"""
1969-
19701960
helps['vm run-command wait'] = """
19711961
type: command
19721962
short-summary: Place the CLI in a waiting state until a condition of the res virtual-machine-run-command is met.

src/azure-cli/azure/cli/command_modules/vm/_params.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -953,10 +953,6 @@ def load_arguments(self, _):
953953
c.argument('output_blob_uri', help='Specify the Azure storage blob (SAS URI) where script output stream will be uploaded.')
954954
c.argument('error_blob_uri', help='Specify the Azure storage blob where script error stream will be uploaded.')
955955

956-
with self.argument_context('vm run-command delete') as c:
957-
c.argument('vm_name', run_cmd_vm_name)
958-
c.argument('run_command_name', run_cmd_name_type)
959-
960956
with self.argument_context('vm run-command list') as c:
961957
c.argument('vm_name', run_cmd_vm_name, id_part=None)
962958
c.argument('expand', help='The expand expression to apply on the operation.')
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# --------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
#
5+
# Code generated by aaz-dev-tools
6+
# --------------------------------------------------------------------------------------------
7+
8+
# pylint: skip-file
9+
# flake8: noqa
10+
11+
from azure.cli.core.aaz import *
12+
13+
14+
@register_command_group(
15+
"vm run-command",
16+
)
17+
class __CMDGroup(AAZCommandGroup):
18+
"""Manage run commands on a Virtual Machine.
19+
20+
For more information, see https://learn.microsoft.com/azure/virtual-machines/windows/run-command or https://learn.microsoft.com/azure/virtual-machines/linux/run-command.
21+
"""
22+
pass
23+
24+
25+
__all__ = ["__CMDGroup"]
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# --------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
#
5+
# Code generated by aaz-dev-tools
6+
# --------------------------------------------------------------------------------------------
7+
8+
# pylint: skip-file
9+
# flake8: noqa
10+
11+
from .__cmd_group import *
12+
from ._create import *
13+
from ._delete import *
14+
from ._invoke import *
15+
from ._list import *
16+
from ._list_by_subscription import *
17+
from ._show import *
18+
from ._show_by_id import *
19+
from ._update import *
20+
from ._wait import *

0 commit comments

Comments
 (0)