juju list-credentials inconsistencies between format output

Bug #1552274 reported by Adam Stokes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Anastasia

Bug Description

The format output for both yaml and json for list-credentials are inconsistent:

😀 adam@deadpool:conjure 🌴 juju list-credentials --format yaml
credentials:
  conjure:
    adam:
      auth-type: oauth1
      maas-oauth: aaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbb

😀 adam@deadpool:conjure 🌴 juju list-credentials --format json
{"credentials":{"conjure":{"DefaultCredential":"","DefaultRegion":"","AuthCredentials":{"adam":{}}}}}

😀 adam@deadpool:conjure 🌴 juju list-credentials
CLOUD CREDENTIALS
conjure adam

I'm guessing the JSON output should match the YAML one

description: updated
Changed in juju-core:
status: New → Incomplete
status: Incomplete → Triaged
importance: Undecided → High
tags: added: juju-release-support
Changed in juju-core:
milestone: none → 2.0-beta4
tags: added: conjure
tags: added: 2.0-count
Changed in juju-core:
milestone: 2.0-beta4 → 2.0.1
tags: added: usability
tags: added: rc1
Changed in juju-core:
milestone: 2.0.1 → 2.0-beta7
Curtis Hovey (sinzui)
Changed in juju-core:
milestone: 2.0-beta7 → 2.0-beta8
Changed in juju-core:
milestone: 2.0-beta8 → 2.0-rc1
tags: added: bitesize
Revision history for this message
Cheryl Jennings (cherylj) wrote :

Looked at this briefly last week, and the CloudCredential struct is missing json tags. However, it's a bit more complicated because we are using the 'inline' tag for yaml, and there doesn't seem to be an equivalent in json.

Nate Finch (natefinch)
Changed in juju-core:
assignee: nobody → Nate Finch (natefinch)
status: Triaged → In Progress
Changed in juju-core:
milestone: 2.0-rc1 → 2.0.0
affects: juju-core → juju
Changed in juju:
milestone: 2.0.0 → none
milestone: none → 2.0.0
Changed in juju:
assignee: Nate Finch (natefinch) → Anastasia (anastasia-macmood)
Revision history for this message
Anastasia (anastasia-macmood) wrote :

PR: https://github.com/juju/juju/pull/6274

With this fix, json output above would be:

{"credentials":{"conjure":{"cloud-credentials":{"adam":{}}}}}

Revision history for this message
Anastasia (anastasia-macmood) wrote :

Correction to output in comment #2 \o/

Of course, there would be details for "adam" as in

{"credentials":{"conjure":{"cloud-credentials":{"adam":{"auth-type":"oauth1","maas-oauth":"aaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbb"}}}}}

Changed in juju:
status: In Progress → Fix Committed
milestone: 2.0.0 → 2.0-rc1
Curtis Hovey (sinzui)
Changed in juju:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.