Permalink
Browse files

refs #10213, modify_security_group: add support for group_names (old …

…way))
  • Loading branch information...
1 parent cddcb5c commit 9bd84a04e4adb3588eee3b25055059c93b04fc05 @konstantin-dzreev konstantin-dzreev committed Aug 18, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/ec2/right_ec2_security_groups.rb
View
3 lib/ec2/right_ec2_security_groups.rb
@@ -283,7 +283,8 @@ def modify_security_group(action, direction, group_id, permissions)
# :groups => {UserId1 => GroupId1, ... UserIdN => GroupIdN}
# or (this allows using same UserId multiple times )
# :groups => [[UserId1, GroupId1], ... [UserIdN, GroupIdN]]
- hash.merge!(amazonize_list( ["IpPermissions.#{pid}.Groups.?.UserId", "IpPermissions.#{pid}.Groups.?.GroupId"], permission[:groups] ))
+ hash.merge!(amazonize_list( ["IpPermissions.#{pid}.Groups.?.UserId", "IpPermissions.#{pid}.Groups.?.GroupName"], permission[:group_names] ))
+ hash.merge!(amazonize_list( ["IpPermissions.#{pid}.Groups.?.UserId", "IpPermissions.#{pid}.Groups.?.GroupId"], permission[:groups] ))
when :egress
# :groups => [GroupId1, ... GroupIdN]
hash.merge!(amazonize_list( "IpPermissions.#{pid}.Groups.?.GroupId", permission[:groups] ))

0 comments on commit 9bd84a0

Please sign in to comment.