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

# Class PortscanClient

source code

               object --+
                        |
    BaseClient.BaseClient --+
                            |
                           PortscanClient

Implement the DataCollector Client interface for port-scanning

Instance Methods | [hide private]
__init__(self, hostname, ipaddr, options=None, device=None, datacollector=None, plugins=[]) Initializer | source code
run(self) Start portscan collection. | source code
_cbScanComplete(self, unused, plugin) Start portscan collection. | source code
_ebScanError(self, err, plugin) Handle an error generated by one of our requests. | source code
list of results |
getResults(self) ZenUtils.PortScan records open ports in a list that are the values for a key in a dict where the key is the IP address scanned. | source code
clientFinished(self, plugin) Tell the datacollector that we are all done. | source code
Inherited from `BaseClient.BaseClient`: `stop` Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__str__`

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, hostname, ipaddr, options=None, device=None, datacollector=None, plugins=[]) (Constructor) | source code
Initializer Parameters: `hostname` (string) - name of the remote device `ipaddr` (string) - IP address of the remote device `options` (optparse options object) - optparse options `device` (device object) - DMD device object `datacollector` (datacollector object) - performance data collector object `plugins` (list of plugin objects) - performance data collector plugin Overrides: BaseClient.BaseClient.__init__

### run(self) | source code
Start portscan collection. Overrides: BaseClient.BaseClient.run

### _cbScanComplete(self, unused, plugin) | source code
Start portscan collection. Parameters: `unused` (object) - unused (unused) `plugin` (plugin object) - performance data collector plugin

### _ebScanError(self, err, plugin) | source code
Handle an error generated by one of our requests. Parameters: `err` (result or Exception) - result from the collection run `plugin` (plugin object) - performance data collector plugin

### getResults(self) | source code
    ZenUtils.PortScan records open ports in a list that are the
    values for a key in a dict where the key is the IP address
    scanned.

    For example, if we scan host 10.0.4.55 and ports 22 and 80 are
    open, getSuccesses() will return the following:

        {'10.0.4.55': [22, 80]}

    @return: results
    @rtype: list of strings
Returns: list of results list of results Overrides: BaseClient.BaseClient.getResults

### clientFinished(self, plugin) | source code
Tell the datacollector that we are all done. Parameters: `plugin` (plugin object) - performance data collector plugin