blob: 94007828945a95df43cf6abbd9de0fe7a8bd314c [file] [log] [blame]
Jamie Hannaford0ca076c2014-10-30 13:12:35 +01001package roles
2
3import "github.com/rackspace/gophercloud"
4
Jamie Hannaford1d58e7a2014-10-30 13:23:33 +01005const extPath = "OS-KSADMN/roles"
Jamie Hannaford0ca076c2014-10-30 13:12:35 +01006
7func resourceURL(c *gophercloud.ServiceClient, id string) string {
Jamie Hannaford1d58e7a2014-10-30 13:23:33 +01008 return c.ServiceURL(extPath, id)
Jamie Hannaford0ca076c2014-10-30 13:12:35 +01009}
10
11func rootURL(c *gophercloud.ServiceClient) string {
Jamie Hannaford1d58e7a2014-10-30 13:23:33 +010012 return c.ServiceURL(extPath)
13}
14
15func userRoleURL(c *gophercloud.ServiceClient, tenantID, userID, roleID string) string {
16 return c.ServiceURL("tenants", tenantID, "users", userID, extPath, roleID)
Jamie Hannaford0ca076c2014-10-30 13:12:35 +010017}