f63beee43ff3961427d3f85b648606f931f26936
[ccsdk/features.git] /
1 /*
2  * ============LICENSE_START=======================================================
3  * ONAP : ccsdk features
4  * ================================================================================
5  * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property.
6  * All rights reserved.
7  * ================================================================================
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  *     http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  * ============LICENSE_END=========================================================
20  *
21  */
22 package org.onap.ccsdk.features.sdnr.wt.dataprovider.test;
23
24 import java.io.IOException;
25 import org.junit.Test;
26 import org.onap.ccsdk.features.sdnr.wt.dataprovider.yangtools.YangToolsMapper;
27 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.pmdata._15m.list.output.Data;
28
29 public class TestDataMappings {
30
31     // @formatter:off
32     private static final String PMDATA15M_SERVERDB_JSON = "{\n"
33             + "\"node-name\": \"sim2\",\n"
34             + "\"uuid-interface\": \"LP-MWPS-TTP-01\",\n"
35             + "\"layer-protocol-name\": \"MWPS\",\n"
36             + "\"radio-signal-id\": \"Test11\",\n"
37             + "\"time-stamp\": \"2017-07-04T14:00:00.0Z\",\n"
38             + "\"granularity-period\": \"PERIOD_15MIN\",\n"
39             + "\"scanner-id\": \"PM_RADIO_15M_9\",\n"
40             + "\"performance-data\": {\n"
41             + "\"es\": 0,\n"
42             + "\"rx-level-avg\": -41,\n"
43             + "\"time2-states\": -1,\n"
44             + "\"time4-states-s\": 0,\n"
45             + "\"time4-states\": 0,\n"
46             + "\"time8-states\": 0,\n"
47             + "\"time16-states-s\": -1,\n"
48             + "\"time16-states\": 0,\n"
49             + "\"time32-states\": 0,\n"
50             + "\"time64-states\": 0,\n"
51             + "\"time128-states\": 0,\n"
52             + "\"time256-states\": 900,\n"
53             + "\"time512-states\": -1,\n"
54             + "\"time512-states-l\": -1,\n"
55             + "\"time1024-states\": -1,\n"
56             + "\"time1024-states-l\": -1,\n"
57             + "\"time2048-states\": -1,\n"
58             + "\"time2048-states-l\": -1,\n"
59             + "\"time4096-states\": -1,\n"
60             + "\"time4096-states-l\": -1,\n"
61             + "\"time8192-states\": -1,\n"
62             + "\"time8192-states-l\": -1,\n"
63             + "\"snir-min\": -99,\n"
64             + "\"snir-max\": -99,\n"
65             + "\"snir-avg\": -99,\n"
66             + "\"xpd-min\": -99,\n"
67             + "\"xpd-max\": -99,\n"
68             + "\"xpd-avg\": -99,\n"
69             + "\"rf-temp-min\": -99,\n"
70             + "\"rf-temp-max\": -99,\n"
71             + "\"rf-temp-avg\": -99,\n"
72             + "\"defect-blocks-sum\": -1,\n"
73             + "\"time-period\": 900,\n"
74             + "\"tx-level-min\": 25,\n"
75             + "\"tx-level-max\": 25,\n"
76             + "\"tx-level-avg\": 25,\n"
77             + "\"rx-level-min\": -41,\n"
78             + "\"rx-level-max\": -41,\n"
79             + "\"unavailability\": 0,\n"
80             + "\"ses\": 0,\n"
81             + "\"cses\": 0\n"
82             + "},\n"
83             + "\"suspect-interval-flag\": false\n"
84             + "}";
85  // @formatter:on
86     @Test
87     public void testPmData15m() {
88
89         YangToolsMapper mapper = new YangToolsMapper();
90         try {
91             Data data = mapper.readValue(PMDATA15M_SERVERDB_JSON.getBytes(), Data.class);
92             System.out.println(data);
93         } catch (IOException e) {
94             e.printStackTrace();
95         }
96     }
97
98 }