| edition = "2023"; |
| |
| package milotic_fast_sanity; |
| |
| // Enum defining the standard types of unique identifiers for components. |
| enum UniqueIdentifierType { |
| UNIQUE_IDENTIFIER_TYPE_UNSPECIFIED = 0; |
| UNIQUE_IDENTIFIER_TYPE_LOCAL_DEVPATH = 1; |
| UNIQUE_IDENTIFIER_TYPE_MACHINE_DEVPATH = 2; |
| UNIQUE_IDENTIFIER_TYPE_LOGICAL_NAME = 3; |
| UNIQUE_IDENTIFIER_TYPE_UUID = 4; |
| UNIQUE_IDENTIFIER_TYPE_ADDRESS = 5; |
| // Add other common identifier types as needed. |
| } |
| |
| // Represents a unique identifier for a component, specifying its value and |
| // type. |
| message UniqueIdentifier { |
| string value = 1; |
| repeated string short_names = 2; |
| UniqueIdentifierType type = 3; |
| } |
| |
| // Generic SMBus Location information. |
| message I2cLocation { |
| string bus = 1; |
| string address = 2; |
| } |
| |
| // Generic Location details for a component, allowing for different types of |
| // physical locations. |
| message Location { |
| oneof location_type { |
| I2cLocation i2c_location = 1; |
| // Extend with other location types as needed. |
| } |
| } |
| |
| // Defines the type of connector. |
| // This is a subset of the connector types defined in the redfish spec. |
| enum ConnectorType { |
| CONNECTOR_TYPE_UNSPECIFIED = 0; |
| CONNECTOR_TYPE_AC_POWER = 1; |
| CONNECTOR_TYPE_DB9 = 2; |
| CONNECTOR_TYPE_DC_POWER = 3; |
| CONNECTOR_TYPE_DISPLAY_PORT = 4; |
| CONNECTOR_TYPE_HDMI = 5; |
| CONNECTOR_TYPE_ICI = 6; |
| CONNECTOR_TYPE_IPASS = 7; |
| CONNECTOR_TYPE_PCI_E = 8; |
| CONNECTOR_TYPE_PROPRIETARY = 9; |
| CONNECTOR_TYPE_RJ45 = 10; |
| CONNECTOR_TYPE_SATA = 11; |
| CONNECTOR_TYPE_SCSI = 12; |
| CONNECTOR_TYPE_SLIMSAS = 13; |
| CONNECTOR_TYPE_SFP = 14; |
| CONNECTOR_TYPE_SFP_PLUS = 15; |
| CONNECTOR_TYPE_USBA = 16; |
| CONNECTOR_TYPE_USBC = 17; |
| CONNECTOR_TYPE_QSFP = 18; |
| CONNECTOR_TYPE_CDFP = 19; |
| CONNECTOR_TYPE_OSFP = 20; |
| // Add more as needed |
| } |
| |
| // Defines the type of cable per the redfish spec. |
| enum CableType { |
| CABLE_TYPE_UNSPECIFIED = 0; |
| CABLE_TYPE_POWER = 1; |
| CABLE_TYPE_NETWORK = 2; |
| CABLE_TYPE_STORAGE = 3; |
| CABLE_TYPE_FAN = 4; |
| CABLE_TYPE_PCIE = 5; |
| CABLE_TYPE_USB = 6; |
| CABLE_TYPE_VIDEO = 7; |
| CABLE_TYPE_FABRIC = 8; |
| CABLE_TYPE_SERIAL = 9; |
| CABLE_TYPE_GENERAL = 10; |
| |
| // Add more as needed |
| } |
| |
| // FRI Classification |
| enum ComponentClassification { |
| COMPONENT_CLASSIFICATION_UNSPECIFIED = 0; |
| COMPONENT_CLASSIFICATION_MEMORY = 1; |
| COMPONENT_CLASSIFICATION_PROCCESSOR = 2; |
| COMPONENT_CLASSIFICATION_CABLE = 3; |
| COMPONENT_CLASSIFICATION_FAN = 4; |
| COMPONENT_CLASSIFICATION_DRIVE = 5; |
| COMPONENT_CLASSIFICATION_BOARD = 6; |
| } |
| |
| // Defines the general category or type of this component. |
| enum ComponentType { |
| COMPONENT_NODE_TYPE_UNSPECIFIED = 0; |
| COMPONENT_NODE_TYPE_PLUGIN = 1; // e.g., Motherboard, Tray, DIMM, etc. |
| COMPONENT_NODE_TYPE_DEVICE = 2; // e.g., Embedded ROT, controller, etc. |
| } |
| |
| // Describes various relationships this component has with others. |
| message RelatedComponents { |
| // Components (devices, connectors) that are direct children or contained |
| // within this component. |
| repeated UniqueIdentifier child_components = 1; |
| |
| // The parent component(s) this component is part of or plugged into. |
| UniqueIdentifier parent_component = 2; |
| } |
| |
| // Represents a single Field Replaceable Unit (FRU) or a logical component. |
| message FruComponent { |
| UniqueIdentifier primary_identifier = 1; |
| repeated UniqueIdentifier secondary_identifiers = 2; |
| |
| // The type of FRU. |
| ComponentType fru_type = 3; |
| |
| // The class of FRU. |
| ComponentClassification fru_class = 4; |
| |
| // Location details of the component. |
| Location location = 5; |
| |
| // Information specific to connector components. |
| ConnectorType connector_type = 6; |
| |
| // Information specific to cable components. |
| CableType cable_type = 7; |
| |
| // Structured relationships describing the component's children, parents, and |
| // plugged-in items. |
| RelatedComponents relationships = 8; |
| |
| // A FRU can be in the following states: |
| // 1. OK: The FRU is present. |
| // |
| // The following states are only applicable if the intent model is available |
| // on the server either provided as part of the request or natively present on |
| // the server. |
| // 2. NOT_SCANNED: The FRU has not been scanned. |
| // The implemenatations that don't have an |
| // intent model will not be able to report this status per FRU. In such |
| // cases, a FRU may be reported without an identifier |
| // 3. NOT_FOUND: The FRU has not been found. |
| // The implementations that scan all the FRUs on the system may choose |
| // to report this status for FRUs that are not present by comparing the |
| // scanned FRUs with the intent model. |
| enum Status { |
| STATUS_UNKNOWN = 0; |
| STATUS_OK = 1; |
| STATUS_NOT_SCANNED = 2; |
| STATUS_NOT_FOUND = 3; |
| } |
| Status status = 9; |
| } |