summaryrefslogtreecommitdiffstats
path: root/nat
diff options
context:
space:
mode:
authorMichal Cmarada <mcmarada@cisco.com>2019-05-27 13:54:02 +0200
committerMichal Cmarada <mcmarada@cisco.com>2019-05-27 13:54:02 +0200
commit5543345d32514bfa38292a5080e57b915e39ea1d (patch)
tree6d759a5eb22bb020f47c299e928e7a65f7a84b2f /nat
parent5c416ebacf4baad25de6213661c3cdfff31c0482 (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')
-rw-r--r--nat/nat-api/src/main/yang/interface-nat@2017-08-16.yang6
-rw-r--r--nat/nat-api/src/main/yang/subinterface-nat@2017-06-15.yang6
-rw-r--r--nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ifc/AbstractInterfaceNatCustomizer.java2
-rw-r--r--nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ifc/AbstractSubInterfaceNatCustomizer.java4
-rw-r--r--nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ifc/IfcNatReaderFactory.java16
-rw-r--r--nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ifc/InterfaceInboundNatCustomizer.java2
-rw-r--r--nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ifc/InterfaceOutboundNatCustomizer.java2
-rw-r--r--nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ifc/SubIfcNatReaderFactory.java24
-rw-r--r--nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ifc/SubInterfaceInboundNatCustomizer.java4
-rw-r--r--nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ifc/SubInterfaceOutboundNatCustomizer.java4
-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
-rw-r--r--nat/nat_postman_collection.json4
13 files changed, 47 insertions, 58 deletions
diff --git a/nat/nat-api/src/main/yang/interface-nat@2017-08-16.yang b/nat/nat-api/src/main/yang/interface-nat@2017-08-16.yang
index 0382b7352..848b2f6ae 100644
--- a/nat/nat-api/src/main/yang/interface-nat@2017-08-16.yang
+++ b/nat/nat-api/src/main/yang/interface-nat@2017-08-16.yang
@@ -94,10 +94,4 @@ module interface-nat {
uses interface-nat-attributes;
}
-
- augment /if:interfaces-state/if:interface {
- ext:augment-identifier "nat-interface-state-augmentation";
-
- uses interface-nat-attributes;
- }
}
diff --git a/nat/nat-api/src/main/yang/subinterface-nat@2017-06-15.yang b/nat/nat-api/src/main/yang/subinterface-nat@2017-06-15.yang
index b13b8701d..0d910178a 100644
--- a/nat/nat-api/src/main/yang/subinterface-nat@2017-06-15.yang
+++ b/nat/nat-api/src/main/yang/subinterface-nat@2017-06-15.yang
@@ -50,10 +50,4 @@ module subinterface-nat {
uses ifc-nat:interface-nat-attributes;
}
-
- augment /if:interfaces-state/if:interface/vpp-vlan:sub-interfaces/vpp-vlan:sub-interface {
- ext:augment-identifier "nat-subinterface-state-augmentation";
-
- uses ifc-nat:interface-nat-attributes;
- }
}
diff --git a/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ifc/AbstractInterfaceNatCustomizer.java b/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ifc/AbstractInterfaceNatCustomizer.java
index c3bb22d50..30f2a0123 100644
--- a/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ifc/AbstractInterfaceNatCustomizer.java
+++ b/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ifc/AbstractInterfaceNatCustomizer.java
@@ -34,7 +34,7 @@ import io.fd.jvpp.nat.future.FutureJVppNatFacade;
import io.fd.jvpp.nat.types.NatConfigFlags;
import java.util.Optional;
import javax.annotation.Nonnull;
-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.Interface;
import org.opendaylight.yangtools.concepts.Builder;
import org.opendaylight.yangtools.yang.binding.DataObject;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
diff --git a/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ifc/AbstractSubInterfaceNatCustomizer.java b/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ifc/AbstractSubInterfaceNatCustomizer.java
index 857e8bc7a..02f95bf7e 100644
--- a/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ifc/AbstractSubInterfaceNatCustomizer.java
+++ b/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ifc/AbstractSubInterfaceNatCustomizer.java
@@ -21,8 +21,8 @@ import static com.google.common.base.Preconditions.checkNotNull;
import io.fd.hc2vpp.common.translate.util.NamingContext;
import io.fd.jvpp.nat.future.FutureJVppNatFacade;
import javax.annotation.Nonnull;
-import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.vlan.rev180319.interfaces.state._interface.sub.interfaces.SubInterface;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev180220.interfaces.state.Interface;
+import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.vlan.rev180319.interfaces._interface.sub.interfaces.SubInterface;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev180220.interfaces.Interface;
import org.opendaylight.yangtools.concepts.Builder;
import org.opendaylight.yangtools.yang.binding.DataObject;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
diff --git a/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ifc/IfcNatReaderFactory.java b/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ifc/IfcNatReaderFactory.java
index 24c0f46a7..91920e1c5 100644
--- a/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ifc/IfcNatReaderFactory.java
+++ b/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ifc/IfcNatReaderFactory.java
@@ -24,14 +24,14 @@ import io.fd.honeycomb.translate.read.ReaderFactory;
import io.fd.honeycomb.translate.read.registry.ModifiableReaderRegistryBuilder;
import io.fd.jvpp.nat.future.FutureJVppNatFacade;
import javax.annotation.Nonnull;
-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.NatInterfaceStateAugmentationBuilder;
+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.NatInterfaceAugmentationBuilder;
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.Outbound;
-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;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev180220.interfaces.Interface;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
/**
@@ -40,9 +40,9 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
public final class IfcNatReaderFactory implements ReaderFactory {
private static final InstanceIdentifier<Interface>
- IFC_ID = InstanceIdentifier.create(InterfacesState.class).child(Interface.class);
- private static final InstanceIdentifier<NatInterfaceStateAugmentation> NAT_AUG_ID =
- IFC_ID.augmentation(NatInterfaceStateAugmentation.class);
+ IFC_ID = InstanceIdentifier.create(Interfaces.class).child(Interface.class);
+ private static final InstanceIdentifier<NatInterfaceAugmentation> NAT_AUG_ID =
+ IFC_ID.augmentation(NatInterfaceAugmentation.class);
private static final InstanceIdentifier<Nat> NAT_AUG_CONTAINER_ID = NAT_AUG_ID.child(Nat.class);
private final NamingContext ifcContext;
private final FutureJVppNatFacade jvppNat;
@@ -56,7 +56,7 @@ public final class IfcNatReaderFactory implements ReaderFactory {
@Override
public void init(@Nonnull final ModifiableReaderRegistryBuilder registry) {
- registry.addStructuralReader(NAT_AUG_ID, NatInterfaceStateAugmentationBuilder.class);
+ registry.addStructuralReader(NAT_AUG_ID, NatInterfaceAugmentationBuilder.class);
registry.addStructuralReader(NAT_AUG_CONTAINER_ID, NatBuilder.class);
registry.addAfter(new GenericInitReader<>(NAT_AUG_CONTAINER_ID.child(Inbound.class),
diff --git a/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ifc/InterfaceInboundNatCustomizer.java b/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ifc/InterfaceInboundNatCustomizer.java
index bc1e82a1f..c45049d0f 100644
--- a/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ifc/InterfaceInboundNatCustomizer.java
+++ b/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ifc/InterfaceInboundNatCustomizer.java
@@ -76,7 +76,7 @@ final class InterfaceInboundNatCustomizer extends AbstractInterfaceNatCustomizer
InstanceIdentifier.create(Interfaces.class)
.child(Interface.class,
new InterfaceKey(id.firstKeyOf(
- org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev180220.interfaces.state.Interface.class)
+ org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev180220.interfaces.Interface.class)
.getName()))
.augmentation(NatInterfaceAugmentation.class)
.child(Nat.class)
diff --git a/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ifc/InterfaceOutboundNatCustomizer.java b/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ifc/InterfaceOutboundNatCustomizer.java
index 9cebb2748..2f30b1286 100644
--- a/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ifc/InterfaceOutboundNatCustomizer.java
+++ b/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ifc/InterfaceOutboundNatCustomizer.java
@@ -75,7 +75,7 @@ final class InterfaceOutboundNatCustomizer extends AbstractInterfaceNatCustomize
InstanceIdentifier.create(Interfaces.class)
.child(Interface.class,
new InterfaceKey(id.firstKeyOf(
- org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev180220.interfaces.state.Interface.class)
+ org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev180220.interfaces.Interface.class)
.getName()))
.augmentation(NatInterfaceAugmentation.class)
.child(Nat.class)
diff --git a/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ifc/SubIfcNatReaderFactory.java b/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ifc/SubIfcNatReaderFactory.java
index 310b7f487..747411fc5 100644
--- a/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ifc/SubIfcNatReaderFactory.java
+++ b/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ifc/SubIfcNatReaderFactory.java
@@ -29,13 +29,13 @@ import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang._interface.nat.rev170
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.Outbound;
-import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.subinterface.nat.rev170615.NatSubinterfaceStateAugmentation;
-import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.subinterface.nat.rev170615.NatSubinterfaceStateAugmentationBuilder;
-import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.vlan.rev180319.SubinterfaceStateAugmentation;
-import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.vlan.rev180319.interfaces.state._interface.SubInterfaces;
-import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.vlan.rev180319.interfaces.state._interface.sub.interfaces.SubInterface;
-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.http.fd.io.hc2vpp.yang.subinterface.nat.rev170615.NatSubinterfaceAugmentation;
+import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.subinterface.nat.rev170615.NatSubinterfaceAugmentationBuilder;
+import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.vlan.rev180319.SubinterfaceAugmentation;
+import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.vlan.rev180319.interfaces._interface.SubInterfaces;
+import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.vlan.rev180319.interfaces._interface.sub.interfaces.SubInterface;
+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.yangtools.yang.binding.InstanceIdentifier;
/**
@@ -44,10 +44,10 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
public final class SubIfcNatReaderFactory implements ReaderFactory {
private static final InstanceIdentifier<SubInterface>
- SUB_IFC_ID = InstanceIdentifier.create(InterfacesState.class).child(Interface.class).augmentation(
- SubinterfaceStateAugmentation.class).child(SubInterfaces.class).child(SubInterface.class);
- private static final InstanceIdentifier<NatSubinterfaceStateAugmentation> NAT_SUB_AUG_ID =
- SUB_IFC_ID.augmentation(NatSubinterfaceStateAugmentation.class);
+ SUB_IFC_ID = InstanceIdentifier.create(Interfaces.class).child(Interface.class).augmentation(
+ SubinterfaceAugmentation.class).child(SubInterfaces.class).child(SubInterface.class);
+ private static final InstanceIdentifier<NatSubinterfaceAugmentation> NAT_SUB_AUG_ID =
+ SUB_IFC_ID.augmentation(NatSubinterfaceAugmentation.class);
private static final InstanceIdentifier<Nat> NAT_AUG_CONTAINER_ID = NAT_SUB_AUG_ID.child(Nat.class);
private final NamingContext ifcContext;
@@ -62,7 +62,7 @@ public final class SubIfcNatReaderFactory implements ReaderFactory {
@Override
public void init(@Nonnull final ModifiableReaderRegistryBuilder registry) {
- registry.addStructuralReader(NAT_SUB_AUG_ID, NatSubinterfaceStateAugmentationBuilder.class);
+ registry.addStructuralReader(NAT_SUB_AUG_ID, NatSubinterfaceAugmentationBuilder.class);
registry.addStructuralReader(NAT_AUG_CONTAINER_ID, NatBuilder.class);
registry.addAfter(new GenericInitReader<>(NAT_AUG_CONTAINER_ID.child(Inbound.class),
diff --git a/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ifc/SubInterfaceInboundNatCustomizer.java b/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ifc/SubInterfaceInboundNatCustomizer.java
index f20dad9b6..89ae2b5a1 100644
--- a/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ifc/SubInterfaceInboundNatCustomizer.java
+++ b/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ifc/SubInterfaceInboundNatCustomizer.java
@@ -80,13 +80,13 @@ final class SubInterfaceInboundNatCustomizer extends AbstractSubInterfaceNatCust
InstanceIdentifier.create(Interfaces.class)
.child(Interface.class,
new InterfaceKey(id.firstKeyOf(
- org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev180220.interfaces.state.Interface.class)
+ org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev180220.interfaces.Interface.class)
.getName()))
.augmentation(SubinterfaceAugmentation.class)
.child(SubInterfaces.class)
.child(SubInterface.class,
new SubInterfaceKey(id.firstKeyOf(
- org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.vlan.rev180319.interfaces.state._interface.sub.interfaces.SubInterface.class)
+ org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.vlan.rev180319.interfaces._interface.sub.interfaces.SubInterface.class)
.getIdentifier()))
.augmentation(NatSubinterfaceAugmentation.class)
.child(Nat.class)
diff --git a/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ifc/SubInterfaceOutboundNatCustomizer.java b/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ifc/SubInterfaceOutboundNatCustomizer.java
index 5251a793a..c17dd43df 100644
--- a/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ifc/SubInterfaceOutboundNatCustomizer.java
+++ b/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ifc/SubInterfaceOutboundNatCustomizer.java
@@ -79,13 +79,13 @@ final class SubInterfaceOutboundNatCustomizer extends AbstractSubInterfaceNatCus
InstanceIdentifier.create(Interfaces.class)
.child(Interface.class,
new InterfaceKey(id.firstKeyOf(
- org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev180220.interfaces.state.Interface.class)
+ org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev180220.interfaces.Interface.class)
.getName()))
.augmentation(SubinterfaceAugmentation.class)
.child(SubInterfaces.class)
.child(SubInterface.class,
new SubInterfaceKey(id.firstKeyOf(
- org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.vlan.rev180319.interfaces.state._interface.sub.interfaces.SubInterface.class)
+ org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.vlan.rev180319.interfaces._interface.sub.interfaces.SubInterface.class)
.getIdentifier()))
.augmentation(NatSubinterfaceAugmentation.class)
.child(Nat.class)
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);
}
diff --git a/nat/nat_postman_collection.json b/nat/nat_postman_collection.json
index eccdf2bf6..12585224a 100644
--- a/nat/nat_postman_collection.json
+++ b/nat/nat_postman_collection.json
@@ -1300,7 +1300,7 @@
"raw": "{\r\n \r\n \"interface\": [\r\n {\r\n \"name\": \"testInterface\",\r\n \"description\": \"for testing purposes\",\r\n \"type\": \"iana-if-type:ethernetCsmacd\",\r\n \"enabled\": \"true\",\r\n \"link-up-down-trap-enable\": \"enabled\",\r\n \"ietf-ip:ipv4\": {\r\n \"enabled\": \"true\",\r\n \"mtu\": \"1500\",\r\n \"address\": [\r\n {\r\n \"ip\": \"1.2.3.0\",\r\n \"netmask\": \"255.255.255.0\"\r\n }\r\n ]\r\n }\r\n }\r\n ]\r\n \r\n}"
},
"url": {
- "raw": "http://localhost:8183/restconf/operational/ietf-interfaces:interfaces-state/",
+ "raw": "http://localhost:8183/restconf/operational/ietf-interfaces:interfaces/",
"protocol": "http",
"host": [
"localhost"
@@ -1309,7 +1309,7 @@
"path": [
"restconf",
"operational",
- "ietf-interfaces:interfaces-state",
+ "ietf-interfaces:interfaces",
""
]
}