blob: c60674a6ddd24545a02734d2678bbb46e28281a3 [file] [log] [blame]
Joe Topjian520307e2015-02-07 05:22:12 +00001package volumeattach
2
Jon Perritt27249f42016-02-18 10:35:59 -06003import "github.com/gophercloud/gophercloud"
Joe Topjian520307e2015-02-07 05:22:12 +00004
5const resourcePath = "os-volume_attachments"
6
7func resourceURL(c *gophercloud.ServiceClient, serverId string) string {
8 return c.ServiceURL("servers", serverId, resourcePath)
9}
10
11func listURL(c *gophercloud.ServiceClient, serverId string) string {
12 return resourceURL(c, serverId)
13}
14
15func createURL(c *gophercloud.ServiceClient, serverId string) string {
16 return resourceURL(c, serverId)
17}
18
19func getURL(c *gophercloud.ServiceClient, serverId, aId string) string {
20 return c.ServiceURL("servers", serverId, resourcePath, aId)
21}
22
23func deleteURL(c *gophercloud.ServiceClient, serverId, aId string) string {
24 return getURL(c, serverId, aId)
25}