{Compute} az vm host group: Migrate command group to aaz-based implementation#32907
{Compute} az vm host group: Migrate command group to aaz-based implementation#32907william051200 wants to merge 21 commits intoAzure:devfrom
az vm host group: Migrate command group to aaz-based implementation#32907Conversation
❌AzureCLI-FullTest
|
️✔️AzureCLI-BreakingChangeTest
|
|
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
Migrates the az vm host group command group away from mgmt.compute SDK usage toward AAZ-based implementations within the VM command module.
Changes:
- Reworks
vm host group createandget-instance-viewto invoke AAZ command classes fromcustom.py. - Registers an AAZ-based
showimplementation with an operations wrapper that hides--expand. - Adds/updates AAZ-generated host group commands (create/update) and bumps host group AAZ API versions to
2024-11-01.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/azure-cli/azure/cli/command_modules/vm/operations/vm_host_group.py |
Adds a wrapper around AAZ Show to hide --expand for vm host group show. |
src/azure-cli/azure/cli/command_modules/vm/custom.py |
Updates dedicated host group create/instance-view paths to call AAZ commands directly. |
src/azure-cli/azure/cli/command_modules/vm/commands.py |
Rewires vm host group command registration to AAZ-based show and custom AAZ-backed create/instance-view. |
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vm/host/group/_create.py |
Adds AAZ-generated implementation for vm host group create (invoked from custom code). |
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vm/host/group/_update.py |
Adds AAZ-generated implementation for vm host group update. |
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vm/host/group/_show.py |
Updates AAZ show to API 2024-11-01 and adds $expand support + schema updates. |
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vm/host/group/_list.py |
Updates AAZ list to API 2024-11-01 and schema updates. |
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vm/host/group/_delete.py |
Updates AAZ delete to API 2024-11-01. |
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vm/host/group/__init__.py |
Exports newly added AAZ create/update modules. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if ultra_ssd_enabled: | ||
| command_args['additional_capabilities'] = { | ||
| 'ultra_ssd_enabled': ultra_ssd_enabled | ||
| } | ||
|
|
There was a problem hiding this comment.
ultra_ssd_enabled is a three-state flag (can be True/False/None). Using if ultra_ssd_enabled: skips the explicit False case, changing behavior from the previous is not None check and making it impossible to send ultraSSDEnabled=false when the user specifies it. Use an is not None check so both True and False are honored when provided.
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
Related command
az vm host group createaz vm host group deleteaz vm host group get-instance-viewaz vm host group listaz vm host group showaz vm host group updateDescription
Migration from mgmt.compute to aaz-based
aaz Azure/aaz#952
Testing Guide
History Notes
This 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.