blob: 23956ba2718d78f887d5e63601aae3b46b744f6c [file] [log] [blame]
Joe Topjian520307e2015-02-07 05:22:12 +00001package volumeattach
2
Krzysztof Szukiełojć3f41d082017-05-07 14:43:06 +02003import "gerrit.mcp.mirantis.net/debian/gophercloud.git"
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}