Robot Framework SSH Library
SSHLibrary.abstractclient.AbstractCommand Class Reference

Base class for the remote command. More...

Inheritance diagram for SSHLibrary.abstractclient.AbstractCommand:
SSHLibrary.javaclient.RemoteCommand SSHLibrary.pythonclient.RemoteCommand

Public Member Functions

def __init__ (self, command, encoding)
 
def run_in (self, shell, sudo=False, sudo_password=None, invoke_subsystem=False)
 Runs this command in the given shell. More...
 
def read_outputs (self)
 Returns the outputs of this command. More...
 

Private Member Functions

def _execute (self)
 
def _invoke (self)
 
def _execute_with_sudo (self, sudo_password=None)
 

Private Attributes

 _command
 
 _encoding
 
 _shell
 

Detailed Description

Base class for the remote command.

Classes derived from this class (i.e. :py:class:`pythonclient.RemoteCommand`
and :py:class:`javaclient.RemoteCommand`) provide the concrete and the
language specific implementations for running the command on the remote
host.

Definition at line 1321 of file abstractclient.py.

Constructor & Destructor Documentation

◆ __init__()

def SSHLibrary.abstractclient.AbstractCommand.__init__ (   self,
  command,
  encoding 
)

Definition at line 1323 of file abstractclient.py.

Member Function Documentation

◆ _execute()

def SSHLibrary.abstractclient.AbstractCommand._execute (   self)
private

◆ _execute_with_sudo()

def SSHLibrary.abstractclient.AbstractCommand._execute_with_sudo (   self,
  sudo_password = None 
)
private

◆ _invoke()

def SSHLibrary.abstractclient.AbstractCommand._invoke (   self)
private

◆ read_outputs()

def SSHLibrary.abstractclient.AbstractCommand.read_outputs (   self)

Returns the outputs of this command.

    :returns: A 3-tuple (stdout, stderr, return_code) with values
        `stdout` and `stderr` as strings and `return_code` as an integer.

Definition at line 1361 of file abstractclient.py.

◆ run_in()

def SSHLibrary.abstractclient.AbstractCommand.run_in (   self,
  shell,
  sudo = False,
  sudo_password = None,
  invoke_subsystem = False 
)

Runs this command in the given shell.

    :param shell: A shell in the already open connection.

    :param sudo
     and
    :param sudo_password are used for executing commands within a sudo session.

    :param invoke_subsystem will request a subsystem on the server.

Definition at line 1338 of file abstractclient.py.

Member Data Documentation

◆ _command

SSHLibrary.abstractclient.AbstractCommand._command
private

Definition at line 1324 of file abstractclient.py.

◆ _encoding

SSHLibrary.abstractclient.AbstractCommand._encoding
private

Definition at line 1325 of file abstractclient.py.

◆ _shell

SSHLibrary.abstractclient.AbstractCommand._shell
private

Definition at line 1326 of file abstractclient.py.


The documentation for this class was generated from the following file: