Adding support for listing user roles
diff --git a/openstack/identity/v2/users/urls.go b/openstack/identity/v2/users/urls.go
index 41b3435..f59cafc 100644
--- a/openstack/identity/v2/users/urls.go
+++ b/openstack/identity/v2/users/urls.go
@@ -2,12 +2,19 @@
import "github.com/rackspace/gophercloud"
-const path = "users"
+const (
+ tenantPath = "tenants"
+ userPath = "users"
+)
func resourceURL(c *gophercloud.ServiceClient, id string) string {
- return c.ServiceURL(path, id)
+ return c.ServiceURL(userPath, id)
}
func rootURL(c *gophercloud.ServiceClient) string {
- return c.ServiceURL(path)
+ return c.ServiceURL(userPath)
+}
+
+func listRolesURL(c *gophercloud.ServiceClient, tenantID, userID string) string {
+ return c.ServiceURL(tenantPath, tenantID, userPath, userID)
}