{Compute} migrate vm managed data disk attach & detach to aaz#32781
{Compute} migrate vm managed data disk attach & detach to aaz#32781
Conversation
️✔️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
Migrate az vm disk attach / az vm disk detach implementation from Compute SDK VM objects to the AAZ framework’s dict-based VM representation.
Changes:
- Updated managed data disk attach/detach logic to use
get_vm_to_update_by_aaz/set_vm_by_aazand dict payloads. - Adjusted VM scenario tests (locations, VM size) and added skips for feature-gated scenarios.
- Updated a backup scenario test recording to a newer Compute API version.
Reviewed changes
Copilot reviewed 3 out of 12 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
src/azure-cli/azure/cli/command_modules/vm/custom.py |
Switch VM disk attach/detach codepaths to AAZ dict-based VM retrieval/update and payload shapes. |
src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py |
Stabilize/adjust scenario tests for the migration; add skips and tweak VM create parameters. |
src/azure-cli/azure/cli/command_modules/backup/tests/latest/recordings/test_backup_disk_exclusion.yaml |
Re-record/update HTTP interactions with a newer api-version. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Related command
az vm disk attachaz vm disk detachDescription
Migrate
az vm disk attachandaz vm disk detachcommands from compute sdk to aaz framework.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.