Skip to content

Conversation

@bim-msft
Copy link
Contributor

@bim-msft bim-msft commented Dec 10, 2019


Fix #8921

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

  • The PR has modified HISTORY.rst describing any customer-facing, functional changes. Note that this does not include changes only to help content. (see Modifying change log).

  • I adhere to the Command Guidelines.

@bim-msft
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).


for scope in ['list', 'list-deleted', 'list-versions']:
with self.argument_context('keyvault key {}'.format(scope)) as c:
c.argument('maxresults', options_list=['--maxresults'], type=int)
Copy link
Member

Choose a reason for hiding this comment

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

is it necessary to set a upper limit on maxresults?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

What would happen if maxresults passed in is greater than 25?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@fengzhou-msft CLI will throw an error message:

(env3) D:\repos\azure-cli>az keyvault secret list --vault-name bim-foo --maxresults 100
Parameter 'maxresults' must be less than 25.

Copy link
Member

Choose a reason for hiding this comment

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

Ok. At least users know the limit from the error message. If you could put it in help text, that will be more clear, just a suggestion though.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@fengzhou-msft Yes, I agree. I think it's a better idea that the upcoming CLI codegen system auto-generates such type of help messages from swagger file.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Good to know that you will collect all these feedbacks and backpropagate to CodeGen team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Command az keyvault key/secret/certificate list/list-deleted/list-versions with parameter --maxresults do not work as intended

4 participants