1
2
3
4
5
6
7
8
9
10
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