summaryrefslogtreecommitdiffstats
path: root/fib-management/fib-management-impl
diff options
context:
space:
mode:
authorTibor Král <tibor.kral@pantheon.tech>2019-01-13 13:33:06 +0100
committerTibor Král <tibor.kral@pantheon.tech>2019-01-14 14:36:44 +0000
commite6bd81db7d506e08fce9f235651e0a33f5c1496e (patch)
treea7b8ec9463dd451e36b84a051acd580354f3201b /fib-management/fib-management-impl
parentf4011297a01819dc74d9d57b43227c68a564b58a (diff)
HC2VPP-300: Unify namespaces of FIB models
Change-Id: Ib24688d039c7e38afe468af542f62c821111e41f Signed-off-by: Tibor Král <tibor.kral@pantheon.tech>
Diffstat (limited to 'fib-management/fib-management-impl')
-rw-r--r--fib-management/fib-management-impl/src/main/java/io/fd/hc2vpp/fib/management/FibManagementIIds.java6
-rw-r--r--fib-management/fib-management-impl/src/main/java/io/fd/hc2vpp/fib/management/read/FibManagementReaderFactory.java4
-rw-r--r--fib-management/fib-management-impl/src/main/java/io/fd/hc2vpp/fib/management/read/FibTableCustomizer.java16
-rw-r--r--fib-management/fib-management-impl/src/main/java/io/fd/hc2vpp/fib/management/write/FibTableCustomizer.java6
-rw-r--r--fib-management/fib-management-impl/src/test/java/io/fd/hc2vpp/fib/management/helpers/SchemaContextTestHelper.java2
-rw-r--r--fib-management/fib-management-impl/src/test/java/io/fd/hc2vpp/fib/management/read/FibTableCustomizerTest.java14
-rw-r--r--fib-management/fib-management-impl/src/test/java/io/fd/hc2vpp/fib/management/write/FibTableCustomizerTest.java21
7 files changed, 36 insertions, 33 deletions
diff --git a/fib-management/fib-management-impl/src/main/java/io/fd/hc2vpp/fib/management/FibManagementIIds.java b/fib-management/fib-management-impl/src/main/java/io/fd/hc2vpp/fib/management/FibManagementIIds.java
index c79ca2b16..4cc1215c4 100644
--- a/fib-management/fib-management-impl/src/main/java/io/fd/hc2vpp/fib/management/FibManagementIIds.java
+++ b/fib-management/fib-management-impl/src/main/java/io/fd/hc2vpp/fib/management/FibManagementIIds.java
@@ -16,9 +16,9 @@
package io.fd.hc2vpp.fib.management;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.fib.table.management.rev180521.FibTableManagement;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.fib.table.management.rev180521.vpp.fib.table.management.FibTables;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.fib.table.management.rev180521.vpp.fib.table.management.fib.tables.Table;
+import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.fib.table.management.rev180521.FibTableManagement;
+import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.fib.table.management.rev180521.vpp.fib.table.management.FibTables;
+import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.fib.table.management.rev180521.vpp.fib.table.management.fib.tables.Table;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
public class FibManagementIIds {
diff --git a/fib-management/fib-management-impl/src/main/java/io/fd/hc2vpp/fib/management/read/FibManagementReaderFactory.java b/fib-management/fib-management-impl/src/main/java/io/fd/hc2vpp/fib/management/read/FibManagementReaderFactory.java
index 4c1de905f..c40a1457b 100644
--- a/fib-management/fib-management-impl/src/main/java/io/fd/hc2vpp/fib/management/read/FibManagementReaderFactory.java
+++ b/fib-management/fib-management-impl/src/main/java/io/fd/hc2vpp/fib/management/read/FibManagementReaderFactory.java
@@ -29,8 +29,8 @@ import io.fd.vpp.jvpp.core.dto.IpFibDetailsReplyDump;
import io.fd.vpp.jvpp.core.dto.IpFibDump;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import javax.annotation.Nonnull;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.fib.table.management.rev180521.FibTableManagementBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.fib.table.management.rev180521.vpp.fib.table.management.FibTablesBuilder;
+import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.fib.table.management.rev180521.FibTableManagementBuilder;
+import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.fib.table.management.rev180521.vpp.fib.table.management.FibTablesBuilder;
/**
* Factory producing readers for FIB management plugin's data.
diff --git a/fib-management/fib-management-impl/src/main/java/io/fd/hc2vpp/fib/management/read/FibTableCustomizer.java b/fib-management/fib-management-impl/src/main/java/io/fd/hc2vpp/fib/management/read/FibTableCustomizer.java
index 08c8328e4..90de1d057 100644
--- a/fib-management/fib-management-impl/src/main/java/io/fd/hc2vpp/fib/management/read/FibTableCustomizer.java
+++ b/fib-management/fib-management-impl/src/main/java/io/fd/hc2vpp/fib/management/read/FibTableCustomizer.java
@@ -29,14 +29,14 @@ import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import javax.annotation.Nonnull;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.fib.table.management.rev180521.AddressFamilyIdentity;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.fib.table.management.rev180521.Ipv4;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.fib.table.management.rev180521.Ipv6;
-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.fib.table.management.rev180521.vpp.fib.table.management.FibTablesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.fib.table.management.rev180521.vpp.fib.table.management.fib.tables.Table;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.fib.table.management.rev180521.vpp.fib.table.management.fib.tables.TableBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.fib.table.management.rev180521.vpp.fib.table.management.fib.tables.TableKey;
+import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.fib.table.management.rev180521.AddressFamilyIdentity;
+import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.fib.table.management.rev180521.Ipv4;
+import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.fib.table.management.rev180521.Ipv6;
+import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.fib.table.management.rev180521.VniReference;
+import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.fib.table.management.rev180521.vpp.fib.table.management.FibTablesBuilder;
+import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.fib.table.management.rev180521.vpp.fib.table.management.fib.tables.Table;
+import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.fib.table.management.rev180521.vpp.fib.table.management.fib.tables.TableBuilder;
+import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.fib.table.management.rev180521.vpp.fib.table.management.fib.tables.TableKey;
import org.opendaylight.yangtools.concepts.Builder;
import org.opendaylight.yangtools.yang.binding.DataObject;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
diff --git a/fib-management/fib-management-impl/src/main/java/io/fd/hc2vpp/fib/management/write/FibTableCustomizer.java b/fib-management/fib-management-impl/src/main/java/io/fd/hc2vpp/fib/management/write/FibTableCustomizer.java
index 74b8dc768..c61ff399e 100644
--- a/fib-management/fib-management-impl/src/main/java/io/fd/hc2vpp/fib/management/write/FibTableCustomizer.java
+++ b/fib-management/fib-management-impl/src/main/java/io/fd/hc2vpp/fib/management/write/FibTableCustomizer.java
@@ -24,9 +24,9 @@ import io.fd.honeycomb.translate.write.WriteContext;
import io.fd.honeycomb.translate.write.WriteFailedException;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import javax.annotation.Nonnull;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.fib.table.management.rev180521.Ipv6;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.fib.table.management.rev180521.vpp.fib.table.management.fib.tables.Table;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.fib.table.management.rev180521.vpp.fib.table.management.fib.tables.TableKey;
+import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.fib.table.management.rev180521.Ipv6;
+import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.fib.table.management.rev180521.vpp.fib.table.management.fib.tables.Table;
+import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.fib.table.management.rev180521.vpp.fib.table.management.fib.tables.TableKey;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
class FibTableCustomizer extends FutureJVppCustomizer implements ListWriterCustomizer<Table, TableKey> {
diff --git a/fib-management/fib-management-impl/src/test/java/io/fd/hc2vpp/fib/management/helpers/SchemaContextTestHelper.java b/fib-management/fib-management-impl/src/test/java/io/fd/hc2vpp/fib/management/helpers/SchemaContextTestHelper.java
index 1341e7e86..d3f07de24 100644
--- a/fib-management/fib-management-impl/src/test/java/io/fd/hc2vpp/fib/management/helpers/SchemaContextTestHelper.java
+++ b/fib-management/fib-management-impl/src/test/java/io/fd/hc2vpp/fib/management/helpers/SchemaContextTestHelper.java
@@ -20,7 +20,7 @@ import com.google.common.collect.ImmutableSet;
import io.fd.honeycomb.test.tools.annotations.InjectablesProcessor;
import io.fd.honeycomb.test.tools.annotations.SchemaContextProvider;
import org.opendaylight.mdsal.binding.generator.impl.ModuleInfoBackedContext;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.fib.table.management.rev180521.$YangModuleInfoImpl;
+import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.fib.table.management.rev180521.$YangModuleInfoImpl;
public interface SchemaContextTestHelper extends InjectablesProcessor {
diff --git a/fib-management/fib-management-impl/src/test/java/io/fd/hc2vpp/fib/management/read/FibTableCustomizerTest.java b/fib-management/fib-management-impl/src/test/java/io/fd/hc2vpp/fib/management/read/FibTableCustomizerTest.java
index 081553e47..a2be35e03 100644
--- a/fib-management/fib-management-impl/src/test/java/io/fd/hc2vpp/fib/management/read/FibTableCustomizerTest.java
+++ b/fib-management/fib-management-impl/src/test/java/io/fd/hc2vpp/fib/management/read/FibTableCustomizerTest.java
@@ -40,16 +40,16 @@ import java.util.List;
import org.junit.Assert;
import org.junit.Test;
import org.mockito.Mock;
+import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.fib.table.management.rev180521.Ipv4;
+import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.fib.table.management.rev180521.Ipv6;
+import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.fib.table.management.rev180521.VniReference;
+import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.fib.table.management.rev180521.vpp.fib.table.management.FibTablesBuilder;
+import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.fib.table.management.rev180521.vpp.fib.table.management.fib.tables.Table;
+import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.fib.table.management.rev180521.vpp.fib.table.management.fib.tables.TableBuilder;
+import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.fib.table.management.rev180521.vpp.fib.table.management.fib.tables.TableKey;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress;
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.Ipv6Address;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.fib.table.management.rev180521.Ipv4;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.fib.table.management.rev180521.Ipv6;
-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.fib.table.management.rev180521.vpp.fib.table.management.FibTablesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.fib.table.management.rev180521.vpp.fib.table.management.fib.tables.Table;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.fib.table.management.rev180521.vpp.fib.table.management.fib.tables.TableBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.fib.table.management.rev180521.vpp.fib.table.management.fib.tables.TableKey;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
public class FibTableCustomizerTest extends InitializingListReaderCustomizerTest<Table, TableKey, TableBuilder>
diff --git a/fib-management/fib-management-impl/src/test/java/io/fd/hc2vpp/fib/management/write/FibTableCustomizerTest.java b/fib-management/fib-management-impl/src/test/java/io/fd/hc2vpp/fib/management/write/FibTableCustomizerTest.java
index c9d05dc45..d292947f6 100644
--- a/fib-management/fib-management-impl/src/test/java/io/fd/hc2vpp/fib/management/write/FibTableCustomizerTest.java
+++ b/fib-management/fib-management-impl/src/test/java/io/fd/hc2vpp/fib/management/write/FibTableCustomizerTest.java
@@ -33,11 +33,12 @@ import io.fd.vpp.jvpp.core.dto.IpTableAddDelReply;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.fib.table.management.rev180521.Ipv6;
-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.fib.table.management.rev180521.vpp.fib.table.management.FibTables;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.fib.table.management.rev180521.vpp.fib.table.management.fib.tables.Table;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.fib.table.management.rev180521.vpp.fib.table.management.fib.tables.TableKey;
+import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.fib.table.management.rev180521.Ipv4;
+import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.fib.table.management.rev180521.Ipv6;
+import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.fib.table.management.rev180521.VniReference;
+import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.fib.table.management.rev180521.vpp.fib.table.management.FibTables;
+import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.fib.table.management.rev180521.vpp.fib.table.management.fib.tables.Table;
+import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.fib.table.management.rev180521.vpp.fib.table.management.fib.tables.TableKey;
@RunWith(HoneycombTestRunner.class)
public class FibTableCustomizerTest extends WriterCustomizerTest implements SchemaContextTestHelper,
@@ -60,9 +61,10 @@ public class FibTableCustomizerTest extends WriterCustomizerTest implements Sche
@Test
public void testWriteSimple(@InjectTestData(resourcePath = "/fib.json", id = FIB_PATH) FibTables tables)
throws WriteFailedException {
- final Table data = tables.getTable().get(0);
+ TableKey key = new TableKey(Ipv4.class, new VniReference(0L));
+ Table data = tables.getTable().stream().filter(table -> table.key().equals(key)).findAny().get();
customizer.writeCurrentAttributes(FibManagementIIds.FM_FIB_TABLES
- .child(Table.class, new TableKey(Ipv6.class, new VniReference(0L))), data, writeContext);
+ .child(Table.class, key), data, writeContext);
final IpTableAddDel request = new IpTableAddDel();
request.isAdd = 1;
request.isIpv6 = 0;
@@ -75,9 +77,10 @@ public class FibTableCustomizerTest extends WriterCustomizerTest implements Sche
@Test
public void testDelete(@InjectTestData(resourcePath = "/fib.json", id = FIB_PATH) FibTables tables)
throws WriteFailedException {
- final Table data = tables.getTable().get(3);
+ TableKey key = new TableKey(Ipv6.class, new VniReference(0L));
+ Table data = tables.getTable().stream().filter(table -> table.key().equals(key)).findAny().get();
customizer.deleteCurrentAttributes(FibManagementIIds.FM_FIB_TABLES
- .child(Table.class, new TableKey(Ipv6.class, new VniReference(0L))), data, writeContext);
+ .child(Table.class, key), data, writeContext);
final IpTableAddDel request = new IpTableAddDel();
request.isAdd = 0;
request.isIpv6 = 1;