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