mirror of
https://opendev.org/x/pyghmi
synced 2025-01-27 19:37:44 +00:00
Implement SMM data extension
Do the SMM specific commands to get the serial number and model number. Change-Id: Iddc84c386996a2f93974e65980ed6f928105d87f
This commit is contained in:
parent
c341814267
commit
1a60269df7
@ -496,6 +496,9 @@ class OEMHandler(generic.OEMHandler):
|
||||
except (AttributeError, KeyError, IndexError):
|
||||
pass
|
||||
return fru
|
||||
elif self.is_fpc == 2: # SMM variant
|
||||
fru['oem_parser'] = 'lenovo'
|
||||
return self.smmhandler.process_fru(fru)
|
||||
else:
|
||||
fru['oem_parser'] = None
|
||||
return fru
|
||||
|
@ -240,6 +240,16 @@ class SMMClient(object):
|
||||
self.password = ipmicmd.ipmi_session.password
|
||||
self._wc = None
|
||||
|
||||
def process_fru(self, fru):
|
||||
# TODO(jjohnson2): can also get EIOM, SMM, and riser data if warranted
|
||||
fru['Serial Number'] = self.ipmicmd.xraw_command(
|
||||
netfn=0x32, command=0xb0, data=(5, 1))['data'][:].strip().replace(
|
||||
'\xff', '')
|
||||
fru['Model'] = self.ipmicmd.xraw_command(
|
||||
netfn=0x32, command=0xb0, data=(5, 0))['data'][:].strip().replace(
|
||||
'\xff', '')
|
||||
return fru
|
||||
|
||||
def get_webclient(self):
|
||||
cv = self.ipmicmd.certverify
|
||||
wc = webclient.SecureHTTPConnection(self.smm, 443, verifycallback=cv)
|
||||
|
Loading…
x
Reference in New Issue
Block a user