summaryrefslogtreecommitdiffstats
path: root/l3/impl/src/test
diff options
context:
space:
mode:
authorMichal Cmarada <mcmarada@cisco.com>2019-02-11 09:35:12 +0100
committerMichal Cmarada <mcmarada@cisco.com>2019-03-01 14:03:15 +0100
commitee5597ccd4091fee6a1586849d61eb657a99225d (patch)
tree25b277a2e5beb18262103925f70fc3fa11aae574 /l3/impl/src/test
parent35d3258fd1b7a4bd2b21f11bb0a9d7d78746f1a4 (diff)
add support for Enumsets
VPP API introduced flags which are by JVPP translated to EnumSets. This fixes several cases where flags are used. Change-Id: Ie52cba0c3a36fa6de2bda91c4688277471a67243 Signed-off-by: Michal Cmarada <mcmarada@cisco.com>
Diffstat (limited to 'l3/impl/src/test')
-rw-r--r--l3/impl/src/test/java/io/fd/hc2vpp/l3/read/InterfaceChildNodeTest.java3
-rw-r--r--l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ipv4/Ipv4NeighbourCustomizerTest.java3
-rw-r--r--l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ipv6/Ipv6NeighbourCustomizerTest.java3
3 files changed, 7 insertions, 2 deletions
diff --git a/l3/impl/src/test/java/io/fd/hc2vpp/l3/read/InterfaceChildNodeTest.java b/l3/impl/src/test/java/io/fd/hc2vpp/l3/read/InterfaceChildNodeTest.java
index 9534ac966..f58422066 100644
--- a/l3/impl/src/test/java/io/fd/hc2vpp/l3/read/InterfaceChildNodeTest.java
+++ b/l3/impl/src/test/java/io/fd/hc2vpp/l3/read/InterfaceChildNodeTest.java
@@ -37,6 +37,7 @@ import io.fd.vpp.jvpp.core.types.AddressUnion;
import io.fd.vpp.jvpp.core.types.Ip4Address;
import io.fd.vpp.jvpp.core.types.Ip6Address;
import io.fd.vpp.jvpp.core.types.IpNeighbor;
+import io.fd.vpp.jvpp.core.types.IpNeighborFlags;
import io.fd.vpp.jvpp.core.types.MacAddress;
import java.util.Arrays;
import java.util.List;
@@ -209,6 +210,8 @@ public interface InterfaceChildNodeTest extends NamingContextHelper, FutureProdu
detail.neighbor.ipAddress.un = addressUnion;
detail.neighbor.macAddress = new MacAddress();
detail.neighbor.macAddress.macaddress = mac;
+ detail.neighbor.flags = new IpNeighborFlags();
+ detail.neighbor.flags.add(IpNeighborFlags.IpNeighborFlagsOptions.IP_API_NEIGHBOR_FLAG_STATIC);
return detail;
}
diff --git a/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ipv4/Ipv4NeighbourCustomizerTest.java b/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ipv4/Ipv4NeighbourCustomizerTest.java
index 7d2b6472c..cb87b5e3e 100644
--- a/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ipv4/Ipv4NeighbourCustomizerTest.java
+++ b/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ipv4/Ipv4NeighbourCustomizerTest.java
@@ -137,7 +137,8 @@ public class Ipv4NeighbourCustomizerTest extends WriterCustomizerTest implements
ip4Address.ip4Address = new byte[]{(byte) 192, (byte) 168, 2, 1};
request.neighbor.ipAddress.un = new AddressUnion(ip4Address);
request.isAdd = booleanToByte(isAdd);
- request.neighbor.flags = IpNeighborFlags.IP_API_NEIGHBOR_FLAG_STATIC;
+ request.neighbor.flags = new IpNeighborFlags();
+ request.neighbor.flags.add(IpNeighborFlags.IpNeighborFlagsOptions.IP_API_NEIGHBOR_FLAG_STATIC);
request.neighbor.swIfIndex = IFACE_ID;
return request;
}
diff --git a/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ipv6/Ipv6NeighbourCustomizerTest.java b/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ipv6/Ipv6NeighbourCustomizerTest.java
index ec8734cf7..f5f906155 100644
--- a/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ipv6/Ipv6NeighbourCustomizerTest.java
+++ b/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ipv6/Ipv6NeighbourCustomizerTest.java
@@ -138,7 +138,8 @@ public class Ipv6NeighbourCustomizerTest extends WriterCustomizerTest implements
Ip6Address ip6Address = new Ip6Address();
ip6Address.ip6Address = new byte[]{32, 1, 13, -72, 10, 11, 18, -16, 0, 0, 0, 0, 0, 0, 0, 1};
request.neighbor.ipAddress.un = new AddressUnion(ip6Address);
- request.neighbor.flags = IpNeighborFlags.IP_API_NEIGHBOR_FLAG_STATIC;
+ request.neighbor.flags = new IpNeighborFlags();
+ request.neighbor.flags.add(IpNeighborFlags.IpNeighborFlagsOptions.IP_API_NEIGHBOR_FLAG_STATIC);
request.neighbor.swIfIndex = IFACE_ID;
return request;
}