2
0
mirror of https://opendev.org/x/pyghmi synced 2024-12-25 12:41:37 +00:00

Rework get description to enable it to work fer XCC3

Change-Id: I3c1fdb74bd68571e81963037bc339bff8228ccea
This commit is contained in:
Jarrod Johnson 2024-09-09 07:44:00 -04:00
parent 74b2e6da48
commit b6776ce2ee
4 changed files with 9 additions and 3 deletions

View File

@ -1078,7 +1078,7 @@ class Command(object):
return self._oem
def get_description(self):
return self.oem.get_description()
return self.oem.get_description(self)
def get_event_log(self, clear=False):
bmcinfo = self._do_web_request(self._bmcurl)

View File

@ -519,7 +519,7 @@ class OEMHandler(object):
def detach_remote_media(self):
return None
def get_description(self):
def get_description(self, fishclient):
return {}
def get_firmware_inventory(self, components, fishclient):

View File

@ -579,7 +579,7 @@ class OEMHandler(generic.OEMHandler):
summary['badreadings'] = fallbackdata
return summary
def get_description(self):
def get_description(self, fishclient):
description = self._do_web_request('/DeviceDescription.json')
if description:
description = description[0]

View File

@ -4,6 +4,12 @@ import pyghmi.exceptions as pygexc
class OEMHandler(generic.OEMHandler):
def get_description(self, fishclient):
bmcstgs = fishclient._do_web_request('/redfish/v1/Managers/1/Oem/Lenovo/BMCSettings')
heightu = bmcstgs.get('Attributes', {}).get('ServerConfigHeightU')
return {'height': heightu}
def get_system_configuration(self, hideadvanced=True, fishclient=None):
stgs = self._getsyscfg(fishclient)[0]
outstgs = {}