Merge pull request #533 in YUNIONIO/onecloud from ~QUXUAN/onecloud:hotfix/qx-webconsole-keypair to release/2.3.0

* commit '8e9105d11540c96f5e41419cd1cbcb9a5c088678':
  使用系统密钥
This commit is contained in:
邱剑
2018-11-17 12:16:27 +08:00
+1 -1
View File
@@ -31,7 +31,7 @@ type SSHtoolSol struct {
func getCommand(ctx context.Context, userCred mcclient.TokenCredential, ip string) (string, *BaseCommand, error) {
cmd := NewBaseCommand(o.Options.SshToolPath)
s := auth.GetAdminSession(o.Options.Region, "v2")
key, err := modules.Sshkeypairs.GetById(s, userCred.GetProjectId(), jsonutils.NewDict())
key, err := modules.Sshkeypairs.GetById(s, userCred.GetProjectId(), jsonutils.Marshal(map[string]bool{"admin": true}))
if err != nil {
return "", nil, err
}