blob: 3809921fefe4739218b9d03f77768daec230d1b1 [file]
edition = "2023";
package milotic_tlbmc;
import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";
import "status.proto";
// Refresh mode of telemetry data.
enum RefreshMode {
// Default value.
REFRESH_MODE_UNSPECIFIED = 0;
// Data is refreshed on demand.
REFRESH_MODE_ON_DEMAND = 1;
// Data is refreshed periodically.
REFRESH_MODE_PERIODIC = 2;
}
message RefreshPolicy {
// Refresh mode of telemetry data.
RefreshMode refresh_mode = 1;
// Refresh interval of telemetry data.
google.protobuf.Duration refresh_interval = 2;
}
// State of telemetry data.
// LINT.IfChange
enum Status {
// Data has not been initialized by the collector.
// Default state on boot.
STATUS_UNKNOWN = 0;
// Fresh data ready to be served.
STATUS_READY = 1;
// State when data refresh timed out or an error occurred preventing future
// refreshes.
STATUS_STALE = 2;
// State when sensor creation failed, but
// TlbmcConfig.allow_sensor_creation_failure is true, allowing tlBMC store
// creation to continue. This sensor's data is invalid and will not refresh.
STATUS_CREATION_FAILED = 3;
// State when sensor creation failed but the sensor is not detected yet, so we
// set its creation as pending.
STATUS_CREATION_PENDING = 4;
// Communication failure (I2C/sysfs) during a read attempt.
STATUS_DRIVER_READ_ERROR = 6;
// Data was retrieved but failed validation (Magic/Checksum/Size).
STATUS_INVALID_DATA = 7;
// Catch-all for undefined failure modes.
STATUS_OTHER_ERROR = 8;
// State indicates that the FRU is created by the deterministic BMC, should
// see PresenceStatus and OperationStatus in FRU.Attributes instead.
STATUS_DO_NOT_USE = 5;
}
// LINT.ThenChange(//depot/google3/third_party/milotic/external/cc/hft/types/sensor_payload.proto)
// Type of the resource object.
enum ResourceType {
RESOURCE_TYPE_UNSPECIFIED = 0;
RESOURCE_TYPE_BOARD = 1;
RESOURCE_TYPE_CABLE = 2;
RESOURCE_TYPE_PROCESSOR = 3;
RESOURCE_TYPE_STORAGE = 4;
RESOURCE_TYPE_COMPUTER_SYSTEM = 5;
RESOURCE_TYPE_FAN = 6;
RESOURCE_TYPE_ASSEMBLY = 7;
RESOURCE_TYPE_DIMM = 8;
RESOURCE_TYPE_MANAGER = 9;
}
// Type of the chassis, used when resource type is RESOURCE_TYPE_BOARD.
// See ChassisType in: https://redfish.dmtf.org/schemas/v1/Chassis.v1_26_0.json
enum ChassisType {
CHASSIS_TYPE_UNSPECIFIED = 0;
CHASSIS_TYPE_RACK_MOUNT = 1;
CHASSIS_TYPE_MODULE = 2;
CHASSIS_TYPE_STORAGE_ENCLOSURE = 3;
CHASSIS_TYPE_COMPONENT = 4;
CHASSIS_TYPE_STANDALONE = 5;
}
// Reset type. Used for Redfish System.Reset and Chassis.Reset method.
enum ResetType {
RESET_TYPE_UNSPECIFIED = 0;
RESET_TYPE_FORCE_OFF = 1;
RESET_TYPE_FORCE_ON = 2;
RESET_TYPE_FORCE_RESTART = 3;
RESET_TYPE_GRACEFUL_RESTART = 4;
RESET_TYPE_GRACEFUL_SHUTDOWN = 5;
RESET_TYPE_ON = 6;
RESET_TYPE_POWER_CYCLE = 7;
}
message ChassisProperties {
ChassisType chassis_type = 1;
bool bmcnet = 2;
bool replaceable = 3;
ChassisResetInfo chassis_reset = 4;
}
message ChassisResetAction {
ResetType type = 1;
oneof reset_mechanism {
string gpio = 2;
}
}
message ChassisResetInfo {
bool enabled = 1;
repeated ChassisResetAction actions = 2;
}
message Attributes {
// Unique key of the resource.
string key = 1;
// Status of the resource.
// Prefer PresenceStatus and OperationStatus below.
Status status = 2;
// Refresh mode of the resource.
RefreshPolicy refresh_policy = 3;
// Last time the resource was refreshed.
google.protobuf.Timestamp last_refreshed_time = 4;
google.protobuf.Timestamp next_refreshed_time = 5;
// Status message. Can be used to provide more details about the status
// especially when the status is not ready.
string status_message = 6;
// Type of the resource.
ResourceType resource_type = 7;
// Properties for Chassis resources, only exist when resource type is
// RESOURCE_TYPE_BOARD.
ChassisProperties chassis_properties = 8;
// Presence status of the resource.
PresenceStatus presence_status = 9;
// Operation status of the resource.
OperationStatus operation_status = 10;
// Expected hardware information of the resource.
ExpectedHardwareInfo expected_hardware_info = 11;
}
// State of the resource.
message State {
Status status = 1;
string status_message = 2;
}
// State of components that the resource probing is related to.
enum RelatedState {
RELATED_STATE_NONE = 0;
// Host power state. This is different from OS status. Host power ON means
// the host is powered on (with GPIO Power OK is asserted), but the OS may not
// be fully booted yet(OS status is based on POST complete signal).
RELATED_STATE_HOST_POWER = 1;
// OS state. This is different from host power state. OS state is based on
// POST complete signal.
RELATED_STATE_OS_STATE = 2;
}
// Configuration for the state that the resource probing is related to.
message RelatedStateConfig {
// The host id of the resource, shouldn't be empty in any case.
string host_id = 1;
// The identifiers of the resources, e.g. the barepath of the resources.
repeated string resource_identifiers = 2;
// The state that the resource probing is related to.
RelatedState related_state = 3 [default = RELATED_STATE_NONE];
// The expected uptime for the resource to be detected after the related state
// event happens. Now only used for host power state related resources.
google.protobuf.Duration expected_uptime = 4;
}
enum SyslogProtocol {
SYSLOG_PROTOCOL_UNSPECIFIED = 0;
SYSLOG_PROTOCOL_TCP = 1;
SYSLOG_PROTOCOL_UDP = 2;
}
enum SyslogTlsMode {
SYSLOG_TLS_MODE_UNSPECIFIED = 0;
SYSLOG_TLS_MODE_DISABLED = 1;
SYSLOG_TLS_MODE_TLS = 2;
}
message SyslogTargetConfig {
string target_ip = 1;
int64 target_port = 2;
SyslogProtocol protocol = 3;
SyslogTlsMode tls_mode = 4;
}