blob: 083f8dc4554f8a40d4c8a055dcb775d31bd35837 [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
Jon Perritt3860b512016-03-29 12:01:48 -05007func resourceURL(c *gophercloud.ServiceClient, serverID string) string {
8 return c.ServiceURL("servers", serverID, resourcePath)
Joe Topjian520307e2015-02-07 05:22:12 +00009}
10
Jon Perritt3860b512016-03-29 12:01:48 -050011func listURL(c *gophercloud.ServiceClient, serverID string) string {
12 return resourceURL(c, serverID)
Joe Topjian520307e2015-02-07 05:22:12 +000013}
14
Jon Perritt3860b512016-03-29 12:01:48 -050015func createURL(c *gophercloud.ServiceClient, serverID string) string {
16 return resourceURL(c, serverID)
Joe Topjian520307e2015-02-07 05:22:12 +000017}
18
Jon Perritt3860b512016-03-29 12:01:48 -050019func getURL(c *gophercloud.ServiceClient, serverID, aID string) string {
20 return c.ServiceURL("servers", serverID, resourcePath, aID)
Joe Topjian520307e2015-02-07 05:22:12 +000021}
22
Jon Perritt3860b512016-03-29 12:01:48 -050023func deleteURL(c *gophercloud.ServiceClient, serverID, aID string) string {
24 return getURL(c, serverID, aID)
Joe Topjian520307e2015-02-07 05:22:12 +000025}