Skip to content

Commit

Permalink
fix: remove the redundant code
Browse files Browse the repository at this point in the history
  • Loading branch information
Meng-20 committed Dec 10, 2024
1 parent 7b2ee17 commit dc6fb58
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions cmd/cfm-service/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,6 @@ func main() {
defaultRedfishController := redfishapi.NewDefaultAPIController(defaultRedfishService)
api.AddRedfishRouter(ctx, router, defaultRedfishController)

// Discover devices before loading datastore
bladeDevices, errBlade := services.DiscoverDevices(ctx, defaultApiService, "blade")
hostDevices, errHost := services.DiscoverDevices(ctx, defaultApiService, "cxl-host")
// Add the discovered devices into datastore
if errBlade == nil && errHost == nil {
services.AddDiscoveredDevices(ctx, defaultApiService, bladeDevices, hostDevices)
}

// Load datastore
datastore.DStore().Restore()
data := datastore.DStore().GetDataStore()
Expand Down

0 comments on commit dc6fb58

Please sign in to comment.