X-Git-Url: http://git.onelab.eu/?p=monitor.git;a=blobdiff_plain;f=monitor%2Fcommon.py;h=850d36b592b7c53a4bc54b78c0430463cd7dccbf;hp=05a4ec261ed10897f27007e7f5ef707145817c72;hb=ecea36bbf6aad3bbd3e544d336b89a45cff4ab34;hpb=36b3183046a4c77cda147b440c6e85d1a036f239 diff --git a/monitor/common.py b/monitor/common.py index 05a4ec2..850d36b 100644 --- a/monitor/common.py +++ b/monitor/common.py @@ -43,12 +43,17 @@ def get_current_state(fbnode): return l def color_pcu_state(fbnode): + if fbnode['plc_pcuid'] is None: + return 'NOPCU' + else: + return 'PCU' if 'plcnode' in fbnode and 'pcu_ids' in fbnode['plcnode'] and len(fbnode['plcnode']['pcu_ids']) > 0 : values = reboot.get_pcu_values(fbnode['plcnode']['pcu_ids'][0]) if values == None: return fbnode['pcu'] else: + print fbnode.keys() if 'pcu' not in fbnode: return 'NOPCU' else: