summaryrefslogtreecommitdiffstats
path: root/fib-management/fib-management-impl/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'fib-management/fib-management-impl/src/test')
-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
3 files changed, 20 insertions, 17 deletions
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;