refactor: unified ingest pipeline + modular Redfish profile framework
Implement the full architectural plan: unified ingest.Service entry point for archive and Redfish payloads, modular redfishprofile package with composable profiles (generic, ami-family, msi, supermicro, dell, hgx-topology), score-based profile matching with fallback expansion mode, and profile-driven acquisition/analysis plans. Vendor-specific logic moved out of common executors and into profile hooks. GPU chassis lookup strategies and known storage recovery collections (IntelVROC/HA-RAID/MRVL) now live in ResolvedAnalysisPlan, populated by profiles at analysis time. Replay helpers read from the plan; no hardcoded path lists remain in generic code. Also splits redfish_replay.go into domain modules (gpu, storage, inventory, fru, profiles) and adds full fixture/matcher/directive test coverage including Dell, AMI, unknown-vendor fallback, and deterministic ordering. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
"time"
|
||||
|
||||
"git.mchus.pro/mchus/logpile/internal/collector"
|
||||
"git.mchus.pro/mchus/logpile/internal/ingest"
|
||||
"git.mchus.pro/mchus/logpile/internal/models"
|
||||
chartviewer "reanimator/chart/viewer"
|
||||
)
|
||||
@@ -38,6 +39,7 @@ type Server struct {
|
||||
|
||||
jobManager *JobManager
|
||||
collectors *collector.Registry
|
||||
ingest *ingest.Service
|
||||
}
|
||||
|
||||
type ConvertArtifact struct {
|
||||
@@ -51,6 +53,7 @@ func New(cfg Config) *Server {
|
||||
mux: http.NewServeMux(),
|
||||
jobManager: NewJobManager(),
|
||||
collectors: collector.NewDefaultRegistry(),
|
||||
ingest: ingest.NewService(),
|
||||
convertJobs: make(map[string]struct{}),
|
||||
convertOutput: make(map[string]ConvertArtifact),
|
||||
}
|
||||
@@ -160,6 +163,17 @@ func (s *Server) ClientVersionString() string {
|
||||
return fmt.Sprintf("LOGPile %s (commit: %s)", v, c)
|
||||
}
|
||||
|
||||
func (s *Server) ingestService() *ingest.Service {
|
||||
if s != nil && s.ingest != nil {
|
||||
return s.ingest
|
||||
}
|
||||
svc := ingest.NewService()
|
||||
if s != nil {
|
||||
s.ingest = svc
|
||||
}
|
||||
return svc
|
||||
}
|
||||
|
||||
// SetDetectedVendor sets the detected vendor name
|
||||
func (s *Server) SetDetectedVendor(vendor string) {
|
||||
s.mu.Lock()
|
||||
|
||||
Reference in New Issue
Block a user