diff --git a/cmd/update.go b/cmd/update.go index 0df2916..48dc6b1 100644 --- a/cmd/update.go +++ b/cmd/update.go @@ -10,7 +10,7 @@ import ( var ( host string port int - firmwarePath string + firmwareUrl string firmwareVersion string component string transferProtocol string @@ -23,7 +23,7 @@ var updateCmd = &cobra.Command{ Run: func(cmd *cobra.Command, args []string) { l := log.NewLogger(logrus.New(), logrus.DebugLevel) q := &magellan.UpdateParams { - FirmwarePath: firmwarePath, + FirmwarePath: firmwareUrl, FirmwareVersion: firmwareVersion, Component: component, TransferProtocol: transferProtocol, @@ -67,13 +67,13 @@ var updateCmd = &cobra.Command{ } func init() { - updateCmd.Flags().StringVar(&host, "host", "", "set the BMC host") - updateCmd.Flags().IntVar(&port, "port", 443, "set the BMC port") + updateCmd.Flags().StringVar(&host, "bmc-host", "", "set the BMC host") + updateCmd.Flags().IntVar(&port, "bmc-port", 443, "set the BMC port") updateCmd.Flags().StringVar(&user, "user", "", "set the BMC user") updateCmd.Flags().StringVar(&pass, "pass", "", "set the BMC password") updateCmd.Flags().StringVar(&transferProtocol, "transfer-protocol", "HTTP", "set the transfer protocol") updateCmd.Flags().StringVar(&protocol, "protocol", "https", "set the Redfish protocol") - updateCmd.Flags().StringVar(&firmwarePath, "firmware-path", "", "set the path to the firmware") + updateCmd.Flags().StringVar(&firmwareUrl, "firmware-url", "", "set the path to the firmware") updateCmd.Flags().StringVar(&firmwareVersion, "firmware-version", "", "set the version of firmware to be installed") updateCmd.Flags().StringVar(&component, "component", "", "set the component to upgrade") updateCmd.Flags().BoolVar(&withSecureTLS, "secure-tls", false, "enable secure TLS") diff --git a/internal/update.go b/internal/update.go index fbfc52e..312eeb8 100644 --- a/internal/update.go +++ b/internal/update.go @@ -163,7 +163,7 @@ func GetUpdateStatus(q *UpdateParams) error { return fmt.Errorf("returned status code %d", res.StatusCode) } if len(body) > 0 { - fmt.Printf("%d: %v\n", res.StatusCode, string(body)) + fmt.Printf("%v\n", string(body)) } return nil }