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
removed unnecessary print.
[monitor.git]
/
commands
/
pcubad.py
diff --git
a/commands/pcubad.py
b/commands/pcubad.py
index
085389f
..
5e7f243
100755
(executable)
--- a/
commands/pcubad.py
+++ b/
commands/pcubad.py
@@
-63,15
+63,16
@@
hn2lb = plccache.plcdb_hn2lb
def check_pcu_state(rec, pcu):
pcu_state = rec.reboot_trial_status
def check_pcu_state(rec, pcu):
pcu_state = rec.reboot_trial_status
+ good_list = [0, "0", "Test: No error"]
# DOWN
# DOWN
- if pcu_state not in
[0, "0"]
and pcu.status not in ['offline', 'down']:
+ if pcu_state not in
good_list
and pcu.status not in ['offline', 'down']:
print "changed status from %s to offline" % pcu.status
pcu.status = 'offline'
pcu.last_changed = datetime.now()
# ONLINE
print "changed status from %s to offline" % pcu.status
pcu.status = 'offline'
pcu.last_changed = datetime.now()
# ONLINE
- if pcu_state in
[0, "0"]
and pcu.status not in [ 'online', 'good' ]:
+ if pcu_state in
good_list
and pcu.status not in [ 'online', 'good' ]:
print "changed status from %s to online" % pcu.status
pcu.status = 'online'
pcu.last_changed = datetime.now()
print "changed status from %s to online" % pcu.status
pcu.status = 'online'
pcu.last_changed = datetime.now()