{Compute} Migrate vm validator function of calling Compute module to aaz-based implementation#33348
{Compute} Migrate vm validator function of calling Compute module to aaz-based implementation#33348william051200 wants to merge 3 commits into
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
This PR migrates the community gallery legal-terms lookup used by VM/VMSS creation validators from the azure.mgmt.compute client to the AAZ-based sig show-community implementation, aligning VM module behavior with the ongoing AAZ migration.
Changes:
- Update
sig show-communityAAZ command to use Compute API version2025-03-03and expand the 200-response schema to include flattenedpropertiesfields (includingcommunityMetadata/ EULA). - Switch
_validate_community_gallery_legal_agreement_acceptanceto call the AAZShowCommunitycommand instead ofcf_community_gallery().get(...).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/sig/_show_community.py |
Bumps API version and enriches response schema so AAZ output includes community gallery metadata (EULA, etc.). |
src/azure-cli/azure/cli/command_modules/vm/_validators.py |
Replaces mgmt-plane client call with AAZ sig show-community to retrieve the community gallery EULA during VM/VMSS create validation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| 'public_gallery_name': community_gallery_name | ||
| } | ||
| community_gallery_info = SigShowCommunity(cli_ctx=cmd.cli_ctx)(command_args=command_args) | ||
| eula = community_gallery_info['community_metadata']['eula'] |
Related command
az vm createaz vmss createaz sig show-communityDescription
Migration from mgmt.compute to aaz-based
aaz Azure/aaz#1005
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.