Ookay, last reshuffle.
* openstack.NewClient() normalizes the identity endpoint with a trailing slash, and sets base and endpoint.
* utils.ChooseVersion() checks suffixes first to short-circuit actual version calls.
* gophercloud.ProviderClient distinguishes between the root of all identity services (IdentityBase)
and the endpoint of the requested auth service (IdentityEndpoint).
diff --git a/provider_client.go b/provider_client.go
index 971276e..2be665e 100644
--- a/provider_client.go
+++ b/provider_client.go
@@ -6,9 +6,14 @@
// providing whatever authentication credentials are required.
type ProviderClient struct {
- // IdentityEndpoint is the front door to an openstack provider.
+ // IdentityBase is the front door to an openstack provider.
// Generally this will be populated when you authenticate.
// It should be the *root* resource of the identity service, not of a specific identity version.
+ IdentityBase string
+
+ // IdentityEndpoint is the originally requested identity endpoint.
+ // This may be a specific version of the identity service, in which case that endpoint is used rather than querying the
+ // version-negotiation endpoint.
IdentityEndpoint string
// TokenID is the most recently valid token issued.