-
Notifications
You must be signed in to change notification settings - Fork 3.3k
{Compute} az vmss get-instance-view: Migrate to aaz-based implementation
#32483
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
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR successfully migrates the az vmss get-instance-view command from SDK-based implementation to AAZ-based implementation, modernizing the codebase to use auto-generated AAZ commands.
Key Changes:
- Replaced SDK client calls with AAZ command invocations in
get_vmss_instance_view()function - Added new AAZ command implementations for VMSS instance view operations
- Updated tests to use more cost-effective VM SKU (Standard_B1ls)
Reviewed changes
Copilot reviewed 8 out of 10 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 |
Migrated get_vmss_instance_view() to use AAZ commands instead of SDK client, preserving all three code paths (instance_id='*', specific instance_id, no instance_id) |
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/instance_view/_show.py |
New auto-generated AAZ command for retrieving VMSS instance view using API version 2024-11-01 |
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/instance_view/__init__.py |
New module initialization file for VMSS instance view commands |
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/instance_view/__cmd_group.py |
New command group definition for instance view management |
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/vms/instance_view/_show.py |
New auto-generated AAZ command for retrieving individual VMSS VM instance view using API version 2024-11-01 |
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/vms/instance_view/__init__.py |
New module initialization file for VMSS VMs instance view commands |
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/vms/instance_view/__cmd_group.py |
New command group definition for VMSS VMs instance view management |
src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py |
Updated tests to use Standard_B1ls VM SKU for cost optimization and changed test image to CentOS in one test case |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
| vm_client.virtual_machine_scale_set_vms.list.assert_called_once_with( | ||
| resource_group_name='rg1', virtual_machine_scale_set_name='vmss1', | ||
| select='instanceView', expand='instanceView') | ||
|
|
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.
remove this test because the implementation has already been migrated to aaz, and the test no longer applies to the current logic.
Related command
az vmss get-instance-viewDescription
Migrate to aaz-based implementation
aaz PR: Azure/aaz#910
Testing Guide
History Notes
[Component Name 1] BREAKING CHANGE:
az command a: Make some customer-facing breaking change[Component Name 2]
az command b: Add some customer-facing featureThis 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.