1package secgroups
2
3import "github.com/gophercloud/gophercloud"
4
5const (
6	secgrouppath = "os-security-groups"
7	rulepath     = "os-security-group-rules"
8)
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}
17
18func listByServerURL(c *gophercloud.ServiceClient, serverID string) string {
19	return c.ServiceURL("servers", serverID, secgrouppath)
20}
21
22func rootRuleURL(c *gophercloud.ServiceClient) string {
23	return c.ServiceURL(rulepath)
24}
25
26func resourceRuleURL(c *gophercloud.ServiceClient, id string) string {
27	return c.ServiceURL(rulepath, id)
28}
29
30func serverActionURL(c *gophercloud.ServiceClient, id string) string {
31	return c.ServiceURL("servers", id, "action")
32}
33