Ask Your Question
0

openstack client: list of valid columns?

asked 2017-02-16 21:57:39 -0600

Many openstack client commands (in particular the list type commands) have a -c option by which the displayed columns can be selected. I have, however, not found what columns are valid. Recent example:

$ openstack hypervisor list -c id -c free_disk_gb 
No recognized column names in [u'id', u'free_disk_gb']

Although these columns exist:

$ openstack hypervisor show 1 | grep -e id -e free_disk_gb
| free_disk_gb         | 52                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
| id                   | 1

(output shortened)

Are the valid columns documented somewhere, or is there a command that tells me what columns are available?

edit retag flag offensive close merge delete

Comments

1

The only commands that I am aware of that supporte columns 'properly' (to use the parameters from 'show') are neutron net-list/subnet-list (eg. neutron net-list -c name -c subnets -c provider:segmentation_id). With openstack client, I remember checking it was quite the same, only some Neutron stuff

volenbovsky gravatar imagevolenbovsky ( 2017-02-17 05:39:13 -0600 )edit

Well, the openstack client still has room for improvement, I guess. Thanks for confirming my thinking :)

Bernd Bausch gravatar imageBernd Bausch ( 2017-02-17 18:05:01 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-08-02 17:23:14 -0600

mihait gravatar image

Found it :)

Use the following command: openstack server list --all-projects --long

Column headers can be used with -c flag, at least for what i'm trying to do (limitting output of openstack server list command).

Sample command: openstack server list --all-project -f table --long -c Name -c Status -c Networks -c 'Availability Zone'

edit flag offensive delete link more

Comments

This works oddly. 'Host' is an item in that list and will only work with --long. That says that there's a whole bunch of column names you can't list in a table, if they don't appear with --long.

ijw-ubuntu gravatar imageijw-ubuntu ( 2018-01-29 09:58:35 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2017-02-16 21:57:39 -0600

Seen: 2,145 times

Last updated: Aug 02 '17