Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ACR] az acr connected-registry: Minor bug fixes #18288

Merged
merged 3 commits into from
Jun 10, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/azure-cli/azure/cli/command_modules/acr/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,9 +421,9 @@ def load_arguments(self, _): # pylint: disable=too-many-statements
with self.argument_context('acr connected-registry update') as c:
c.argument('log_level', help='Sets the log level for logging on the instance. Accepted log levels are Debug, Information, Warning, Error, and None.', required=False)
c.argument('add_client_token_list', options_list=['--add-client-tokens'], nargs='*', required=False,
help='Client tokens to be added. Use the format "--add-client-tokens [TOKEN_ID1 TOKEN_ID2 ...]" per token id.')
help='Client tokens to be added. Use the format "--add-client-tokens [TOKEN_NAME1 TOKEN_NAME2 ...]" per token id.')
c.argument('remove_client_token_list', options_list=['--remove-client-tokens'], nargs='*', required=False,
help='Client tokens to be removed. Use the format "--remove-client-tokens [TOKEN_ID1 TOKEN_ID2 ...]" per token id.')
help='Client tokens to be removed. Use the format "--remove-client-tokens [TOKEN_NAME1 TOKEN_NAME2 ...]" per token id.')
c.argument('sync_window', options_list=['--sync-window', '-w'], help='Used to determine the schedule duration. Uses ISO 8601 duration format.', required=False)
c.argument('sync_schedule', options_list=['--sync-schedule', '-s'], help='Optional parameter to define the sync schedule. Uses cron expression to determine the schedule. If not specified, the instance is considered always online and attempts to sync every minute.', required=False)
c.argument('sync_message_ttl', help='Determines how long the sync messages will be kept in the cloud. Uses ISO 8601 duration format.', required=False)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ def acr_connected_registry_create(cmd, # pylint: disable=too-many-locals, too-m
sync_audit_logs_enabled=False):

if bool(sync_token_name) == bool(repositories):
raise CLIError("usage error: you need to provide either --sync-token-name or --repository, but not both.")
raise CLIError("usage error: you must provide either --sync-token-name or --repository, but not both.")
# Check needed since the sync token gateway actions must be at least 5 characters long.
if len(connected_registry_name) < 5:
raise CLIError("argument error: Connected registry name must be at least 5 characters long")
registry, resource_group_name = get_registry_by_name(cmd.cli_ctx, registry_name, resource_group_name)
subscription_id = get_subscription_id(cmd.cli_ctx)

Expand Down