Package ZenWin :: Module WinCollector :: Class WinCollector
[hide private]
[frames] | no frames]

Class WinCollector

source code

Products.ZenHub.PBDaemon.PBDaemon --+
                                    |
                                   WinCollector

Base class to be sub-classed by WMI daemons

Instance Methods [hide private]
 
__init__(self) source code
 
remote_notifyConfigChanged(self)
Called from zenhub to push new configs down.
source code
 
stopScan(self, unused=None)
Stop (reactor.stop()) the collection
source code
Twisted defered or DeferredList
scanCycle(self, driver)
Generator function to collect data in one scan cycle
source code
Twisted DeferredList
processLoop(self, devices, timeoutSecs)
Cycle through the list of devices and collect from them.
source code
Twisted defered
processDevice(self, device, timeoutSecs)
Perform a collection service on a device
source code
int
cycleInterval(self)
Return the length of time in a scan cycle
source code
WmiConfig
configService(self)
Gather this daemons WMI configuration
source code
 
devicesEqual(self, d1, d2) source code
 
updateDevices(self, devices)
Update device configuration
source code
 
remote_deleteDevice(self, deviceId)
Function called from zenhub to remove a device from our list of devices.
source code
 
error(self, why)
Twisted errback routine to log messages
source code
 
updateConfig(self, cfg)
updateConfig
source code
 
start(self)
Startup routine
source code
 
startScan(self, unused=None)
Calls start() and then goes through scanCycle() until finished
source code
 
deviceDown(self, device, error)
Method to call when a device does not respond or returns an error.
source code
 
deviceUp(self, device)
Method to call when a device comes back to life.
source code
Twisted defered
reconfigure(self, driver)
Gather our complete configuration information.
source code
Twisted defered
startConfigCycle(self)
Gather configuration and set up to re-check.
source code
 
connected(self)
Method called after a connection to zenhub is established.
source code
 
buildOptions(self)
Command-line option builder
source code
Class Variables [hide private]
  configCycleInterval = 20
  wmiqueryTimeout = 1000
  whatIDo = 'Override whatIDo in a subclass'
  initialServices = PBDaemon.initialServices+ ['Products.ZenWin....
  attributes = 'configCycleInterval', 'wmiqueryTimeout'
  deviceAttributes = 'manageIp', 'zWinPassword', 'zWinUser', 'zW...
Method Details [hide private]

stopScan(self, unused=None)

source code 
Stop (reactor.stop()) the collection
Parameters:
  • unused (string) - unused

scanCycle(self, driver)

source code 
Generator function to collect data in one scan cycle
Parameters:
  • driver (string) - driver
Returns: Twisted defered or DeferredList
defered task

processLoop(self, devices, timeoutSecs)

source code 
Cycle through the list of devices and collect from them.
Parameters:
  • devices (list) - device object list
  • timeoutSecs (int) - timeoutSecs
Returns: Twisted DeferredList
list of defereds to processDevice()

processDevice(self, device, timeoutSecs)

source code 
Perform a collection service on a device
Parameters:
  • device (object) - device to query
  • timeoutSecs (int) - timeoutSecs
Returns: Twisted defered
defered to complete the processing

cycleInterval(self)

source code 

Return the length of time in a scan cycle

Method which must be overridden
Returns: int
number of seconds in a cycle

configService(self)

source code 
Gather this daemons WMI configuration
Returns: WmiConfig
zenhub configuration information

updateDevices(self, devices)

source code 
Update device configuration
Parameters:
  • devices (list) - list of devices

remote_deleteDevice(self, deviceId)

source code 
Function called from zenhub to remove a device from our list of devices.
Parameters:
  • deviceId (string) - deviceId

error(self, why)

source code 
Twisted errback routine to log messages
Parameters:
  • why (string) - error message

updateConfig(self, cfg)

source code 
updateConfig
Parameters:
  • cfg (WmiConfig) - configuration from zenhub

startScan(self, unused=None)

source code 
Calls start() and then goes through scanCycle() until finished
Parameters:
  • unused (string) - unused

deviceDown(self, device, error)

source code 
Method to call when a device does not respond or returns an error.
Parameters:
  • device (device object) - device object
  • error (string) - useful and informative error message

deviceUp(self, device)

source code 
Method to call when a device comes back to life.
Parameters:
  • device (device object) - device oject

reconfigure(self, driver)

source code 
Gather our complete configuration information.
Parameters:
  • driver (driver object) - driver object
Returns: Twisted defered
defered

startConfigCycle(self)

source code 
Gather configuration and set up to re-check.
Returns: Twisted defered
defered

connected(self)

source code 
Method called after a connection to zenhub is established. Calls startConfigCycle() and startScan()

Class Variable Details [hide private]

initialServices

Value:
PBDaemon.initialServices+ ['Products.ZenWin.services.WmiConfig']

deviceAttributes

Value:
'manageIp', 'zWinPassword', 'zWinUser', 'zWmiMonitorIgnore'