blob: 7e2694cdecabbb3e3d704a2f163fd45cbe755ab9 [file] [log] [blame]
Jamie Hannaford924c09d2014-11-19 12:05:38 +01001package secgroups
2
3import "github.com/rackspace/gophercloud"
4
5const (
6 secgrouppath = "os-security-groups"
Jamie Hannaford8badf1e2014-11-19 14:39:26 +01007 rulepath = "os-security-group-rules"
Jamie Hannaford924c09d2014-11-19 12:05:38 +01008)
9
10func resourceURL(c *gophercloud.ServiceClient, id string) string {
11 return c.ServiceURL(secgrouppath, id)
12}
13
14func rootURL(c *gophercloud.ServiceClient) string {
15 return c.ServiceURL(secgrouppath)
16}
Jamie Hannaford19151792014-11-19 12:46:47 +010017
18func listByServerURL(c *gophercloud.ServiceClient, serverID string) string {
19 return c.ServiceURL(secgrouppath, "servers", serverID, secgrouppath)
20}
Jamie Hannaford8badf1e2014-11-19 14:39:26 +010021
22func rootRuleURL(c *gophercloud.ServiceClient) string {
23 return c.ServiceURL(rulepath)
24}
Jamie Hannaford61f81ca2014-11-19 14:44:33 +010025
26func resourceRuleURL(c *gophercloud.ServiceClient, id string) string {
27 return c.ServiceURL(rulepath, id)
28}