From 6147f7d7d1dc1f246d139c1990447774d479f8a3 Mon Sep 17 00:00:00 2001 From: Zexi Li Date: Fri, 22 Mar 2019 10:40:35 +0800 Subject: [PATCH] fix: climc server-create input keypair missing --- pkg/apis/compute/api.go | 1 + pkg/mcclient/options/servers.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/apis/compute/api.go b/pkg/apis/compute/api.go index 973310851e..a6fbce93b7 100644 --- a/pkg/apis/compute/api.go +++ b/pkg/apis/compute/api.go @@ -169,6 +169,7 @@ type ServerDeployInput struct { Id string + Keypair string `json:"keypair"` DeleteKeypair bool `json:"__delete_keypair__"` DeployConfigs []*DeployConfig `json:"deploy_configs"` ResetPassword *bool `json:"reset_password"` diff --git a/pkg/mcclient/options/servers.go b/pkg/mcclient/options/servers.go index 8c1277947a..cb733b7da6 100644 --- a/pkg/mcclient/options/servers.go +++ b/pkg/mcclient/options/servers.go @@ -285,7 +285,7 @@ func (opts *ServerCreateOptions) Params() (*computeapi.ServerCreateInput, error) params := &computeapi.ServerCreateInput{ ServerConfigs: config, VcpuCount: opts.VcpuCount, - Keypair: opts.Keypair, + KeypairId: opts.Keypair, Password: opts.Password, Cdrom: opts.Iso, Vga: opts.Vga,