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:
parent
36c6285715
commit
2ee10df146
@ -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 []
|
||||
|
||||
|
@ -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 = {}
|
||||
|
Loading…
Reference in New Issue
Block a user