l.c.s.ShellOutSSHClient(BaseSSHClient) : class documentation

Part of libcloud.compute.ssh View Source View In Hierarchy

This client shells out to "ssh" binary to run commands on the remote
server.

Note: This client should not be used in production.
Method __init__ @type hostname: C{str} @keyword hostname: Hostname or IP address to connect to.
Method connect This client doesn't support persistent connections establish a new connection every time "run" method is called.
Method run Run a command on a remote node.
Method put Upload a file to the remote node.
Method delete Delete/Unlink a file on the remote node.
Method close Shutdown connection to the remote node.
Method _get_and_setup_logger Undocumented
Method _get_base_ssh_command Undocumented
Method _run_remote_shell_command Run a command on a remote server.
def __init__(self, hostname, port=22, username='root', password=None, key=None, timeout=None): (source)
@type hostname: C{str}
@keyword hostname: Hostname or IP address to connect to.

@type port: C{int}
@keyword port: TCP port to communicate on, defaults to 22.

@type username: C{str}
@keyword username: Username to use, defaults to root.

@type password: C{str}
@keyword password: Password to authenticate with.

@type key: C{list}
@keyword key: Private SSH keys to authenticate with.
def connect(self): (source)
This client doesn't support persistent connections establish a new
connection every time "run" method is called.
def run(self, cmd): (source)
Run a command on a remote node.

@type cmd: C{str}
@keyword cmd: Command to run.

@return C{list} of [stdout, stderr, exit_status]
def put(self, path, contents=None, chmod=None, mode='w'): (source)
Upload a file to the remote node.

@type path: C{str}
@keyword path: File path on the remote node.

@type contents: C{str}
@keyword contents: File Contents.

@type chmod: C{int}
@keyword chmod: chmod file to this after creation.

@type mode: C{str}
@keyword mode: Mode in which the file is opened.

@return: Full path to the location where a file has been saved.
@rtype: C{str}
def delete(self, path): (source)
Delete/Unlink a file on the remote node.

@type path: C{str}
@keyword path: File path on the remote node.

@return: True if the file has been successfuly deleted, False
         otherwise.
@rtype: C{bool}
def close(self): (source)
Shutdown connection to the remote node.

@return: True if the connection has been successfuly closed, False
         otherwise.
@rtype: C{bool}
def _get_and_setup_logger(self): (source)
Undocumented
def _get_base_ssh_command(self): (source)
Undocumented
def _run_remote_shell_command(self, cmd): (source)
Run a command on a remote server.

@param      cmd: Command to run.
@type       cmd: C{list} of C{str}

@return: Command stdout, stderr and status code.
@rtype: C{tuple}
API Documentation for libcloud, generated by pydoctor at 2013-04-20 21:40:42.