{ACR} Add --endpoint-protocol parameter to az acr update#33089
{ACR} Add --endpoint-protocol parameter to az acr update#33089
Conversation
Add support for configuring the endpoint protocol (IPv4 and/or IPv6) on Azure Container Registries via az acr update. Changes: - Add --endpoint-protocol parameter with enum values IPv4, IPv4AndIPv6 - Set instance.endpoint_protocol in acr_update_custom() when provided - Add help text example for updating endpoint protocol - Add test_acr_with_dual_stack_endpoints scenario test Requires azure-mgmt-containerregistry >= 15.1.0b1 with API version 2026-01-01-preview which includes the EndpointProtocol property on the Registry model. Validated on dogfood registry srcregistryaue (Australia East): - az acr update --endpoint-protocol IPv4AndIPv6 → success - az acr update --endpoint-protocol IPv4 → success Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
️✔️AzureCLI-FullTest
|
|
Hi @avtakkar, |
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
| rule | cmd_name | rule_message | suggest_message |
|---|---|---|---|
| acr update | cmd acr update added parameter endpoint_protocol |
|
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
Adds support in the ACR command module for configuring an Azure Container Registry’s endpoint protocol (IPv4 vs dual-stack) via az acr update.
Changes:
- Introduces
--endpoint-protocol(IPv4 / IPv4AndIPv6) toaz acr update. - Wires the new argument through
acr_update_custom()to setinstance.endpoint_protocol. - Adds CLI help example and a new scenario test for dual-stack endpoints.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/azure-cli/azure/cli/command_modules/acr/custom.py |
Sets endpoint_protocol on the update parameters when provided. |
src/azure-cli/azure/cli/command_modules/acr/_params.py |
Adds the --endpoint-protocol argument to acr update. |
src/azure-cli/azure/cli/command_modules/acr/_help.py |
Documents an example usage of --endpoint-protocol. |
src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands.py |
Adds a scenario test covering IPv4 ↔ dual-stack updates. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands.py
Show resolved
Hide resolved
…st as live_only - Add is_preview=True to --endpoint-protocol parameter since the underlying API version (2026-01-01-preview) is in preview - Mark test_acr_with_dual_stack_endpoints as @live_only() since it requires live Azure credentials for registry creation Addresses review comments from Copilot and CI test failures. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| with self.argument_context('acr update', arg_group='Network Rule') as c: | ||
| c.argument('data_endpoint_enabled', get_three_state_flag(), help="Enable dedicated data endpoint for client firewall configuration") | ||
| c.argument('endpoint_protocol', arg_type=get_enum_type(['IPv4', 'IPv4AndIPv6']), options_list=['--endpoint-protocol'], is_preview=True, help="The endpoint protocol (IPv4 and/or IPv6) for the registry.") |
There was a problem hiding this comment.
You might be clarify that we only support IPv4 and IPv4AndIPv6.
Add support for configuring the endpoint protocol (IPv4 and/or IPv6) on Azure Container Registries via az acr update.
Changes:
Requires azure-mgmt-containerregistry >= 15.1.0b1 with API version 2026-01-01-preview which includes the EndpointProtocol property on the Registry model.
Validated on dogfood registry srcregistryaue (Australia East):
Related command
Description
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.