blob: 23b4b318e2ba68f8f409741b7f27e363588be60c [file] [log] [blame]
Jon Perrittaf5e28c2015-03-06 13:09:49 -07001package rules
2
3import (
4 "github.com/rackspace/gophercloud"
5 os "github.com/rackspace/gophercloud/openstack/networking/v2/extensions/security/rules"
6 "github.com/rackspace/gophercloud/pagination"
7)
8
9// List returns a Pager which allows you to iterate over a collection of
10// security group rules. It accepts a ListOpts struct, which allows you to filter
11// and sort the returned collection for greater efficiency.
12func List(c *gophercloud.ServiceClient, opts os.ListOpts) pagination.Pager {
13 return os.List(c, opts)
14}
15
16// Create is an operation which provisions a new security group with default
17// security group rules for the IPv4 and IPv6 ether types.
18func Create(c *gophercloud.ServiceClient, opts os.CreateOpts) os.CreateResult {
19 return os.Create(c, opts)
20}
21
22// Get retrieves a particular security group based on its unique ID.
23func Get(c *gophercloud.ServiceClient, id string) os.GetResult {
24 return os.Get(c, id)
25}
26
27// Delete will permanently delete a particular security group based on its unique ID.
28func Delete(c *gophercloud.ServiceClient, id string) os.DeleteResult {
29 return os.Delete(c, id)
30}