From 77aad5f728a79a718168042135267a1ba1162fd9 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 17 Feb 2015 13:40:14 -0500 Subject: [PATCH] Add missing generic discrete codes A large chunk of generic discrete codes had been skipped. Rectify the omission and classify the events. Some debate could be had around 'non-redundant', but the intent seems to be a way for a nominally redundant component to describe a suboptimal state. Change-Id: I48bbef96b7b6c952bcc940f5bb950962d07507d9 --- pyghmi/ipmi/private/constants.py | 92 +++++++++++++++++++++++++++++++- 1 file changed, 91 insertions(+), 1 deletion(-) diff --git a/pyghmi/ipmi/private/constants.py b/pyghmi/ipmi/private/constants.py index 98cbe909..1cee5e7d 100644 --- a/pyghmi/ipmi/private/constants.py +++ b/pyghmi/ipmi/private/constants.py @@ -196,7 +196,97 @@ discrete_type_offsets = { 'desc': 'Enabled', 'severity': const.Health.Ok, }, - } + }, + 0xa: { + 0: { + 'desc': 'Running', + 'severity': const.Health.Ok, + }, + 1: { + 'desc': 'In Test', + 'severity': const.Health.Ok, + }, + 2: { + 'desc': 'Power off', + 'severity': const.Health.Ok, + }, + 3: { + 'desc': 'Online', + 'severity': const.Health.Ok, + }, + 4: { + 'desc': 'Offline', + 'severity': const.Health.Critical, + }, + 5: { + 'desc': 'Off duty', + 'severity': const.Health.Ok, + }, + 6: { + 'desc': 'Degraded', + 'severity': const.Health.Critical, + }, + 7: { + 'desc': 'Power Save', + 'severity': const.Health.Ok, + }, + 8: { + 'desc': 'Install Error', + 'severity': const.Health.Critical, + }, + }, + 0xb: { + 0: { + 'desc': 'Redundant', + 'severity': const.Health.Ok, + }, + 1: { + 'desc': 'Not Redundant', + 'severity': const.Health.Warning, + }, + 2: { + 'desc': 'Redundancy degraded', + 'severity': const.Health.Warning, + }, + 3: { + 'desc': 'Not Redundant', + 'severity': const.Health.Warning, + }, + 4: { + 'desc': 'Not Redundant', + 'severity': const.Health.Warning, + }, + 5: { + 'desc': 'Degraded', + 'severity': const.Health.Critical, + }, + 6: { + 'desc': 'Redundancy degraded', + 'severity': const.Health.Warning, + }, + 7: { + 'desc': 'Redundancy degraded', + 'severity': const.Health.Warning, + }, + }, + 0xc: { + 0: { + 'desc': 'ACPI D0', + 'severity': const.Health.Ok, + }, + 1: { + 'desc': 'ACPI D1', + 'severity': const.Health.Ok, + }, + 2: { + 'desc': 'ACPI D2', + 'severity': const.Health.Ok, + }, + 3: { + 'desc': 'ACPI D3', + 'severity': const.Health.Ok, + }, + }, } sensor_type_offsets = {