Package ZenEvents :: Module xtest :: Class XTest
[hide private]
[frames] | no frames]

Class XTest

source code

Products.ZenUtils.CmdBase.CmdBase --+
                                    |
                                   XTest

Instance Methods [hide private]
 
__init__(self, noopts=0) source code
 
buildOptions(self)
basic options setup sub classes can add more options here
source code
 
parseEventsFile(self, filepath=None)
Not much actual parsing going on here, just importing the given file.
source code
 
getXmlRpcProxy(self)
Returns xmlrpc proxy, creating on if the instance doesn't already have one.
source code
 
sendEvents(self, events)
events is a list of dictionaries with details of events to send.
source code
 
sendSampleEvents(self, repeat=1)
Sends the sample event and corresponding clear event.
source code
 
sendSampleWithDelayedClear(self, repeat=1, delay=30)
Sends sample event then after a delay sends the clear event, repeating as specified.
source code
 
sendEventsFromFile(self, filepath=None)
Parse the given file (or the file specified at init) and send the files.
source code

Inherited from Products.ZenUtils.CmdBase.CmdBase: buildParser, generate_configs, generate_xml_table, parseOptions, pretty_print_config_comment, setupLogging

Class Variables [hide private]
  sampleEvent = {'component': 'Sample component', 'device': 'Sam...
  sampleClear = {'component': 'Sample component', 'device': 'Sam...

Inherited from Products.ZenUtils.CmdBase.CmdBase: doesLogging

Method Details [hide private]

__init__(self, noopts=0)
(Constructor)

source code 
Overrides: Products.ZenUtils.CmdBase.CmdBase.__init__

buildOptions(self)

source code 
basic options setup sub classes can add more options here
Overrides: Products.ZenUtils.CmdBase.CmdBase.buildOptions

sendEvents(self, events)

source code 
events is a list of dictionaries with details of events to send. This sends those events via the xmlrpc proxy.

sendSampleEvents(self, repeat=1)

source code 
Sends the sample event and corresponding clear event. Repeats this as many times as specified by repeat.

Class Variable Details [hide private]

sampleEvent

Value:
{'component': 'Sample component',
 'device': 'Sample device',
 'eventClass': '/Status/Perf',
 'severity': 4,
 'summary': 'Test event at 1193344037.67'}

sampleClear

Value:
{'component': 'Sample component',
 'device': 'Sample device',
 'eventClass': '/Status/Perf',
 'severity': 0,
 'summary': 'Clear event'}