-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
rename to --admin-enabled on update/create for acr operations #1276
Conversation
@skkestrel #1269 has been merged. |
cd5f062
to
dca0f0c
Compare
Tests have been updated to match with the changed flag, with a few other description changes to match Swagger. |
0624617
to
a6b1f3d
Compare
CI known issue, should be fixed #1285. I am restarting it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Recommend highly you don't confuse your users by having two ways of updating a thing: the create command (which 'updates' by overwriting) and the update command (which patches).
show : Get a container registry. | ||
update : Update a container registry. | ||
check-name: Checks whether the container registry name is available for use. | ||
create : Creates or updates a container registry with the specified parameters. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While I recognize the SDK call is "create_or_update", it will confuse users as to why you have a command called create that "creates or updates" and a command called update that just updates--and why they update differently. I would keep the help the same as it was--i.e. that it just creates (and you can then drop the 'with the specified parameters' part because that is implied in all commands).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agreed that it might be confusing to the user. This description was meant to match what the actual behavior is. If the user "creates" an existing registry with different properties, it is indeed an update, while in update command, all parameters are optional. VM has similar behaviors in their create command.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't update so much as overwrite. Every create in the CLI that is backed by a PUT does the same thing, but we don't advertise that because it will confuse and/or frustrate users. Invariably someone will just use 'create' to update something and then be suprised when some optional parameter was thrown away instead of being left alone.
|
||
Create a container registry | ||
------------- | ||
:: | ||
|
||
Command | ||
az acr create: Create a container registry. | ||
az acr create: Creates or updates a container registry with the specified parameters. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment here. I think this will confuse and frustrate more than help.
existing tags. | ||
|
||
--name -n [Required]: The name of the container registry. | ||
--admin-enabled : The value that indicates whether the admin user is enabled. Allowed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could make this more concise. "Indicates whether the admin user is enabled."
enable_admin=False): | ||
'''Create a container registry. | ||
admin_enabled='false'): | ||
'''Creates or updates a container registry with the specified parameters. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here. PUT doesn't really "update" so much as "overwrite existing", which is different from your actual update command.
This PR renames --admin-user-enabled to --admin-enabled on create and update operations.
Usage:
Also removed short flags -a and -s in readme for update operation. Additionally, updates descriptions to match new swagger file.