Package Products :: Package ZenEvents :: Module EventCommand
[hide private]
[frames] | no frames]

Source Code for Module Products.ZenEvents.EventCommand

 1  ########################################################################### 
 2  # 
 3  # This program is part of Zenoss Core, an open source monitoring platform. 
 4  # Copyright (C) 2007, Zenoss Inc. 
 5  # 
 6  # This program is free software; you can redistribute it and/or modify it 
 7  # under the terms of the GNU General Public License version 2 or (at your 
 8  # option) any later version as published by the Free Software Foundation. 
 9  # 
10  # For complete information please visit: http://www.zenoss.com/oss/ 
11  # 
12  ########################################################################### 
13   
14  from AccessControl import ClassSecurityInfo 
15  from Acquisition import aq_parent 
16  from Products.ZenModel.ZenModelRM import ZenModelRM 
17  from Products.ZenModel.Commandable import Commandable 
18  from Products.ZenModel.ZenPackable import ZenPackable 
19  from Products.ZenRelations.RelSchema import * 
20  from Globals import InitializeClass 
21  from EventFilter import EventFilter 
22   
23 -class EventCommand(ZenModelRM, Commandable, EventFilter, ZenPackable):
24 25 where = '' 26 command = '' 27 clearCommand = '' 28 enabled = False 29 delay = 0 30 repeatTime = 0 31 32 _properties = ZenModelRM._properties + ( 33 {'id':'command', 'type':'string', 'mode':'w'}, 34 {'id':'clearCommand', 'type':'string', 'mode':'w'}, 35 {'id':'where', 'type':'string', 'mode':'w'}, 36 {'id':'defaultTimeout', 'type':'int', 'mode':'w'}, 37 {'id':'enabled', 'type':'boolean', 'mode':'w'}, 38 {'id':'delay', 'type':'int', 'mode':'w'}, 39 {'id':'repeatTime', 'type':'int', 'mode':'w'}, 40 ) 41 42 _relations = ZenPackable._relations + ( 43 ("eventManager", ToOne(ToManyCont, "Products.ZenEvents.EventManagerBase", "commands")), 44 ) 45 46 security = ClassSecurityInfo()
47 48 49 InitializeClass(EventCommand) 50