blob: 558b399018ff056273a164764662bdb738536183 [file] [log] [blame]
Jamie Hannaford548d3402014-09-18 15:50:08 +02001package ports
2
3import "github.com/rackspace/gophercloud"
4
Jamie Hannaford965ae702014-09-22 14:58:19 +02005const version = "v2.0"
Jamie Hannaford548d3402014-09-18 15:50:08 +02006
Jamie Hannaford965ae702014-09-22 14:58:19 +02007func resourceURL(c *gophercloud.ServiceClient, id string) string {
8 return c.ServiceURL(version, "ports", id)
Jamie Hannaford548d3402014-09-18 15:50:08 +02009}
10
Jamie Hannaford965ae702014-09-22 14:58:19 +020011func rootURL(c *gophercloud.ServiceClient) string {
12 return c.ServiceURL(version, "ports")
Jamie Hannaford548d3402014-09-18 15:50:08 +020013}
14
Jamie Hannaford965ae702014-09-22 14:58:19 +020015func listURL(c *gophercloud.ServiceClient) string {
16 return rootURL(c)
Jamie Hannaford548d3402014-09-18 15:50:08 +020017}
18
Jamie Hannaford965ae702014-09-22 14:58:19 +020019func getURL(c *gophercloud.ServiceClient, id string) string {
20 return resourceURL(c, id)
Jamie Hannaford548d3402014-09-18 15:50:08 +020021}
22
Jamie Hannaford965ae702014-09-22 14:58:19 +020023func createURL(c *gophercloud.ServiceClient) string {
24 return rootURL(c)
Jamie Hannaford548d3402014-09-18 15:50:08 +020025}
26
Jamie Hannaford965ae702014-09-22 14:58:19 +020027func updateURL(c *gophercloud.ServiceClient, id string) string {
28 return resourceURL(c, id)
Jamie Hannaford548d3402014-09-18 15:50:08 +020029}
30
Jamie Hannaford965ae702014-09-22 14:58:19 +020031func deleteURL(c *gophercloud.ServiceClient, id string) string {
32 return resourceURL(c, id)
Jamie Hannaford548d3402014-09-18 15:50:08 +020033}