blob: 54198f85291665c3a07846afaf39ec435fa088b6 [file] [log] [blame]
Joe Topjiandee32222015-02-09 23:56:26 +00001package floatingip
2
3import "github.com/rackspace/gophercloud"
4
5const resourcePath = "os-floating-ips"
6
7func resourceURL(c *gophercloud.ServiceClient) string {
8 return c.ServiceURL(resourcePath)
9}
10
11func listURL(c *gophercloud.ServiceClient) string {
12 return resourceURL(c)
13}
14
15func createURL(c *gophercloud.ServiceClient) string {
16 return resourceURL(c)
17}
18
19func getURL(c *gophercloud.ServiceClient, id string) string {
20 return c.ServiceURL(resourcePath, id)
21}
22
23func deleteURL(c *gophercloud.ServiceClient, id string) string {
24 return getURL(c, id)
25}
26
27func serverURL(c *gophercloud.ServiceClient, serverId string) string {
28 return c.ServiceURL("servers/" + serverId + "/action")
29}
30
31func associateURL(c *gophercloud.ServiceClient, serverId string) string {
32 return serverURL(c, serverId)
33}
34
35func disassociateURL(c *gophercloud.ServiceClient, serverId string) string {
36 return serverURL(c, serverId)
37}