{Compute} disk and snapshot command migration#32596
Conversation
️✔️AzureCLI-FullTest
|
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
Hi @william051200, |
|
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>
|
️✔️AzureCLI-BreakingChangeTest
|
There was a problem hiding this comment.
Pull request overview
This PR migrates the az disk create and az snapshot create commands from the legacy mgmt.compute SDK to the aaz-based implementation, modernizing the command infrastructure.
Key Changes:
- Removed SDK type references from command group definitions for disk and snapshot commands
- Simplified validator functions by removing API version checks that are no longer needed with aaz-based commands
- Cleaned up conditional validation logic that was dependent on API version support
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/azure-cli/azure/cli/command_modules/vm/commands.py | Removed compute_disk_sdk and compute_snapshot_sdk parameters from command group definitions, allowing the commands to use aaz-based implementations |
| src/azure-cli/azure/cli/command_modules/vm/_validators.py | Simplified _validate_gallery_image_reference by removing the cmd parameter and API version check; removed API version validation for UploadWithSecurityData upload type |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
cc99002 to
90d7991
Compare
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
eac096a to
887d9d0
Compare
Related command
az disk createaz snapshot createDescription
Migration from mgmt.compute to aaz-based
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.