summaryrefslogtreecommitdiffstats
path: root/l3/impl/src
diff options
context:
space:
mode:
authorMarek Gradzki <mgradzki@cisco.com>2018-07-02 08:36:39 +0200
committerMarek Gradzki <mgradzki@cisco.com>2018-07-02 09:31:01 +0200
commitae927860249b060ed4f9a8e0f3df8df7ec2e269c (patch)
tree9d64f36e681d49cbedb928ab2f69d5cad9dacb32 /l3/impl/src
parent8366e77f1751abdae92284a9cbc0d26c126eb4dd (diff)
HC2VPP-349: use fib-table-list-ref in the proxy-arp model
User is now required to explicitly configure FIB tables using vpp-fib-management module. The patch also adds non-default vrf configuration example to the proxy-arp postman collection. Change-Id: I8cbdf0add8992bfb0a6a8fe0a38d6a466d5951f0 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'l3/impl/src')
-rw-r--r--l3/impl/src/main/java/io/fd/hc2vpp/l3/write/factory/ProxyArpWriterFactory.java8
-rw-r--r--l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/ProxyArpCustomizer.java2
-rw-r--r--l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/ProxyRangeCustomizer.java6
-rw-r--r--l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ProxyArpCustomizerTest.java4
-rw-r--r--l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ProxyRangeCustomizerTest.java11
5 files changed, 16 insertions, 15 deletions
diff --git a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/factory/ProxyArpWriterFactory.java b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/factory/ProxyArpWriterFactory.java
index 14999f873..dd1b5147b 100644
--- a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/factory/ProxyArpWriterFactory.java
+++ b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/factory/ProxyArpWriterFactory.java
@@ -29,10 +29,10 @@ import io.fd.honeycomb.translate.write.registry.ModifiableWriterRegistryBuilder;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.Interfaces;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.proxy.arp.rev170315.ProxyArpInterfaceAugmentation;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.proxy.arp.rev170315.ProxyRanges;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.proxy.arp.rev170315.interfaces._interface.ProxyArp;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.proxy.arp.rev170315.proxy.ranges.ProxyRange;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.proxy.arp.rev180702.ProxyArpInterfaceAugmentation;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.proxy.arp.rev180702.ProxyRanges;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.proxy.arp.rev180702.interfaces._interface.ProxyArp;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.proxy.arp.rev180702.proxy.ranges.ProxyRange;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
public final class ProxyArpWriterFactory implements WriterFactory {
diff --git a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/ProxyArpCustomizer.java b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/ProxyArpCustomizer.java
index 7c506e995..cb1e244ae 100644
--- a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/ProxyArpCustomizer.java
+++ b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/ProxyArpCustomizer.java
@@ -26,7 +26,7 @@ import io.fd.vpp.jvpp.core.dto.ProxyArpIntfcEnableDisable;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import javax.annotation.Nonnull;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.proxy.arp.rev170315.interfaces._interface.ProxyArp;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.proxy.arp.rev180702.interfaces._interface.ProxyArp;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
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 942dc20eb..c26f2abd2 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
@@ -29,8 +29,8 @@ import io.fd.vpp.jvpp.core.types.ProxyArp;
import java.net.InetAddress;
import java.util.concurrent.Future;
import javax.annotation.Nonnull;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.proxy.arp.rev170315.proxy.ranges.ProxyRange;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.proxy.arp.rev170315.proxy.ranges.ProxyRangeKey;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.proxy.arp.rev180702.proxy.ranges.ProxyRange;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.proxy.arp.rev180702.proxy.ranges.ProxyRangeKey;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -64,7 +64,7 @@ public class ProxyRangeCustomizer extends FutureJVppCustomizer
throws WriteFailedException {
final InetAddress srcAddress = InetAddresses.forString(proxyArp.getLowAddr().getValue());
final InetAddress dstAddress = InetAddresses.forString(proxyArp.getHighAddr().getValue());
- final int vrfId = proxyArp.getVrfId().intValue();
+ final int vrfId = proxyArp.getVrfId().getValue().intValue();
return getFutureJVpp().proxyArpAddDel(
getProxyArpConfRequest(operation, srcAddress.getAddress(), dstAddress.getAddress(), vrfId))
.toCompletableFuture();
diff --git a/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ProxyArpCustomizerTest.java b/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ProxyArpCustomizerTest.java
index 366d181fe..1ad360f9f 100644
--- a/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ProxyArpCustomizerTest.java
+++ b/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ProxyArpCustomizerTest.java
@@ -32,8 +32,8 @@ import org.junit.Test;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.Interfaces;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.InterfaceKey;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.proxy.arp.rev170315.ProxyArpInterfaceAugmentation;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.proxy.arp.rev170315.interfaces._interface.ProxyArp;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.proxy.arp.rev180702.ProxyArpInterfaceAugmentation;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.proxy.arp.rev180702.interfaces._interface.ProxyArp;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
public class ProxyArpCustomizerTest extends WriterCustomizerTest implements ByteDataTranslator {
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 307e9382f..9e8fd6dc8 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
@@ -30,10 +30,11 @@ 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;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.proxy.arp.rev170315.ProxyRanges;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.proxy.arp.rev170315.proxy.ranges.ProxyRange;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.proxy.arp.rev170315.proxy.ranges.ProxyRangeBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.proxy.arp.rev170315.proxy.ranges.ProxyRangeKey;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.fib.table.management.rev180521.VniReference;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.proxy.arp.rev180702.ProxyRanges;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.proxy.arp.rev180702.proxy.ranges.ProxyRange;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.proxy.arp.rev180702.proxy.ranges.ProxyRangeBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.proxy.arp.rev180702.proxy.ranges.ProxyRangeKey;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier;
@@ -47,7 +48,7 @@ public class ProxyRangeCustomizerTest extends WriterCustomizerTest implements By
public void setUpTest() throws Exception {
final Ipv4Address highAddr = new Ipv4AddressNoZone("10.1.1.2");
final Ipv4Address lowAddr = new Ipv4AddressNoZone("10.1.1.1");
- final long vrfId = 123;
+ final VniReference vrfId = new VniReference(123L);
IID = InstanceIdentifier.create(ProxyRanges.class)
.child(ProxyRange.class, new ProxyRangeKey(highAddr, lowAddr, vrfId));
RANGE = new ProxyRangeBuilder().setVrfId(vrfId).setHighAddr(highAddr).setLowAddr(new Ipv4AddressNoZone(lowAddr))