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

Source Code for Module Products.ZenEvents.EventCommand

 1  ############################################################################## 
 2  #  
 3  # Copyright (C) Zenoss, Inc. 2007, all rights reserved. 
 4  #  
 5  # This content is made available according to terms specified in 
 6  # License.zenoss under the directory where your Zenoss product is installed. 
 7  #  
 8  ############################################################################## 
 9   
10   
11  from AccessControl import ClassSecurityInfo 
12  from Acquisition import aq_parent 
13  from Products.ZenModel.ZenModelRM import ZenModelRM 
14  from Products.ZenModel.Commandable import Commandable 
15  from Products.ZenModel.ZenPackable import ZenPackable 
16  from Products.ZenRelations.RelSchema import * 
17  from Globals import InitializeClass 
18  from EventFilter import EventFilter 
19   
20 -class EventCommand(ZenModelRM, Commandable, EventFilter, ZenPackable):
21 22 where = '' 23 command = '' 24 clearCommand = '' 25 enabled = False 26 delay = 0 27 repeatTime = 0 28 29 _properties = ZenModelRM._properties + ( 30 {'id':'command', 'type':'string', 'mode':'w'}, 31 {'id':'clearCommand', 'type':'string', 'mode':'w'}, 32 {'id':'where', 'type':'string', 'mode':'w'}, 33 {'id':'defaultTimeout', 'type':'int', 'mode':'w'}, 34 {'id':'enabled', 'type':'boolean', 'mode':'w'}, 35 {'id':'delay', 'type':'int', 'mode':'w'}, 36 {'id':'repeatTime', 'type':'int', 'mode':'w'}, 37 ) 38 39 _relations = ZenPackable._relations + ( 40 ("eventManager", ToOne(ToManyCont, "Products.ZenEvents.EventManagerBase", "commands")), 41 ) 42 43 security = ClassSecurityInfo()
44 45 46 InitializeClass(EventCommand) 47