mirror of
https://opendev.org/x/pyghmi
synced 2026-10-06 17:46:59 +00:00
Provide build id values for SMMV3 firmware
Provide an OEM method to get Oem data from firmware into the normalized form, and use that to hook the SMM firmware information. Change-Id: I7028c510afebf103fb6e0aaabdf085de3472eef2
This commit is contained in:
@@ -1115,7 +1115,7 @@ class Command(object):
|
||||
yield res
|
||||
|
||||
def _extract_fwinfo(self, inf):
|
||||
currinf = {}
|
||||
currinf = self._oem._extract_fwinfo(inf)
|
||||
fwi, url = inf
|
||||
fwname = fwi.get('Name', 'Unknown')
|
||||
if fwname in self._fwnamemap:
|
||||
@@ -1129,6 +1129,7 @@ class Command(object):
|
||||
currinf['id'] = fwi.get('Id', None)
|
||||
currinf['version'] = fwi.get('Version', 'Unknown')
|
||||
currinf['date'] = parse_time(fwi.get('ReleaseDate', ''))
|
||||
currinf['software_id'] = fwi.get('SoftwareId', '')
|
||||
if not (currinf['version'] or currinf['date']):
|
||||
return None, None
|
||||
# TODO(Jarrod Johnson): OEM extended data with buildid
|
||||
|
||||
@@ -650,6 +650,9 @@ class OEMHandler(object):
|
||||
return {}
|
||||
|
||||
|
||||
def _extract_fwinfo(self, inf):
|
||||
return {}
|
||||
|
||||
def get_firmware_inventory(self, components, fishclient):
|
||||
return []
|
||||
|
||||
|
||||
@@ -104,6 +104,15 @@ class OEMHandler(generic.OEMHandler):
|
||||
progress({'phase': 'complete'})
|
||||
return savefile
|
||||
|
||||
def _extract_fwinfo(self, inf):
|
||||
fwi, url = inf
|
||||
currinf = {}
|
||||
buildid = fwi.get('Oem', {}).get('Lenovo', {}).get('ExtendedVersion', None)
|
||||
if buildid:
|
||||
currinf['build'] = buildid
|
||||
return currinf
|
||||
|
||||
|
||||
def _get_node_info(self):
|
||||
nodeinfo = self._varsysinfo
|
||||
if not nodeinfo:
|
||||
|
||||
Reference in New Issue
Block a user