summaryrefslogtreecommitdiffstats
path: root/nat/nat2vpp/src/test/java/io/fd/hc2vpp/nat/write/ifc/InterfaceInboundNatCustomizerTest.java
diff options
context:
space:
mode:
authorMarek Gradzki <mgradzki@cisco.com>2017-08-01 13:43:14 +0200
committerJan Srnicek <jsrnicek@cisco.com>2017-08-02 11:19:25 +0000
commit33ecedc83c01e4d33e8304d9759100dcd95cb244 (patch)
tree739f0fdd39960f53e3b11d5926ed5fde69687c7c /nat/nat2vpp/src/test/java/io/fd/hc2vpp/nat/write/ifc/InterfaceInboundNatCustomizerTest.java
parentc86637969d6fce3759b3ce8a693ec16eb14b04e6 (diff)
HC2VPP-197: translation layert for post routing NAT
Change-Id: Icef6682fbc7a18a1e52953270ad26f6b3b7676eb Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'nat/nat2vpp/src/test/java/io/fd/hc2vpp/nat/write/ifc/InterfaceInboundNatCustomizerTest.java')
-rw-r--r--nat/nat2vpp/src/test/java/io/fd/hc2vpp/nat/write/ifc/InterfaceInboundNatCustomizerTest.java19
1 files changed, 13 insertions, 6 deletions
diff --git a/nat/nat2vpp/src/test/java/io/fd/hc2vpp/nat/write/ifc/InterfaceInboundNatCustomizerTest.java b/nat/nat2vpp/src/test/java/io/fd/hc2vpp/nat/write/ifc/InterfaceInboundNatCustomizerTest.java
index 8c16b1c98..17efc4095 100644
--- a/nat/nat2vpp/src/test/java/io/fd/hc2vpp/nat/write/ifc/InterfaceInboundNatCustomizerTest.java
+++ b/nat/nat2vpp/src/test/java/io/fd/hc2vpp/nat/write/ifc/InterfaceInboundNatCustomizerTest.java
@@ -27,22 +27,29 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang._interfa
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang._interface.nat.rev170801._interface.nat.attributes.nat.InboundBuilder;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-public class InterfaceInboundNatCustomizerTest extends AbstractNatCustomizerTest<Inbound, InterfaceInboundNatCustomizer> {
+public class InterfaceInboundNatCustomizerTest
+ extends AbstractNatCustomizerTest<Inbound, InterfaceInboundNatCustomizer> {
@Override
- protected Inbound getData() {
- return new InboundBuilder().build();
+ protected Inbound getPreRoutingConfig() {
+ return new InboundBuilder().setPostRouting(false).build();
+ }
+
+ @Override
+ protected Inbound getPostRoutingConfig() {
+ return new InboundBuilder().setPostRouting(true).build();
}
@Override
protected InstanceIdentifier<Inbound> getIId(final String ifaceName) {
return InstanceIdentifier.create(Interfaces.class)
- .child(Interface.class, new InterfaceKey(ifaceName)).augmentation(NatInterfaceAugmentation.class)
- .child(Nat.class).child(Inbound.class);
+ .child(Interface.class, new InterfaceKey(ifaceName)).augmentation(NatInterfaceAugmentation.class)
+ .child(Nat.class).child(Inbound.class);
}
@Override
- protected InterfaceInboundNatCustomizer getCustomizer(final FutureJVppSnatFacade snatApi, final NamingContext ifcNamingCtx) {
+ protected InterfaceInboundNatCustomizer getCustomizer(final FutureJVppSnatFacade snatApi,
+ final NamingContext ifcNamingCtx) {
return new InterfaceInboundNatCustomizer(snatApi, ifcNamingCtx);
}
} \ No newline at end of file