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
 
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

Inherited from DataCollector.SshClient.SshClient: channelClosed, clientConnectionFailed, 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: clientConnectionLost, 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

clientFinished(self)

source code 

We don't need to track commands/results when they complete

Overrides: DataCollector.CollectorClient.CollectorClient.clientFinished