And one more nit:
On Mon, 2011-05-30 at 17:33 +0300, [email protected] wrote:
> diff --git a/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
> b/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
> index 0c0471a..c3911cc 100644
> --- a/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
> +++ b/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
> @@ -571,6 +574,73 @@ module Deltacloud
> end
> end
>
> +#--
> +#FIREWALLS - ec2 security groups
> +#--
> + def firewalls(credentials, opts={})
> + ec2 = new_client(credentials)
> + the_firewalls = []
> + groups = []
> + safely do
> + if opts[:id]
> + groups = ec2.describe_security_groups([opts[:id]])
> + else
> + groups = ec2.describe_security_groups()
> + end
> + end
> + groups.each do |security_group|
> + the_firewalls << convert_security_group(security_group)
> + end
> + filter_on(the_firewalls, :id, opts)
> + end
The filter_on shouldn't be necessary, since we already only look up the
one security group if given an :id.
David