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

Attempt generic height information extraction

Change-Id: I751f4bbe00c0aaa9d4dd57e33c1343e883807167
This commit is contained in:
Jarrod Johnson 2024-09-12 11:28:17 -04:00
parent 36c6285715
commit 2ee10df146
2 changed files with 7 additions and 6 deletions

View File

@ -530,8 +530,15 @@ class OEMHandler(object):
return None
def get_description(self, fishclient):
for chassis in fishclient.sysinfo.get('Links', {}).get('Chassis', []):
chassisurl = chassis['@odata.id']
chassisinfo = self._do_web_request(chassisurl)
hmm = chassisinfo.get('HeightMm', None)
if hmm:
return {'height': hmm/44.45}
return {}
def get_firmware_inventory(self, components, fishclient):
return []

View File

@ -4,15 +4,9 @@ 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 supports_expand(self, url):
return True
def get_system_configuration(self, hideadvanced=True, fishclient=None):
stgs = self._getsyscfg(fishclient)[0]
outstgs = {}