2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-01-17 21:23:18 +00:00

Merge pull request #29 from jjohnson42/moveleds

Move 'leds' to be a hardware sensor category
This commit is contained in:
Jarrod Johnson 2015-09-28 14:44:24 -04:00
commit db3320e2ec
2 changed files with 7 additions and 8 deletions

View File

@ -218,13 +218,12 @@ noderesources = {
'pluginattrs': ['hardwaremanagement.method'],
'default': 'ipmi',
}),
},
'led': {
'all': PluginCollection({
'leds': PluginCollection({
'pluginattrs': ['hardwaremanagement.method'],
'default': 'ipmi',
})
}),
},
},
}

View File

@ -651,12 +651,12 @@ class IpmiHandler(object):
self.sensorcategory = self.element[2]
# list sensors per category
if len(self.element) == 3 and self.element[-2] == 'hardware':
if self.sensorcategory == 'leds':
return self.list_leds()
return self.list_sensors()
elif len(self.element) == 3 and self.element[-2] == 'led':
return self.list_leds()
elif len(self.element) == 4 and self.element[1] == 'led':
return self.read_leds(self.element[-1])
elif len(self.element) == 4: # resource requested
if self.sensorcategory == 'leds':
return self.read_leds(self.element[-1])
return self.read_sensors(self.element[-1])
def match_sensor(self, sensor):