[Compute]Make column content readable for both human and machine
Currently, we use utils.format_dict(), utils.format_list(),
utils.format_list_of_dicts to make column value can be easy to read by
human, but osc support to format the CLI output into several format,
like: json, shell, csv, yaml, most of these should be understand by
program and code, so keeping the column content as the original value
make sense, like {u'name': u'RuiChen'} than name='RuiChen'
Reviewed: https:/ /review. openstack. org/493814 /git.openstack. org/cgit/ openstack/ python- openstackclient /commit/ ?id=ff9bd34b3c6 3c22c96d7a07119 39828a38f003d8
Committed: https:/
Submitter: Jenkins
Branch: feature/osc4
commit ff9bd34b3c63c22 c96d7a071193982 8a38f003d8
Author: Rui Chen <email address hidden>
Date: Fri Mar 10 17:32:44 2017 +0800
[Compute]Make column content readable for both human and machine
Currently, we use utils.format_ dict(), utils.format_ list(), format_ list_of_ dicts to make column value can be easy to read by
utils.
human, but osc support to format the CLI output into several format,
like: json, shell, csv, yaml, most of these should be understand by
program and code, so keeping the column content as the original value
make sense, like {u'name': u'RuiChen'} than name='RuiChen'
The patch include all compute commands.
Change-Id: I313a52f9489562 5e6045df8703208 40fee157759 -columns
Implements: blueprint osc-formattable
Partial-Bug: #1538015
Partial-Bug: #1538006