Finishing off add user roles :zap:
diff --git a/openstack/identity/v2/extensions/admin/roles/requests.go b/openstack/identity/v2/extensions/admin/roles/requests.go
index df58eec..f09fc1f 100644
--- a/openstack/identity/v2/extensions/admin/roles/requests.go
+++ b/openstack/identity/v2/extensions/admin/roles/requests.go
@@ -1,6 +1,7 @@
package roles
import (
+ "github.com/racker/perigee"
"github.com/rackspace/gophercloud"
"github.com/rackspace/gophercloud/pagination"
)
diff --git a/openstack/identity/v2/extensions/admin/roles/urls.go b/openstack/identity/v2/extensions/admin/roles/urls.go
index 2ab2b5d..9400782 100644
--- a/openstack/identity/v2/extensions/admin/roles/urls.go
+++ b/openstack/identity/v2/extensions/admin/roles/urls.go
@@ -2,15 +2,16 @@
import "github.com/rackspace/gophercloud"
-const (
- extPath = "OS-KSADMN"
- rolePath = "roles"
-)
+const extPath = "OS-KSADMN/roles"
func resourceURL(c *gophercloud.ServiceClient, id string) string {
- return c.ServiceURL(extPath, rolePath, id)
+ return c.ServiceURL(extPath, id)
}
func rootURL(c *gophercloud.ServiceClient) string {
- return c.ServiceURL(extPath, rolePath)
+ return c.ServiceURL(extPath)
+}
+
+func userRoleURL(c *gophercloud.ServiceClient, tenantID, userID, roleID string) string {
+ return c.ServiceURL("tenants", tenantID, "users", userID, extPath, roleID)
}