diff options
author | Marek Gradzki <mgradzki@cisco.com> | 2016-11-21 08:52:48 +0100 |
---|---|---|
committer | Jan Srnicek <jsrnicek@cisco.com> | 2016-11-23 13:45:58 +0000 |
commit | 294d0ea77bd20d580405cc1470dc9a1078be7a5c (patch) | |
tree | 6457b44d889290a685fa20c017737fcccea8677e /v3po/v3po2vpp/src/test | |
parent | 563a9c165740e59aa08bb3ba5eef123abfaed805 (diff) |
Update IP4 address read order after VPP change (3816)
Change-Id: I2e4a555ca8373b8bed9bf00d4a61fd59b1810bbc
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'v3po/v3po2vpp/src/test')
2 files changed, 16 insertions, 30 deletions
diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/ip/Ipv4AddressCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/ip/Ipv4AddressCustomizerTest.java index a2eda9157..bac21c88f 100644 --- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/ip/Ipv4AddressCustomizerTest.java +++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/ip/Ipv4AddressCustomizerTest.java @@ -120,10 +120,8 @@ public class Ipv4AddressCustomizerTest extends ListReaderCustomizerTest<Address, IpAddressDetails detail1 = new IpAddressDetails(); IpAddressDetails detail2 = new IpAddressDetails(); - detail1.ip = reverseBytes( - ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.1")))); - detail2.ip = reverseBytes( - ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.2")))); + detail1.ip = ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.1"))); + detail2.ip = ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.2"))); IpAddressDetailsReplyDump reply = new IpAddressDetailsReplyDump(); reply.ipAddressDetails = ImmutableList.of(detail1); @@ -166,12 +164,9 @@ public class Ipv4AddressCustomizerTest extends ListReaderCustomizerTest<Address, IpAddressDetails detail2 = new IpAddressDetails(); IpAddressDetails detail3 = new IpAddressDetails(); - detail1.ip = reverseBytes( - ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.1")))); - detail2.ip = reverseBytes( - ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.2")))); - detail3.ip = reverseBytes( - ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.3")))); + detail1.ip = ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.1"))); + detail2.ip = ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.2"))); + detail3.ip = ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.3"))); IpAddressDetailsReplyDump reply = new IpAddressDetailsReplyDump(); reply.ipAddressDetails = ImmutableList.of(detail1, detail2, detail3); @@ -192,12 +187,9 @@ public class Ipv4AddressCustomizerTest extends ListReaderCustomizerTest<Address, IpAddressDetails detail2 = new IpAddressDetails(); IpAddressDetails detail3 = new IpAddressDetails(); - detail1.ip = reverseBytes( - ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.1")))); - detail2.ip = reverseBytes( - ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.2")))); - detail3.ip = reverseBytes( - ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.3")))); + detail1.ip = ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.1"))); + detail2.ip = ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.2"))); + detail3.ip = ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.3"))); IpAddressDetailsReplyDump reply = new IpAddressDetailsReplyDump(); reply.ipAddressDetails = ImmutableList.of(detail1, detail2, detail3); @@ -257,12 +249,10 @@ public class Ipv4AddressCustomizerTest extends ListReaderCustomizerTest<Address, replyIfaceOne.ipAddressDetails = Arrays.asList(detailIfaceOneAddressOne); replyIfaceTwo.ipAddressDetails = Arrays.asList(detailIfaceTwoAddressOne); - detailIfaceOneAddressOne.ip = reverseBytes( - ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.1")))); + detailIfaceOneAddressOne.ip = ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.1"))); detailIfaceOneAddressOne.prefixLength = 22; - detailIfaceTwoAddressOne.ip = reverseBytes( - ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.1")))); + detailIfaceTwoAddressOne.ip = ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.1"))); detailIfaceTwoAddressOne.prefixLength = 23; cache.put(cacheKeyFactory.createKey(ifaceOneAddressOneIdentifier), replyIfaceOne); @@ -274,8 +264,7 @@ public class Ipv4AddressCustomizerTest extends ListReaderCustomizerTest<Address, IpAddressDetailsReplyDump replyIfaceOne = new IpAddressDetailsReplyDump(); replyIfaceOne.ipAddressDetails = Arrays.asList(detailIfaceOneAddressOne); - detailIfaceOneAddressOne.ip = reverseBytes( - ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.1")))); + detailIfaceOneAddressOne.ip = ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.1"))); detailIfaceOneAddressOne.prefixLength = 22; cache.put(cacheKeyFactory.createKey(ifaceOneAddressOneIdentifier), replyIfaceOne); diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/ip/SubInterfaceIpv4AddressCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/ip/SubInterfaceIpv4AddressCustomizerTest.java index cecc70235..4842f5de4 100644 --- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/ip/SubInterfaceIpv4AddressCustomizerTest.java +++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/ip/SubInterfaceIpv4AddressCustomizerTest.java @@ -204,12 +204,10 @@ public class SubInterfaceIpv4AddressCustomizerTest extends ListReaderCustomizerT replyIfaceOne.ipAddressDetails = Arrays.asList(detailIfaceOneAddressOne); replyIfaceTwo.ipAddressDetails = Arrays.asList(detailIfaceTwoAddressOne); - detailIfaceOneAddressOne.ip = reverseBytes( - ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.1")))); + detailIfaceOneAddressOne.ip = ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.1"))); detailIfaceOneAddressOne.prefixLength = 22; - detailIfaceTwoAddressOne.ip = reverseBytes( - ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.1")))); + detailIfaceTwoAddressOne.ip = ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.1"))); detailIfaceTwoAddressOne.prefixLength = 23; cache.put(cacheKeyFactory.createKey(ifaceOneAddressOneIdentifier), replyIfaceOne); @@ -221,8 +219,7 @@ public class SubInterfaceIpv4AddressCustomizerTest extends ListReaderCustomizerT IpAddressDetailsReplyDump replyIfaceOne = new IpAddressDetailsReplyDump(); replyIfaceOne.ipAddressDetails = Arrays.asList(detailIfaceOneAddressOne); - detailIfaceOneAddressOne.ip = reverseBytes( - ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.1")))); + detailIfaceOneAddressOne.ip = ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.1"))); detailIfaceOneAddressOne.prefixLength = 22; cache.put(cacheKeyFactory.createKey(ifaceOneAddressOneIdentifier), replyIfaceOne); @@ -233,12 +230,12 @@ public class SubInterfaceIpv4AddressCustomizerTest extends ListReaderCustomizerT final IpAddressDetailsReplyDump reply = new IpAddressDetailsReplyDump(); final IpAddressDetails details1 = new IpAddressDetails(); - details1.ip = new byte[]{1, 1, 1, 10}; + details1.ip = new byte[]{10, 1, 1, 1}; details1.prefixLength = (byte) PREFIX_LENGTH; reply.ipAddressDetails.add(details1); final IpAddressDetails details2 = new IpAddressDetails(); - details2.ip = new byte[]{2, 1, 1, 10}; + details2.ip = new byte[]{10, 1, 1, 2}; details2.prefixLength = (byte) PREFIX_LENGTH; reply.ipAddressDetails.add(details2); |