Jamie Hannaford | ed7f453 | 2015-02-17 14:56:30 +0100 | [diff] [blame] | 1 | package configurations |
| 2 | |
| 3 | import "github.com/rackspace/gophercloud" |
| 4 | |
| 5 | func baseURL(c *gophercloud.ServiceClient) string { |
| 6 | return c.ServiceURL("configurations") |
| 7 | } |
| 8 | |
| 9 | func resourceURL(c *gophercloud.ServiceClient, configID string) string { |
| 10 | return c.ServiceURL("configurations", configID) |
| 11 | } |
| 12 | |
| 13 | func instancesURL(c *gophercloud.ServiceClient, configID string) string { |
| 14 | return c.ServiceURL("configurations", configID, "instances") |
| 15 | } |
Jamie Hannaford | 23867bb | 2015-02-17 15:56:48 +0100 | [diff] [blame] | 16 | |
| 17 | func listDSParamsURL(c *gophercloud.ServiceClient, datastoreID, versionID string) string { |
Jamie Hannaford | 1110840 | 2015-02-23 10:31:41 +0100 | [diff] [blame] | 18 | return c.ServiceURL("datastores", datastoreID, "versions", versionID, "parameters") |
Jamie Hannaford | 23867bb | 2015-02-17 15:56:48 +0100 | [diff] [blame] | 19 | } |
| 20 | |
| 21 | func getDSParamURL(c *gophercloud.ServiceClient, datastoreID, versionID, paramID string) string { |
Jamie Hannaford | 1110840 | 2015-02-23 10:31:41 +0100 | [diff] [blame] | 22 | return c.ServiceURL("datastores", datastoreID, "versions", versionID, "parameters", paramID) |
Jamie Hannaford | 23867bb | 2015-02-17 15:56:48 +0100 | [diff] [blame] | 23 | } |
| 24 | |
| 25 | func listGlobalParamsURL(c *gophercloud.ServiceClient, versionID string) string { |
| 26 | return c.ServiceURL("datastores", "versions", versionID, "parameters") |
| 27 | } |
| 28 | |
| 29 | func getGlobalParamURL(c *gophercloud.ServiceClient, versionID, paramID string) string { |
| 30 | return c.ServiceURL("datastores", "versions", versionID, "parameters", paramID) |
| 31 | } |