1# Callback Manager 2 3Author: James Feist !jfei 4 5Primary assignee: James Feist !jfei 6 7Other contributors: None 8 9Created: 2019-06-26 10 11## Problem Description 12 13We need a centralized location to change the LED state. 14 15## Background and References 16 17[Redfish Health](https://github.com/openbmc/docs/blob/master/designs/redfish_health_rollup.md) 18 19[Sensor Thresholds](https://github.com/openbmc/phosphor-dbus-interfaces/tree/master/xyz/openbmc_project/Sensor/Threshold) 20 21## Requirements 22 23Need to be able to trigger the LED from multiple locations and maintain state. 24 25## Proposed Design 26 27The callback manager can change LED state in the below ways. 28 291. Monitoring the sensor threshold interface. 301. Monitoring critical / warning thresholds as Redfish does. 31 32Other interfaces specific interfaces can be added later if it makes sense. The 33reason it was designed this way is Redfish has the idea of a Global health 34state, and a component health state. We need to map these to the LED. 35 36### Thresholds 37 38Warning thresholds will trigger warning (blink green) LED state. 39 40Critical thresholds will trigger critical (blink amber) state. 41 42Callback manager will create associations for redfish for thresholds 43automatically. 44 45### Associations 46 47There are two types of status associations, detailed in the Redfish health 48whitepaper. 49 501. Global- These are the attributes to the global state (warning / critical). 51 This is exposed by the callback manager for ease 52 (xyz.openbmc_project.Inventory.Item.Global, 53 path=/xyz/openbmc_project/CallbackManager) 541. Local- Any other warning / critical association. 55 56If the path for an association is Critical for Global & Local, the LED will be 57in the fatal (amber solid) state. 58 59If the path for an association is in Warning for Global & Critical for local, 60the LED will be in the Critical (amber blink) state. 61 62If the path for an association is in the Warning for Global & not Critical for 63local, the LED will be in the Warning (blink green) state. 64 65## Alternatives Considered 66 67Write the LED manually, this seems very error prone. 68 69## Impacts 70 71Will have to add more associations. 72 73## Testing 74 75Sensor override, then look at LED and Redfish. 76