[Network] Fix #33502: az network vnet list: List all VNets without specifying --resource-group#33510
Conversation
️✔️AzureCLI-FullTest
|
|
| rule | cmd_name | rule_message | suggest_message |
|---|---|---|---|
| network vnet list | cmd network vnet list update parameter resource_group: removed property required=True |
There was a problem hiding this comment.
Pull request overview
Restores az network vnet list behavior to support subscription-scope listing when --resource-group/-g is omitted, aligning the AAZ implementation with historical CLI behavior and documented examples.
Changes:
- Makes
--resource-groupoptional again fornetwork vnet listand routes to a subscription-levelVirtualNetworksListAlloperation when omitted. - Adds the subscription-scope VNet list resource/operation for API version
2025-07-01. - Updates scenario tests to exercise
network vnet listwithout-g.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/vnet/_list.py |
Reintroduces subscription-level list operation and makes RG optional, selecting the correct operation based on whether --resource-group is provided. |
src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py |
Updates VNet scenario test to call network vnet list and -o table without --resource-group. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
az network vnet list: Restore support for listing all VNets without specifying --resource-groupaz network vnet list: List all VNets without specifying --resource-group
|
Network |
|
When will those changes appear in the release? I got a broken pipeline due to this |
|
The fix was already merged. and the next coming release is 2.88.0 on 07/07. |
|
Thanks yonzhan. I wonder if it makes sense to release hotfixes/bug fixes only once a month, since AZ is widely used in pipelines, and breaking the contract can break the pipeline entirely. |
Related command
az network vnet listDescription
A previous update to the
az network vnet listAAZ command accidentally removed the ability to list all virtual networks across the subscription without specifying--resource-group. This PR restores the subscription-level listing by making--resource-groupoptional again and re-adding theVirtualNetworksListAlloperation against API version2025-07-01.fix: #33502
aaz: Azure/aaz#1026
Testing Guide
az network vnet listaz network vnet list -g myResourceGroupHistory 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.