2
0
mirror of https://opendev.org/x/pyghmi synced 2025-01-28 11:57:34 +00:00

Fix attempt to get LED against System X

The lenovo oem handler was erroneously unconditionally applying
Thinkserver LED queries to system x.  Correct by checking for a
TSM prior to making the request.

Change-Id: I202942743a1040516f80ea5a2655037d19a5c59a
This commit is contained in:
Jarrod Johnson 2015-09-28 10:57:10 -04:00
parent d4ed291e69
commit 36404cc934

View File

@ -280,14 +280,16 @@ class OEMHandler(generic.OEMHandler):
continue
def get_leds(self):
for (name, id_) in leds.items():
try:
rsp = self.ipmicmd.xraw_command(netfn=0x3A, command=0x02,
data=(id_,))
except pygexc.IpmiException:
continue # Ignore LEDs we can't retrieve
status = led_status.get(ord(rsp['data'][0]), led_status_default)
yield (name, {'status': status})
if self.has_tsm:
for (name, id_) in leds.items():
try:
rsp = self.ipmicmd.xraw_command(netfn=0x3A, command=0x02,
data=(id_,))
except pygexc.IpmiException:
continue # Ignore LEDs we can't retrieve
status = led_status.get(ord(rsp['data'][0]),
led_status_default)
yield (name, {'status': status})
def process_fru(self, fru):
if fru is None: