diff options
author | Michal Cmarada <mcmarada@cisco.com> | 2019-05-27 13:54:02 +0200 |
---|---|---|
committer | Michal Cmarada <mcmarada@cisco.com> | 2019-05-27 13:54:02 +0200 |
commit | 5543345d32514bfa38292a5080e57b915e39ea1d (patch) | |
tree | 6d759a5eb22bb020f47c299e928e7a65f7a84b2f /nat/nat2vpp/src/test/java/io | |
parent | 5c416ebacf4baad25de6213661c3cdfff31c0482 (diff) |
HC2VPP-411: remove deprecated interface-state
- new ietf-interfaces obsoletes interfaces-state container,
only interfaces container should be used from now on.
Change-Id: Ifb24611a3dca987bdf6b029d32e01d9b1f479fe8
Signed-off-by: Michal Cmarada <mcmarada@cisco.com>
Diffstat (limited to 'nat/nat2vpp/src/test/java/io')
-rw-r--r-- | nat/nat2vpp/src/test/java/io/fd/hc2vpp/nat/NatModuleTest.java | 19 | ||||
-rw-r--r-- | nat/nat2vpp/src/test/java/io/fd/hc2vpp/nat/read/ifc/InterfaceInboundNatCustomizerTest.java | 12 |
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); } |