mirror of
https://github.com/davidallendj/magellan.git
synced 2025-12-20 03:27:03 -07:00
Test ipmi driver with bmclib functions
This commit is contained in:
parent
118c12fa14
commit
de07b119b5
10 changed files with 213 additions and 168 deletions
|
|
@ -1,7 +1,6 @@
|
|||
package cmd
|
||||
|
||||
import (
|
||||
"davidallendj/magellan/api/smd"
|
||||
magellan "davidallendj/magellan/internal"
|
||||
|
||||
"github.com/bombsimon/logrusr/v2"
|
||||
|
|
@ -76,21 +75,26 @@ var collectCmd = &cobra.Command{
|
|||
if err != nil {
|
||||
l.Errorf("could not query bios: %v\n", err)
|
||||
}
|
||||
}
|
||||
|
||||
// add all endpoints to smd
|
||||
for _, inventory := range inventories {
|
||||
err := smd.AddRedfishEndpoint(inventory)
|
||||
_, err = magellan.QueryPowerState(client, &logger, &q)
|
||||
if err != nil {
|
||||
logrus.Errorf("could not add redfish endpoint: %v", err)
|
||||
l.Errorf("could not query power state: %v\n", err)
|
||||
}
|
||||
}
|
||||
|
||||
// add all endpoints to smd
|
||||
// for _, inventory := range inventories {
|
||||
// err := smd.AddRedfishEndpoint(inventory)
|
||||
// if err != nil {
|
||||
// logrus.Errorf("could not add redfish endpoint: %v", err)
|
||||
// }
|
||||
// }
|
||||
|
||||
// confirm the inventories were added
|
||||
err = smd.GetRedfishEndpoints()
|
||||
if err != nil {
|
||||
logrus.Errorf("could not get redfish endpoints: %v\n", err)
|
||||
}
|
||||
// err = smd.GetRedfishEndpoints()
|
||||
// if err != nil {
|
||||
// logrus.Errorf("could not get redfish endpoints: %v\n", err)
|
||||
// }
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue