blob: 6d7d2f5464b2eb00c55345c1bbae6d4377bc1b93 [file] [log] [blame] [edit]
edition = "2023";
package milotic_tlbmc;
enum PowerState {
POWER_STATE_UNSPECIFIED = 0;
// Power is on.
POWER_STATE_ON = 1;
// Power is turning on, waiting for power OK signal. If power OK is not
// received within the watchdog timer timeout, the power will be set to off.
POWER_STATE_WAIT_FOR_POWER_OK = 2;
// Power is off.
POWER_STATE_OFF = 3;
// Power is transitioning to off state due to a force power off.
POWER_STATE_TRANSITION_TO_OFF = 4;
// Power is transitioning to off state due to a graceful power off.
POWER_STATE_GRACEFUL_TRANSITION_TO_OFF = 5;
// Power is off, waiting for power cycle timer to expire before turning on.
// This is an intermediate state during a power cycle request.
POWER_STATE_CYCLE_OFF = 6;
// Power is transitioning to cycle off state. This is an intermediate state
// during a power cycle request(before Power OK is deasserted).
POWER_STATE_TRANSITION_TO_CYCLE_OFF = 7;
// Power is transitioning to cycle off state. This is an intermediate state
// during a graceful power cycle request(before Power OK is deasserted).
POWER_STATE_GRACEFUL_TRANSITION_TO_CYCLE_OFF = 8;
// POST complete deasserted, checking if it is a warm reset.
POWER_STATE_CHECK_FOR_WARM_RESET = 9;
}
enum OSState {
OS_STATE_UNSPECIFIED = 0;
OS_STATE_INACTIVE = 1;
OS_STATE_STANDBY = 2;
}
// System reset type. Used for Redfish System.Reset method.
enum SystemResetType {
SYSTEM_RESET_TYPE_UNSPECIFIED = 0;
SYSTEM_RESET_TYPE_FORCE_OFF = 1;
SYSTEM_RESET_TYPE_FORCE_ON = 2;
SYSTEM_RESET_TYPE_FORCE_RESTART = 3;
SYSTEM_RESET_TYPE_GRACEFUL_RESTART = 4;
SYSTEM_RESET_TYPE_GRACEFUL_SHUTDOWN = 5;
SYSTEM_RESET_TYPE_ON = 6;
SYSTEM_RESET_TYPE_POWER_CYCLE = 7;
}
message HostState {
string host_id = 1;
PowerState power_state = 2;
OSState os_state = 3;
}
message PowerControlConfig {
string host_id = 1;
string chassis_id = 2;
// Input GPIO line name to detect if host power is OK.
string power_ok_gpio_name = 3;
// Input GPIO line name to detect if OS is active.
string post_complete_gpio_name = 4;
// Output GPIO line name to control host power.
string power_out_gpio_name = 5;
// Output GPIO line name to control host reset.
string reset_out_gpio_name = 6;
map<string, uint32> timer_map = 7;
}
message PowerControlConfigs {
repeated PowerControlConfig power_control_configs = 1;
// We only allow to perform tray power operations for now.
// Press this GPIO pin to perform tray power operations.
string hotswap_pin_name = 2;
}