From fa37941aee4d2bb6f95b38f1b136f6a42f20a563 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 24 Jun 2022 10:20:05 -0400 Subject: [PATCH] Remove DIMM temperatures from XCC sensor These sensors are very slow to fetch and slow down readers needlessly for low value. Change-Id: Ic498dff5f669f6d2610e6998af7f3693591c40c4 --- pyghmi/ipmi/oem/lenovo/imm.py | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/pyghmi/ipmi/oem/lenovo/imm.py b/pyghmi/ipmi/oem/lenovo/imm.py index c988cb27..4c6c1bce 100644 --- a/pyghmi/ipmi/oem/lenovo/imm.py +++ b/pyghmi/ipmi/oem/lenovo/imm.py @@ -1557,24 +1557,26 @@ class XCCClient(IMMClient): def get_oem_sensor_names(self, ipmicmd): oemsensornames = super(XCCClient, self).get_oem_sensor_names(ipmicmd) - therminfo = self.grab_cacheable_json( - '/api/dataset/pwrmgmt?params=GetThermalRealTimeData', 1) - if therminfo: - for name in sorted(therminfo.get('items', [[]])[0]): - if 'DIMM' in name and 'Temp' in name: - oemsensornames = oemsensornames + (name,) return oemsensornames + # therminfo = self.grab_cacheable_json( + # '/api/dataset/pwrmgmt?params=GetThermalRealTimeData', 1) + # if therminfo: + # for name in sorted(therminfo.get('items', [[]])[0]): + # if 'DIMM' in name and 'Temp' in name: + # oemsensornames = oemsensornames + (name,) + # return oemsensornames def get_oem_sensor_descriptions(self, ipmicmd): oemdesc = [{'name': x, 'type': 'Energy'} for x in super( XCCClient, self).get_oem_sensor_names(ipmicmd)] - therminfo = self.grab_cacheable_json( - '/api/dataset/pwrmgmt?params=GetThermalRealTimeData', 1) - if therminfo: - for name in sorted(therminfo['items'][0]): - if 'DIMM' in name and 'Temp' in name: - oemdesc.append({'name': name, 'type': 'Temperature'}) return oemdesc + # therminfo = self.grab_cacheable_json( + # '/api/dataset/pwrmgmt?params=GetThermalRealTimeData', 1) + # if therminfo: + # for name in sorted(therminfo['items'][0]): + # if 'DIMM' in name and 'Temp' in name: + # oemdesc.append({'name': name, 'type': 'Temperature'}) + # return oemdesc def get_oem_sensor_reading(self, name, ipmicmd): if 'Energy' in name: