2
0
mirror of https://opendev.org/x/pyghmi synced 2026-01-11 18:52:33 +00:00

Merge "Fix problems with unrecognized health"

This commit is contained in:
Zuul
2019-09-17 13:00:31 +00:00
committed by Gerrit Code Review

View File

@@ -131,6 +131,11 @@ class SensorReading(object):
self.name = sensor['name']
else:
self.name = healthinfo['Name']
self.health = _healthmap.get(
healthinfo.get('Status', {}).get(
'Health', None), const.Health.Warning)
self.states = [healthinfo.get('Status', {}).get('Health',
'Unknown')]
self.health = _healthmap[healthinfo['Status']['Health']]
self.states = [healthinfo['Status']['Health']]
self.value = value