2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-02-17 02:58:51 +00:00

Add 'type' field to sensors

In sensors/ and health/, put 'type' field in to clarify the sensor
reading category.
This commit is contained in:
Jarrod Johnson 2015-07-13 10:15:03 -04:00
parent d27df8fffc
commit 24eb872090
2 changed files with 5 additions and 1 deletions

View File

@ -740,6 +740,8 @@ class SensorReadings(ConfluentMessage):
sensordict['states'] = sensor['states']
if 'health' in sensor:
sensordict['health'] = sensor['health']
if 'type' in sensor:
sensordict['type'] = sensor['type']
readings.append(sensordict)
if self.notnode:
self.kvpairs = {'sensors': readings}

View File

@ -280,7 +280,9 @@ persistent_ipmicmds = {}
def _dict_sensor(pygreading):
retdict = {'name': pygreading.name, 'value': pygreading.value,
'states': pygreading.states, 'units': pygreading.units,
'health': _str_health(pygreading.health)}
'health': _str_health(pygreading.health),
'type': pygreading.type,
}
return retdict