Package Products :: Package DataCollector :: Module CollectorClient :: Class CollectorClient |
[hide private]
[frames] | no frames]

# Class CollectorClient

source code

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

Known Subclasses:
  - TelnetClient.TelnetClient
  - , SshClient.SshClient

Data collector client class to be subclassed by different types collector protocols

Instance Methods | [hide private]
__init__(self, hostname, ip, port, plugins=None, options=None, device=None, datacollector=None, alog=None) Gather our required zProperties | source code
addCommand(self, command) Add a command to the list of commands to gather data | source code
addResult(self, command, data, exitCode) Add a result pair to the results store | source code
list of strings |
getCommands(self) The commands which we will use to collect data | source code
list of strings |
getResults(self) Return all of the results we have collected so far | source code
commandsFinished(self) Called by protocol to see if all commands have been run | source code
clientFinished(self) Tell the datacollector that we are all done | source code
reinitialize(self) Clear out all member variables that are collections to avoid memory leaks. | source code
Inherited from `BaseClient.BaseClient`: `run`, `stop` Inherited from `twisted.internet.protocol.ClientFactory`: `clientConnectionFailed`, `clientConnectionLost`, `startedConnecting` Inherited from `twisted.internet.protocol.Factory`: `buildProtocol`, `doStart`, `doStop`, `startFactory`, `stopFactory`

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

Method Details | [hide private]

### __init__(self, hostname, ip, port, plugins=None, options=None, device=None, datacollector=None, alog=None) (Constructor) | source code
Gather our required zProperties Parameters: `hostname` (string) - name of the remote device `ip` (string) - IP address of the remote device `port` (integer) - IP port number to listen on `plugins` (list) - plugins to run `options` (optparse options object) - optparse options `device` (device object) - DMD device object `datacollector` (datacollector object) - datacollector `alog` (Python logging class object) - Python logging class object Overrides: BaseClient.BaseClient.__init__

### addCommand(self, command) | source code
Add a command to the list of commands to gather data Parameters: `command` (string) - command

### addResult(self, command, data, exitCode) | source code
Add a result pair to the results store Parameters: `command` (string) - command `data` (string) - results of running the command `exitCode` (integer) - exit code from executing the command

### getCommands(self) | source code
The commands which we will use to collect data Returns: list of strings commands

### getResults(self) | source code
Return all of the results we have collected so far Returns: list of strings results Overrides: BaseClient.BaseClient.getResults