Jon Perritt | af5e28c | 2015-03-06 13:09:49 -0700 | [diff] [blame] | 1 | package rules |
| 2 | |
| 3 | import ( |
| 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. |
| 12 | func 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. |
| 18 | func 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. |
| 23 | func 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. |
| 28 | func Delete(c *gophercloud.ServiceClient, id string) os.DeleteResult { |
| 29 | return os.Delete(c, id) |
| 30 | } |