Jamie Hannaford | 89f9af2 | 2014-09-17 12:21:48 +0200 | [diff] [blame] | 1 | package subnets |
Jamie Hannaford | 0708c00 | 2014-09-17 16:08:49 +0200 | [diff] [blame] | 2 | |
Krzysztof Szukiełojć | 3f41d08 | 2017-05-07 14:43:06 +0200 | [diff] [blame] | 3 | import "gerrit.mcp.mirantis.net/debian/gophercloud.git" |
Jamie Hannaford | 0708c00 | 2014-09-17 16:08:49 +0200 | [diff] [blame] | 4 | |
Jamie Hannaford | 686c496 | 2014-09-23 10:46:20 +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("subnets", id) |
Jamie Hannaford | 0708c00 | 2014-09-17 16:08:49 +0200 | [diff] [blame] | 7 | } |
| 8 | |
Jamie Hannaford | 686c496 | 2014-09-23 10:46:20 +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("subnets") |
Jamie Hannaford | 0708c00 | 2014-09-17 16:08:49 +0200 | [diff] [blame] | 11 | } |
| 12 | |
Jamie Hannaford | 686c496 | 2014-09-23 10:46:20 +0200 | [diff] [blame] | 13 | func listURL(c *gophercloud.ServiceClient) string { |
| 14 | return rootURL(c) |
Jamie Hannaford | 0708c00 | 2014-09-17 16:08:49 +0200 | [diff] [blame] | 15 | } |
| 16 | |
Jamie Hannaford | 686c496 | 2014-09-23 10:46:20 +0200 | [diff] [blame] | 17 | func getURL(c *gophercloud.ServiceClient, id string) string { |
| 18 | return resourceURL(c, id) |
Jamie Hannaford | 0708c00 | 2014-09-17 16:08:49 +0200 | [diff] [blame] | 19 | } |
Jamie Hannaford | 6363143 | 2014-09-18 11:40:09 +0200 | [diff] [blame] | 20 | |
Jamie Hannaford | 686c496 | 2014-09-23 10:46:20 +0200 | [diff] [blame] | 21 | func createURL(c *gophercloud.ServiceClient) string { |
| 22 | return rootURL(c) |
Jamie Hannaford | 6363143 | 2014-09-18 11:40:09 +0200 | [diff] [blame] | 23 | } |
Jamie Hannaford | d11e20c | 2014-09-18 12:03:01 +0200 | [diff] [blame] | 24 | |
Jamie Hannaford | 686c496 | 2014-09-23 10:46:20 +0200 | [diff] [blame] | 25 | func updateURL(c *gophercloud.ServiceClient, id string) string { |
| 26 | return resourceURL(c, id) |
Jamie Hannaford | d11e20c | 2014-09-18 12:03:01 +0200 | [diff] [blame] | 27 | } |
| 28 | |
Jamie Hannaford | 686c496 | 2014-09-23 10:46:20 +0200 | [diff] [blame] | 29 | func deleteURL(c *gophercloud.ServiceClient, id string) string { |
| 30 | return resourceURL(c, id) |
Jamie Hannaford | d11e20c | 2014-09-18 12:03:01 +0200 | [diff] [blame] | 31 | } |