From 60313e76c0c78f4a4386e0373802a4a4c4539222 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 12 Apr 2019 13:48:45 -0400 Subject: [PATCH] Workaround 7Y36 model bug 7Y36 firmware does not populate u-height. Workaround the bug by embedding the correct value for the model. Change-Id: I78481b7ec80956d76e6085855d35cd7c6886a225 --- pyghmi/ipmi/oem/lenovo/imm.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyghmi/ipmi/oem/lenovo/imm.py b/pyghmi/ipmi/oem/lenovo/imm.py index 174887c4..39088c65 100644 --- a/pyghmi/ipmi/oem/lenovo/imm.py +++ b/pyghmi/ipmi/oem/lenovo/imm.py @@ -787,7 +787,10 @@ class XCCClient(IMMClient): dsc = self.wc.grab_json_response('/DeviceDescription.json') dsc = dsc[0] if not dsc.get('u-height', None): - return {} + if dsc.get('enclosure-machinetype-model', '').startswith('7Y36'): + return {'height': 2, 'slot': 0} + else: + return {} return {'height': int(dsc['u-height']), 'slot': int(dsc['slot'])} def clear_system_configuration(self):