New in version 2017.7.0.
This outputter displays a sequence of rows as table.
Example output:
edge01.bjm01:
----------
comment:
----------
out:
----------
______________________________________________________________________________
| Active | Interface | Last Move | Mac | Moves | Static | Vlan |
______________________________________________________________________________
| True | ae1.900 | 0.0 | 40:A6:77:5A:50:01 | 0 | False | 111 |
______________________________________________________________________________
| True | ae1.111 | 0.0 | 64:16:8D:32:26:58 | 0 | False | 111 |
______________________________________________________________________________
| True | ae1.111 | 0.0 | 8C:60:4F:73:2D:57 | 0 | False | 111 |
______________________________________________________________________________
| True | ae1.111 | 0.0 | 8C:60:4F:73:2D:7C | 0 | False | 111 |
______________________________________________________________________________
| True | ae1.222 | 0.0 | 8C:60:4F:73:2D:57 | 0 | False | 222 |
______________________________________________________________________________
| True | ae1.222 | 0.0 | F4:0F:1B:76:9D:97 | 0 | False | 222 |
______________________________________________________________________________
result:
----------
salt.output.table_out.
TableDisplay
(has_header=True, row_delimiter='-', delim=' | ', justify='center', separate_rows=True, prefix='| ', suffix=' |', width=50, wrapfunc=None)¶Manage the table display content.
display
(ret, indent, out, rows_key=None, labels_key=None)¶Display table(s).
display_rows
(rows, labels, indent)¶Prepares row content and displays.
prepare_rows
(rows, indent, has_header)¶Prepare rows content to be displayed.
ustring
(indent, color, msg, prefix='', suffix='', endc=None)¶Build the unicode string to be displayed.
wrap_onspace
(text)¶When the text inside the column is longer then the width, will split by space and continue on the next line.
salt.output.table_out.
output
(ret, **kwargs)¶Display the output as table.
Parameters: |
|
---|