osutil.AuthOptions appends /tokens to provider
if not already present.
A typical `OS_AUTH_URL` is:
```
OS_AUTH_URL=http://<hostname>:5000/v2.0
```
We need to append "/tokens" to this in order for auth calls to work.
Sample program: https://gist.github.com/msabramo/e21a6d3a24c5aa3441c6
diff --git a/osutil/auth.go b/osutil/auth.go
index 409846c..a411b63 100644
--- a/osutil/auth.go
+++ b/osutil/auth.go
@@ -4,6 +4,7 @@
"fmt"
"github.com/rackspace/gophercloud"
"os"
+ "strings"
)
var (
@@ -55,5 +56,9 @@
TenantName: tenantName,
}
+ if !strings.HasSuffix(provider, "/tokens") {
+ provider += "/tokens"
+ }
+
return provider, ao, nil
}