diff --git a/pkg/mcclient/options/webconsole.go b/pkg/mcclient/options/webconsole.go index 89052fb5ac..bd06eb7092 100644 --- a/pkg/mcclient/options/webconsole.go +++ b/pkg/mcclient/options/webconsole.go @@ -71,12 +71,18 @@ func (opt *WebConsoleBaremetalOptions) Params() (*jsonutils.JSONDict, error) { type WebConsoleSshOptions struct { WebConsoleOptions - IP string `help:"IP to connect"` + IP string `help:"IP to connect" json:"-"` Port int `help:"Remote server port"` } func (opt *WebConsoleSshOptions) Params() (*jsonutils.JSONDict, error) { - return StructToParams(opt) + data, err := StructToParams(opt) + if err != nil { + return nil, err + } + params := jsonutils.NewDict() + params.Set("webconsole", data) + return params, nil } type WebConsoleServerOptions struct {