Commit 03776d8
committed
compute: Fix 'server * -f yaml' output
Make use of 'FormattableColumn'-derived formatters, which provide better
output than what we were using before, particularly for the YAML output
format. For example, compare before for the 'server show' command:
$ openstack --os-compute-api-version 2.79 server show test-server -f yaml
...
addresses: private=fdff:77e3:9bb4:0:f816:3eff:fe6d:a944, 10.0.0.44
flavor: disk='1', ephemeral='0', extra_specs.hw_rng:allowed='True', original_name='m1.tiny',
ram='512', swap='0', vcpus='1'
...
To after:
$ openstack --os-compute-api-version 2.79 server show test-server -f yaml
...
addresses:
private:
- fdff:77e3:9bb4:0:f816:3eff:fe6d:a944
- 10.0.0.44
flavor:
disk: 1
ephemeral: 0
extra_specs:
hw_rng:allowed: 'True'
original_name: m1.tiny
ram: 512
swap: 0
vcpus: 1
...
Similarly, compare before for 'server list':
$ openstack --os-compute-api-version 2.79 server list -f yaml
- ...
Networks: private=fdff:77e3:9bb4:0:f816:3eff:fe6d:a944, 10.0.0.44
Power State: Running
Properties: ''
...
To after:
$ openstack --os-compute-api-version 2.79 server list -f yaml
- ...
Networks:
private:
- fdff:77e3:9bb4:0:f816:3eff:fe6d:a944
- 10.0.0.44
Power State: 1
Properties: {}
...
We also fix the human-readable output for the 'tags' field.
Before:
$ openstack --os-compute-api-version 2.79 server list
...
| tags | ['bar', 'foo'] |
After:
$ openstack --os-compute-api-version 2.79 server list
...
| tags | bar, foo |
Change-Id: I7a8349106e211c57c4577b75326b39b88bd9ac1e
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>1 parent f2c4914 commit 03776d8
4 files changed
Lines changed: 99 additions & 115 deletions
File tree
- openstackclient
- compute/v2
- tests
- functional/compute/v2
- unit/compute/v2
- releasenotes/notes
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
44 | | - | |
45 | | - | |
| 45 | + | |
| 46 | + | |
46 | 47 | | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | 48 | | |
67 | 49 | | |
68 | 50 | | |
| |||
74 | 56 | | |
75 | 57 | | |
76 | 58 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
81 | 64 | | |
82 | 65 | | |
83 | 66 | | |
| |||
169 | 152 | | |
170 | 153 | | |
171 | 154 | | |
172 | | - | |
| 155 | + | |
173 | 156 | | |
174 | 157 | | |
175 | 158 | | |
| |||
185 | 168 | | |
186 | 169 | | |
187 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
188 | 174 | | |
189 | 175 | | |
190 | | - | |
| 176 | + | |
191 | 177 | | |
192 | 178 | | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
| 179 | + | |
201 | 180 | | |
202 | 181 | | |
203 | 182 | | |
204 | 183 | | |
205 | 184 | | |
206 | 185 | | |
207 | 186 | | |
208 | | - | |
| 187 | + | |
209 | 188 | | |
210 | 189 | | |
211 | 190 | | |
| |||
1873 | 1852 | | |
1874 | 1853 | | |
1875 | 1854 | | |
1876 | | - | |
1877 | | - | |
1878 | | - | |
1879 | | - | |
| 1855 | + | |
| 1856 | + | |
| 1857 | + | |
1880 | 1858 | | |
1881 | 1859 | | |
1882 | 1860 | | |
| |||
Lines changed: 14 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
346 | 347 | | |
347 | 348 | | |
348 | 349 | | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
349 | 358 | | |
350 | 359 | | |
351 | 360 | | |
| |||
387 | 396 | | |
388 | 397 | | |
389 | 398 | | |
390 | | - | |
| 399 | + | |
391 | 400 | | |
392 | 401 | | |
393 | 402 | | |
| |||
397 | 406 | | |
398 | 407 | | |
399 | 408 | | |
400 | | - | |
| 409 | + | |
401 | 410 | | |
402 | 411 | | |
403 | 412 | | |
| |||
417 | 426 | | |
418 | 427 | | |
419 | 428 | | |
420 | | - | |
| 429 | + | |
421 | 430 | | |
422 | 431 | | |
423 | 432 | | |
| |||
431 | 440 | | |
432 | 441 | | |
433 | 442 | | |
434 | | - | |
| 443 | + | |
435 | 444 | | |
436 | 445 | | |
437 | 446 | | |
| |||
856 | 865 | | |
857 | 866 | | |
858 | 867 | | |
859 | | - | |
860 | | - | |
| 868 | + | |
861 | 869 | | |
862 | 870 | | |
863 | 871 | | |
| |||
0 commit comments