fix: remove apiversion param from session

This commit is contained in:
QIU Jian
2022-08-25 04:43:59 +08:00
committed by Qiu Jian
parent c6f557fd68
commit 293afd2e69
165 changed files with 381 additions and 487 deletions

View File

@@ -69,7 +69,7 @@ func getCommand(ctx context.Context, us *mcclient.ClientSession, ip string, port
if !o.Options.EnableAutoLogin {
return "", nil, nil
}
s := auth.GetAdminSession(ctx, o.Options.Region, "v2")
s := auth.GetAdminSession(ctx, o.Options.Region)
key, err := compute.Sshkeypairs.GetById(s, us.GetProjectId(), jsonutils.Marshal(map[string]bool{"admin": true}))
if err != nil {
return "", nil, err