From 223b2a315c5976efa040307f85d7cef7662fbb8f Mon Sep 17 00:00:00 2001 From: Marek Gradzki Date: Fri, 25 May 2018 15:53:18 +0200 Subject: ProxyRangeCustomizer: use ProxyArp type Fixes compilation issues caused by recent VPP ip.api change: https://gerrit.fd.io/r/#/c/12693/ Change-Id: Ibbf2b9ceaf6b214f2cbe80e57bc21f6541680739 Signed-off-by: Marek Gradzki --- .../java/io/fd/hc2vpp/l3/write/ipv4/ProxyRangeCustomizer.java | 8 +++++--- .../test/java/io/fd/hc2vpp/l3/write/ProxyRangeCustomizerTest.java | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/ProxyRangeCustomizer.java b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/ProxyRangeCustomizer.java index 852959807..942dc20eb 100644 --- a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/ProxyRangeCustomizer.java +++ b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/ProxyRangeCustomizer.java @@ -25,6 +25,7 @@ import io.fd.honeycomb.translate.write.WriteFailedException; import io.fd.vpp.jvpp.core.dto.ProxyArpAddDel; import io.fd.vpp.jvpp.core.dto.ProxyArpAddDelReply; import io.fd.vpp.jvpp.core.future.FutureJVppCore; +import io.fd.vpp.jvpp.core.types.ProxyArp; import java.net.InetAddress; import java.util.concurrent.Future; import javax.annotation.Nonnull; @@ -88,9 +89,10 @@ public class ProxyRangeCustomizer extends FutureJVppCustomizer final int vrfId) { final ProxyArpAddDel proxyArpAddDel = new ProxyArpAddDel(); proxyArpAddDel.isAdd = isAdd; - proxyArpAddDel.lowAddress = lAddr; - proxyArpAddDel.hiAddress = hAddr; - proxyArpAddDel.vrfId = vrfId; + proxyArpAddDel.proxy = new ProxyArp(); + proxyArpAddDel.proxy.lowAddress = lAddr; + proxyArpAddDel.proxy.hiAddress = hAddr; + proxyArpAddDel.proxy.vrfId = vrfId; return proxyArpAddDel; } } diff --git a/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ProxyRangeCustomizerTest.java b/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ProxyRangeCustomizerTest.java index bdc382c40..307e9382f 100644 --- a/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ProxyRangeCustomizerTest.java +++ b/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ProxyRangeCustomizerTest.java @@ -26,6 +26,7 @@ import io.fd.hc2vpp.l3.write.ipv4.ProxyRangeCustomizer; import io.fd.honeycomb.translate.write.WriteFailedException; import io.fd.vpp.jvpp.core.dto.ProxyArpAddDel; import io.fd.vpp.jvpp.core.dto.ProxyArpAddDelReply; +import io.fd.vpp.jvpp.core.types.ProxyArp; import org.junit.Test; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4AddressNoZone; @@ -88,9 +89,10 @@ public class ProxyRangeCustomizerTest extends WriterCustomizerTest implements By private ProxyArpAddDel expectedAddDelRequest(final boolean isAdd) { final ProxyArpAddDel request = new ProxyArpAddDel(); request.isAdd = booleanToByte(isAdd); - request.vrfId = 123; - request.lowAddress = new byte[] {10, 1, 1, 1}; - request.hiAddress = new byte[] {10, 1, 1, 2}; + request.proxy = new ProxyArp(); + request.proxy.vrfId = 123; + request.proxy.lowAddress = new byte[] {10, 1, 1, 1}; + request.proxy.hiAddress = new byte[] {10, 1, 1, 2}; return request; } } -- cgit 1.2.3-korg