Skip to content

{Compute} az vm host group: Migrate command group to aaz-based implementation#32907

Open
william051200 wants to merge 12 commits intoAzure:devfrom
william051200:vm-host-group-migration
Open

{Compute} az vm host group: Migrate command group to aaz-based implementation#32907
william051200 wants to merge 12 commits intoAzure:devfrom
william051200:vm-host-group-migration

Conversation

@william051200
Copy link
Member

@william051200 william051200 commented Mar 5, 2026

Related command

az vm host group create
az vm host group delete
az vm host group get-instance-view
az vm host group list
az vm host group show
az vm host group update

Description

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.

Copilot AI review requested due to automatic review settings March 5, 2026 01:57
@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Mar 5, 2026

️✔️AzureCLI-FullTest
️✔️acr
️✔️latest
️✔️3.12
️✔️3.13
️✔️acs
️✔️latest
️✔️3.12
️✔️3.13
️✔️advisor
️✔️latest
️✔️3.12
️✔️3.13
️✔️ams
️✔️latest
️✔️3.12
️✔️3.13
️✔️apim
️✔️latest
️✔️3.12
️✔️3.13
️✔️appconfig
️✔️latest
️✔️3.12
️✔️3.13
️✔️appservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️aro
️✔️latest
️✔️3.12
️✔️3.13
️✔️backup
️✔️latest
️✔️3.12
️✔️3.13
️✔️batch
️✔️latest
️✔️3.12
️✔️3.13
️✔️batchai
️✔️latest
️✔️3.12
️✔️3.13
️✔️billing
️✔️latest
️✔️3.12
️✔️3.13
️✔️botservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️cdn
️✔️latest
️✔️3.12
️✔️3.13
️✔️cloud
️✔️latest
️✔️3.12
️✔️3.13
️✔️cognitiveservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️compute_recommender
️✔️latest
️✔️3.12
️✔️3.13
️✔️computefleet
️✔️latest
️✔️3.12
️✔️3.13
️✔️config
️✔️latest
️✔️3.12
️✔️3.13
️✔️configure
️✔️latest
️✔️3.12
️✔️3.13
️✔️consumption
️✔️latest
️✔️3.12
️✔️3.13
️✔️container
️✔️latest
️✔️3.12
️✔️3.13
️✔️containerapp
️✔️latest
️✔️3.12
️✔️3.13
️✔️core
️✔️latest
️✔️3.12
️✔️3.13
️✔️cosmosdb
️✔️latest
️✔️3.12
️✔️3.13
️✔️databoxedge
️✔️latest
️✔️3.12
️✔️3.13
️✔️dls
️✔️latest
️✔️3.12
️✔️3.13
️✔️dms
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventgrid
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventhubs
️✔️latest
️✔️3.12
️✔️3.13
️✔️feedback
️✔️latest
️✔️3.12
️✔️3.13
️✔️find
️✔️latest
️✔️3.12
️✔️3.13
️✔️hdinsight
️✔️latest
️✔️3.12
️✔️3.13
️✔️identity
️✔️latest
️✔️3.12
️✔️3.13
️✔️iot
️✔️latest
️✔️3.12
️✔️3.13
️✔️keyvault
️✔️latest
️✔️3.12
️✔️3.13
️✔️lab
️✔️latest
️✔️3.12
️✔️3.13
️✔️managedservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️maps
️✔️latest
️✔️3.12
️✔️3.13
️✔️marketplaceordering
️✔️latest
️✔️3.12
️✔️3.13
️✔️monitor
️✔️latest
️✔️3.12
️✔️3.13
️✔️mysql
️✔️latest
️✔️3.12
️✔️3.13
️✔️netappfiles
️✔️latest
️✔️3.12
️✔️3.13
️✔️network
️✔️latest
️✔️3.12
️✔️3.13
️✔️policyinsights
️✔️latest
️✔️3.12
️✔️3.13
️✔️postgresql
️✔️latest
️✔️3.12
️✔️3.13
️✔️privatedns
️✔️latest
️✔️3.12
️✔️3.13
️✔️profile
️✔️latest
️✔️3.12
️✔️3.13
️✔️rdbms
️✔️latest
️✔️3.12
️✔️3.13
️✔️redis
️✔️latest
️✔️3.12
️✔️3.13
️✔️relay
️✔️latest
️✔️3.12
️✔️3.13
️✔️resource
️✔️latest
️✔️3.12
️✔️3.13
️✔️role
️✔️latest
️✔️3.12
️✔️3.13
️✔️search
️✔️latest
️✔️3.12
️✔️3.13
️✔️security
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicebus
️✔️latest
️✔️3.12
️✔️3.13
️✔️serviceconnector
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicefabric
️✔️latest
️✔️3.12
️✔️3.13
️✔️signalr
️✔️latest
️✔️3.12
️✔️3.13
️✔️sql
️✔️latest
️✔️3.12
️✔️3.13
️✔️sqlvm
️✔️latest
️✔️3.12
️✔️3.13
️✔️storage
️✔️latest
️✔️3.12
️✔️3.13
️✔️synapse
️✔️latest
️✔️3.12
️✔️3.13
️✔️telemetry
️✔️latest
️✔️3.12
️✔️3.13
️✔️util
️✔️latest
️✔️3.12
️✔️3.13
️✔️vm
️✔️latest
️✔️3.12
️✔️3.13

@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Mar 5, 2026

⚠️AzureCLI-BreakingChangeTest
⚠️vm
rule cmd_name rule_message suggest_message
⚠️ 1008 - ParaPropAdd vm host group update cmd vm host group update update parameter host_group_name: added property aaz_type=string
⚠️ 1008 - ParaPropAdd vm host group update cmd vm host group update update parameter host_group_name: added property type=string
⚠️ 1010 - ParaPropUpdate vm host group update cmd vm host group update update parameter host_group_name: updated property name from host_group_name to name
⚠️ 1008 - ParaPropAdd vm host group update cmd vm host group update update parameter properties_to_add: added property aaz_type=AAZGenericUpdateAddArg
⚠️ 1008 - ParaPropAdd vm host group update cmd vm host group update update parameter properties_to_remove: added property aaz_type=AAZGenericUpdateRemoveArg
⚠️ 1008 - ParaPropAdd vm host group update cmd vm host group update update parameter properties_to_set: added property aaz_type=AAZGenericUpdateSetArg
⚠️ 1008 - ParaPropAdd vm host group update cmd vm host group update update parameter resource_group_name: added property aaz_type=string
⚠️ 1008 - ParaPropAdd vm host group update cmd vm host group update update parameter resource_group_name: added property type=string
⚠️ 1010 - ParaPropUpdate vm host group update cmd vm host group update update parameter resource_group_name: updated property name from resource_group_name to resource_group

@yonzhan
Copy link
Collaborator

yonzhan commented Mar 5, 2026

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link

github-actions bot commented Mar 5, 2026

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).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 create and get-instance-view to invoke AAZ command classes from custom.py.
  • Registers an AAZ-based show implementation 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.

Comment on lines 5926 to 5930
if ultra_ssd_enabled:
command_args['additional_capabilities'] = {
'ultra_ssd_enabled': ultra_ssd_enabled
}

Copy link

Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Auto-Assign Auto assign by bot Compute az vm/vmss/image/disk/snapshot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants