HTTP configuration it done too late

The HTTP transport configuration should be
done before the authentication request.

Signed-off-by: Guillaume Giamarchi <guillaume.giamarchi@gmail.com>
This commit is contained in:
Guillaume Giamarchi 2015-02-20 16:45:05 +01:00 committed by Ash Wilson
parent bd2bdda827
commit b5dd34a90e
1 changed files with 6 additions and 1 deletions

View File

@ -411,7 +411,7 @@ func (c *GenericClient) Authenticate(d *Driver) error {
AllowReauth: true,
}
provider, err := openstack.AuthenticatedClient(opts)
provider, err := openstack.NewClient(opts.IdentityEndpoint)
if err != nil {
return err
}
@ -423,6 +423,11 @@ func (c *GenericClient) Authenticate(d *Driver) error {
provider.HTTPClient.Transport = transport
}
err = openstack.Authenticate(provider, opts)
if err != nil {
return err
}
c.Provider = provider
return nil