2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-22 17:43:14 +00:00

Add numeric state_ids to sensor readings

A plugin may provide a numeric enumeration for
state ids.  Provide that for programmatic recognition
of events in addition to being able to combine the
available text.
This commit is contained in:
Jarrod Johnson 2015-07-20 15:03:18 -04:00
parent 19dd0539a9
commit 905c41b021
2 changed files with 4 additions and 1 deletions

View File

@ -746,6 +746,8 @@ class SensorReadings(ConfluentMessage):
sensordict['units'] = sensor['units']
if 'states' in sensor:
sensordict['states'] = sensor['states']
if 'state_ids' in sensor:
sensordict['state_ids'] = sensor['state_ids']
if 'health' in sensor:
sensordict['health'] = sensor['health']
if 'type' in sensor:

View File

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