osc_lib.utils.columns
Module¶osc_lib.utils.columns.
get_column_definitions
(attr_map, long_listing)¶Return table headers and column names for a listing table.
An attribute map (attr_map) is a list of table entry definitions and the format of the map is as follows:
Parameters: |
|
---|---|
Returns: | A tuple of a list of table headers and a list of column names. |
osc_lib.utils.columns.
get_columns
(item, attr_map=None)¶Return pair of resource attributes and corresponding display names.
Parameters: |
|
---|---|
Returns: | A pair of tuple of attributes and tuple of display names. (('id', 'name', 'tenant_id', 'foo'), # attributes
('ID', 'Name', 'Project', 'foo') # display names
Both tuples of attributes and display names are sorted by display names in the alphabetical order. Attributes not found in a given attr_map are kept as-is. |
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.