connection.appliance_ssh

class connection.appliance_ssh.ApplianceSsh
__init__(system, call_timeout=None, **connect_args)
connect()

Connect to an appliance, disable timeouts and return the ssh object. :return: paramiko ssh object

disconnect()
prep_cmd(operation, **update_cmds)
Returns:ActCmd object with ssh_command attribute
call(command_obj)

Use when you explicitly want to connect over ssh and send raw ssh commands.

This houses the functionality unlike rest method because I want to avoid passing around the client to retain channels.

Parameters:command_obj – Instance of ActCmd object
Returns:stdout, stderr, exit status
post_cmd(command_obj)
strip_newlines()
raw(ssh_command)
params_to_cli(operation, **update_cmds)

Takes a functional cli operation and appends rest like inputs.

ex.
self.cmd(‘udsinfo lshost’, filtervalue=’ostype=Linux’)
returns:
“/act/bin/udsinfo lshost -filtervalue ‘ostype=Linux’”
Parameters:
  • operation – A functional cli operation
  • update_cmds
Returns:

convert_ssh_output(stdout, stderr)