-
Notifications
You must be signed in to change notification settings - Fork 3.3k
{Compute} az vm availability-set create: Migrate commands to aaz #32679
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
❌AzureCLI-FullTest
|
|
Hi @huiii99, |
️✔️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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request migrates the az vm availability-set create command from using ARM template-based deployment to the AAZ (Azure CLI Code Generation) framework. The migration deprecates the --validate parameter since the command no longer generates ARM templates.
Changes:
- Replaced ARM template-based implementation with direct AAZ API calls for availability set creation
- Added deprecation notice for the
--validateparameter with a clear error message - Generated new AAZ command class in
_create.pyusing auto-generated code - Updated parameter help text to indicate the
--validateoption is deprecated
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/azure-cli/azure/cli/command_modules/vm/custom.py | Refactored create_av_set function to call AAZ Create command instead of ARM template deployment; added error handling for deprecated --validate parameter |
| src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vm/availability_set/_create.py | New auto-generated AAZ command class for availability set creation using API version 2024-07-01 |
| src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vm/availability_set/init.py | Added import for the new Create command class |
| src/azure-cli/azure/cli/command_modules/vm/_params.py | Updated help text for --validate parameter to indicate deprecation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Related command
az vm availability-set createDescription
This pull request migrates
az vm availability-set createcmd from the legacy mgmt.compute sdk to the new aaz framework.aaz: Azure/aaz#925
Testing Guide
History Notes
[Compute]
az vm availability-set create: Deprecate the--validateparameter after migrating the command to AAZThis 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.