mirror of
https://github.com/davidallendj/magellan.git
synced 2025-12-20 03:27:03 -07:00
Fixed formatting via gofmt
Signed-off-by: David J. Allen <davidallendj@gmail.com>
This commit is contained in:
parent
ac9556a526
commit
b3368e5264
11 changed files with 94 additions and 103 deletions
|
|
@ -10,9 +10,8 @@ import (
|
|||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
|
||||
var collectCmd = &cobra.Command{
|
||||
Use: "collect",
|
||||
Use: "collect",
|
||||
Short: "Query information about BMC",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
// make application logger
|
||||
|
|
@ -28,14 +27,14 @@ var collectCmd = &cobra.Command{
|
|||
threads = mathutil.Clamp(len(probeStates), 1, 255)
|
||||
}
|
||||
q := &magellan.QueryParams{
|
||||
User: user,
|
||||
Pass: pass,
|
||||
Drivers: drivers,
|
||||
Preferred: preferredDriver,
|
||||
Timeout: timeout,
|
||||
Threads: threads,
|
||||
Verbose: verbose,
|
||||
WithSecureTLS: withSecureTLS,
|
||||
User: user,
|
||||
Pass: pass,
|
||||
Drivers: drivers,
|
||||
Preferred: preferredDriver,
|
||||
Timeout: timeout,
|
||||
Threads: threads,
|
||||
Verbose: verbose,
|
||||
WithSecureTLS: withSecureTLS,
|
||||
}
|
||||
magellan.CollectInfo(&probeStates, l, q)
|
||||
|
||||
|
|
@ -47,7 +46,7 @@ var collectCmd = &cobra.Command{
|
|||
},
|
||||
}
|
||||
|
||||
func init(){
|
||||
func init() {
|
||||
collectCmd.PersistentFlags().StringSliceVar(&drivers, "driver", []string{"redfish"}, "set the driver(s) and fallback drivers to use")
|
||||
collectCmd.PersistentFlags().StringVar(&smd.Host, "host", smd.Host, "set the host to the smd API")
|
||||
collectCmd.PersistentFlags().IntVar(&smd.Port, "port", smd.Port, "set the port to the smd API")
|
||||
|
|
@ -58,4 +57,4 @@ func init(){
|
|||
collectCmd.PersistentFlags().BoolVar(&withSecureTLS, "secure-tls", false, "enable secure TLS")
|
||||
collectCmd.PersistentFlags().StringVar(&certPoolFile, "cert-pool", "", "path to CA cert. (defaults to system CAs; used with --secure-tls=true)")
|
||||
rootCmd.AddCommand(collectCmd)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,9 +8,8 @@ import (
|
|||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
|
||||
var listCmd = &cobra.Command{
|
||||
Use: "list",
|
||||
Use: "list",
|
||||
Short: "List information from scan",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
probeResults, err := sqlite.GetProbeResults(dbpath)
|
||||
|
|
@ -25,4 +24,4 @@ var listCmd = &cobra.Command{
|
|||
|
||||
func init() {
|
||||
rootCmd.AddCommand(listCmd)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
24
cmd/root.go
24
cmd/root.go
|
|
@ -8,19 +8,19 @@ import (
|
|||
)
|
||||
|
||||
var (
|
||||
timeout int
|
||||
threads int
|
||||
ports []int
|
||||
hosts []string
|
||||
withSecureTLS bool
|
||||
certPoolFile string
|
||||
user string
|
||||
pass string
|
||||
dbpath string
|
||||
drivers []string
|
||||
timeout int
|
||||
threads int
|
||||
ports []int
|
||||
hosts []string
|
||||
withSecureTLS bool
|
||||
certPoolFile string
|
||||
user string
|
||||
pass string
|
||||
dbpath string
|
||||
drivers []string
|
||||
preferredDriver string
|
||||
ipmitoolPath string
|
||||
verbose bool
|
||||
ipmitoolPath string
|
||||
verbose bool
|
||||
)
|
||||
|
||||
// TODO: discover bmc's on network (dora)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue