Scriptable formatting
This needs to be better:
[root@wn26 ~(keystone_admin)]# openstack server list | awk '{print $2}'
ID
d99cc6fd-
b5234948-
d1a1cb68-
d9fc3956-
0c1b6618-
e11595ed-
[root@wn26 ~(keystone_admin)]#
Blueprint information
- Status:
- Complete
- Approver:
- None
- Priority:
- Undefined
- Drafter:
- Kevin Fox
- Direction:
- Needs approval
- Assignee:
- None
- Definition:
- Obsolete
- Series goal:
- None
- Implementation:
- Unknown
- Milestone target:
- None
- Started by
- Completed by
- Dean Troyer
Related branches
Related bugs
Sprints
Whiteboard
Could use cliff's formatters, it at least gets rid of the nasty awk usage,
$ openstack user list -c ID
+------
| ID |
+------
| 56ec46a97599484
| 5e86b418db25424
| 612eff36341e448
| 9f17c5bea47148d
| b8ee00c6d45a40d
| cf8bc4da4f5b43c
| e12f71c46b3b442
| e43c48c3a39d460
+------
Also:
$ openstack user list -c ID -f csv
"ID"
"56ec46a9759948
"5e86b418db2542
"612eff36341e44
"9f17c5bea47148
"b8ee00c6d45a40
"cf8bc4da4f5b43
"e12f71c46b3b44
"e43c48c3a39d46
And ...
$ openstack user list -c ID -f csv --quote none
ID
56ec46a97599484
5e86b418db25424
612eff36341e448
9f17c5bea47148d
b8ee00c6d45a40d
cf8bc4da4f5b43c
e12f71c46b3b442
e43c48c3a39d460
Maybe we can add an option to cliff to get rid of the column headers, in which case this is more of a bug, not a blueprint
-------
kfox1111: Yeah. -f csv or something would be good. Having an option to turn off headers would help. --quote none should not be needed. csv parsers support optional quotes for times where there are no coma's to escape. So something like:
$openstack user list -c ID -f csv --noheader
56ec46a97599484
5e86b418db25424
612eff36341e448
9f17c5bea47148d
b8ee00c6d45a40d
cf8bc4da4f5b43c
e12f71c46b3b442
e43c48c3a39d460
-------
stevemar: I created a bug report in cliff to add the --noheader flag (or perhaps just remove the first row if the -c flag is used). Link: https:/