Skip to content

[Network] Fix #33502: az network vnet list: List all VNets without specifying --resource-group#33510

Merged
necusjz merged 1 commit into
Azure:devfrom
huiii99:fix/vnet-list
Jun 10, 2026
Merged

[Network] Fix #33502: az network vnet list: List all VNets without specifying --resource-group#33510
necusjz merged 1 commit into
Azure:devfrom
huiii99:fix/vnet-list

Conversation

@huiii99

@huiii99 huiii99 commented Jun 9, 2026

Copy link
Copy Markdown
Member

Related command
az network vnet list

Description
A previous update to the az network vnet list AAZ 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-group optional again and re-adding the VirtualNetworksListAll operation against API version 2025-07-01.

fix: #33502
aaz: Azure/aaz#1026

Testing Guide
az network vnet list
az network vnet list -g myResourceGroup

History Notes


This checklist is used to make sure that common guidelines for a pull request are followed.

@azure-client-tools-bot-prd

azure-client-tools-bot-prd Bot commented Jun 9, 2026

Copy link
Copy Markdown
️✔️AzureCLI-FullTest
️✔️acr
️✔️latest
️✔️3.12
️✔️3.14
️✔️acs
️✔️latest
️✔️3.12
️✔️3.14
️✔️advisor
️✔️latest
️✔️3.12
️✔️3.14
️✔️ams
️✔️latest
️✔️3.12
️✔️3.14
️✔️apim
️✔️latest
️✔️3.12
️✔️3.14
️✔️appconfig
️✔️latest
️✔️3.12
️✔️3.14
️✔️appservice
️✔️latest
️✔️3.12
️✔️3.14
️✔️aro
️✔️latest
️✔️3.12
️✔️3.14
️✔️backup
️✔️latest
️✔️3.12
️✔️3.14
️✔️batch
️✔️latest
️✔️3.12
️✔️3.14
️✔️batchai
️✔️latest
️✔️3.12
️✔️3.14
️✔️billing
️✔️latest
️✔️3.12
️✔️3.14
️✔️botservice
️✔️latest
️✔️3.12
️✔️3.14
️✔️cdn
️✔️latest
️✔️3.12
️✔️3.14
️✔️cloud
️✔️latest
️✔️3.12
️✔️3.14
️✔️cognitiveservices
️✔️latest
️✔️3.12
️✔️3.14
️✔️compute_recommender
️✔️latest
️✔️3.12
️✔️3.14
️✔️computefleet
️✔️latest
️✔️3.12
️✔️3.14
️✔️config
️✔️latest
️✔️3.12
️✔️3.14
️✔️configure
️✔️latest
️✔️3.12
️✔️3.14
️✔️consumption
️✔️latest
️✔️3.12
️✔️3.14
️✔️container
️✔️latest
️✔️3.12
️✔️3.14
️✔️containerapp
️✔️latest
️✔️3.12
️✔️3.14
️✔️core
️✔️latest
️✔️3.12
️✔️3.14
️✔️cosmosdb
️✔️latest
️✔️3.12
️✔️3.14
️✔️databoxedge
️✔️latest
️✔️3.12
️✔️3.14
️✔️dls
️✔️latest
️✔️3.12
️✔️3.14
️✔️dms
️✔️latest
️✔️3.12
️✔️3.14
️✔️eventgrid
️✔️latest
️✔️3.12
️✔️3.14
️✔️eventhubs
️✔️latest
️✔️3.12
️✔️3.14
️✔️feedback
️✔️latest
️✔️3.12
️✔️3.14
️✔️find
️✔️latest
️✔️3.12
️✔️3.14
️✔️hdinsight
️✔️latest
️✔️3.12
️✔️3.14
️✔️identity
️✔️latest
️✔️3.12
️✔️3.14
️✔️iot
️✔️latest
️✔️3.12
️✔️3.14
️✔️keyvault
️✔️latest
️✔️3.12
️✔️3.14
️✔️lab
️✔️latest
️✔️3.12
️✔️3.14
️✔️managedservices
️✔️latest
️✔️3.12
️✔️3.14
️✔️maps
️✔️latest
️✔️3.12
️✔️3.14
️✔️marketplaceordering
️✔️latest
️✔️3.12
️✔️3.14
️✔️monitor
️✔️latest
️✔️3.12
️✔️3.14
️✔️mysql
️✔️latest
️✔️3.12
️✔️3.14
️✔️netappfiles
️✔️latest
️✔️3.12
️✔️3.14
️✔️network
️✔️latest
️✔️3.12
️✔️3.14
️✔️policyinsights
️✔️latest
️✔️3.12
️✔️3.14
️✔️postgresql
️✔️latest
️✔️3.12
️✔️3.14
️✔️privatedns
️✔️latest
️✔️3.12
️✔️3.14
️✔️profile
️✔️latest
️✔️3.12
️✔️3.14
️✔️rdbms
️✔️latest
️✔️3.12
️✔️3.14
️✔️redis
️✔️latest
️✔️3.12
️✔️3.14
️✔️relay
️✔️latest
️✔️3.12
️✔️3.14
️✔️resource
️✔️latest
️✔️3.12
️✔️3.14
️✔️role
️✔️latest
️✔️3.12
️✔️3.14
️✔️search
️✔️latest
️✔️3.12
️✔️3.14
️✔️security
️✔️latest
️✔️3.12
️✔️3.14
️✔️servicebus
️✔️latest
️✔️3.12
️✔️3.14
️✔️serviceconnector
️✔️latest
️✔️3.12
️✔️3.14
️✔️servicefabric
️✔️latest
️✔️3.12
️✔️3.14
️✔️signalr
️✔️latest
️✔️3.12
️✔️3.14
️✔️sql
️✔️latest
️✔️3.12
️✔️3.14
️✔️sqlvm
️✔️latest
️✔️3.12
️✔️3.14
️✔️storage
️✔️latest
️✔️3.12
️✔️3.14
️✔️synapse
️✔️latest
️✔️3.12
️✔️3.14
️✔️telemetry
️✔️latest
️✔️3.12
️✔️3.14
️✔️util
️✔️latest
️✔️3.12
️✔️3.14
️✔️vm
️✔️latest
️✔️3.12
️✔️3.14

