diff --git a/pyghmi/redfish/command.py b/pyghmi/redfish/command.py index de8b7d48..32feea92 100644 --- a/pyghmi/redfish/command.py +++ b/pyghmi/redfish/command.py @@ -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 diff --git a/pyghmi/redfish/oem/generic.py b/pyghmi/redfish/oem/generic.py index a77212f1..0cbb4ba0 100644 --- a/pyghmi/redfish/oem/generic.py +++ b/pyghmi/redfish/oem/generic.py @@ -650,6 +650,9 @@ class OEMHandler(object): return {} + def _extract_fwinfo(self, inf): + return {} + def get_firmware_inventory(self, components, fishclient): return [] diff --git a/pyghmi/redfish/oem/lenovo/smm3.py b/pyghmi/redfish/oem/lenovo/smm3.py index d35a30e5..aa3ab8df 100644 --- a/pyghmi/redfish/oem/lenovo/smm3.py +++ b/pyghmi/redfish/oem/lenovo/smm3.py @@ -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: