blob: 0b0b70e47a0849b85eab888561825c8c5202cd71 [file] [log] [blame]
Jamie Hannaford01e14922014-09-11 15:23:49 +02001package networks
2
3import (
Jamie Hannafordf14d4562014-09-11 17:46:18 +02004 "strings"
5
Jamie Hannaford01e14922014-09-11 15:23:49 +02006 "github.com/rackspace/gophercloud"
7)
8
Jamie Hannaford12bc2472014-09-15 12:14:31 +02009const Version = "v2.0"
10
Jamie Hannaford01e14922014-09-11 15:23:49 +020011func APIVersionsURL(c *gophercloud.ServiceClient) string {
12 return c.ServiceURL("")
13}
Jamie Hannafordf14d4562014-09-11 17:46:18 +020014
15func APIInfoURL(c *gophercloud.ServiceClient, version string) string {
16 return c.ServiceURL(strings.TrimRight(version, "/") + "/")
17}
Jamie Hannaford12bc2472014-09-15 12:14:31 +020018
19func ExtensionURL(c *gophercloud.ServiceClient, name string) string {
20 return c.ServiceURL(Version, "extensions", name)
21}
Jamie Hannafordd01a3c72014-09-15 12:51:00 +020022
23func NetworkURL(c *gophercloud.ServiceClient, id string) string {
24 return c.ServiceURL(Version, "networks", id)
25}
Jamie Hannafordd2d9f562014-09-15 15:35:07 +020026
27func CreateURL(c *gophercloud.ServiceClient) string {
28 return c.ServiceURL(Version, "networks")
29}