{Compute} az vmss reimage: Migrate command to aaz-based implementation#32790
{Compute} az vmss reimage: Migrate command to aaz-based implementation#32790william051200 wants to merge 2 commits intoAzure:devfrom
az vmss reimage: Migrate command to aaz-based implementation#32790Conversation
️✔️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
This PR migrates the az vmss reimage command from the legacy SDK-based implementation (mgmt.compute) to a modern AAZ-based implementation. The migration is part of an ongoing effort to modernize Azure CLI by moving away from SDK clients to AAZ (Azure CLI Auto Rest) commands.
Changes:
- Replaces SDK-based
reimage_vmssimplementation with AAZ command invocations - Introduces two new AAZ command files:
_reimage.pyand_reimageall.py - Moves command registration from SDK-based command group to custom command group
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/azure-cli/azure/cli/command_modules/vm/custom.py | Refactored reimage_vmss function to use AAZ commands instead of SDK clients; maintains same logic flow (uses Reimageall when instance_ids provided, Reimage otherwise) |
| src/azure-cli/azure/cli/command_modules/vm/commands.py | Moved reimage command registration from SDK-based command group to custom command group (appropriate for AAZ implementation) |
| src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/_reimage.py | New auto-generated AAZ command for VMSS reimage operation; supports instance_ids, force_update_os_disk_for_ephemeral, and additional parameters |
| src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/_reimageall.py | New auto-generated AAZ command for VMSS reimage-all operation (reimages all disks including data disks) |
| src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/init.py | Added imports for new Reimage and Reimageall AAZ commands |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Related command
az vmss reimageDescription
Migration from mgmt.compute to aaz-based
aaz Azure/aaz#946
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.