Merge pull request #10144 from zetaab/allowreauth

allow reauth for openstack client
This commit is contained in:
Kubernetes Prow Robot 2020-10-30 00:34:05 -07:00 committed by GitHub
commit 9ef11bb8ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -51,8 +51,6 @@ func NewSwiftClient() (*gophercloud.ServiceClient, error) {
return nil, err
}
authOption.AllowReauth = true
pc, err := openstack.NewClient(authOption.IdentityEndpoint)
if err != nil {
return nil, fmt.Errorf("error building openstack provider client: %v", err)
@ -145,6 +143,7 @@ func (oc OpenstackConfig) GetCredential() (gophercloud.AuthOptions, error) {
if env.ApplicationCredentialID != "" && env.Username == "" {
env.Scope = &gophercloud.AuthScope{}
}
env.AllowReauth = true
return env, nil
}