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

@@ -71,7 +71,6 @@ func NewWorker(commonOpts *common_options.CommonOptions, opts *agentoptions.Opti
clientSet: agentssh.NewClientSet(),
sessionCache: &auth.SessionCache{
Region: commonOpts.Region,
APIVersion: "v2",
UseAdminToken: true,
EarlyRefresh: time.Hour,
},

View File

@@ -154,7 +154,7 @@ func (proxyendpoint *SProxyEndpoint) remoteConfigure(ctx context.Context, userCr
},
}
cliSess := auth.GetSession(ctx, userCred, "", "")
cliSess := auth.GetSession(ctx, userCred, "")
pbId := ""
pbName := "pe-remote-configure-" + proxyendpoint.Name
_, err := ansible_modules.AnsiblePlaybooks.UpdateOrCreatePbModel(

View File

@@ -60,7 +60,7 @@ func getServerInfo(
userCred mcclient.TokenCredential,
serverId string,
) (*serverInfo, error) {
sess := auth.GetSession(ctx, userCred, "", "")
sess := auth.GetSession(ctx, userCred, "")
serverJson, err := compute_modules.Servers.Get(sess, serverId, nil)
if err != nil {
return nil, httperrors.NewGeneralError(err)