from nodecommon import color_pcu_state, datetime_fromstr
from nodehistory import get_filefromglob
import time
from nodecommon import color_pcu_state, datetime_fromstr
from nodehistory import get_filefromglob
import time
for field in ['cpuspeed', 'memsize', 'disksize']:
if field not in cstat: cstat[field] = "null"
for field in ['cpuspeed', 'memsize', 'disksize']:
if field not in cstat: cstat[field] = "null"
return "BAD" # "disk_small",
if cstat['disksize'] == "null" and \
return "BAD" # "disk_small",
if cstat['disksize'] == "null" and \
- if float(cstat['cpuspeed']) >= 2.4 and \
- float(cstat['memsize']) >= 2.9 and \
- (cstat['disksize'] == "null" or float(cstat['disksize']) >= 320.0):
+ if float(cstat['cpuspeed']) >= 2.2 and \
+ float(cstat['memsize']) >= 2.8 and \
+ (cstat['disksize'] == "null" or float(cstat['disksize']) >= 250.0):
- fbstr = get_filefromglob(d, "production.findbad")
- fbpcustr = get_filefromglob(d, "production.findbadpcus")
+ fbstr = get_filefromglob(d, "production.findbad")[0]
+ fbpcustr = get_filefromglob(d, "production.findbadpcus")[0]
'hardware' : gethardwarequality(hostname, fb),
'pcuok' : color_pcu_state(fb['nodes'][hostname]['values']) }
#except:
'hardware' : gethardwarequality(hostname, fb),
'pcuok' : color_pcu_state(fb['nodes'][hostname]['values']) }
#except:
# print args
# print fb['nodes'][hostname]['values']
results.append("%(cc)7s %(status)8s %(hardware)8s %(pcuok)8s %(site)15s %(host)42s " % args)
# print args
# print fb['nodes'][hostname]['values']
results.append("%(cc)7s %(status)8s %(hardware)8s %(pcuok)8s %(site)15s %(host)42s " % args)