Joe Topjian | 520307e | 2015-02-07 05:22:12 +0000 | [diff] [blame] | 1 | package volumeattach |
| 2 | |
| 3 | import "github.com/rackspace/gophercloud" |
| 4 | |
| 5 | const resourcePath = "os-volume_attachments" |
| 6 | |
| 7 | func resourceURL(c *gophercloud.ServiceClient, serverId string) string { |
| 8 | return c.ServiceURL("servers", serverId, resourcePath) |
| 9 | } |
| 10 | |
| 11 | func listURL(c *gophercloud.ServiceClient, serverId string) string { |
| 12 | return resourceURL(c, serverId) |
| 13 | } |
| 14 | |
| 15 | func createURL(c *gophercloud.ServiceClient, serverId string) string { |
| 16 | return resourceURL(c, serverId) |
| 17 | } |
| 18 | |
| 19 | func getURL(c *gophercloud.ServiceClient, serverId, aId string) string { |
| 20 | return c.ServiceURL("servers", serverId, resourcePath, aId) |
| 21 | } |
| 22 | |
| 23 | func deleteURL(c *gophercloud.ServiceClient, serverId, aId string) string { |
| 24 | return getURL(c, serverId, aId) |
| 25 | } |