mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-06-07 23:09:17 +08:00
client session add context
This commit is contained in:
@@ -30,7 +30,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")
|
||||
s := auth.GetAdminSession(ctx, o.Options.Region, "v2")
|
||||
key, err := modules.Sshkeypairs.GetById(s, userCred.GetProjectId(), jsonutils.Marshal(map[string]bool{"admin": true}))
|
||||
if err != nil {
|
||||
return "", nil, err
|
||||
|
||||
Reference in New Issue
Block a user