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:
commit
db3320e2ec
@ -218,13 +218,12 @@ noderesources = {
|
||||
'pluginattrs': ['hardwaremanagement.method'],
|
||||
'default': 'ipmi',
|
||||
}),
|
||||
},
|
||||
'led': {
|
||||
'all': PluginCollection({
|
||||
'leds': PluginCollection({
|
||||
'pluginattrs': ['hardwaremanagement.method'],
|
||||
'default': 'ipmi',
|
||||
})
|
||||
}),
|
||||
},
|
||||
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user