From c5902bb0c88f785f9e2d36bc8e6cfdf7e668bb67 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 30 Oct 2015 11:28:05 -0400 Subject: [PATCH] Fix TSM detection As of recent System X hardware releases, the mfg/device id values are now ambiguous. Go deeper in the tsm detection to assure the system is indeed a TSM system rather than IMM or other. Change-Id: Id63d015bf03e9ea9501503543effd31e01691b31 --- pyghmi/ipmi/oem/lenovo/handler.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pyghmi/ipmi/oem/lenovo/handler.py b/pyghmi/ipmi/oem/lenovo/handler.py index 20f94a5e..b675658d 100755 --- a/pyghmi/ipmi/oem/lenovo/handler.py +++ b/pyghmi/ipmi/oem/lenovo/handler.py @@ -230,8 +230,16 @@ class OEMHandler(generic.OEMHandler): def has_tsm(self): """True if this particular server have a TSM based service processor """ - return (self.oemid['manufacturer_id'] == 19046 and - self.oemid['device_id'] == 32) + if (self.oemid['manufacturer_id'] == 19046 and + self.oemid['device_id'] == 32): + try: + self.ipmicmd.xraw_command(netfn=0x3a, command=0xf) + except pygexc.IpmiException as ie: + if ie.ipmicode == 193: + return False + raise + return True + return False def get_oem_inventory_descriptions(self): if self.has_tsm: