Modelled mostly after how Heat does it, but with some added power and
also consistency between print_list and print_dict.
We have print_list for printing of lists and print_dict for printing
of show actions. Both functions take as arguments (aside from the data
to print) also an optional dict of custom formatters (allowing to
freely format the attributes before printing) and custom labels
(allowing to tweak table headers and property names). The list is also
sorted by one of the columns.
The formatting is showcased on sample formatters and actions -
rack-show and rack-list.
Reviewed: https:/ /review. openstack. org/43127 github. com/stackforge/ python- tuskarclient/ commit/ ca01366beaa75f6 6d68cc4023691d8 86f180c086
Committed: http://
Submitter: Jenkins
Branch: master
commit ca01366beaa75f6 6d68cc4023691d8 86f180c086
Author: Jiri Stransky <email address hidden>
Date: Mon Aug 19 15:48:37 2013 +0200
Advanced print formatting for CLI
Modelled mostly after how Heat does it, but with some added power and
also consistency between print_list and print_dict.
We have print_list for printing of lists and print_dict for printing
of show actions. Both functions take as arguments (aside from the data
to print) also an optional dict of custom formatters (allowing to
freely format the attributes before printing) and custom labels
(allowing to tweak table headers and property names). The list is also
sorted by one of the columns.
The formatting is showcased on sample formatters and actions -
rack-show and rack-list.
Fixes bug 1213056
Change-Id: Ic14dbb930a5967 e2634c1b4777e67 05ab2a370ec