Joe Topjian | 520307e | 2015-02-07 05:22:12 +0000 | [diff] [blame] | 1 | package volumeattach |
| 2 | |
Krzysztof Szukiełojć | 3f41d08 | 2017-05-07 14:43:06 +0200 | [diff] [blame] | 3 | import "gerrit.mcp.mirantis.net/debian/gophercloud.git" |
Joe Topjian | 520307e | 2015-02-07 05:22:12 +0000 | [diff] [blame] | 4 | |
| 5 | const resourcePath = "os-volume_attachments" |
| 6 | |
Jon Perritt | 3860b51 | 2016-03-29 12:01:48 -0500 | [diff] [blame] | 7 | func resourceURL(c *gophercloud.ServiceClient, serverID string) string { |
| 8 | return c.ServiceURL("servers", serverID, resourcePath) |
Joe Topjian | 520307e | 2015-02-07 05:22:12 +0000 | [diff] [blame] | 9 | } |
| 10 | |
Jon Perritt | 3860b51 | 2016-03-29 12:01:48 -0500 | [diff] [blame] | 11 | func listURL(c *gophercloud.ServiceClient, serverID string) string { |
| 12 | return resourceURL(c, serverID) |
Joe Topjian | 520307e | 2015-02-07 05:22:12 +0000 | [diff] [blame] | 13 | } |
| 14 | |
Jon Perritt | 3860b51 | 2016-03-29 12:01:48 -0500 | [diff] [blame] | 15 | func createURL(c *gophercloud.ServiceClient, serverID string) string { |
| 16 | return resourceURL(c, serverID) |
Joe Topjian | 520307e | 2015-02-07 05:22:12 +0000 | [diff] [blame] | 17 | } |
| 18 | |
Jon Perritt | 3860b51 | 2016-03-29 12:01:48 -0500 | [diff] [blame] | 19 | func getURL(c *gophercloud.ServiceClient, serverID, aID string) string { |
| 20 | return c.ServiceURL("servers", serverID, resourcePath, aID) |
Joe Topjian | 520307e | 2015-02-07 05:22:12 +0000 | [diff] [blame] | 21 | } |
| 22 | |
Jon Perritt | 3860b51 | 2016-03-29 12:01:48 -0500 | [diff] [blame] | 23 | func deleteURL(c *gophercloud.ServiceClient, serverID, aID string) string { |
| 24 | return getURL(c, serverID, aID) |
Joe Topjian | 520307e | 2015-02-07 05:22:12 +0000 | [diff] [blame] | 25 | } |