git://git.onelab.eu
/
monitor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Setting tag monitor-3.1-5
[monitor.git]
/
monitor
/
model.py
diff --git
a/monitor/model.py
b/monitor/model.py
index
d06edae
..
5d0fc05
100755
(executable)
--- a/
monitor/model.py
+++ b/
monitor/model.py
@@
-2,7
+2,7
@@
from monitor import database
from monitor import database
-from monitor.wrapper import plc
, plccache
+from monitor.wrapper import plc
from monitor.wrapper import mailer
import time
from monitor.wrapper import mailer
import time
@@
-413,6
+413,7
@@
class Target:
class Record(object):
def __init__(self, hostname, data):
class Record(object):
def __init__(self, hostname, data):
+ from monitor.wrapper import plccache
self.hostname = hostname
self.data = data
self.plcdb_hn2lb = plccache.plcdb_hn2lb
self.hostname = hostname
self.data = data
self.plcdb_hn2lb = plccache.plcdb_hn2lb
@@
-527,6
+528,8
@@
class Record(object):
else:
print "takeAction: increasing penalty for %s"%self.hostname
pp.increase()
else:
print "takeAction: increasing penalty for %s"%self.hostname
pp.increase()
+
+ print "takeAction: applying penalty to %s as index %s"% (self.hostname, index)
pp.index = index
pp.apply(self.hostname)
pp.save()
pp.index = index
pp.apply(self.hostname)
pp.save()
@@
-580,7
+583,7
@@
class Record(object):
contacts += plc.getTechEmails(self.loginbase)
if PI & roles:
#contacts += [PIEMAIL % self.loginbase]
contacts += plc.getTechEmails(self.loginbase)
if PI & roles:
#contacts += [PIEMAIL % self.loginbase]
- contacts += plc.get
SliceUser
Emails(self.loginbase)
+ contacts += plc.get
PI
Emails(self.loginbase)
if USER & roles:
contacts += plc.getSliceUserEmails(self.loginbase)
slices = plc.slices(self.loginbase)
if USER & roles:
contacts += plc.getSliceUserEmails(self.loginbase)
slices = plc.slices(self.loginbase)