angelos.lib.net.client

Module docstring.

class angelos.lib.net.client.Client(ioc: angelos.lib.ioc.Container)

Bases: angelos.lib.ioc.ContainerAware, asyncssh.client.SSHClient

Client base class.

Subsystems should be regiested in the _subsystems dictionary accordingly:

self._subsystems[“subsystem”] = (ClientSubsystemHandler, SubsystemClient)

# Do something def something(self, arg1, arg2, callback=None):

self._loop.run(

self._session.send_request(“WHATEVER”, arg1, arg2, callback))

auth_completed()

Completed authentication.

classmethod connect(ioc: angelos.lib.ioc.Container, host: unicode, port: int, client_keys=None, known_hosts=None)Client

Connect to a server with this client

connection_made(conn)

Connected to server.

class angelos.lib.net.client.ClientSession

Bases: asyncssh.stream.SSHStreamSession, asyncssh.session.SSHClientSession

connection_lost(exc)

Handle an incoming channel close

connection_made(chan)

Handle a newly opened channel

data_received(data, datatype)

Handle incoming data on the channel

eof_received()

Handle an incoming end of file on the channel

send_request(verb, resource, body, callback)
session_started()

Called when the session is started

This method is called when a session has started up. For client and server sessions, this will be called once a shell, exec, or subsystem request has been successfully completed. For TCP and UNIX domain socket sessions, it will be called immediately after the connection is opened.