$ craton host-list -r 1
+---------+----+-------------+-------------------------------------+--------+
| cell_id | id | device_type | name | active |
+---------+----+-------------+-------------------------------------+--------+
| 1 | 2 | server | host0.ORD135.C0001.C-1.example1.com | True |
| 1 | 3 | server | host1.ORD135.C0001.C-1.example1.com | True |
| 1 | 4 | server | host0.ORD135.C0001.C-2.example2.com | True |
| 1 | 5 | server | host1.ORD135.C0001.C-2.example2.com | True |
| 2 | 7 | server | host0.ORD135.C0002.C-1.example1.com | True |
| 2 | 8 | server | host1.ORD135.C0002.C-1.example1.com | True |
| 2 | 9 | server | host0.ORD135.C0002.C-2.example2.com | True |
| 2 | 10 | server | host1.ORD135.C0002.C-2.example2.com | True |
+---------+----+-------------+-------------------------------------+--------+
$ craton host-list -r 2
+---------+----------------------------------+----+-------------+--------+
| cell_id | name | id | device_type | active |
+---------+----------------------------------+----+-------------+--------+
| 3 | host0.DFW.C0001.C-1.example1.com | 12 | server | True |
| 3 | host0.DFW.C0001.C-2.example2.com | 14 | server | True |
| 3 | host1.DFW.C0001.C-1.example1.com | 13 | server | True |
| 3 | host1.DFW.C0001.C-2.example2.com | 15 | server | True |
| 4 | host1.DFW.C0002.C-2.example2.com | 20 | server | True |
+---------+----------------------------------+----+-------------+--------+
Reviewed: https:/ /review. openstack. org/440810 /git.openstack. org/cgit/ openstack/ python- cratonclient/ commit/ ?id=683f3425069 eed5aa792fad236 8873d0e5140da8
Committed: https:/
Submitter: Jenkins
Branch: master
commit 683f3425069eed5 aa792fad2368873 d0e5140da8
Author: Ian Cordasco <email address hidden>
Date: Thu Mar 2 15:01:09 2017 -0600
Make column ordering consistent and predictable
This changes how we sort columns in listings and how we display the
column headings. The default columns are now stored as lists so that
they are the same from run to run. This simplifies some of the logic in
the shell modules as well. Instead of keeping static mappings of
attributes to column headings, we now use some simple python logic, to
title case the columns.
This commit covers:
- cell-* commands
- cloud-* commands
- host-* commands
- project-* commands
- region-* commands
Finally, we noticed that the cloud-list and region-list commands were
behaving differently from the rest of the -list commands. This
unifies the interface to add the --detail flag.
Closes-bug: #1659103 b9ba93ecf54a7bc f6db5ddfa1c
Closes-bug: #1659427
Closes-bug: #1668221
Change-Id: If5906780e501c7