blob: a0d660a21027e1a31ab2e831b3f101618a3af460 [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 Hannaford12bc2472014-09-15 12:14:31 +02005const Version = "v2.0"
6
Jamie Hannaford4721abc2014-09-16 16:29:04 +02007func ResourceURL(c *gophercloud.ServiceClient, id string) string {
Jamie Hannafordd01a3c72014-09-15 12:51:00 +02008 return c.ServiceURL(Version, "networks", id)
9}
Jamie Hannafordd2d9f562014-09-15 15:35:07 +020010
Jamie Hannaford4721abc2014-09-16 16:29:04 +020011func RootURL(c *gophercloud.ServiceClient) string {
Jamie Hannafordd2d9f562014-09-15 15:35:07 +020012 return c.ServiceURL(Version, "networks")
13}
Jamie Hannaford4721abc2014-09-16 16:29:04 +020014
15func GetURL(c *gophercloud.ServiceClient, id string) string {
16 return ResourceURL(c, id)
17}
18
19func ListURL(c *gophercloud.ServiceClient) string {
20 return RootURL(c)
21}
22
23func CreateURL(c *gophercloud.ServiceClient) string {
24 return RootURL(c)
25}
26
27func DeleteURL(c *gophercloud.ServiceClient, id string) string {
28 return ResourceURL(c, id)
29}