mirror of
https://opendev.org/x/pyghmi
synced 2025-01-15 12:17:44 +00:00
Handle Lenovo Thinkserver lacking OEM inventory
If a Thinkserver responds negatively to request for OEM inventory data, gracefully drop out and return empty information rather than passing it up the stack. Change-Id: I16d176606bb95d56244dfea43f9d828ff046bbc1
This commit is contained in:
parent
d6f0a2797a
commit
59d7945957
@ -15,6 +15,7 @@
|
||||
# limitations under the License.
|
||||
|
||||
import pyghmi.constants as pygconst
|
||||
import pyghmi.exceptions as pygexc
|
||||
import pyghmi.ipmi.oem.generic as generic
|
||||
import pyghmi.ipmi.private.constants as ipmiconst
|
||||
import pyghmi.ipmi.private.spd as spd
|
||||
@ -222,8 +223,11 @@ class OEMHandler(generic.OEMHandler):
|
||||
def _collect_tsm_inventory(self):
|
||||
# Collect CPU inventory
|
||||
self.oem_inventory_info = {}
|
||||
rsp = self.ipmicmd.xraw_command(netfn=6, command=0x59,
|
||||
data=(0, 0xc1, 1, 0))
|
||||
try:
|
||||
rsp = self.ipmicmd.xraw_command(netfn=6, command=0x59,
|
||||
data=(0, 0xc1, 1, 0))
|
||||
except pygexc.IpmiException:
|
||||
return
|
||||
compcount = ord(rsp['data'][1])
|
||||
for cpu in xrange(0, compcount):
|
||||
offset = 2 + (85 * cpu)
|
||||
|
Loading…
x
Reference in New Issue
Block a user