summaryrefslogtreecommitdiffstats
path: root/nat/nat2vpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'nat/nat2vpp/src')
-rw-r--r--nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/util/MappingEntryContext.java6
-rw-r--r--nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/write/ExternalIpPoolCustomizer.java2
-rw-r--r--nat/nat2vpp/src/test/java/io/fd/hc2vpp/nat/read/ExternalIpPoolCustomizerTest.java6
-rw-r--r--nat/nat2vpp/src/test/java/io/fd/hc2vpp/nat/util/MappingEntryContextTest.java2
4 files changed, 8 insertions, 8 deletions
diff --git a/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/util/MappingEntryContext.java b/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/util/MappingEntryContext.java
index 4b0c030e4..4472a4953 100644
--- a/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/util/MappingEntryContext.java
+++ b/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/util/MappingEntryContext.java
@@ -146,21 +146,21 @@ public class MappingEntryContext implements Ipv4Translator, Ipv6Translator {
@Nonnull final org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.nat.rev180628.nat.instances.instance.mapping.table.MappingEntry entry,
final long entryId) {
return new MappingEntryBuilder()
- .setKey(entryToKey(entry))
+ .withKey(entryToKey(entry))
.setIndex(entryId)
.build();
}
private MappingEntry toCtxMapEntry(@Nonnull final Nat44StaticMappingDetails details, final long entryId) {
return new MappingEntryBuilder()
- .setKey(entryToKey(details))
+ .withKey(entryToKey(details))
.setIndex(entryId)
.build();
}
private MappingEntry toCtxMapEntry(@Nonnull final Nat64BibDetails details, final long entryId) {
return new MappingEntryBuilder()
- .setKey(entryToKey(details))
+ .withKey(entryToKey(details))
.setIndex(entryId)
.build();
}
diff --git a/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/write/ExternalIpPoolCustomizer.java b/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/write/ExternalIpPoolCustomizer.java
index 0e60481d2..ceede4244 100644
--- a/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/write/ExternalIpPoolCustomizer.java
+++ b/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/write/ExternalIpPoolCustomizer.java
@@ -74,7 +74,7 @@ final class ExternalIpPoolCustomizer implements ListWriterCustomizer<ExternalIpA
final boolean isAdd) throws WriteFailedException {
boolean isNat64 = false;
final ExternalIpAddressPoolAugmentation augmentation =
- addressPool.getAugmentation(ExternalIpAddressPoolAugmentation.class);
+ addressPool.augmentation(ExternalIpAddressPoolAugmentation.class);
if (augmentation != null) {
isNat64 = Nat64.equals(augmentation.getPoolType());
}
diff --git a/nat/nat2vpp/src/test/java/io/fd/hc2vpp/nat/read/ExternalIpPoolCustomizerTest.java b/nat/nat2vpp/src/test/java/io/fd/hc2vpp/nat/read/ExternalIpPoolCustomizerTest.java
index 901aea10b..c80b5a3c0 100644
--- a/nat/nat2vpp/src/test/java/io/fd/hc2vpp/nat/read/ExternalIpPoolCustomizerTest.java
+++ b/nat/nat2vpp/src/test/java/io/fd/hc2vpp/nat/read/ExternalIpPoolCustomizerTest.java
@@ -84,7 +84,7 @@ public class ExternalIpPoolCustomizerTest
assertEquals("192.168.44.3/32", builder.getExternalIpPool().getValue());
assertEquals(poolId, builder.getPoolId().longValue());
- assertEquals(Nat44, builder.getAugmentation(ExternalIpAddressPoolAugmentation.class).getPoolType());
+ assertEquals(Nat44, builder.augmentation(ExternalIpAddressPoolAugmentation.class).getPoolType());
}
@Test
@@ -98,7 +98,7 @@ public class ExternalIpPoolCustomizerTest
assertEquals("192.168.64.3/32", builder.getExternalIpPool().getValue());
assertEquals(poolId, builder.getPoolId().longValue());
- assertEquals(Nat64, builder.getAugmentation(ExternalIpAddressPoolAugmentation.class).getPoolType());
+ assertEquals(Nat64, builder.augmentation(ExternalIpAddressPoolAugmentation.class).getPoolType());
}
@Test
@@ -112,7 +112,7 @@ public class ExternalIpPoolCustomizerTest
assertEquals("192.168.64.3/32", builder.getExternalIpPool().getValue());
assertEquals(poolId, builder.getPoolId().longValue());
- assertEquals(Nat64, builder.getAugmentation(ExternalIpAddressPoolAugmentation.class).getPoolType());
+ assertEquals(Nat64, builder.augmentation(ExternalIpAddressPoolAugmentation.class).getPoolType());
}
@Test
diff --git a/nat/nat2vpp/src/test/java/io/fd/hc2vpp/nat/util/MappingEntryContextTest.java b/nat/nat2vpp/src/test/java/io/fd/hc2vpp/nat/util/MappingEntryContextTest.java
index d79dfed1e..f6c4434bf 100644
--- a/nat/nat2vpp/src/test/java/io/fd/hc2vpp/nat/util/MappingEntryContextTest.java
+++ b/nat/nat2vpp/src/test/java/io/fd/hc2vpp/nat/util/MappingEntryContextTest.java
@@ -188,7 +188,7 @@ public class MappingEntryContextTest implements Ipv4Translator {
private static MappingEntry getEntry(final long id, final String longernalIpv4, final String externalIpv4) {
return new MappingEntryBuilder()
- .setKey(new MappingEntryKey(id))
+ .withKey(new MappingEntryKey(id))
.setType(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.nat.rev180628.MappingEntry.Type.Static)
.setInternalSrcAddress(new IpPrefix(new Ipv4Prefix(longernalIpv4)))
.setExternalSrcAddress(new IpPrefix(new Ipv4Prefix(externalIpv4)))