Skip to content

{Network} StandardV2 for NAT Gateway and Public IP#31532

Merged
necusjz merged 7 commits intoAzure:devfrom
cxznmhdcxz:standardV2-for-nat-gateway-and-public-ip
May 29, 2025
Merged

{Network} StandardV2 for NAT Gateway and Public IP#31532
necusjz merged 7 commits intoAzure:devfrom
cxznmhdcxz:standardV2-for-nat-gateway-and-public-ip

Conversation

@cxznmhdcxz
Copy link
Copy Markdown
Member

@cxznmhdcxz cxznmhdcxz commented May 22, 2025

Related command

az network nat gateway create/delete/list/show/update
az network public-ip create/delete/list/show/update
az network public-ip prefix create/delete/list/show/update

Description

resolve #31245
aaz Azure/aaz#772
Testing Guide

History Notes

[Network] az network nat gateway: Support Standard V2 SKU
[Network] az network public-ip: Support Standard V2 SKU
[Network] az network public-ip prefix: Support Standard V2 SKU


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

@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd bot commented May 22, 2025

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

@azure-client-tools-bot-prd
Copy link
Copy Markdown

Hi @cxznmhdcxz,
Since the current milestone time is less than 7 days, this pr will be reviewed in the next milestone.

@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd bot commented May 22, 2025

⚠️AzureCLI-BreakingChangeTest
⚠️network
rule cmd_name rule_message suggest_message
⚠️ 1006 - ParaAdd network public-ip prefix create cmd network public-ip prefix create added parameter sku
⚠️ 1010 - ParaPropUpdate network public-ip update cmd network public-ip update update parameter sku: updated property choices from ['Basic', 'Standard'] to ['Basic', 'Standard', 'StandardV2']

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented May 22, 2025

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link
Copy Markdown

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).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

@cxznmhdcxz cxznmhdcxz marked this pull request as ready for review May 28, 2025 08:16
Copilot AI review requested due to automatic review settings May 28, 2025 08:16
Copy link
Copy Markdown
Contributor

Copilot AI left a 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 updates network commands to API version 2024-07-01, adds StandardV2 SKU support, and introduces IPv6 and source virtual network properties across NAT gateway, Public IP, and Public IP prefix commands.

  • Bump all relevant API-version strings from 2022-09-01/2022-11-01/2022-01-01 to 2024-07-01
  • Add enums for StandardV2 SKU and CLI arguments for IPv6 addresses/prefixes and sourceVirtualNetwork
  • Update schema and helper methods to include public_ip_addresses_v6, public_ip_prefixes_v6, source_virtual_network, and mark new read-only flags
  • Fix resource group vs. subscription scope logic in list commands
  • Update test recordings to use the new API version

Reviewed Changes

Copilot reviewed 141 out of 141 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
public_ip/prefix/_show.py API version bump & added v6 and sourceVirtualNetwork
public_ip/prefix/_list.py Listing logic fix, API bump & added v6 properties
public_ip/prefix/_create.py, _update.py New StandardV2 enum, IPv6 args & sourceVirtualNetwork
network/public_ip/_create.py, _update.py StandardV2 SKU, IPv6 args, schema updates
network/nat/gateway/_create.py, _update.py StandardV2 SKU, IPv6 args, sub-resource helpers
Tests: monitor & acs recording YAMLs Updated api-version strings
Comments suppressed due to low confidence (2)

src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/public_ip/prefix/_create.py:142

  • Tests for the new StandardV2 SKU should be added to verify correct CLI behavior and generated ARM templates when this SKU is selected.
enum={"Standard": "Standard", "StandardV2": "StandardV2"},

src/azure-cli/azure/cli/command_modules/monitor/tests/latest/recordings/test_monitor_clone_public_ip_metric_alerts_scenario.yaml:69

  • [nitpick] Manual API-version updates across many recording files are error-prone; consider centralizing the version in a constant or template to simplify future bumps.
uri: https://management.azure.com/.../publicIPAddresses/ip1?api-version=2024-07-01

)
nat_gateway.public_ip_prefixes_v6 = AAZListArg(
options=["public-ip-prefixes-v6"],
help="An array of public ip prefixes V6 associated with the nat gateway resource.",
Copy link

Copilot AI May 28, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider using the standard term 'IPv6' instead of 'V6' for clarity, e.g., "An array of IPv6 public IP prefixes associated with the NAT gateway."

Suggested change
help="An array of public ip prefixes V6 associated with the nat gateway resource.",
help="An array of public IPv6 prefixes associated with the nat gateway resource.",

Copilot uses AI. Check for mistakes.
Comment on lines +54 to +58
condition_0 = has_value(self.ctx.subscription_id) and has_value(self.ctx.args.resource_group) is not True
condition_1 = has_value(self.ctx.args.resource_group) and has_value(self.ctx.subscription_id)
if condition_0:
self.PublicIPPrefixesList(ctx=self.ctx)()
if condition_1:
self.PublicIPPrefixesListAll(ctx=self.ctx)()
if condition_1:
Copy link

Copilot AI May 28, 2025

Choose a reason for hiding this comment

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

[nitpick] The naming of condition_0/condition_1 is not descriptive; consider renaming to is_tenant_scope and is_rg_scope (or similar) to clarify their intent.

Copilot uses AI. Check for mistakes.
@necusjz necusjz changed the title [Network] StandardV2 for NAT Gateway and Public IP {Network} StandardV2 for NAT Gateway and Public IP May 29, 2025
@necusjz necusjz merged commit 1f27224 into Azure:dev May 29, 2025
49 checks passed
@aimee-littleton
Copy link
Copy Markdown

@necusjz @cxznmhdcxz - We need to push out when we publish these changes. GA is now delayed and will no longer make June 30 target date. I'm working on getting new GA date, can update as soon as I know. Thanks

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 Network az network vnet/lb/nic/dns/etc...

Projects

None yet

Development

Successfully merging this pull request may close these issues.

StandardV2 NAT Gateway and StandardV2 Public IPs CLI New Feature Work Request

6 participants