From b8cf23cd61c2d3f57f9450570236534bce69232e Mon Sep 17 00:00:00 2001 From: Jan Srnicek Date: Tue, 15 Aug 2017 11:30:28 +0200 Subject: HONEYCOMB-386 - Hc2vpp Customizers update Utilizes new default update implementation Change-Id: I9bf8473336274ba5fcfc18804f7b414937b3708e Signed-off-by: Jan Srnicek --- .../vppnsh/impl/config/NshEntryWriterCustomizer.java | 19 +++++-------------- .../vppnsh/impl/config/NshMapWriterCustomizer.java | 17 +++++------------ 2 files changed, 10 insertions(+), 26 deletions(-) (limited to 'nsh') diff --git a/nsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/config/NshEntryWriterCustomizer.java b/nsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/config/NshEntryWriterCustomizer.java index 122594c3d..988c9948d 100755 --- a/nsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/config/NshEntryWriterCustomizer.java +++ b/nsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/config/NshEntryWriterCustomizer.java @@ -19,17 +19,18 @@ package io.fd.hc2vpp.vppnsh.impl.config; import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkState; -import io.fd.honeycomb.translate.MappingContext; -import io.fd.honeycomb.translate.spi.write.ListWriterCustomizer; import io.fd.hc2vpp.common.translate.util.ByteDataTranslator; import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer; import io.fd.hc2vpp.common.translate.util.NamingContext; +import io.fd.hc2vpp.vppnsh.impl.util.FutureJVppNshCustomizer; +import io.fd.honeycomb.translate.MappingContext; +import io.fd.honeycomb.translate.spi.write.ListWriterCustomizer; import io.fd.honeycomb.translate.write.WriteContext; import io.fd.honeycomb.translate.write.WriteFailedException; -import io.fd.hc2vpp.vppnsh.impl.util.FutureJVppNshCustomizer; import io.fd.vpp.jvpp.nsh.dto.NshAddDelEntry; import io.fd.vpp.jvpp.nsh.dto.NshAddDelEntryReply; import io.fd.vpp.jvpp.nsh.future.FutureJVppNsh; +import java.util.List; import java.util.concurrent.CompletionStage; import javax.annotation.Nonnull; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.Ethernet; @@ -39,16 +40,13 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh. import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.MdType2; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.NshMdType1Augment; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.NshMdType2Augment; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.nsh.md.type2.attributes.Md2Data; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.nsh.entries.NshEntry; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.nsh.entries.NshEntryKey; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.nsh.md.type2.attributes.Md2Data; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.nio.charset.StandardCharsets; -import java.util.List; - /** * Writer customizer responsible for NshEntry create/delete. */ @@ -76,13 +74,6 @@ public class NshEntryWriterCustomizer extends FutureJVppNshCustomizer LOG.debug("Successfully created nsh entry(id={]): iid={} dataAfter={}", newEntryIndex, id, dataAfter); } - @Override - public void updateCurrentAttributes(@Nonnull final InstanceIdentifier id, - @Nonnull final NshEntry dataBefore, @Nonnull final NshEntry dataAfter, - @Nonnull final WriteContext writeContext) throws WriteFailedException { - throw new UnsupportedOperationException("Nsh entry update is not supported"); - } - @Override public void deleteCurrentAttributes(@Nonnull final InstanceIdentifier id, @Nonnull final NshEntry dataBefore, diff --git a/nsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/config/NshMapWriterCustomizer.java b/nsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/config/NshMapWriterCustomizer.java index eaa1e75ee..23b05da35 100755 --- a/nsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/config/NshMapWriterCustomizer.java +++ b/nsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/config/NshMapWriterCustomizer.java @@ -19,26 +19,26 @@ package io.fd.hc2vpp.vppnsh.impl.config; import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkState; -import io.fd.honeycomb.translate.MappingContext; -import io.fd.honeycomb.translate.spi.write.ListWriterCustomizer; import io.fd.hc2vpp.common.translate.util.ByteDataTranslator; import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer; import io.fd.hc2vpp.common.translate.util.NamingContext; +import io.fd.hc2vpp.vppnsh.impl.util.FutureJVppNshCustomizer; +import io.fd.honeycomb.translate.MappingContext; +import io.fd.honeycomb.translate.spi.write.ListWriterCustomizer; import io.fd.honeycomb.translate.write.WriteContext; import io.fd.honeycomb.translate.write.WriteFailedException; -import io.fd.hc2vpp.vppnsh.impl.util.FutureJVppNshCustomizer; import io.fd.vpp.jvpp.nsh.dto.NshAddDelMap; import io.fd.vpp.jvpp.nsh.dto.NshAddDelMapReply; import io.fd.vpp.jvpp.nsh.future.FutureJVppNsh; import java.util.concurrent.CompletionStage; import javax.annotation.Nonnull; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.None; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.Pop; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.Push; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.Swap; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.VxlanGpe; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.Vxlan4; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.Vxlan6; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.None; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.VxlanGpe; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.nsh.maps.NshMap; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.nsh.maps.NshMapKey; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; @@ -76,13 +76,6 @@ implements ListWriterCustomizer, ByteDataTranslator, JvppRepl LOG.debug("Successfully created nsh map(id={]): iid={} dataAfter={}", newMapIndex, id, dataAfter); } - @Override - public void updateCurrentAttributes(@Nonnull final InstanceIdentifier id, - @Nonnull final NshMap dataBefore, @Nonnull final NshMap dataAfter, - @Nonnull final WriteContext writeContext) throws WriteFailedException { - throw new UnsupportedOperationException("Nsh map update is not supported"); - } - @Override public void deleteCurrentAttributes(@Nonnull final InstanceIdentifier id, @Nonnull final NshMap dataBefore, -- cgit 1.2.3-korg