Package Products :: Package ZenRRD :: Module zencommand :: Class MySshClient |
[hide private]
[frames] | no frames]

# Class MySshClient

source code

                                   object --+
                                            |
          DataCollector.BaseClient.BaseClient --+
                                                |
        twisted.internet.protocol.Factory --+   |
                                            |   |
      twisted.internet.protocol.ClientFactory --+
                                                |
    DataCollector.CollectorClient.CollectorClient --+
                                                    |
                    DataCollector.SshClient.SshClient --+
                                                        |
                                                       MySshClient

Connection to SSH server at the remote device

Instance Methods | [hide private]
__init__(self, *args, **kw) Initializer | source code
addCommand(self, command) Run a command against the server | source code
addResult(self, command, data, code) Forward the results of the command execution to the starter | source code
clientConnectionLost(self, connector, reason) Called when an established connection is lost. | source code
check(self, ip, timeout=2) Turn off blocking SshClient.test method | source code
clientFinished(self) We don't need to track commands/results when they complete | source code
clientConnectionFailed(self, connector, reason) If we didn't connect let the modeler know | source code
Inherited from `DataCollector.SshClient.SshClient`: `channelClosed`, `loseConnection`, `run`, `runCommands`, `serviceStarted` Inherited from `DataCollector.CollectorClient.CollectorClient`: `commandsFinished`, `getCommands`, `getResults`, `reinitialize` Inherited from `DataCollector.BaseClient.BaseClient`: `stop` Inherited from `twisted.internet.protocol.ClientFactory`: `startedConnecting` Inherited from `twisted.internet.protocol.Factory`: `buildProtocol`, `doStart`, `doStop`, `startFactory`, `stopFactory`

Class Variables | [hide private]
Inherited from `DataCollector.CollectorClient.CollectorClient`: `cmdindex`, `maintainConnection` Inherited from `twisted.internet.protocol.Factory`: `noisy`, `numPorts`, `protocol`

Method Details | [hide private]

### __init__(self, *args, **kw) (Constructor) | source code
Initializer Parameters: `hostname` - hostname of the device `ip` - IP address of the device `port` - port number to use to connect to device `plugins` - plugins `options` - options `device` - name of device `datacollector` - object Overrides: DataCollector.BaseClient.BaseClient.__init__ (inherited documentation)

### addCommand(self, command) | source code
Run a command against the server Parameters: `commands` - commands to run Overrides: DataCollector.CollectorClient.CollectorClient.addCommand

### addResult(self, command, data, code) | source code
Forward the results of the command execution to the starter Parameters: `command` - command `data` - results of running the command `exitCode` - exit code from executing the command Overrides: DataCollector.CollectorClient.CollectorClient.addResult

### clientConnectionLost(self, connector, reason) | source code
Called when an established connection is lost. It may be useful to call connector.connect() - this will reconnect. Overrides: twisted.internet.protocol.ClientFactory.clientConnectionLost (inherited documentation)

### clientFinished(self) | source code
We don't need to track commands/results when they complete Overrides: DataCollector.CollectorClient.CollectorClient.clientFinished

### clientConnectionFailed(self, connector, reason) | source code
If we didn't connect let the modeler know Parameters: `connector` (object) - connector associated with this failure `reason` (object) - failure object Overrides: twisted.internet.protocol.ClientFactory.clientConnectionFailed