blob: ca70b668ce5bc0ffa3aff1634c861f3123525d71 [file] [log] [blame]
Jamie Hannaford89f9af22014-09-17 12:21:48 +02001package subnets
Jamie Hannaford0708c002014-09-17 16:08:49 +02002
3import "github.com/rackspace/gophercloud"
4
Jamie Hannaford686c4962014-09-23 10:46:20 +02005const version = "v2.0"
Jamie Hannaford0708c002014-09-17 16:08:49 +02006
Jamie Hannaford686c4962014-09-23 10:46:20 +02007func resourceURL(c *gophercloud.ServiceClient, id string) string {
8 return c.ServiceURL(version, "subnets", id)
Jamie Hannaford0708c002014-09-17 16:08:49 +02009}
10
Jamie Hannaford686c4962014-09-23 10:46:20 +020011func rootURL(c *gophercloud.ServiceClient) string {
12 return c.ServiceURL(version, "subnets")
Jamie Hannaford0708c002014-09-17 16:08:49 +020013}
14
Jamie Hannaford686c4962014-09-23 10:46:20 +020015func listURL(c *gophercloud.ServiceClient) string {
16 return rootURL(c)
Jamie Hannaford0708c002014-09-17 16:08:49 +020017}
18
Jamie Hannaford686c4962014-09-23 10:46:20 +020019func getURL(c *gophercloud.ServiceClient, id string) string {
20 return resourceURL(c, id)
Jamie Hannaford0708c002014-09-17 16:08:49 +020021}
Jamie Hannaford63631432014-09-18 11:40:09 +020022
Jamie Hannaford686c4962014-09-23 10:46:20 +020023func createURL(c *gophercloud.ServiceClient) string {
24 return rootURL(c)
Jamie Hannaford63631432014-09-18 11:40:09 +020025}
Jamie Hannafordd11e20c2014-09-18 12:03:01 +020026
Jamie Hannaford686c4962014-09-23 10:46:20 +020027func updateURL(c *gophercloud.ServiceClient, id string) string {
28 return resourceURL(c, id)
Jamie Hannafordd11e20c2014-09-18 12:03:01 +020029}
30
Jamie Hannaford686c4962014-09-23 10:46:20 +020031func deleteURL(c *gophercloud.ServiceClient, id string) string {
32 return resourceURL(c, id)
Jamie Hannafordd11e20c2014-09-18 12:03:01 +020033}