class documentation

A stub ISession implementation for our StubAvatar. The instance variables generally keep track of method invocations so that we can test that the methods were called.

Method __init__ Store the avatar we're adapting.
Method closed Note that close has been received.
Method eofReceived Note that EOF has been received.
Method execCommand If the command is 'true', store the command, the process protocol, and the transport we connect to the process protocol. Otherwise, just store the command and raise an error.
Method getPty If the terminal is 'bad', fail. Otherwise, store the information in the ptyRequest variable.
Method openShell If we have gotten a shell request before, fail. Otherwise, store the process protocol in the shellProtocol variable, connect it to the EchoTransport and store that as shellTransport.
Method windowChanged If all the window sizes are 0, fail. Otherwise, store the size in the windowChange variable.
Instance Variable avatar the StubAvatar we are adapting.
Instance Variable execCommandLine if present, the command line passed to the execCommand method.
Instance Variable execProtocol if present, the SSHSessionProcessProtocol passed to the execCommand method.
Instance Variable execTransport if present, the EchoTransport connected to execProtocol.
Instance Variable gotClosed if present, a closed message was received.
Instance Variable gotEOF if present, an EOF message was received.
Instance Variable ptyRequest if present, the terminal, window size, and modes passed to the getPty method.
Instance Variable shellProtocol if present, the SSHSessionProcessProtocol passed to the openShell method.
Instance Variable shellTransport if present, the EchoTransport connected to shellProtocol.
Instance Variable windowChange if present, the window size passed to the windowChangned method.
def __init__(self, avatar): (source)

Store the avatar we're adapting.

def closed(self): (source)

Note that close has been received.

def eofReceived(self): (source)

Note that EOF has been received.

def execCommand(self, pp, command): (source)

If the command is 'true', store the command, the process protocol, and the transport we connect to the process protocol. Otherwise, just store the command and raise an error.

def getPty(self, terminal, window, modes): (source)

If the terminal is 'bad', fail. Otherwise, store the information in the ptyRequest variable.

def openShell(self, pp): (source)

If we have gotten a shell request before, fail. Otherwise, store the process protocol in the shellProtocol variable, connect it to the EchoTransport and store that as shellTransport.

def windowChanged(self, window): (source)

If all the window sizes are 0, fail. Otherwise, store the size in the windowChange variable.

the StubAvatar we are adapting.

execCommandLine = (source)

if present, the command line passed to the execCommand method.

execProtocol = (source)

if present, the SSHSessionProcessProtocol passed to the execCommand method.

execTransport = (source)

if present, the EchoTransport connected to execProtocol.

gotClosed: bool = (source)

if present, a closed message was received.

if present, an EOF message was received.

ptyRequest = (source)

if present, the terminal, window size, and modes passed to the getPty method.

shellProtocol = (source)

if present, the SSHSessionProcessProtocol passed to the openShell method.

shellTransport = (source)

if present, the EchoTransport connected to shellProtocol.

windowChange = (source)

if present, the window size passed to the windowChangned method.