2
0
mirror of https://opendev.org/x/pyghmi synced 2026-04-01 15:53:32 +00:00

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
This commit is contained in:
Jarrod Johnson
2022-04-20 16:41:38 -04:00
parent 500d31e215
commit 49973f7474

View File

@@ -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,