blob: a3720cbcce9b5ecb95d77135a1fbb8bb9192570a [file] [log] [blame]
Jamie Hannaford0ca076c2014-10-30 13:12:35 +01001package roles
2
Krzysztof Szukiełojć3f41d082017-05-07 14:43:06 +02003import "gerrit.mcp.mirantis.net/debian/gophercloud.git"
Jamie Hannaford0ca076c2014-10-30 13:12:35 +01004
Jamie Hannaford46e07ae2014-10-30 13:53:43 +01005const (
Jamie Hannaford36a7dfd2014-10-30 14:31:34 +01006 ExtPath = "OS-KSADM"
7 RolePath = "roles"
Jamie Hannaford46e07ae2014-10-30 13:53:43 +01008 UserPath = "users"
9)
Jamie Hannaford0ca076c2014-10-30 13:12:35 +010010
11func resourceURL(c *gophercloud.ServiceClient, id string) string {
Jamie Hannaford36a7dfd2014-10-30 14:31:34 +010012 return c.ServiceURL(ExtPath, RolePath, id)
Jamie Hannaford0ca076c2014-10-30 13:12:35 +010013}
14
15func rootURL(c *gophercloud.ServiceClient) string {
Jamie Hannaford36a7dfd2014-10-30 14:31:34 +010016 return c.ServiceURL(ExtPath, RolePath)
Jamie Hannaford1d58e7a2014-10-30 13:23:33 +010017}
18
19func userRoleURL(c *gophercloud.ServiceClient, tenantID, userID, roleID string) string {
Jamie Hannaford36a7dfd2014-10-30 14:31:34 +010020 return c.ServiceURL("tenants", tenantID, UserPath, userID, RolePath, ExtPath, roleID)
Jamie Hannaford0ca076c2014-10-30 13:12:35 +010021}