aks-preview: Change NAT gateway V2 outbound IPs/prefixes to comma-separated#9760
Conversation
|
| rule | cmd_name | rule_message | suggest_message |
|---|---|---|---|
| aks create | cmd aks create update parameter nat_gateway_outbound_ip_ids: removed property nargs=+ |
||
| aks create | cmd aks create update parameter nat_gateway_outbound_ip_prefix_ids: removed property nargs=+ |
||
| aks update | cmd aks update update parameter nat_gateway_outbound_ip_ids: removed property nargs=+ |
||
| aks update | cmd aks update update parameter nat_gateway_outbound_ip_prefix_ids: removed property nargs=+ |
|
Hi @christine33-creator, |
|
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>
|
CodeGen Tools Feedback CollectionThank you for using our CodeGen tool. We value your feedback, and we would like to know how we can improve our product. Please take a few minutes to fill our codegen survey |
|
8698a25 to
b1ad63b
Compare
There was a problem hiding this comment.
Pull request overview
This PR updates the aks-preview extension’s NAT Gateway V2 CLI parameters to accept comma-separated outbound public IP / IP prefix resource IDs (aligning with the existing load balancer outbound IP parameter pattern).
Changes:
- Change
--nat-gateway-outbound-ips/--nat-gateway-outbound-ip-prefixesfromnargs='+'(space-separated) to a single comma-separated string argument. - Update NAT gateway profile construction to split comma-separated strings into lists.
- Bump extension version and update changelog; adjust unit tests for the new input type.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/aks-preview/setup.py | Bumps extension version to 19.0.0b30. |
| src/aks-preview/HISTORY.rst | Adds 19.0.0b30 release notes entry for the CLI parameter format change. |
| src/aks-preview/azext_aks_preview/tests/latest/test_natgateway.py | Updates unit tests to pass string values for outbound IP / prefix IDs. |
| src/aks-preview/azext_aks_preview/_params.py | Updates CLI argument definitions and help text to indicate comma-separated input. |
| src/aks-preview/azext_aks_preview/_natgateway.py | Parses comma-separated strings into lists when building NAT gateway profiles. |
c2321f7 to
a2de17e
Compare
src/aks-preview/HISTORY.rst
Outdated
| * Fix monitoring addon key casing compatibility with azure-cli/acs | ||
| * `az aks create/update`: Add `--outbound-type managedNATGatewayV2` support using Azure NAT Gateway Standard V2 SKU with IPv6, user-provided IPs, and IP prefixes. | ||
| * `az aks create/update`: Fix `--outbound-type managedNATGatewayV2` being silently overwritten to `loadBalancer` by the dynamic completion logic. | ||
| * `az aks create/update`: Change `--nat-gateway-outbound-ips` and `--nat-gateway-outbound-ip-prefixes` to use comma-separated values, consistent with load balancer outbound IP parameters. |
There was a problem hiding this comment.
duplicated with what's written under 19.0.0b30?
There was a problem hiding this comment.
fixed, thank you.
src/aks-preview/HISTORY.rst
Outdated
| Pending | ||
| +++++++ | ||
|
|
||
| 19.0.0b30 |
There was a problem hiding this comment.
The current change is a breaking change. Please update the major version (to 20.0.0b1) and leave a note with [Breaking Change] as prefix.
There was a problem hiding this comment.
done, updated the version and left a note with Breaking Change as prefix.
…arated Change --nat-gateway-outbound-ips and --nat-gateway-outbound-ip-prefixes from space-separated (nargs='+') to comma-separated string input, matching the existing load balancer outbound IP parameter pattern (--load-balancer-outbound-ips). Before: az aks create --nat-gateway-outbound-ips id1 id2 After: az aks create --nat-gateway-outbound-ips id1,id2
a2de17e to
25d066e
Compare
Change --nat-gateway-outbound-ips and --nat-gateway-outbound-ip-prefixes from space-separated (nargs='+') to comma-separated string input, matching the existing load balancer outbound IP parameter pattern (--load-balancer-outbound-ips).
Before: az aks create --nat-gateway-outbound-ips id1 id2
After: az aks create --nat-gateway-outbound-ips id1,id2
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally? (pip install wheel==0.30.0required)For new extensions:
About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update
src/index.jsonautomatically.You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify
src/index.json.