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] Add a validator for argument 'registry_name' #12685

Merged
merged 2 commits into from
Mar 23, 2020
Merged

[ACR] Add a validator for argument 'registry_name' #12685

merged 2 commits into from
Mar 23, 2020

Conversation

Wwwsylvia
Copy link
Contributor

@Wwwsylvia Wwwsylvia commented Mar 20, 2020

Resolve #12631
Add a validator for argument 'registry_name' to omit login server endpoint suffix.
The validator applies to all az acr commands, except az acr create and az acr check-name.

Behavior
(specify registry name with --registry)
image

(specify login server with --registry)
image

(specify login server with --name)
image

History Notes:
(Fill in the following template if multiple notes are needed, otherwise PR title will be used for history note.)

[Component Name 1] (BREAKING CHANGE:) (az command:) make some customer-facing change.
[Component Name 2] (BREAKING CHANGE:) (az command:) make some customer-facing change.


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

@arrownj arrownj self-requested a review March 20, 2020 09:04
"""Omit login server endpoint suffix."""
registry = namespace.registry_name
if registry:
suffix = cmd.cli_ctx.cloud.suffixes.acr_login_server_endpoint
Copy link
Contributor

Choose a reason for hiding this comment

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

seems not all clouds define the acr_login_server_endpoint(AzureGermanCloud), it's better to have an empty check here.

Copy link
Contributor Author

@Wwwsylvia Wwwsylvia Mar 20, 2020

Choose a reason for hiding this comment

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

Thanks for the comment! How about suffixes? Are there any documentation I can refer?

Copy link
Contributor

Choose a reason for hiding this comment

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

AzureGermanCloud is defined here,

. You can also find the other default clouds definition in the same file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's very helpful, thanks a lot!

@yungezz yungezz added the ACR label Mar 20, 2020
@yungezz yungezz added this to the S167 milestone Mar 20, 2020
@Wwwsylvia Wwwsylvia requested a review from arrownj March 23, 2020 06:39
@yungezz
Copy link
Member

yungezz commented Mar 23, 2020

HI @Wwwsylvia just fyi, next azure CLI release CC date is 3/25 UTC +8, pls help to address comments and let us know when the PR ready for reviewing/merging.

Copy link
Contributor

@arrownj arrownj left a comment

Choose a reason for hiding this comment

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

LGTM

@arrownj arrownj merged commit 16687c5 into Azure:dev Mar 23, 2020
@Wwwsylvia
Copy link
Contributor Author

HI @Wwwsylvia just fyi, next azure CLI release CC date is 3/25 UTC +8, pls help to address comments and let us know when the PR ready for reviewing/merging.

Noted, thanks!

@Wwwsylvia Wwwsylvia deleted the lixlei/omit-endpoint-suffix branch March 24, 2020 01:19
@ghost ghost added Container Registry az acr and removed ACR labels Jun 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Omit login server endpoint for --registry on az acr
3 participants