blob: f64707362124ca3e4b1e0eae79082bdb6b1ad357 [file] [log] [blame]
Jamie Hannafordfba65af2014-11-03 10:32:37 +01001package lbs
Jamie Hannaford186d4e22014-10-31 12:26:11 +01002
Jamie Hannaford5f95e6a2014-10-31 16:13:44 +01003import (
4 "strconv"
5
6 "github.com/rackspace/gophercloud"
7)
Jamie Hannaford186d4e22014-10-31 12:26:11 +01008
Jamie Hannaford4ab9aea2014-11-04 14:38:06 +01009const (
Jamie Hannaford46336282014-11-04 14:48:20 +010010 path = "loadbalancers"
11 protocolsPath = "protocols"
12 algorithmsPath = "algorithms"
Jamie Hannafordd78bb352014-11-07 16:36:09 +010013 logPath = "connectionlogging"
Jamie Hannafordda45b422014-11-10 11:00:38 +010014 epPath = "errorpage"
Jamie Hannaford3da65282014-11-10 11:36:16 +010015 stPath = "stats"
Jamie Hannaford4ab9aea2014-11-04 14:38:06 +010016)
Jamie Hannaford186d4e22014-10-31 12:26:11 +010017
Jamie Hannaford5f95e6a2014-10-31 16:13:44 +010018func resourceURL(c *gophercloud.ServiceClient, id int) string {
19 return c.ServiceURL(path, strconv.Itoa(id))
Jamie Hannaford186d4e22014-10-31 12:26:11 +010020}
21
22func rootURL(c *gophercloud.ServiceClient) string {
23 return c.ServiceURL(path)
24}
Jamie Hannaford4ab9aea2014-11-04 14:38:06 +010025
26func protocolsURL(c *gophercloud.ServiceClient) string {
27 return c.ServiceURL(path, protocolsPath)
28}
Jamie Hannaford46336282014-11-04 14:48:20 +010029
30func algorithmsURL(c *gophercloud.ServiceClient) string {
31 return c.ServiceURL(path, algorithmsPath)
32}
Jamie Hannafordd78bb352014-11-07 16:36:09 +010033
34func loggingURL(c *gophercloud.ServiceClient, id int) string {
35 return c.ServiceURL(path, strconv.Itoa(id), logPath)
36}
Jamie Hannafordda45b422014-11-10 11:00:38 +010037
38func errorPageURL(c *gophercloud.ServiceClient, id int) string {
39 return c.ServiceURL(path, strconv.Itoa(id), epPath)
40}
Jamie Hannaford3da65282014-11-10 11:36:16 +010041
42func statsURL(c *gophercloud.ServiceClient, id int) string {
43 return c.ServiceURL(path, strconv.Itoa(id), stPath)
44}