5.2. _clp module
- class capture_it._clp.CLP(dtype, conn, path, parsed_output, visual_progress, logger_list)
Bases:
object
parent class for Command processing
- Parameters:
dtype (str) – device type
conn (conn) – connection object
path (str) – path to store the captured output
parsed_output (bool) – Need to parse output and generate excel or not.
visual_progress (int) – scale 0 to 10. 0 being no output, 10 all.
logger (list) – device logging messages list
- check_config_authorization(cmd)
check if given command is allowed or not on this device.
- Parameters:
cmd (str) – command to be executed
- Returns:
True/False
- Return type:
bool
- cmd_capture(cmd, cumulative=False, banner=False)
start command capture for given command
- Parameters:
cmd (str) – command to be executed
cumulative (bool, optional) – True/False/both. Defaults to False.
banner (bool, optional) – set a banner property to object if given. Defaults to False.
- Returns:
[description]
- Return type:
[type]
- configure(config_mode=False)
set configuration mode
- Parameters:
config_mode (bool, optional) – enable/disable config commands. Defaults to False.