[Compute] Fix #31929: Fix az vm/vmss update cannot update --wire-server-profile-id and --imds-profile-id#32129
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 fixes an issue where az vm update and az vmss update commands could not update the --wire-server-profile-id and --imds-profile-id parameters. The fix implements a patch API approach to properly support updating these in-VM access control profile reference IDs.
- Adds a new patch-based update mechanism for profile reference IDs using AAZ classes
- Removes error-raising test assertions that were preventing these parameters from being updated
- Updates test configuration to use proper VM SKU for flexible orchestration mode
Reviewed Changes
Copilot reviewed 2 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/azure-cli/azure/cli/command_modules/vm/custom.py | Implements patch API for updating profile reference IDs in both VM and VMSS update functions |
| src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py | Removes HttpResponseError assertions and adds comprehensive test for profile reference ID updates |
Comments suppressed due to low confidence (3)
src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:1
- Variable name 'wireseriver_prifile' contains a typo. It should be 'wireserver_profile' or similar.
# --------------------------------------------------------------------------------------------
src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:1
- Variable name 'imds_prifile' contains a typo. It should be 'imds_profile' or similar.
# --------------------------------------------------------------------------------------------
src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:1
- The variable name 'wireseriver_prifile' is inconsistent with the dictionary key 'wireserver_profileid'. Consider using consistent naming like 'wireserver_profile' for the variable.
# --------------------------------------------------------------------------------------------
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
az vm/vmss update cannot update --wire-server-profile-id and --imds-profile-idaz vm/vmss update cannot update --wire-server-profile-id and --imds-profile-id
Related command
az vm/vmss updateDescription
Add patch api to support update inVMAccessControlProfileReferenceId
close #31929
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.