@azure-client-tools-bot-prd

azure-client-tools-bot-prd Bot commented Jun 9, 2026

Copy link
Copy Markdown
⚠️AzureCLI-BreakingChangeTest
⚠️network
rule cmd_name rule_message suggest_message
⚠️ 1009 - ParaPropRemove network vnet list cmd network vnet list update parameter resource_group: removed property required=True

@microsoft-github-policy-service microsoft-github-policy-service Bot added the Auto-Assign Auto assign by bot label Jun 9, 2026
@huiii99 huiii99 marked this pull request as ready for review June 9, 2026 05:20
Copilot AI review requested due to automatic review settings June 9, 2026 05:20
@huiii99 huiii99 self-assigned this Jun 9, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-group optional again for network vnet list and routes to a subscription-level VirtualNetworksListAll operation when omitted.
  • Adds the subscription-scope VNet list resource/operation for API version 2025-07-01.
  • Updates scenario tests to exercise network vnet list without -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.

@necusjz necusjz changed the title [Network] az network vnet list: Restore support for listing all VNets without specifying --resource-group [Network] Fix #33502: az network vnet list: List all VNets without specifying --resource-group Jun 9, 2026
@yonzhan

yonzhan commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Network

@necusjz necusjz merged commit fdd76d0 into Azure:dev Jun 10, 2026
55 checks passed
@ruff3d

ruff3d commented Jun 19, 2026

Copy link
Copy Markdown

When will those changes appear in the release? I got a broken pipeline due to this

@yonzhan

yonzhan commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

The fix was already merged. and the next coming release is 2.88.0 on 07/07.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Auto-Assign Auto assign by bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Network] az network vnet list broken in 2.87.0: --resource-group wrongly required

5 participants