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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue