blob: 6d0572f1fb2798a5a4473dd8444105015d392cd2 [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 +02005func resourceURL(c *gophercloud.ServiceClient, id string) string {
Ash Wilsonb4c8c6f2014-10-06 17:35:02 -04006 return c.ServiceURL("ports", id)
Jamie Hannaford548d3402014-09-18 15:50:08 +02007}
8
Jamie Hannaford965ae702014-09-22 14:58:19 +02009func rootURL(c *gophercloud.ServiceClient) string {
Ash Wilsonb4c8c6f2014-10-06 17:35:02 -040010 return c.ServiceURL("ports")
Jamie Hannaford548d3402014-09-18 15:50:08 +020011}
12
Jamie Hannaford965ae702014-09-22 14:58:19 +020013func listURL(c *gophercloud.ServiceClient) string {
14 return rootURL(c)
Jamie Hannaford548d3402014-09-18 15:50:08 +020015}
16
Jamie Hannaford965ae702014-09-22 14:58:19 +020017func getURL(c *gophercloud.ServiceClient, id string) string {
18 return resourceURL(c, id)
Jamie Hannaford548d3402014-09-18 15:50:08 +020019}
20
Jamie Hannaford965ae702014-09-22 14:58:19 +020021func createURL(c *gophercloud.ServiceClient) string {
22 return rootURL(c)
Jamie Hannaford548d3402014-09-18 15:50:08 +020023}
24
Jamie Hannaford965ae702014-09-22 14:58:19 +020025func updateURL(c *gophercloud.ServiceClient, id string) string {
26 return resourceURL(c, id)
Jamie Hannaford548d3402014-09-18 15:50:08 +020027}
28
Jamie Hannaford965ae702014-09-22 14:58:19 +020029func deleteURL(c *gophercloud.ServiceClient, id string) string {
30 return resourceURL(c, id)
Jamie Hannaford548d3402014-09-18 15:50:08 +020031}