summaryrefslogtreecommitdiffstats
path: root/sdnr/wt/common-yang
diff options
context:
space:
mode:
authorMichael DÜrre <michael.duerre@highstreet-technologies.com>2022-01-31 05:11:03 +0100
committerKAPIL SINGAL <ks220y@att.com>2022-02-01 03:42:42 +0000
commitf01064b548d479d2f98abb7d30429b4a410a209e (patch)
tree08bede472e8833eeb431836a4bb33ae544f5430d /sdnr/wt/common-yang
parent9912e1626d93afeb4f7148dd5d826ae1caa1ef8a (diff)
add nodb support
add option to work without db Issue-ID: CCSDK-3573 Signed-off-by: Michael DÜrre <michael.duerre@highstreet-technologies.com> Change-Id: I1a1dc785dceb1789fe12bf6b3009e35d56578816 Signed-off-by: Michael DÜrre <michael.duerre@highstreet-technologies.com>
Diffstat (limited to 'sdnr/wt/common-yang')
-rw-r--r--sdnr/wt/common-yang/utils/src/test/java/org/onap/ccsdk/features/sdnr/wt/yang/mapper/TestYangGenSalMapping.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/sdnr/wt/common-yang/utils/src/test/java/org/onap/ccsdk/features/sdnr/wt/yang/mapper/TestYangGenSalMapping.java b/sdnr/wt/common-yang/utils/src/test/java/org/onap/ccsdk/features/sdnr/wt/yang/mapper/TestYangGenSalMapping.java
index 40164d756..f46729c98 100644
--- a/sdnr/wt/common-yang/utils/src/test/java/org/onap/ccsdk/features/sdnr/wt/yang/mapper/TestYangGenSalMapping.java
+++ b/sdnr/wt/common-yang/utils/src/test/java/org/onap/ccsdk/features/sdnr/wt/yang/mapper/TestYangGenSalMapping.java
@@ -23,10 +23,13 @@ package org.onap.ccsdk.features.sdnr.wt.yang.mapper;
import java.io.IOException;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import org.json.JSONObject;
import org.junit.Test;
import org.onap.ccsdk.features.sdnr.wt.yang.mapper.serialize.IdentifierDeserializer;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.pm.types.rev191129.PmDataType;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Uri;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.DateAndTime;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.NetconfNode;
@@ -34,10 +37,14 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev15
import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.netconf.node.connection.parameters.OdlHelloMessageCapabilitiesBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.netconf.node.credentials.Credentials;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.netconf.node.credentials.credentials.LoginPasswordBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.openroadm.pm.types.rev200413.DefectSeconds;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.pmdata.grp.Measurement;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.pmdata.grp.MeasurementBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.pmdata.grp.MeasurementKey;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.pmdata15m.entity.PerformanceDataBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.pmdata._15m.list.output.Data;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.pmdata._15m.list.output.DataBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.units.rev200413.KHz;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -86,6 +93,12 @@ public class TestYangGenSalMapping {
PerformanceDataBuilder performanceBuilder = new PerformanceDataBuilder();
performanceBuilder.setEs(99);
+ Map<MeasurementKey, Measurement> values = new HashMap<>();
+
+ Measurement m = new MeasurementBuilder().setPmKey(DefectSeconds.class).setPmUnit(KHz.class)
+ .setPmValue(new PmDataType(1L)).build();
+ values.put(m.key(), m);
+ performanceBuilder.setMeasurement(values);
DataBuilder pmData15MinutesBuilder = new DataBuilder();
pmData15MinutesBuilder.setLayerProtocolName("fdsaf");
pmData15MinutesBuilder.setTimeStamp(new DateAndTime("2017-03-01T09:15:00.0Z"));