Jamie Hannaford | 548d340 | 2014-09-18 15:50:08 +0200 | [diff] [blame] | 1 | package ports |
| 2 | |
| 3 | import "github.com/rackspace/gophercloud" |
| 4 | |
Jamie Hannaford | 965ae70 | 2014-09-22 14:58:19 +0200 | [diff] [blame] | 5 | func resourceURL(c *gophercloud.ServiceClient, id string) string { |
Ash Wilson | b4c8c6f | 2014-10-06 17:35:02 -0400 | [diff] [blame] | 6 | return c.ServiceURL("ports", id) |
Jamie Hannaford | 548d340 | 2014-09-18 15:50:08 +0200 | [diff] [blame] | 7 | } |
| 8 | |
Jamie Hannaford | 965ae70 | 2014-09-22 14:58:19 +0200 | [diff] [blame] | 9 | func rootURL(c *gophercloud.ServiceClient) string { |
Ash Wilson | b4c8c6f | 2014-10-06 17:35:02 -0400 | [diff] [blame] | 10 | return c.ServiceURL("ports") |
Jamie Hannaford | 548d340 | 2014-09-18 15:50:08 +0200 | [diff] [blame] | 11 | } |
| 12 | |
Jamie Hannaford | 965ae70 | 2014-09-22 14:58:19 +0200 | [diff] [blame] | 13 | func listURL(c *gophercloud.ServiceClient) string { |
| 14 | return rootURL(c) |
Jamie Hannaford | 548d340 | 2014-09-18 15:50:08 +0200 | [diff] [blame] | 15 | } |
| 16 | |
Jamie Hannaford | 965ae70 | 2014-09-22 14:58:19 +0200 | [diff] [blame] | 17 | func getURL(c *gophercloud.ServiceClient, id string) string { |
| 18 | return resourceURL(c, id) |
Jamie Hannaford | 548d340 | 2014-09-18 15:50:08 +0200 | [diff] [blame] | 19 | } |
| 20 | |
Jamie Hannaford | 965ae70 | 2014-09-22 14:58:19 +0200 | [diff] [blame] | 21 | func createURL(c *gophercloud.ServiceClient) string { |
| 22 | return rootURL(c) |
Jamie Hannaford | 548d340 | 2014-09-18 15:50:08 +0200 | [diff] [blame] | 23 | } |
| 24 | |
Jamie Hannaford | 965ae70 | 2014-09-22 14:58:19 +0200 | [diff] [blame] | 25 | func updateURL(c *gophercloud.ServiceClient, id string) string { |
| 26 | return resourceURL(c, id) |
Jamie Hannaford | 548d340 | 2014-09-18 15:50:08 +0200 | [diff] [blame] | 27 | } |
| 28 | |
Jamie Hannaford | 965ae70 | 2014-09-22 14:58:19 +0200 | [diff] [blame] | 29 | func deleteURL(c *gophercloud.ServiceClient, id string) string { |
| 30 | return resourceURL(c, id) |
Jamie Hannaford | 548d340 | 2014-09-18 15:50:08 +0200 | [diff] [blame] | 31 | } |