mirror of https://github.com/apache/jclouds.git
Fixes #816 unable to set security group ingress with AWSEC2Client
This commit is contained in:
parent
bc94e367ce
commit
769ace1640
|
@ -73,8 +73,9 @@ public class IpPermissions extends IpPermissionImpl {
|
||||||
i = 0;
|
i = 0;
|
||||||
for (Entry<String, String> userIdGroupNamePair : checkNotNull(permission.getUserIdGroupPairs(),
|
for (Entry<String, String> userIdGroupNamePair : checkNotNull(permission.getUserIdGroupPairs(),
|
||||||
"userIdGroupNamePairs").entries()) {
|
"userIdGroupNamePairs").entries()) {
|
||||||
headers.put(prefix + i++ + ".UserId", userIdGroupNamePair.getKey());
|
headers.put(prefix + i + ".UserId", userIdGroupNamePair.getKey());
|
||||||
headers.put(prefix + i + ".GroupName", userIdGroupNamePair.getValue());
|
headers.put(prefix + i + ".GroupName", userIdGroupNamePair.getValue());
|
||||||
|
i++;
|
||||||
}
|
}
|
||||||
prefix = "IpPermissions.%d.IpRanges.";
|
prefix = "IpPermissions.%d.IpRanges.";
|
||||||
i = 0;
|
i = 0;
|
||||||
|
|
|
@ -103,6 +103,6 @@ public class IpPermissionsTest {
|
||||||
"groupId");
|
"groupId");
|
||||||
assertEquals(
|
assertEquals(
|
||||||
IpPermissions.buildFormParametersForIndex(0, authorization).toString(),
|
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