| edition = "2023"; |
| |
| package safepower_agent_config; |
| |
| import "safepower_agent.proto"; |
| |
| option features.field_presence = IMPLICIT; |
| |
| // shared configs |
| message SafePowerAgentConfig { |
| GpowerdConfig gpowerd_config = 1; |
| repeated ActionConfig action_configs = 2; |
| } |
| // gpowerd specific configs will go here |
| message GpowerdConfig { |
| repeated StateMonitorConfig state_monitor_config = 1; |
| } |
| |
| message StateMonitorConfig { |
| string state_name = 1; |
| StateGatheringInfo state_gathering_info = 2; |
| safepower_agent_proto.SystemComponent system_component = 3; |
| } |
| |
| message StateGatheringInfo { |
| oneof info { |
| RedfishInfo redfish = 1; |
| DbusInfo dbus = 2; |
| } |
| |
| uint32 collection_interval_ms = 3; |
| safepower_agent_proto.ComponentState prototype = 4; |
| } |
| |
| message RedfishInfo { |
| string uri = 1; |
| string json_key = 2; |
| } |
| |
| message DbusInfo { |
| string dbus_path = 1; |
| string dbus_method = 2; |
| string dbus_interface = 3; |
| string dbus_value = 4; |
| } |
| |
| message ActionConfig { |
| string action_name = 1; |
| safepower_agent_proto.Action action = 2; |
| |
| oneof info { |
| RedfishAction redfish = 4; |
| DbusAction dbus = 5; |
| } |
| } |
| |
| message RedfishAction { |
| string uri = 1; |
| string json_body = 2; |
| string ip = 3; |
| uint32 port = 4; |
| } |
| |
| message DbusAction {} |