show-space quotes integer and doesn't work with id as argument

Bug #1862238 reported by Richard Harding
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Nam Nguyen

Bug Description

Some feedback on the show-space cli tool

show-space should also accept the space id. We list that first in the output and folks will try to do this

    juju spaces
    Space Name Subnets
    0 alpha
    1 default 10.0.0.0/24

    juju show-space 0
    {}
    ERROR cannot retrieve space "0": fetching space "space-0": space "0" not found

The space id I'm expecting to be an integer but it's output as a string?

    % juju show-space alpha
    space:
      id: "0"
      name: alpha
      subnets: []

Same with provider-id?

--help output tweaks

"Summary" Displays detailed information about a network space.

"Details"

Displays detailed information about a network space. Output includes the space subnets, applications with bindings to the space, and a count of machines connected to the space.

(if we have the verbose option still that was discussed we should include an example of that using the template below)
Examples:
<blank line>
Text explaining next example (ending in a colon).
<blank line>
<indent><command>
<blank line>

Changed in juju:
assignee: nobody → Nam Nguyen (nammn)
Revision history for this message
Nam Nguyen (nammn) wrote :

Provider-ID and ID were strings before in the other commands as well.
Internally we parse the ID as a string everywhere. Should we change that for the output?

E.g. (note that the default output of show-space is yaml)
juju spaces --format=yaml
juju list-machines --format yaml

Revision history for this message
Nam Nguyen (nammn) wrote :
Revision history for this message
Nam Nguyen (nammn) wrote :

After discussions with rharding we decided to omit the feature to search for ID.

The patch above only includes doc updates for cli examples.

Nam Nguyen (nammn)
Changed in juju:
status: Triaged → Fix Committed
Harry Pidcock (hpidcock)
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.