Ask Your Question

listing column which contains space

asked 2019-06-07 02:11:32 -0500

spn221 gravatar image


Trying to get the ouput for a limited set of columns in the below cli

openstack server list -c ID -c Name -c 'Power Status' openstack server list -c ID -c Name -c "Power Status"

No matter, what i try the column does not get listed at all

if i run command openstack server list --long I get below columns in output

| ID | Name | Status | Task State | Power State | Networks | Image Name | Image ID | Availability Zone | Host | Properties

there is no man page that i can search for the actual column name and help "openstack help server list" does not display any help.

this sounds very silly and simple, but my google search has not helped.

could anyone please help?

edit retag flag offensive close merge delete


The columns that can be selected with the -c option are, unfortunately, not documented (or not well), but how about trying Power State instead of Power Status?

Or perhaps the field name from the server show command works, something like OS-EXT-STS:power_state.

Bernd Bausch gravatar imageBernd Bausch ( 2019-06-07 02:23:58 -0500 )edit

Tried that too: - no luck, it does not look like a legal column

openstack server list -c ID -c Name -c OS-EXT-STS:power_state

spn221 gravatar imagespn221 ( 2019-06-07 03:27:13 -0500 )edit

In conclusion, the openstack client's column selection has room for improvement.

Bernd Bausch gravatar imageBernd Bausch ( 2019-06-07 03:43:59 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2019-06-07 05:07:37 -0500

spn221 gravatar image

The command : openstack server show <name of="" instance=""> -c OS-EXT-STS:power_state is the closest we can get

The same command - does not work with openstack server list --all-projects -c Name -c OS-EXT-STS:power_state

it seems a bug or documentation issue - the columns are case sensitive - however in output of "openstack server show" the name is "name", but if given as filter, it should be "Name"

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2019-06-07 02:11:32 -0500

Seen: 299 times

Last updated: Jun 07 '19