2
0
mirror of https://opendev.org/x/pyghmi synced 2025-08-24 03:50:20 +00:00

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
This commit is contained in:
Jarrod Johnson
2015-10-30 11:28:05 -04:00
parent f6386e42fa
commit c5902bb0c8

View File

@@ -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: