blob: a9eecc52956e8d351d8440a72d660e77a997fb28 [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
Jon Perrittd72ac532014-10-31 13:58:41 -050025func updateURL(c *gophercloud.ServiceClient, id string) string {
26 return resourceURL(c, id)
27}
28
Jamie Hannaford686c4962014-09-23 10:46:20 +020029func deleteURL(c *gophercloud.ServiceClient, id string) string {
30 return resourceURL(c, id)
Jamie Hannaford4721abc2014-09-16 16:29:04 +020031}