mirror of
https://github.com/davidallendj/magellan.git
synced 2025-12-20 03:27:03 -07:00
move to OpenCHAMI and update changelog
This commit is contained in:
parent
955c9fb4bd
commit
cccf0dfdf2
14 changed files with 96 additions and 91 deletions
|
|
@ -1,10 +1,10 @@
|
|||
package cmd
|
||||
|
||||
import (
|
||||
magellan "github.com/OpenChami/magellan/internal"
|
||||
"github.com/OpenChami/magellan/internal/api/smd"
|
||||
"github.com/OpenChami/magellan/internal/db/sqlite"
|
||||
"github.com/OpenChami/magellan/internal/log"
|
||||
magellan "github.com/OpenCHAMI/magellan/internal"
|
||||
"github.com/OpenCHAMI/magellan/internal/api/smd"
|
||||
"github.com/OpenCHAMI/magellan/internal/db/sqlite"
|
||||
"github.com/OpenCHAMI/magellan/internal/log"
|
||||
"github.com/cznic/mathutil"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/spf13/cobra"
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package cmd
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/OpenChami/magellan/internal/db/sqlite"
|
||||
"github.com/OpenCHAMI/magellan/internal/db/sqlite"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/spf13/cobra"
|
||||
|
|
|
|||
16
cmd/scan.go
16
cmd/scan.go
|
|
@ -6,18 +6,18 @@ import (
|
|||
"os"
|
||||
"path"
|
||||
|
||||
magellan "github.com/OpenChami/magellan/internal"
|
||||
"github.com/OpenChami/magellan/internal/db/sqlite"
|
||||
magellan "github.com/OpenCHAMI/magellan/internal"
|
||||
"github.com/OpenCHAMI/magellan/internal/db/sqlite"
|
||||
|
||||
"github.com/cznic/mathutil"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var (
|
||||
begin uint8
|
||||
end uint8
|
||||
subnets []string
|
||||
subnetMasks []net.IP
|
||||
begin uint8
|
||||
end uint8
|
||||
subnets []string
|
||||
subnetMasks []net.IP
|
||||
disableProbing bool
|
||||
)
|
||||
|
||||
|
|
@ -35,10 +35,10 @@ var scanCmd = &cobra.Command{
|
|||
return
|
||||
}
|
||||
|
||||
if len(subnetMasks) < i + 1 {
|
||||
if len(subnetMasks) < i+1 {
|
||||
subnetMasks = append(subnetMasks, net.IP{255, 255, 255, 0})
|
||||
}
|
||||
|
||||
|
||||
hostsToScan = append(hostsToScan, magellan.GenerateHosts(subnet, &subnetMasks[i])...)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,45 +1,45 @@
|
|||
package cmd
|
||||
|
||||
import (
|
||||
magellan "github.com/OpenChami/magellan/internal"
|
||||
"github.com/OpenChami/magellan/internal/log"
|
||||
magellan "github.com/OpenCHAMI/magellan/internal"
|
||||
"github.com/OpenCHAMI/magellan/internal/log"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var (
|
||||
host string
|
||||
port int
|
||||
firmwareUrl string
|
||||
firmwareVersion string
|
||||
component string
|
||||
host string
|
||||
port int
|
||||
firmwareUrl string
|
||||
firmwareVersion string
|
||||
component string
|
||||
transferProtocol string
|
||||
status bool
|
||||
status bool
|
||||
)
|
||||
|
||||
var updateCmd = &cobra.Command{
|
||||
Use: "update",
|
||||
Use: "update",
|
||||
Short: "Update BMC node firmware",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
l := log.NewLogger(logrus.New(), logrus.DebugLevel)
|
||||
q := &magellan.UpdateParams {
|
||||
FirmwarePath: firmwareUrl,
|
||||
FirmwareVersion: firmwareVersion,
|
||||
Component: component,
|
||||
q := &magellan.UpdateParams{
|
||||
FirmwarePath: firmwareUrl,
|
||||
FirmwareVersion: firmwareVersion,
|
||||
Component: component,
|
||||
TransferProtocol: transferProtocol,
|
||||
QueryParams: magellan.QueryParams{
|
||||
Drivers: []string{"redfish"},
|
||||
Preferred: "redfish",
|
||||
Protocol: protocol,
|
||||
Host: host,
|
||||
User: user,
|
||||
Pass: pass,
|
||||
Timeout: timeout,
|
||||
Port: port,
|
||||
Drivers: []string{"redfish"},
|
||||
Preferred: "redfish",
|
||||
Protocol: protocol,
|
||||
Host: host,
|
||||
User: user,
|
||||
Pass: pass,
|
||||
Timeout: timeout,
|
||||
Port: port,
|
||||
WithSecureTLS: withSecureTLS,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
// check if required params are set
|
||||
if host == "" || user == "" || pass == "" {
|
||||
l.Log.Fatal("requires host, user, and pass to be set")
|
||||
|
|
@ -53,7 +53,7 @@ var updateCmd = &cobra.Command{
|
|||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
// client, err := magellan.NewClient(l, &q.QueryParams)
|
||||
// if err != nil {
|
||||
// l.Log.Errorf("could not make client: %v", err)
|
||||
|
|
@ -79,4 +79,4 @@ func init() {
|
|||
updateCmd.Flags().BoolVar(&withSecureTLS, "secure-tls", false, "enable secure TLS")
|
||||
updateCmd.Flags().BoolVar(&status, "status", false, "get the status of the update")
|
||||
rootCmd.AddCommand(updateCmd)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue