Documentation
¶
Overview ¶
Package types provides public domain types for the RLA client. This package has minimal dependencies (only uuid) and can be imported by external modules for interface definitions and mocking without pulling in gRPC dependencies.
Index ¶
- type BMC
- type BMCType
- type Component
- type ComponentDiff
- type ComponentType
- type DeviceInfo
- type DiffType
- type FieldDiff
- type Identifier
- type InRackPosition
- type Location
- type NVLDomain
- type OperationRule
- type OperationType
- type Pagination
- type PowerControlOp
- type Rack
- type RackRuleAssociation
- type StringQueryInfo
- type Task
- type TaskExecutorType
- type TaskStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BMCType ¶
type BMCType string
BMCType represents the type of BMC (Baseboard Management Controller).
type Component ¶
type Component struct {
Type ComponentType
Info DeviceInfo
FirmwareVersion string
Position InRackPosition
BMCs []BMC
ComponentID string // Component ID from the component manager service
RackID uuid.UUID
PowerState string
}
Component represents a rack component (compute node, switch, etc.).
type ComponentDiff ¶
type ComponentDiff struct {
Type DiffType
ComponentID string
Expected *Component
Actual *Component
FieldDiffs []FieldDiff
}
ComponentDiff represents a difference found during validation.
type ComponentType ¶
type ComponentType string
ComponentType represents the type of a rack component.
const ( ComponentTypeUnknown ComponentType = "UNKNOWN" ComponentTypeCompute ComponentType = "COMPUTE" ComponentTypeNVSwitch ComponentType = "NVSWITCH" ComponentTypePowerShelf ComponentType = "POWERSHELF" ComponentTypeTORSwitch ComponentType = "TORSWITCH" ComponentTypeUMS ComponentType = "UMS" ComponentTypeCDU ComponentType = "CDU" )
type DeviceInfo ¶
type DeviceInfo struct {
ID uuid.UUID
Name string
Manufacturer string
Model string
SerialNumber string
Description string
}
DeviceInfo contains device identification information.
type DiffType ¶
type DiffType string
DiffType represents the type of difference in component validation.
type Identifier ¶
Identifier can identify a resource by ID or Name.
type InRackPosition ¶
InRackPosition represents a component's position within a rack.
type OperationRule ¶
type OperationRule struct {
ID uuid.UUID
Name string
Description string
OperationType OperationType
OperationCode string // e.g., "power_on", "upgrade"
RuleDefinitionJSON string // JSON-encoded rule definition
IsDefault bool
CreatedAt time.Time
UpdatedAt time.Time
}
OperationRule represents a configurable rule for executing operations.
type OperationType ¶
type OperationType string
OperationType represents the type of operation (power control, firmware, etc.).
const ( OperationTypeUnknown OperationType = "UNKNOWN" OperationTypePowerControl OperationType = "POWER_CONTROL" OperationTypeFirmwareControl OperationType = "FIRMWARE_CONTROL" )
type PowerControlOp ¶
type PowerControlOp string
PowerControlOp represents a power control operation.
const ( PowerControlOpOn PowerControlOp = "ON" PowerControlOpForceOn PowerControlOp = "FORCE_ON" PowerControlOpOff PowerControlOp = "OFF" PowerControlOpForceOff PowerControlOp = "FORCE_OFF" PowerControlOpRestart PowerControlOp = "RESTART" PowerControlOpForceRestart PowerControlOp = "FORCE_RESTART" PowerControlOpWarmReset PowerControlOp = "WARM_RESET" PowerControlOpColdReset PowerControlOp = "COLD_RESET" )
type Rack ¶
type Rack struct {
Info DeviceInfo
Location Location
Components []Component
}
Rack represents a physical rack containing components.
type RackRuleAssociation ¶
type RackRuleAssociation struct {
RackID uuid.UUID
OperationType OperationType
OperationCode string // e.g., "power_on", "upgrade"
RuleID uuid.UUID
CreatedAt time.Time
UpdatedAt time.Time
}
RackRuleAssociation represents an association between a rack and an operation rule.
type StringQueryInfo ¶
StringQueryInfo for filtering list requests.
type Task ¶
type Task struct {
ID uuid.UUID
Operation string
RackID uuid.UUID
ComponentIDs []uuid.UUID
Description string
ExecutorType TaskExecutorType
ExecutionID string
Status TaskStatus
Message string
}
Task represents an async operation task.
type TaskExecutorType ¶
type TaskExecutorType string
TaskExecutorType represents the type of task executor.
const ( TaskExecutorTypeUnknown TaskExecutorType = "UNKNOWN" TaskExecutorTypeTemporal TaskExecutorType = "TEMPORAL" )
type TaskStatus ¶
type TaskStatus string
TaskStatus represents the status of an async task.
const ( TaskStatusUnknown TaskStatus = "UNKNOWN" TaskStatusPending TaskStatus = "PENDING" TaskStatusRunning TaskStatus = "RUNNING" TaskStatusCompleted TaskStatus = "COMPLETED" TaskStatusFailed TaskStatus = "FAILED" )