This update adds the Power Supply Redundancy sensor to the redfish
server power sensor group.
Some special handling is required to make the assertion of this
new sensor have a 'major' severity level and only while there are
2 or more power supplies provisioned. See code comments in the review
that highlight the assertion only applies when the redundancy sensor
count is 2 and severity is overridden from critical to major.
This update does not apply to the IPMI 'server power' sensor group.
This is because the IPMI protocol does not distinguish between single
and redundant power supply provisioning cases and reports a redundancy
loss in the single power supply case even when that power supply is
operating fine.
Test Plan:
PASS: Verify new PS Redundancy sensor is added to the server
power sensor group with redfish sensor monitoring.
PASS: Verify no PS Redundancy assertion with redundant power
supplies installed while both have AC power input.
PASS: Verify major PS Redundancy assertion with redundant power
supplies installed while one not receiving AC power input.
PASS: Verify no PS Redundancy assertion with single power supply.
PASS: Verify PS Redundancy sensor goes offline when 'state' is
not 'Enabled' and returns to operating state when re-Enabled.
PASS: Verify PS Redundancy sensor goes 'offline' when
Redundancy label is missing.
PASS: Verify PS Redundancy sensor goes 'offline' when
RedundancySet count is missing.
PASS: Verify PS Redundancy sensor goes 'offline' when
Status label is missing.
PASS: Verify PS Redundancy sensor assertion when Status:Health
is not 'OK'.
PASS: Verify PS Redundancy sensor goes 'offline' when Status:State
is not 'Enabled'.
PASS: Verify new PS Redundancy sensor survives a process restart.
PASS: Verify new PS Redundancy sensor asserts with non-OK status
while redundancy count is greater than one.
Regression:
PASS: Verify host is degraded when PS redundancy alarm is asserted.
PASS: Verify alarm and degrade is cleared if sensor reads OK.
PASS: Verify alarm and degrade is cleared if sensor goes offline.
PASS: Verify a 'logged-major' PS Redundancy assertion raises alarm
when the group action is changed to 'alarm'.
PASS: Verify a' alarm-major' PS Redundancy assertion clears alarm
when the group action is changed to 'log'.
PASS: Verify no PS Redundancy sensor is added to the server
power sensor group with ipmi sensor monitoring.
PASS: Verify no PS Redundancy assertion with single or redundant
power supplies with ipmi sensor monitoring.
PASS: Verify all sensor assertions are cleared when a server's BMC
is reprovisioned by bm_type or bm_ip address or completely
deprovisioned by bm_type=none.
PASS: Verify basic hardware monitor sensor assertion/clear operations.
Closes-Bug: 2076200
Change-Id: Ieae8f2b8681d1a2b29da0707b2f439cf10c47a2c
Signed-off-by: Eric MacDonald <eric.macdonald@windriver.com>