mirror of https://github.com/apache/jclouds.git
Merge pull request #697 from vijaykiran/issue-816
Fixes #816 unable to set security group ingress with AWSEC2Client
This commit is contained in:
commit
f95070a88e
|
@ -73,8 +73,9 @@ public class IpPermissions extends IpPermissionImpl {
|
|||
i = 0;
|
||||
for (Entry<String, String> userIdGroupNamePair : checkNotNull(permission.getUserIdGroupPairs(),
|
||||
"userIdGroupNamePairs").entries()) {
|
||||
headers.put(prefix + i++ + ".UserId", userIdGroupNamePair.getKey());
|
||||
headers.put(prefix + i + ".UserId", userIdGroupNamePair.getKey());
|
||||
headers.put(prefix + i + ".GroupName", userIdGroupNamePair.getValue());
|
||||
i++;
|
||||
}
|
||||
prefix = "IpPermissions.%d.IpRanges.";
|
||||
i = 0;
|
||||
|
|
|
@ -103,6 +103,6 @@ public class IpPermissionsTest {
|
|||
"groupId");
|
||||
assertEquals(
|
||||
IpPermissions.buildFormParametersForIndex(0, authorization).toString(),
|
||||
"{IpPermissions.0.IpProtocol=[icmp], IpPermissions.0.FromPort=[-1], IpPermissions.0.ToPort=[-1], IpPermissions.0.Groups.0.UserId=[userId], IpPermissions.0.Groups.1.GroupName=[groupId]}");
|
||||
"{IpPermissions.0.IpProtocol=[icmp], IpPermissions.0.FromPort=[-1], IpPermissions.0.ToPort=[-1], IpPermissions.0.Groups.0.UserId=[userId], IpPermissions.0.Groups.0.GroupName=[groupId]}");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue