| Trees | Indices | Help |
|
|---|
|
|
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 import logging
12
13 log = logging.getLogger("zen.notificationwindows")
14
15 import time
16 from Products.ZenRelations.RelSchema import *
17 from Products.ZenModel.MaintenanceWindow import MaintenanceWindow
18
20
21 notificationSubscription = None
22
23 backCrumb = "triggers"
24
25 _relations = MaintenanceWindow._relations + (
26 ("notificationSubscription",
27 ToOne(
28 ToManyCont,
29 "Products.ZenModel.NotificationSubscription",
30 "windows"
31 )),
32 )
33
34 _properties = tuple(list(MaintenanceWindow._properties) + [
35 {'id':'enabled', 'type':'boolean', 'mode':'w'}
36 ])
37
39 return self.notificationSubscription()
40
42 if self.started is not None:
43 log.debug('Notification Subscription Window is trying to begin after'
44 ' it is already started: Start: %s, Duration: %s' % (self.started, self.duration))
45
46 self.target().enabled = True
47 if not now:
48 now = time.time()
49 self.started = now
50
54
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1.1812 on Mon Jul 30 17:11:34 2012 | http://epydoc.sourceforge.net |