summaryrefslogtreecommitdiffstats
path: root/nat/nat2vpp/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'nat/nat2vpp/src/test')
-rw-r--r--nat/nat2vpp/src/test/java/io/fd/hc2vpp/nat/NatModuleTest.java19
-rw-r--r--nat/nat2vpp/src/test/java/io/fd/hc2vpp/nat/read/ifc/InterfaceInboundNatCustomizerTest.java12
2 files changed, 16 insertions, 15 deletions
diff --git a/nat/nat2vpp/src/test/java/io/fd/hc2vpp/nat/NatModuleTest.java b/nat/nat2vpp/src/test/java/io/fd/hc2vpp/nat/NatModuleTest.java
index a25ee6316..bd7cc400d 100644
--- a/nat/nat2vpp/src/test/java/io/fd/hc2vpp/nat/NatModuleTest.java
+++ b/nat/nat2vpp/src/test/java/io/fd/hc2vpp/nat/NatModuleTest.java
@@ -46,10 +46,10 @@ import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
import org.opendaylight.mdsal.binding.api.DataBroker;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev180220.InterfacesState;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev180220.InterfacesStateBuilder;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev180220.interfaces.state.Interface;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev180220.interfaces.state.InterfaceBuilder;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev180220.Interfaces;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev180220.InterfacesBuilder;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev180220.interfaces.Interface;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev180220.interfaces.InterfaceBuilder;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
public class NatModuleTest {
@@ -80,8 +80,9 @@ public class NatModuleTest {
@Before
public void setUp() throws Exception {
ietfIfcReaderFactory = registry -> {
- registry.addStructuralReader(InstanceIdentifier.create(InterfacesState.class), InterfacesStateBuilder.class);
- registry.addStructuralReader(InstanceIdentifier.create(InterfacesState.class).child(Interface.class), InterfaceBuilder.class);
+ registry.addStructuralReader(InstanceIdentifier.create(Interfaces.class), InterfacesBuilder.class);
+ registry.addStructuralReader(InstanceIdentifier.create(Interfaces.class).child(Interface.class),
+ InterfaceBuilder.class);
};
initMocks(this);
ifcContext = new NamingContext("interface-", "interface-context");
@@ -89,10 +90,10 @@ public class NatModuleTest {
// be present, add structural readers (or add V3poModule here, but adding the full Module is not the best solution)
Guice.createInjector(binder -> Multibinder.newSetBinder(binder, ReaderFactory.class)
.addBinding().toInstance(registry -> {
- registry.addStructuralReader(InstanceIdentifier.create(InterfacesState.class),
- InterfacesStateBuilder.class);
+ registry.addStructuralReader(InstanceIdentifier.create(Interfaces.class),
+ InterfacesBuilder.class);
registry.add(new GenericListReader<>(
- InstanceIdentifier.create(InterfacesState.class).child(Interface.class),
+ InstanceIdentifier.create(Interfaces.class).child(Interface.class),
mock(ListReaderCustomizer.class)));
}), new NatModule(MockJVppNatProvider.class), BoundFieldModule.of(this)).injectMembers(this);
}
diff --git a/nat/nat2vpp/src/test/java/io/fd/hc2vpp/nat/read/ifc/InterfaceInboundNatCustomizerTest.java b/nat/nat2vpp/src/test/java/io/fd/hc2vpp/nat/read/ifc/InterfaceInboundNatCustomizerTest.java
index 46a5c8c5e..4e5a6b31f 100644
--- a/nat/nat2vpp/src/test/java/io/fd/hc2vpp/nat/read/ifc/InterfaceInboundNatCustomizerTest.java
+++ b/nat/nat2vpp/src/test/java/io/fd/hc2vpp/nat/read/ifc/InterfaceInboundNatCustomizerTest.java
@@ -38,14 +38,14 @@ import io.fd.jvpp.nat.types.InterfaceIndex;
import io.fd.jvpp.nat.types.NatConfigFlags;
import org.junit.Test;
import org.mockito.Mock;
-import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang._interface.nat.rev170816.NatInterfaceStateAugmentation;
+import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang._interface.nat.rev170816.NatInterfaceAugmentation;
import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang._interface.nat.rev170816._interface.nat.attributes.Nat;
import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang._interface.nat.rev170816._interface.nat.attributes.NatBuilder;
import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang._interface.nat.rev170816._interface.nat.attributes.nat.Inbound;
import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang._interface.nat.rev170816._interface.nat.attributes.nat.InboundBuilder;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev180220.InterfacesState;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev180220.interfaces.state.Interface;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev180220.interfaces.state.InterfaceKey;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev180220.Interfaces;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev180220.interfaces.Interface;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev180220.interfaces.InterfaceKey;
import org.opendaylight.yangtools.yang.binding.ChildOf;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
@@ -67,9 +67,9 @@ public class InterfaceInboundNatCustomizerTest
}
static <T extends ChildOf<Nat>> InstanceIdentifier<T> getId(Class<T> boundType) {
- return InstanceIdentifier.create(InterfacesState.class)
+ return InstanceIdentifier.create(Interfaces.class)
.child(Interface.class, new InterfaceKey(IFC_NAME))
- .augmentation(NatInterfaceStateAugmentation.class)
+ .augmentation(NatInterfaceAugmentation.class)
.child(Nat.class)
.child(boundType);
}