| edition = "2023"; |
| |
| package safepower_agent_config; |
| |
| import "safepower_agent.proto"; |
| |
| // shared configs |
| message SafePowerAgentConfig { |
| GpowerdConfig gpowerd_config = 1; |
| repeated ActionConfig action_configs = 2; |
| PersistentStorageConfig persistent_storage_config = 3; |
| NodeOsConfig node_os_config = 4; |
| GrpcConfig grpc_config = 5; |
| } |
| // gpowerd specific configs will go here |
| message GpowerdConfig { |
| repeated StateMonitorConfig state_monitor_config = 1; |
| PersistentStorageConfig persistent_storage_config = 2 [deprecated = true]; |
| PingConfig ping_config = 3; |
| AddressLookupConfig address_lookup_config = 4; |
| RedfishBootCountConfig redfish_boot_count_config = 5; |
| } |
| |
| message PingConfig { |
| string command = 1 [default = "/usr/bin/ping6"]; |
| int64 interval_ms = 2 [default = 5000]; |
| int32 count_per_check = 3 [default = 3]; |
| // extra args to be passed to the ping command before the count and hostname. |
| repeated string extra_args = 5; |
| } |
| |
| message AddressLookupConfig { |
| string command = 1 [default = "/usr/sbin/ip"]; |
| repeated string args = 5; |
| } |
| |
| message RedfishBootCountConfig { |
| string uri = 1 [default = "/redfish/v1/Managers/bmc/ManagerDiagnosticData"]; |
| string ip = 2 [default = "::1"]; |
| uint32 port = 3 [default = 80]; |
| int64 retry_interval_ms = 4 [default = 1000]; |
| int64 timeout_sec = 5; |
| } |
| |
| // node os specific configs will go here |
| message NodeOsConfig { |
| string boot_count_path = 1 [default = "/etc/bootcount"]; |
| } |
| |
| message PersistentStorageConfig { |
| string dir_path = 1; |
| int64 max_file_size = 2; |
| int64 proto_keep_number = 3; |
| } |
| |
| 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.NodeState 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; |
| int32 disruption_timeout_seconds = 3; |
| |
| oneof info { |
| RedfishAction redfish = 4; |
| DbusAction dbus = 5; |
| ExecAction exec = 6; |
| } |
| } |
| |
| message ExecAction { |
| string command = 1; |
| repeated string args = 2; |
| int32 expected_exit_code = 3; |
| int32 timeout_seconds = 4 [default = 1]; |
| } |
| |
| message RedfishAction { |
| string uri = 1; |
| string json_body = 2; |
| string ip = 3; |
| uint32 port = 4; |
| int32 call_timeout_seconds = 5; |
| } |
| |
| message DbusAction {} |
| |
| message GrpcConfig { |
| int32 keepalive_time_ms = 1 [default = 600000]; // 10 min; |
| int32 keepalive_timeout_ms = 2 [default = 20000]; // 20 sec |
| int32 keepalive_permit_without_calls = 3 [default = 1]; |
| int32 max_pings_without_data = 4 [default = 2]; |
| int32 min_recv_ping_interval_without_data_ms = 5 |
| [default = 10000]; // 10 sec; |
| int32 max_ping_strikes = 6 [default = 2]; |
| } |