From 49973f747429ce60f2077a0801ca3627d032b0a4 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 20 Apr 2022 16:41:38 -0400 Subject: [PATCH] Go back to trusting XCC health assessment The health assesment can be much cheaper if the XCC health assessment is trusted. The issue would be that if the XCC web shows healthy, but the error LED is lit, this condition would no longer be seen. However, the error LED shouldn't be lit unless the XCC detects a fault. So if such a condition of LED lit without explanation should arise in the future, it would be better treated as an XCC firmware issue. Change-Id: I55a4451eda4aba43fcf3d3e8e2307c3ce30b8fcd --- pyghmi/ipmi/oem/lenovo/imm.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/pyghmi/ipmi/oem/lenovo/imm.py b/pyghmi/ipmi/oem/lenovo/imm.py index a2503bd2..ec35241f 100644 --- a/pyghmi/ipmi/oem/lenovo/imm.py +++ b/pyghmi/ipmi/oem/lenovo/imm.py @@ -2134,16 +2134,8 @@ class XCCClient(IMMClient): raise pygexc.BypassGenericBehavior() rsp = wc.grab_json_response('/api/providers/imm_active_events') if 'items' in rsp and len(rsp['items']) == 0: - ledcheck = self.wc.grab_json_response( - '/api/dataset/imm_status_power') - for led in ledcheck.get('items', [{}])[0].get('LEDs', ()): - if led.get('name', None) == 'Fault': - if led.get('status', 0) == 0: - raise pygexc.BypassGenericBehavior() - break - else: - # The XCC reports healthy, no need to interrogate - raise pygexc.BypassGenericBehavior() + # The XCC reports healthy, no need to interrogate + raise pygexc.BypassGenericBehavior() fallbackdata = [] hmap = { 'I': pygconst.Health.Ok,