From c86fe16c5ea1e79890b7f6a96af819d56a754cdd Mon Sep 17 00:00:00 2001 From: Dylan Egan Date: Tue, 23 Aug 2011 16:19:49 -0700 Subject: [PATCH] [compute|aws] Since this is really proving the use of nil, let's just not pretend there's a value for owner_id. --- lib/fog/compute/models/aws/security_group.rb | 4 ++-- tests/compute/models/aws/security_group_tests.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/fog/compute/models/aws/security_group.rb b/lib/fog/compute/models/aws/security_group.rb index 1bbd941a1..40a2099d5 100644 --- a/lib/fog/compute/models/aws/security_group.rb +++ b/lib/fog/compute/models/aws/security_group.rb @@ -38,7 +38,7 @@ module Fog # "Server"=>"AmazonEC2"} # - def authorize_group_and_owner(group, owner) + def authorize_group_and_owner(group, owner = nil) requires :name connection.authorize_security_group_ingress( @@ -130,7 +130,7 @@ module Fog # "Server"=>"AmazonEC2"} # - def revoke_group_and_owner(group, owner) + def revoke_group_and_owner(group, owner = nil) requires :name connection.revoke_security_group_ingress( diff --git a/tests/compute/models/aws/security_group_tests.rb b/tests/compute/models/aws/security_group_tests.rb index add4a4eda..7d38dd89f 100644 --- a/tests/compute/models/aws/security_group_tests.rb +++ b/tests/compute/models/aws/security_group_tests.rb @@ -15,13 +15,13 @@ Shindo.tests("Fog::Compute[:aws] | security_group", ['aws']) do @other_group = Fog::Compute[:aws].security_groups.create(:name => 'other group', :description => 'another group') test("authorize access by another security group") do - @group.authorize_group_and_owner(@other_group.name, @other_group.owner_id) + @group.authorize_group_and_owner(@other_group.name) @group.reload @group.ip_permissions.size == 3 end test("revoke access from another security group") do - @group.revoke_group_and_owner(@other_group.name, @other_group.owner_id) + @group.revoke_group_and_owner(@other_group.name) @group.reload @group.ip_permissions.empty? end