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

JSON format includes description for project list #68

Closed
gschueler opened this issue Feb 2, 2017 · 1 comment
Closed

JSON format includes description for project list #68

gschueler opened this issue Feb 2, 2017 · 1 comment

Comments

@gschueler
Copy link
Member

original: rundeck/rundeck#2303

Bug report

This may not be a bug but a functionality issue.

When invoking the command projects from the rd utility with RD_FORMAT=json the project name and project description are concatenated. Trying using -v option won't work. One should expect to receive a JSON object with not mixed values.

My Rundeck detail

  • Rundeck version: 2.7.1 and rundeck-cli-1.0.5-1
  • install type: rpm
  • OS Name/version: RHEL 7

Expected Behavior

It's expected to receive as output project names, like the following:

$ RD_FORMAT=json rd projects
[ "ProjectA", "ProjectB", "ProjectC" ] 

or in the best case:

$ RD_FORMAT=json rd projects -v
[
   { "name": "ProjectA", "description": "ProjectA description" },
   { "name": "ProjectB", "description": "ProjectB description" },
   { "name": "ProjectC", "description": "ProjectC description" },
]

Actual Behavior

Each element of the array is being concatenated with project description, just like:

$ RD_FORMAT=json rd projects
[ "ProjectA: ProjectA description", "ProjectB: ProjectB description", "ProjectC: ProjectC description" ]

How to reproduce Behavior

Run rd projects

@gschueler
Copy link
Member Author

It should allow the -%/--outformat flag for text output, and default to more sensible json output

gschueler added a commit that referenced this issue Feb 2, 2017
Fix #68 improve projects list output
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

No branches or pull requests

1 participant