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