Base class for the remote command. More...
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 | |
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.
def SSHLibrary.abstractclient.AbstractCommand.__init__ | ( | self, | |
command, | |||
encoding | |||
) |
Definition at line 1323 of file abstractclient.py.
|
private |
Reimplemented in SSHLibrary.pythonclient.RemoteCommand, and SSHLibrary.javaclient.RemoteCommand.
Definition at line 1347 of file abstractclient.py.
|
private |
Reimplemented in SSHLibrary.pythonclient.RemoteCommand, and SSHLibrary.javaclient.RemoteCommand.
Definition at line 1353 of file abstractclient.py.
|
private |
Reimplemented in SSHLibrary.pythonclient.RemoteCommand, and SSHLibrary.javaclient.RemoteCommand.
Definition at line 1350 of file abstractclient.py.
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.
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.
|
private |
Definition at line 1324 of file abstractclient.py.
|
private |
Definition at line 1325 of file abstractclient.py.
|
private |
Definition at line 1326 of file abstractclient.py.