blob: 0d0236894158c5ac9e04b2e283889ea272830b4c [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 +02005func resourceURL(c *gophercloud.ServiceClient, id string) string {
Ash Wilsonb4c8c6f2014-10-06 17:35:02 -04006 return c.ServiceURL("subnets", id)
Jamie Hannaford0708c002014-09-17 16:08:49 +02007}
8
Jamie Hannaford686c4962014-09-23 10:46:20 +02009func rootURL(c *gophercloud.ServiceClient) string {
Ash Wilsonb4c8c6f2014-10-06 17:35:02 -040010 return c.ServiceURL("subnets")
Jamie Hannaford0708c002014-09-17 16:08:49 +020011}
12
Jamie Hannaford686c4962014-09-23 10:46:20 +020013func listURL(c *gophercloud.ServiceClient) string {
14 return rootURL(c)
Jamie Hannaford0708c002014-09-17 16:08:49 +020015}
16
Jamie Hannaford686c4962014-09-23 10:46:20 +020017func getURL(c *gophercloud.ServiceClient, id string) string {
18 return resourceURL(c, id)
Jamie Hannaford0708c002014-09-17 16:08:49 +020019}
Jamie Hannaford63631432014-09-18 11:40:09 +020020
Jamie Hannaford686c4962014-09-23 10:46:20 +020021func createURL(c *gophercloud.ServiceClient) string {
22 return rootURL(c)
Jamie Hannaford63631432014-09-18 11:40:09 +020023}
Jamie Hannafordd11e20c2014-09-18 12:03:01 +020024
Jamie Hannaford686c4962014-09-23 10:46:20 +020025func updateURL(c *gophercloud.ServiceClient, id string) string {
26 return resourceURL(c, id)
Jamie Hannafordd11e20c2014-09-18 12:03:01 +020027}
28
Jamie Hannaford686c4962014-09-23 10:46:20 +020029func deleteURL(c *gophercloud.ServiceClient, id string) string {
30 return resourceURL(c, id)
Jamie Hannafordd11e20c2014-09-18 12:03:01 +020031}