Skip to content

Commit 639e80d

Browse files
committed
[ACR] az acr replication create/update: Add breaking changes announcement
1 parent 2d9be6b commit 639e80d

2 files changed

Lines changed: 13 additions & 3 deletions

File tree

src/azure-cli/azure/cli/command_modules/acr/_breaking_change.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# --------------------------------------------------------------------------------------------
55

66
from azure.cli.core.breaking_change import (
7+
register_argument_deprecate,
78
register_command_group_deprecate,
89
register_logic_breaking_change
910
)
@@ -41,3 +42,8 @@
4142
detail='The `--status enabled` parameter will no longer be accepted and will result in '
4243
'an error due to Docker Content Trust deprecation.',
4344
doc_link='https://aka.ms/acr/dctdeprecation')
45+
46+
register_argument_deprecate('acr replication create', '--region-endpoint-enabled',
47+
redirect='--global-endpoint-routing')
48+
register_argument_deprecate('acr replication update', '--region-endpoint-enabled',
49+
redirect='--global-endpoint-routing')

src/azure-cli/azure/cli/command_modules/acr/_params.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,12 +299,16 @@ def load_arguments(self, _): # pylint: disable=too-many-statements
299299
c.argument('replication_name', help='The name of the replication. Default to the location name.', completer=None)
300300

301301
for scope in ['acr replication create', 'acr replication update']:
302-
help_str = "Allow routing to this replication. Requests will not be routed to a disabled replication." \
303-
" Data syncing will continue regardless of the region endpoint status."
302+
help_str = "Allow routing to this replication via the global endpoint. Requests will not be routed to a" \
303+
" disabled replication. Data syncing will continue regardless of the routing status."
304304
help_str += ' Default: true.' if 'create' in scope else '' # suffix help with default if command is for create
305305

306306
with self.argument_context(scope) as c:
307-
c.argument('region_endpoint_enabled', arg_type=get_three_state_flag(), help=help_str, is_preview=True)
307+
c.argument('region_endpoint_enabled',
308+
options_list=['--global-endpoint-routing',
309+
c.deprecate(target='--region-endpoint-enabled',
310+
redirect='--global-endpoint-routing')],
311+
arg_type=get_three_state_flag(), help=help_str)
308312

309313
with self.argument_context('acr run') as c:
310314
c.argument('registry_name', options_list=['--registry', '-r'])

0 commit comments

Comments
 (0)