Package ZenHub :: Module zenhubworker :: Class zenhubworker
[hide private]
[frames] | no frames]

Class zenhubworker

source code

Products.ZenUtils.ZCmdBase.ZCmdBase --+
                                      |
    twisted.spread.pb.Referenceable --+
                                      |
                                     zenhubworker

Execute ZenHub requests in separate process

Instance Methods [hide private]
 
__init__(self) source code
 
gotPerspective(self, perspective)
Once we are connected to zenhub, register ourselves
source code
 
_getService(self, name, instance)
Utility method to create the service (like PingConfig) for instance (like localhost)
source code
 
remote_execute(self, service, instance, method, args)
Execute requests on behalf of zenhub
source code
 
buildOptions(self)
Options, mostly to find where zenhub lives These options should be passed (by file) from zenhub.
source code
Method Details [hide private]

_getService(self, name, instance)

source code 
Utility method to create the service (like PingConfig) for instance (like localhost)
Parameters:
  • name (string) - the dotted-name of the module to load (uses @Products.ZenUtils.Utils.importClass)
  • instance - string
  • instance - each service serves only one specific collector instances (like 'localhost'). instance defines the collector's instance name.
Returns:
a service loaded from ZenHub/services or one of the zenpacks.

remote_execute(self, service, instance, method, args)

source code 
Execute requests on behalf of zenhub
Parameters:
  • service (string) - the name of a service, like PingConfig
  • instance (string) - each service serves only one specific collector instances (like 'localhost'). instance defines the collector's instance name.
  • method (string) - the name of the called method, like getPingTree
  • args (tuple) - arguments to the method
  • kw (dictionary) - keyword arguments to the method
Decorators:
  • @translateError