mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-06-08 23:45:40 +08:00
fix: remove apiversion param from session
This commit is contained in:
@@ -328,7 +328,7 @@ func (asc *SASController) DetachInstances(ctx context.Context, userCred mcclient
|
||||
removeParams.Set("scaling_group", jsonutils.NewString(sg.Id))
|
||||
removeParams.Set("delete_server", jsonutils.JSONTrue)
|
||||
removeParams.Set("auto", jsonutils.JSONTrue)
|
||||
session := auth.GetSession(ctx, userCred, "", "")
|
||||
session := auth.GetSession(ctx, userCred, "")
|
||||
failedList := make([]string, 0)
|
||||
waitList := make([]string, 0, len(instances))
|
||||
instanceMap := make(map[string]SInstance, len(instances))
|
||||
@@ -484,7 +484,7 @@ func (asc *SASController) CreateInstances(
|
||||
countPR, requests := asc.countPRAndRequests(num)
|
||||
log.Debugf("countPR: %d, requests: %d", countPR, requests)
|
||||
rand.Seed(time.Now().UnixNano())
|
||||
session := auth.GetSession(ctx, userCred, "", "")
|
||||
session := auth.GetSession(ctx, userCred, "")
|
||||
|
||||
failedList := make([]string, 0)
|
||||
succeedList := make([]SInstance, 0, num/2)
|
||||
|
||||
@@ -103,7 +103,7 @@ func (asc *SASController) CheckInstanceHealth(ctx context.Context, userCred mccl
|
||||
removeParams := jsonutils.NewDict()
|
||||
removeParams.Set("delete_server", jsonutils.JSONTrue)
|
||||
removeParams.Set("auto", jsonutils.JSONTrue)
|
||||
session := auth.GetSession(ctx, userCred, "", "")
|
||||
session := auth.GetSession(ctx, userCred, "")
|
||||
for i := range unnormalGuests {
|
||||
ug := unnormalGuests[i]
|
||||
if ug.CreateCompleteTime.Add(time.Duration(scalingGroupMap[ug.ScalngGroupId].HealthCheckGov) * time.Second).After(now) {
|
||||
|
||||
@@ -60,7 +60,7 @@ func (asc *SASController) Timer(ctx context.Context, userCred mcclient.TokenCred
|
||||
}
|
||||
log.Debugf("total %d need to exec, %v", len(scalingTimers), scalingTimers)
|
||||
log.Debugf("timeScope: start: %s, end: %s", timeScope.Start, timeScope.End)
|
||||
session := auth.GetSession(ctx, userCred, "", "")
|
||||
session := auth.GetSession(ctx, userCred, "")
|
||||
triggerParams := jsonutils.NewDict()
|
||||
for i := range scalingTimers {
|
||||
scalingTimer := scalingTimers[i]
|
||||
|
||||
Reference in New Issue
Block a user