From 7964e8aa9b9748678f6dadfe7b0c17c936679351 Mon Sep 17 00:00:00 2001 From: Michael Dürre Date: Thu, 15 Aug 2024 10:04:54 +0200 Subject: migrate sdnr features to potassium MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit adapt features and poms for potassium-sr2 Issue-ID: CCSDK-4046 Change-Id: I67e8fc442811eca40c19f1f3777f1a36812d3e35 Signed-off-by: Michael Dürre --- sdnr/wt/common-yang/utils/pom.xml | 5 ----- .../ccsdk/features/sdnr/wt/yang/mapper/YangToolsMapperHelper.java | 5 +++-- .../mapper/mapperextensions/YangToolsDeserializerModifier2.java | 2 +- .../wt/yang/mapper/mapperextensions/YangtoolsMapDesirializer.java | 7 ++++--- .../wt/yang/mapper/mapperextensions/YangtoolsMapDesirializer2.java | 7 ++++--- .../features/sdnr/wt/yang/mapper/serialize/SetDeserializer.java | 4 ---- 6 files changed, 12 insertions(+), 18 deletions(-) (limited to 'sdnr/wt/common-yang/utils') diff --git a/sdnr/wt/common-yang/utils/pom.xml b/sdnr/wt/common-yang/utils/pom.xml index f16adcd66..1122a5e0d 100644 --- a/sdnr/wt/common-yang/utils/pom.xml +++ b/sdnr/wt/common-yang/utils/pom.xml @@ -85,11 +85,6 @@ ${project.version} test - - org.opendaylight.netconf - sal-netconf-connector - test - diff --git a/sdnr/wt/common-yang/utils/src/main/java/org/onap/ccsdk/features/sdnr/wt/yang/mapper/YangToolsMapperHelper.java b/sdnr/wt/common-yang/utils/src/main/java/org/onap/ccsdk/features/sdnr/wt/yang/mapper/YangToolsMapperHelper.java index 9ca07fe59..91b0a1d08 100644 --- a/sdnr/wt/common-yang/utils/src/main/java/org/onap/ccsdk/features/sdnr/wt/yang/mapper/YangToolsMapperHelper.java +++ b/sdnr/wt/common-yang/utils/src/main/java/org/onap/ccsdk/features/sdnr/wt/yang/mapper/YangToolsMapperHelper.java @@ -43,6 +43,7 @@ import javax.annotation.Nullable; import org.opendaylight.mdsal.dom.api.DOMEvent; import org.opendaylight.mdsal.dom.api.DOMNotification; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.DateAndTime; + import org.opendaylight.yangtools.yang.binding.*; import org.osgi.framework.Bundle; import org.osgi.framework.BundleContext; @@ -316,8 +317,8 @@ public class YangToolsMapperHelper { } - public static , V extends Identifiable> Map toMap(List list) { - return list == null || list.isEmpty() ? null : Maps.uniqueIndex(list, Identifiable::key); + public static , V extends KeyAware> Map toMap(List list) { + return list == null || list.isEmpty() ? null : Maps.uniqueIndex(list, KeyAware::key); } @SuppressWarnings("unchecked") diff --git a/sdnr/wt/common-yang/utils/src/main/java/org/onap/ccsdk/features/sdnr/wt/yang/mapper/mapperextensions/YangToolsDeserializerModifier2.java b/sdnr/wt/common-yang/utils/src/main/java/org/onap/ccsdk/features/sdnr/wt/yang/mapper/mapperextensions/YangToolsDeserializerModifier2.java index 800f41481..7ee959b61 100644 --- a/sdnr/wt/common-yang/utils/src/main/java/org/onap/ccsdk/features/sdnr/wt/yang/mapper/mapperextensions/YangToolsDeserializerModifier2.java +++ b/sdnr/wt/common-yang/utils/src/main/java/org/onap/ccsdk/features/sdnr/wt/yang/mapper/mapperextensions/YangToolsDeserializerModifier2.java @@ -40,8 +40,8 @@ import org.onap.ccsdk.features.sdnr.wt.yang.mapper.serialize.BaseIdentityDeseria import org.onap.ccsdk.features.sdnr.wt.yang.mapper.serialize.ClassDeserializer; import org.onap.ccsdk.features.sdnr.wt.yang.mapper.serialize.IdentifierDeserializer; import org.onap.ccsdk.features.sdnr.wt.yang.mapper.serialize.TypeObjectDeserializer; +import org.opendaylight.yangtools.concepts.Identifier; import org.opendaylight.yangtools.yang.binding.BaseIdentity; -import org.opendaylight.yangtools.yang.binding.Identifier; import org.opendaylight.yangtools.yang.binding.ScalarTypeObject; import org.opendaylight.yangtools.yang.binding.TypeObject; import org.slf4j.Logger; diff --git a/sdnr/wt/common-yang/utils/src/main/java/org/onap/ccsdk/features/sdnr/wt/yang/mapper/mapperextensions/YangtoolsMapDesirializer.java b/sdnr/wt/common-yang/utils/src/main/java/org/onap/ccsdk/features/sdnr/wt/yang/mapper/mapperextensions/YangtoolsMapDesirializer.java index 922257d13..75984dccb 100644 --- a/sdnr/wt/common-yang/utils/src/main/java/org/onap/ccsdk/features/sdnr/wt/yang/mapper/mapperextensions/YangtoolsMapDesirializer.java +++ b/sdnr/wt/common-yang/utils/src/main/java/org/onap/ccsdk/features/sdnr/wt/yang/mapper/mapperextensions/YangtoolsMapDesirializer.java @@ -10,10 +10,11 @@ import java.util.List; import java.util.Map; import org.onap.ccsdk.features.sdnr.wt.yang.mapper.YangToolsMapper; import org.onap.ccsdk.features.sdnr.wt.yang.mapper.YangToolsMapperHelper; -import org.opendaylight.yangtools.yang.binding.Identifiable; -import org.opendaylight.yangtools.yang.binding.Identifier; +import org.opendaylight.yangtools.yang.binding.Key; +import org.opendaylight.yangtools.yang.binding.KeyAware; -public class YangtoolsMapDesirializer, V extends Identifiable> + +public class YangtoolsMapDesirializer, V extends KeyAware> extends JsonDeserializer> { private final Class clazz; diff --git a/sdnr/wt/common-yang/utils/src/main/java/org/onap/ccsdk/features/sdnr/wt/yang/mapper/mapperextensions/YangtoolsMapDesirializer2.java b/sdnr/wt/common-yang/utils/src/main/java/org/onap/ccsdk/features/sdnr/wt/yang/mapper/mapperextensions/YangtoolsMapDesirializer2.java index 4a52f57ee..6b6a07a31 100644 --- a/sdnr/wt/common-yang/utils/src/main/java/org/onap/ccsdk/features/sdnr/wt/yang/mapper/mapperextensions/YangtoolsMapDesirializer2.java +++ b/sdnr/wt/common-yang/utils/src/main/java/org/onap/ccsdk/features/sdnr/wt/yang/mapper/mapperextensions/YangtoolsMapDesirializer2.java @@ -10,10 +10,11 @@ import java.util.List; import java.util.Map; import org.onap.ccsdk.features.sdnr.wt.yang.mapper.YangToolsMapper; import org.onap.ccsdk.features.sdnr.wt.yang.mapper.YangToolsMapperHelper; -import org.opendaylight.yangtools.yang.binding.Identifiable; -import org.opendaylight.yangtools.yang.binding.Identifier; +import org.opendaylight.yangtools.yang.binding.Key; +import org.opendaylight.yangtools.yang.binding.KeyAware; -public class YangtoolsMapDesirializer2, V extends Identifiable> + +public class YangtoolsMapDesirializer2, V extends KeyAware> extends JsonDeserializer> { private final Class clazz; diff --git a/sdnr/wt/common-yang/utils/src/main/java/org/onap/ccsdk/features/sdnr/wt/yang/mapper/serialize/SetDeserializer.java b/sdnr/wt/common-yang/utils/src/main/java/org/onap/ccsdk/features/sdnr/wt/yang/mapper/serialize/SetDeserializer.java index 2ab3fe7c3..ec75f7846 100644 --- a/sdnr/wt/common-yang/utils/src/main/java/org/onap/ccsdk/features/sdnr/wt/yang/mapper/serialize/SetDeserializer.java +++ b/sdnr/wt/common-yang/utils/src/main/java/org/onap/ccsdk/features/sdnr/wt/yang/mapper/serialize/SetDeserializer.java @@ -8,13 +8,9 @@ import com.fasterxml.jackson.databind.type.CollectionLikeType; import java.io.IOException; import java.util.HashSet; import java.util.List; -import java.util.Map; import java.util.Set; import org.onap.ccsdk.features.sdnr.wt.yang.mapper.YangToolsMapper; -import org.onap.ccsdk.features.sdnr.wt.yang.mapper.YangToolsMapperHelper; -import org.opendaylight.yangtools.yang.binding.Identifiable; -import org.opendaylight.yangtools.yang.binding.Identifier; public class SetDeserializer extends JsonDeserializer> { -- cgit 1.2.3-korg