mirror of
https://github.com/xcat2/confluent.git
synced 2025-01-17 21:23:18 +00:00
Move 'leds' to be a hardware sensor category
Rather than 'led' being distinct from 'hardware', have 'leds' be a category of 'hardware' like 'fans' or other things similarly hardware related.
This commit is contained in:
parent
c1bd46b22a
commit
0ae2b7acc6
@ -214,13 +214,12 @@ noderesources = {
|
||||
'pluginattrs': ['hardwaremanagement.method'],
|
||||
'default': 'ipmi',
|
||||
}),
|
||||
},
|
||||
'led': {
|
||||
'all': PluginCollection({
|
||||
'leds': PluginCollection({
|
||||
'pluginattrs': ['hardwaremanagement.method'],
|
||||
'default': 'ipmi',
|
||||
})
|
||||
}),
|
||||
},
|
||||
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -646,12 +646,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