Jamie Hannaford | 924c09d | 2014-11-19 12:05:38 +0100 | [diff] [blame] | 1 | package secgroups |
| 2 | |
| 3 | import "github.com/rackspace/gophercloud" |
| 4 | |
| 5 | const ( |
| 6 | secgrouppath = "os-security-groups" |
Jamie Hannaford | 8badf1e | 2014-11-19 14:39:26 +0100 | [diff] [blame] | 7 | rulepath = "os-security-group-rules" |
Jamie Hannaford | 924c09d | 2014-11-19 12:05:38 +0100 | [diff] [blame] | 8 | ) |
| 9 | |
| 10 | func resourceURL(c *gophercloud.ServiceClient, id string) string { |
| 11 | return c.ServiceURL(secgrouppath, id) |
| 12 | } |
| 13 | |
| 14 | func rootURL(c *gophercloud.ServiceClient) string { |
| 15 | return c.ServiceURL(secgrouppath) |
| 16 | } |
Jamie Hannaford | 1915179 | 2014-11-19 12:46:47 +0100 | [diff] [blame] | 17 | |
| 18 | func listByServerURL(c *gophercloud.ServiceClient, serverID string) string { |
| 19 | return c.ServiceURL(secgrouppath, "servers", serverID, secgrouppath) |
| 20 | } |
Jamie Hannaford | 8badf1e | 2014-11-19 14:39:26 +0100 | [diff] [blame] | 21 | |
| 22 | func rootRuleURL(c *gophercloud.ServiceClient) string { |
| 23 | return c.ServiceURL(rulepath) |
| 24 | } |
Jamie Hannaford | 61f81ca | 2014-11-19 14:44:33 +0100 | [diff] [blame] | 25 | |
| 26 | func resourceRuleURL(c *gophercloud.ServiceClient, id string) string { |
| 27 | return c.ServiceURL(rulepath, id) |
| 28 | } |