{Compute} az vm run-command: Migrate to AAZ#32026
Conversation
️✔️AzureCLI-FullTest
|
|
| rule | cmd_name | rule_message | suggest_message |
|---|---|---|---|
| vm run-command delete | cmd vm run-command delete removed property confirmation |
||
| vm run-command delete | cmd vm run-command delete update parameter no_wait: added property aaz_type=bool |
||
| vm run-command delete | cmd vm run-command delete update parameter no_wait: added property choices=['0', '1', 'f', 'false', 'n', 'no', 't', 'true', 'y', 'yes'] |
||
| vm run-command delete | cmd vm run-command delete update parameter no_wait: added property nargs=? |
||
| vm run-command delete | cmd vm run-command delete update parameter no_wait: added property type=bool |
||
| vm run-command delete | cmd vm run-command delete update parameter resource_group_name: added property aaz_type=string |
||
| vm run-command delete | cmd vm run-command delete update parameter resource_group_name: added property type=string |
||
| vm run-command delete | cmd vm run-command delete update parameter resource_group_name: updated property name from resource_group_name to resource_group |
||
| vm run-command delete | cmd vm run-command delete update parameter run_command_name: added property aaz_type=string |
||
| vm run-command delete | cmd vm run-command delete update parameter run_command_name: added property id_part=child_name_1 |
||
| vm run-command delete | cmd vm run-command delete update parameter run_command_name: added property type=string |
||
| vm run-command delete | cmd vm run-command delete update parameter run_command_name: updated property options from ['--name', '--run-command-name'] to ['--name', '--run-command-name', '-n'] |
||
| vm run-command delete | cmd vm run-command delete update parameter vm_name: added property aaz_type=string |
||
| vm run-command delete | cmd vm run-command delete update parameter vm_name: added property type=string |
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
There was a problem hiding this comment.
Pull Request Overview
This PR migrates the az vm run-command commands from SDK-based implementation to the AAZ (Azure CLI Command Framework) pattern. The migration aims to modernize the command structure and improve maintainability.
- Replaces manual SDK client usage with auto-generated AAZ commands
- Updates test configurations to use newer VM images and larger instance sizes
- Removes obsolete client factory and import dependencies
Reviewed Changes
Copilot reviewed 15 out of 17 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/azure-cli/azure/cli/command_modules/vm/custom.py | Migrates all run-command functions to use AAZ commands instead of SDK clients |
| src/azure-cli/azure/cli/command_modules/vm/commands.py | Updates command registration to remove SDK client factory dependency |
| src/azure-cli/azure/cli/command_modules/vm/_client_factory.py | Removes obsolete cf_run_commands factory function |
| src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py | Updates test VM configurations with newer images and larger instance sizes |
| src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vm/run_command/*.py | Adds auto-generated AAZ command implementations for all run-command operations |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| run_command_name=run_command_name, | ||
| run_command=run_command) | ||
| args['error_blob_uri'] = error_blob_uri | ||
| return LongRunningOperation(cmd.cli_ctx)(Create(cli_ctx=cmd.cli_ctx)(command_args=args)) |
There was a problem hiding this comment.
Missing import statement for LongRunningOperation. This will cause a runtime error when the function is called.
| args['run_command_name'] = run_command_name | ||
| args['vm_name'] = vm_name | ||
| args['no_wait'] = no_wait | ||
| return LongRunningOperation(cmd.cli_ctx)(Update(cli_ctx=cmd.cli_ctx)(command_args=args)) |
There was a problem hiding this comment.
Missing import statement for LongRunningOperation. This will cause a runtime error when the function is called.
9bb1ac1 to
c6b5600
Compare
c6b5600 to
ac286ec
Compare
|
please fix the CI issues. |
14f0abe to
ac03922
Compare
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
Related command
az vm run-command create/delete/list/show/update/invokeDescription
Migrate to AAZ
Azure/aaz#845
Testing Guide
History Notes
[Component Name 1] BREAKING CHANGE:
az command a: Make some customer-facing breaking change[Component Name 2]
az command b: Add some customer-facing featureThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.