mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix: remove apiversion param from session
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -80,7 +80,7 @@ func fetchK8sEnv(ctx context.Context, w http.ResponseWriter, r *http.Request) (*
|
||||
k8sReq.Namespace = "default"
|
||||
}
|
||||
podName := params["<podName>"]
|
||||
adminSession := auth.GetAdminSession(ctx, o.Options.Region, "")
|
||||
adminSession := auth.GetAdminSession(ctx, o.Options.Region)
|
||||
|
||||
query := jsonutils.NewDict()
|
||||
query.Add(jsonutils.NewString(k8sReq.Namespace), "namespace")
|
||||
@@ -134,7 +134,7 @@ func fetchCloudEnv(ctx context.Context, w http.ResponseWriter, r *http.Request)
|
||||
if userCred == nil {
|
||||
return nil, httperrors.NewUnauthorizedError("No token founded")
|
||||
}
|
||||
s := auth.Client().NewSession(ctx, o.Options.Region, "", "internal", userCred, "v2")
|
||||
s := auth.Client().NewSession(ctx, o.Options.Region, "", "internal", userCred)
|
||||
return &CloudEnv{
|
||||
ClientSessin: s,
|
||||
Params: params,
|
||||
|
||||
Reference in New Issue
Block a user