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 5f20240340
commit 96224409b8

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