blob: 33c23875caa57915d183dcb7c1c913c94a5b9a05 [file] [log] [blame]
Jamie Hannaford01e14922014-09-11 15:23:49 +02001package networks
2
Jamie Hannaford1ce30f22014-09-16 11:23:34 +02003import "github.com/rackspace/gophercloud"
Jamie Hannaford01e14922014-09-11 15:23:49 +02004
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("networks", id)
Jamie Hannafordd01a3c72014-09-15 12:51:00 +02007}
Jamie Hannafordd2d9f562014-09-15 15:35:07 +02008
Jamie Hannaford686c4962014-09-23 10:46:20 +02009func rootURL(c *gophercloud.ServiceClient) string {
Ash Wilsonb4c8c6f2014-10-06 17:35:02 -040010 return c.ServiceURL("networks")
Jamie Hannafordd2d9f562014-09-15 15:35:07 +020011}
Jamie Hannaford4721abc2014-09-16 16:29:04 +020012
Jamie Hannaford686c4962014-09-23 10:46:20 +020013func getURL(c *gophercloud.ServiceClient, id string) string {
14 return resourceURL(c, id)
Jamie Hannaford4721abc2014-09-16 16:29:04 +020015}
16
Jamie Hannaford686c4962014-09-23 10:46:20 +020017func listURL(c *gophercloud.ServiceClient) string {
18 return rootURL(c)
Jamie Hannaford4721abc2014-09-16 16:29:04 +020019}
20
Jamie Hannaford686c4962014-09-23 10:46:20 +020021func createURL(c *gophercloud.ServiceClient) string {
22 return rootURL(c)
Jamie Hannaford4721abc2014-09-16 16:29:04 +020023}
24
Jamie Hannaford686c4962014-09-23 10:46:20 +020025func deleteURL(c *gophercloud.ServiceClient, id string) string {
26 return resourceURL(c, id)
Jamie Hannaford4721abc2014-09-16 16:29:04 +020027}