Add a cidrlist to the listportforwardingrulesresponse.json test

This commit is contained in:
Richard Downer 2011-12-22 10:36:30 +00:00
parent eca39408ef
commit 4248b879a5
2 changed files with 6 additions and 5 deletions

View File

@ -42,11 +42,12 @@ public class ListPortForwardingRulesResponseTest extends BaseSetParserTest<PortF
@Override @Override
@SelectJson("portforwardingrule") @SelectJson("portforwardingrule")
public Set<PortForwardingRule> expected() { public Set<PortForwardingRule> expected() {
Set<String> cidrs = ImmutableSet.of("0.0.0.0/1", "128.0.0.0/1");
return ImmutableSet.<PortForwardingRule> of( return ImmutableSet.<PortForwardingRule> of(
PortForwardingRule.builder().id(15).privatePort(22).protocol("tcp").publicPort(2022).virtualMachineId(3) PortForwardingRule.builder().id(15).privatePort(22).protocol("tcp").publicPort(2022).virtualMachineId(3)
.virtualMachineName("i-3-3-VM").IPAddressId(3).IPAddress("72.52.126.32").state("Active").build(), .virtualMachineName("i-3-3-VM").IPAddressId(3).IPAddress("72.52.126.32").state("Active").CIDRs(cidrs).build(),
PortForwardingRule.builder().id(18).privatePort(22).protocol("tcp").publicPort(22).virtualMachineId(89) PortForwardingRule.builder().id(18).privatePort(22).protocol("tcp").publicPort(22).virtualMachineId(89)
.virtualMachineName("i-3-89-VM").IPAddressId(34).IPAddress("72.52.126.63").state("Active").build()); .virtualMachineName("i-3-89-VM").IPAddressId(34).IPAddress("72.52.126.63").state("Active").build());
} }
} }

View File

@ -1 +1 @@
{ "listportforwardingrulesresponse" : { "portforwardingrule" : [ {"id":18,"privateport":"22","protocol":"tcp","publicport":"22","virtualmachineid":89,"virtualmachinename":"i-3-89-VM","ipaddressid":34,"ipaddress":"72.52.126.63","state":"Active"}, {"id":15,"privateport":"22","protocol":"tcp","publicport":"2022","virtualmachineid":3,"virtualmachinename":"i-3-3-VM","ipaddressid":3,"ipaddress":"72.52.126.32","state":"Active","cidrlist":""} ] } } { "listportforwardingrulesresponse" : { "portforwardingrule" : [ {"id":18,"privateport":"22","protocol":"tcp","publicport":"22","virtualmachineid":89,"virtualmachinename":"i-3-89-VM","ipaddressid":34,"ipaddress":"72.52.126.63","state":"Active"}, {"id":15,"privateport":"22","protocol":"tcp","publicport":"2022","virtualmachineid":3,"virtualmachinename":"i-3-3-VM","ipaddressid":3,"ipaddress":"72.52.126.32","state":"Active","cidrlist":"0.0.0.0/1,128.0.0.0/1"} ] } }