blob: c238239f61e23133cd7641b72fe88e229c0c1fd3 [file] [log] [blame]
Jon Perritt9f8b0152015-03-17 19:28:18 -06001package lbpools
2
3import "github.com/rackspace/gophercloud"
4
5var root = "load_balancer_pools"
6
7func listURL(c *gophercloud.ServiceClient) string {
8 return c.ServiceURL(root)
9}
10
11func getURL(c *gophercloud.ServiceClient, id string) string {
12 return c.ServiceURL(root, id)
13}
14
15func listNodesURL(c *gophercloud.ServiceClient, id string) string {
16 return c.ServiceURL(root, id, "nodes")
17}
18
19func createNodeURL(c *gophercloud.ServiceClient, id string) string {
20 return listNodesURL(c, id)
21}
22
23func listNodesDetailsURL(c *gophercloud.ServiceClient, id string) string {
24 return c.ServiceURL(root, id, "nodes", "details")
25}
26
27func nodeURL(c *gophercloud.ServiceClient, poolID, nodeID string) string {
28 return c.ServiceURL(root, poolID, "nodes", nodeID)
29}
30
31func deleteNodeURL(c *gophercloud.ServiceClient, poolID, nodeID string) string {
32 return nodeURL(c, poolID, nodeID)
33}
34
35func nodeDetailsURL(c *gophercloud.ServiceClient, poolID, nodeID string) string {
36 return c.ServiceURL(root, poolID, "nodes", nodeID, "details")
37}
38
39func createNodesURL(c *gophercloud.ServiceClient) string {
40 return c.ServiceURL(root, "nodes")
41}
42
43func deleteNodesURL(c *gophercloud.ServiceClient) string {
44 return createNodesURL(c)
45}
46
47func listNodesForServerURL(c *gophercloud.ServiceClient, serverID string) string {
48 return c.ServiceURL(root, "nodes", "details?cloud_server_id="+serverID)
49}