fix(mcclient): options: webconsole: fix passing ssh port

This commit is contained in:
Yousong Zhou
2020-12-23 13:29:22 +08:00
parent db8307822f
commit b06be9ea5c
+8 -2
View File
@@ -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 {