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

token create: help output update #481

Closed
wants to merge 2 commits into from

Conversation

jyanko
Copy link

@jyanko jyanko commented Oct 12, 2022

Related to issue: #480

  • update to token create subcommand's help output to reference comma delim rather than space delim.
  • functionality verified with rd cli v2.0.3, rundeck enterprise v4.5.0-20220811, and API v41

@sonatype-lift
Copy link

sonatype-lift bot commented Oct 12, 2022

⚠️ 5 God Classes were detected by Lift in this project. Visit the Lift web console for more details.

@jyanko
Copy link
Author

jyanko commented Oct 13, 2022

note: bumped the noted api version back to v19+ as I've been informed that this comma delim should work since that version

@gschueler
Copy link
Member

@jyanko the CLI tool parses the input based on space-separated values (although you could use multiple option flags as well), e.g.:
rd tokens create -u bob -r role1 role2 or rd tokens create -u bob -r role1 -r role2

both result in a request to the API of {"user":"bob","roles":["role1","role2"]}. This is the correct usage.

However, I realize that if you use a comma, you may not get the result you expect, as in:

rd tokens create -u bob -r role1,role2 results in a request with {"user":"bob","roles":["role1,role2"]}

but

rd tokens create -u bob -r role1, role2 (notice the space) results in a request with {"user":"bob","roles":["role1,","role2"]} (notice the extra comma)

@gschueler gschueler closed this Dec 12, 2022
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.

2 participants