blob: 7b435b39b601b65a42b2721423e580707717b3ec [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 Hannaford4ab9aea2014-11-04 14:38:06 +010013)
Jamie Hannaford186d4e22014-10-31 12:26:11 +010014
Jamie Hannaford5f95e6a2014-10-31 16:13:44 +010015func resourceURL(c *gophercloud.ServiceClient, id int) string {
16 return c.ServiceURL(path, strconv.Itoa(id))
Jamie Hannaford186d4e22014-10-31 12:26:11 +010017}
18
19func rootURL(c *gophercloud.ServiceClient) string {
20 return c.ServiceURL(path)
21}
Jamie Hannaford4ab9aea2014-11-04 14:38:06 +010022
23func protocolsURL(c *gophercloud.ServiceClient) string {
24 return c.ServiceURL(path, protocolsPath)
25}
Jamie Hannaford46336282014-11-04 14:48:20 +010026
27func algorithmsURL(c *gophercloud.ServiceClient) string {
28 return c.ServiceURL(path, algorithmsPath)
29}