apache/libcloud — pull request #297 by zerthimon (2014-05-21 15:01:40+00:00)
Title: LIBCLOUD-559_sec-groups new method to get security groups

Current method of listing security groups [ex_list_security_groups()] only returns security group names. This method doesn't provide ability for filter security groups by names or ID, nor does it list security group's rules with no way to know which rules are in place.

This patch adds new method of listing security groups: ex_get_security_groups() and new class: EC2SecurityGroup. The objects of new class have ingress_rules and egress_rules structures that reflect the EC2 security groups rules.

The filter dict building code was moved into a separate function.
This patch doesn't provide any unit tests (will be added it the concept is approved)