Post-repair hardware validation pipeline for Proxmox cluster hosts. Go orchestrator + in-image agent + mkosi live image + bundled dnsmasq PXE + SQLite + HTMX/SSE UI + notify registry + janitor + full docs.
This commit is contained in:
@@ -0,0 +1,96 @@
|
||||
package model
|
||||
|
||||
import "time"
|
||||
|
||||
type Host struct {
|
||||
ID int64
|
||||
Name string
|
||||
MAC string
|
||||
WoLBroadcastIP string
|
||||
WoLPort int
|
||||
ExpectedSpecYAML string
|
||||
PDUConfigJSON string
|
||||
IPMIConfigJSON string
|
||||
Notes string
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
}
|
||||
|
||||
type RunState string
|
||||
|
||||
const (
|
||||
StateRegistered RunState = "Registered"
|
||||
StateQueued RunState = "Queued"
|
||||
StateWaitingWoL RunState = "WaitingWoL"
|
||||
StateBooting RunState = "Booting"
|
||||
StateInventoryCheck RunState = "InventoryCheck"
|
||||
StateSpecValidate RunState = "SpecValidate"
|
||||
StateSMART RunState = "SMART"
|
||||
StateCPUStress RunState = "CPUStress"
|
||||
StateStorage RunState = "Storage"
|
||||
StateNetwork RunState = "Network"
|
||||
StateGPU RunState = "GPU"
|
||||
StatePSU RunState = "PSU"
|
||||
StateReporting RunState = "Reporting"
|
||||
StateCompleted RunState = "Completed"
|
||||
StateFailed RunState = "Failed"
|
||||
StateFailedHolding RunState = "FailedHolding"
|
||||
StateReleased RunState = "Released"
|
||||
)
|
||||
|
||||
type Run struct {
|
||||
ID int64
|
||||
HostID int64
|
||||
State RunState
|
||||
Result string
|
||||
FailedStage string
|
||||
NextBootTarget string
|
||||
AgentTokenHash string
|
||||
StartedAt time.Time
|
||||
CompletedAt *time.Time
|
||||
ReportPath string
|
||||
HoldIP string
|
||||
OverrideFlagsJSON string
|
||||
}
|
||||
|
||||
type StageState string
|
||||
|
||||
const (
|
||||
StagePending StageState = "pending"
|
||||
StageRunning StageState = "running"
|
||||
StagePassed StageState = "passed"
|
||||
StageFailed StageState = "failed"
|
||||
StageSkipped StageState = "skipped"
|
||||
)
|
||||
|
||||
type Stage struct {
|
||||
ID int64
|
||||
RunID int64
|
||||
Name string
|
||||
Ordinal int
|
||||
State StageState
|
||||
StartedAt *time.Time
|
||||
CompletedAt *time.Time
|
||||
SummaryJSON string
|
||||
}
|
||||
|
||||
type Measurement struct {
|
||||
ID int64
|
||||
RunID int64
|
||||
StageID *int64
|
||||
TS time.Time
|
||||
Kind string
|
||||
Key string
|
||||
Value float64
|
||||
Unit string
|
||||
}
|
||||
|
||||
type SpecDiff struct {
|
||||
ID int64
|
||||
RunID int64
|
||||
Field string
|
||||
Expected string
|
||||
Actual string
|
||||
Severity string // critical|warning|info
|
||||
Ignored bool
|
||||
}
|
||||
Reference in New Issue
Block a user