Skip to content

Commit

Permalink
Fix: Simplify checking for existing blades
Browse files Browse the repository at this point in the history
  • Loading branch information
Meng-20 committed Dec 9, 2024
1 parent ab85319 commit b12367b
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions cmd/cfm-service/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,7 @@ func main() {
data := datastore.DStore().GetDataStore()

// Check if there are any devices in the data store
bladeExist := false
for _, appliance := range data.ApplianceData {
if len(appliance.BladeData) != 0 {
bladeExist = true
}
}
bladeExist := len(data.ApplianceData) != 0
hostExist := len(data.HostData) != 0

// If there are no devices in the data store, do discovery, otherwise skip
Expand Down

0 comments on commit b12367b

Please sign in to comment.