aboutsummaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
authorkrishnaa96 <krishna.moorthy6@wipro.com>2019-04-10 14:28:53 +0530
committerkrishnaa96 <krishna.moorthy6@wipro.com>2019-04-10 18:01:28 +0530
commit2896a24832902865313cd16081bba8b2d079748f (patch)
treefeb17dfb42f15d1f33dc76363aa5ce5835ded445 /src/test
parent80b0c61808d0958ef7d38a772a206f2c17dfd2a5 (diff)
Fix bugs and formatting issues
Added minor functionality changes License formatting fixed Change-Id: Ieed4aab7562256eaf15627de0cee53cfe1cc8956 Issue-ID: DCAEGEN2-1111 Signed-off-by: krishnaa96 <krishna.moorthy6@wipro.com>
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/org/onap/dcaegen2/services/sonhms/EventHandlerTest.java35
-rw-r--r--src/test/java/org/onap/dcaegen2/services/sonhms/FaultFieldsTest.java4
-rw-r--r--src/test/java/org/onap/dcaegen2/services/sonhms/PMNotificationHandlerTest.java44
-rw-r--r--src/test/java/org/onap/dcaegen2/services/sonhms/child/TestChildThreadUtils.java17
-rw-r--r--src/test/java/org/onap/dcaegen2/services/sonhms/child/TestPnfUtils.java33
-rw-r--r--src/test/java/org/onap/dcaegen2/services/sonhms/restclient/SdnrRestClientTest.java46
-rw-r--r--src/test/resources/anrSolutions.json15
-rw-r--r--src/test/resources/pmNotification.json94
-rw-r--r--src/test/resources/pmNotification1.json96
-rw-r--r--src/test/resources/policy_notification.json4
10 files changed, 209 insertions, 179 deletions
diff --git a/src/test/java/org/onap/dcaegen2/services/sonhms/EventHandlerTest.java b/src/test/java/org/onap/dcaegen2/services/sonhms/EventHandlerTest.java
index 02a061b..8f161a7 100644
--- a/src/test/java/org/onap/dcaegen2/services/sonhms/EventHandlerTest.java
+++ b/src/test/java/org/onap/dcaegen2/services/sonhms/EventHandlerTest.java
@@ -1,22 +1,23 @@
/*******************************************************************************
- * ============LICENSE_START=======================================================
- * pcims
+ * ============LICENSE_START=======================================================
+ * son-handler
* ================================================================================
- * Copyright (C) 2018 Wipro Limited.
- * ==============================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- ******************************************************************************/
+ * Copyright (C) 2019 Wipro Limited.
+ * ==============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ *
+ *******************************************************************************/
package org.onap.dcaegen2.services.sonhms;
diff --git a/src/test/java/org/onap/dcaegen2/services/sonhms/FaultFieldsTest.java b/src/test/java/org/onap/dcaegen2/services/sonhms/FaultFieldsTest.java
index c940917..19f3815 100644
--- a/src/test/java/org/onap/dcaegen2/services/sonhms/FaultFieldsTest.java
+++ b/src/test/java/org/onap/dcaegen2/services/sonhms/FaultFieldsTest.java
@@ -38,7 +38,7 @@ public class FaultFieldsTest {
faultFields.setEventSeverity("eventSeverity");
faultFields.setEventSourceType("eventSourceType");
- faultFields.setFaultFieldsVersion(0);
+ faultFields.setFaultFieldsVersion(4.0);
faultFields.setAlarmAdditionalInformation(alarmAdditionalInformation);
faultFields.setSpecificProblem("specificProblem");
@@ -46,7 +46,7 @@ public class FaultFieldsTest {
assertEquals("alarmCondition", faultFields.getAlarmCondition());
assertEquals(1, faultFields.getAlarmAdditionalInformation().getCollisions());
assertEquals(3, faultFields.getAlarmAdditionalInformation().getConfusions());
- assertEquals(0, faultFields.getFaultFieldsVersion());
+ assertEquals(4.0, faultFields.getFaultFieldsVersion(), 0);
assertEquals("eventSeverity", faultFields.getEventSeverity());
assertEquals("eventSourceType", faultFields.getEventSourceType());
assertEquals("networkId", faultFields.getAlarmAdditionalInformation().getNetworkId());
diff --git a/src/test/java/org/onap/dcaegen2/services/sonhms/PMNotificationHandlerTest.java b/src/test/java/org/onap/dcaegen2/services/sonhms/PMNotificationHandlerTest.java
index e2e702c..9cae5b6 100644
--- a/src/test/java/org/onap/dcaegen2/services/sonhms/PMNotificationHandlerTest.java
+++ b/src/test/java/org/onap/dcaegen2/services/sonhms/PMNotificationHandlerTest.java
@@ -1,22 +1,23 @@
/*******************************************************************************
- * ============LICENSE_START=======================================================
- * pcims
+ * ============LICENSE_START=======================================================
+ * son-handler
* ================================================================================
- * Copyright (C) 2018 Wipro Limited.
- * ==============================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- ******************************************************************************/
+ * Copyright (C) 2019 Wipro Limited.
+ * ==============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ *
+ *******************************************************************************/
package org.onap.dcaegen2.services.sonhms;
@@ -38,6 +39,7 @@ import org.mockito.Mockito;
import org.onap.dcaegen2.services.sonhms.dao.HandOverMetricsRepository;
import org.onap.dcaegen2.services.sonhms.dmaap.PolicyDmaapClient;
import org.onap.dcaegen2.services.sonhms.entity.HandOverMetrics;
+import org.onap.dcaegen2.services.sonhms.model.Flag;
import org.onap.dcaegen2.services.sonhms.model.PMNotification;
import org.onap.dcaegen2.services.sonhms.utils.BeanUtil;
import org.powermock.api.mockito.PowerMockito;
@@ -56,8 +58,11 @@ public class PMNotificationHandlerTest {
@Mock
HandOverMetricsRepository handOverMetricsRepositoryMock;
+ @Mock
+ Flag flagMock;
+
@InjectMocks
- PMNotificationHandler pmNotificationHandler;
+ PmNotificationHandler pmNotificationHandler;
@Mock
PolicyDmaapClient policyDmaapClient;
@@ -88,7 +93,10 @@ public class PMNotificationHandlerTest {
PowerMockito.mockStatic(BeanUtil.class);
PowerMockito.when(BeanUtil
.getBean(HandOverMetricsRepository.class)).thenReturn(handOverMetricsRepositoryMock);
+ PowerMockito.when(BeanUtil
+ .getBean(Flag.class)).thenReturn(flagMock);
when(handOverMetricsRepositoryMock.save(new HandOverMetrics())).thenReturn(null);
+ when(flagMock.getHolder()).thenReturn("NONE");
when(policyDmaapClient.sendNotificationToPolicy(Mockito.anyString())).thenReturn(true);
assertTrue(pmNotificationHandler.handlePmNotifications(pmNotification, 50));
assertFalse(pmNotificationHandler.handlePmNotifications(null, 0));
diff --git a/src/test/java/org/onap/dcaegen2/services/sonhms/child/TestChildThreadUtils.java b/src/test/java/org/onap/dcaegen2/services/sonhms/child/TestChildThreadUtils.java
index ab4119d..536f327 100644
--- a/src/test/java/org/onap/dcaegen2/services/sonhms/child/TestChildThreadUtils.java
+++ b/src/test/java/org/onap/dcaegen2/services/sonhms/child/TestChildThreadUtils.java
@@ -55,7 +55,6 @@ import org.onap.dcaegen2.services.sonhms.model.CellPciPair;
import org.onap.dcaegen2.services.sonhms.model.PolicyNotification;
import org.onap.dcaegen2.services.sonhms.restclient.AsyncResponseBody;
import org.onap.dcaegen2.services.sonhms.restclient.SdnrRestClient;
-import org.onap.dcaegen2.services.sonhms.restclient.Solutions;
import org.onap.dcaegen2.services.sonhms.utils.BeanUtil;
import org.onap.dcaegen2.services.sonhms.utils.ClusterUtilsTest;
import org.powermock.api.mockito.PowerMockito;
@@ -153,7 +152,7 @@ public class TestChildThreadUtils {
String requestId = "a4130fd5-2291-4a83-8992-04e4c9f32731";
Long alarmStart = Long.parseLong("1542445563201");
- String result = childThreadUtils.getNotificationString(pnfName, cellPciPairs, requestId, alarmStart);
+ String result = childThreadUtils.getNotificationString(pnfName, requestId, "payloadString", alarmStart, "action");
PolicyNotification actual = new PolicyNotification();
try {
actual = mapper.readValue(result, PolicyNotification.class);
@@ -188,8 +187,18 @@ public class TestChildThreadUtils {
pciPairList.add(cell2);
pciPairList.add(cell3);
pnfsMap.put("pnf1", pciPairList);
- when(pnfUtils.getPnfs(Mockito.any(Solutions.class))).thenReturn(pnfsMap);
- childThreadUtils.sendToPolicy(async);
+ when(pnfUtils.getPnfs(async.getSolutions())).thenReturn(pnfsMap);
+ List<String> remNeighbors = new ArrayList<>();
+ remNeighbors.add("EXP006");
+ Map<String,List<String>> cellRemNeighborsPair = new HashMap<>();
+ cellRemNeighborsPair.put("EXP003", remNeighbors);
+ List<Map<String,List<String>>> list = new ArrayList<>();
+ list.add(cellRemNeighborsPair);
+ Map<String, List<Map<String,List<String>>>> expected = new HashMap<>();
+ expected.put("pnfName", list);
+ when(pnfUtils.getPnfsForAnrSolutions(async.getSolutions().getAnrSolutions())).thenReturn(expected);
+ assertTrue(childThreadUtils2.sendToPolicy(async));
+
}
private static String readFromFile(String file) {
diff --git a/src/test/java/org/onap/dcaegen2/services/sonhms/child/TestPnfUtils.java b/src/test/java/org/onap/dcaegen2/services/sonhms/child/TestPnfUtils.java
index 4b36598..d74bff8 100644
--- a/src/test/java/org/onap/dcaegen2/services/sonhms/child/TestPnfUtils.java
+++ b/src/test/java/org/onap/dcaegen2/services/sonhms/child/TestPnfUtils.java
@@ -22,6 +22,7 @@ package org.onap.dcaegen2.services.sonhms.child;
import static org.junit.Assert.assertEquals;
+import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.io.BufferedReader;
@@ -46,6 +47,7 @@ import org.onap.dcaegen2.services.sonhms.dao.CellInfoRepository;
import org.onap.dcaegen2.services.sonhms.entity.CellInfo;
import org.onap.dcaegen2.services.sonhms.exceptions.ConfigDbNotFoundException;
import org.onap.dcaegen2.services.sonhms.model.CellPciPair;
+import org.onap.dcaegen2.services.sonhms.restclient.AnrSolutions;
import org.onap.dcaegen2.services.sonhms.restclient.SdnrRestClient;
import org.onap.dcaegen2.services.sonhms.restclient.Solutions;
import org.onap.dcaegen2.services.sonhms.utils.BeanUtil;
@@ -69,6 +71,7 @@ public class TestPnfUtils {
private static final Logger log = org.slf4j.LoggerFactory.getLogger(TestPnfUtils.class);
private static Solutions solutions = new Solutions();
+ private static List<AnrSolutions> anrSolutions = new ArrayList<>();
private static Optional<CellInfo> cellInfo;
private static Optional<CellInfo> cellInfoNull;
@@ -81,10 +84,13 @@ public class TestPnfUtils {
String solutionsString=readFromFile("/solutions.json");
+ String anrSolutionsString = readFromFile("/anrSolutions.json");
ObjectMapper mapper = new ObjectMapper();
try {
solutions=mapper.readValue(solutionsString, Solutions.class);
+ anrSolutions = mapper.readValue(anrSolutionsString, new TypeReference<ArrayList<AnrSolutions>>() {
+ });
} catch (IOException e) {
log.debug("Exception in StateOof Test "+e);
e.printStackTrace();
@@ -134,6 +140,33 @@ public class TestPnfUtils {
e.printStackTrace();
}
}
+
+ @Test
+ public void testGetPnfsForAnrSolutions() {
+ Map<String, List<Map<String,List<String>>>> actual = null ;
+ Map<String, List<Map<String,List<String>>>> expected = new HashMap<>();
+ try {
+ PowerMockito.mockStatic(SdnrRestClient.class);
+ PowerMockito.when(SdnrRestClient.getPnfName(Mockito.anyString())).thenReturn("ncServer1");
+ actual = pnfUtils.getPnfsForAnrSolutions(anrSolutions);
+ } catch (ConfigDbNotFoundException e) {
+ e.printStackTrace();
+ }
+ List<String> remNeighbors1 = new ArrayList<>();
+ List<String> remNeighbors2 = new ArrayList<>();
+ remNeighbors1.add("cell2");
+ remNeighbors1.add("cell3");
+ remNeighbors2.add("cell9");
+ Map<String,List<String>> cellRemNeighborsPair1 = new HashMap<>();
+ Map<String,List<String>> cellRemNeighborsPair2 = new HashMap<>();
+ cellRemNeighborsPair1.put("cell1", remNeighbors1);
+ cellRemNeighborsPair2.put("cell8", remNeighbors2);
+ List<Map<String,List<String>>> list = new ArrayList<>();
+ list.add(cellRemNeighborsPair1);
+ list.add(cellRemNeighborsPair2);
+ expected.put("ncServer1", list);
+ assertEquals(expected, actual);
+ }
private static String readFromFile(String file) {
String content = new String();
try {
diff --git a/src/test/java/org/onap/dcaegen2/services/sonhms/restclient/SdnrRestClientTest.java b/src/test/java/org/onap/dcaegen2/services/sonhms/restclient/SdnrRestClientTest.java
index 1557e51..59eacc9 100644
--- a/src/test/java/org/onap/dcaegen2/services/sonhms/restclient/SdnrRestClientTest.java
+++ b/src/test/java/org/onap/dcaegen2/services/sonhms/restclient/SdnrRestClientTest.java
@@ -37,7 +37,6 @@ import org.mockito.MockitoAnnotations;
import org.onap.dcaegen2.services.sonhms.Configuration;
import org.onap.dcaegen2.services.sonhms.exceptions.ConfigDbNotFoundException;
import org.onap.dcaegen2.services.sonhms.model.CellPciPair;
-import org.onap.dcaegen2.services.sonhms.utils.BeanUtil;
import org.onap.dcaegen2.services.sonhms.utils.SonHandlerRestTemplate;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PrepareForTest;
@@ -64,36 +63,20 @@ public class SdnrRestClientTest {
MockitoAnnotations.initMocks(this);
}
- @Test
- public void getCellListTest() {
-
- String responseBody="[\n" +
- " \"string\"\n" +
- "]";
- PowerMockito.mockStatic(SonHandlerRestTemplate.class);
- PowerMockito.mockStatic(BeanUtil.class);
- PowerMockito.mockStatic(Configuration.class);
- PowerMockito.when(Configuration.getInstance()).thenReturn(configuration);
- PowerMockito.when(SonHandlerRestTemplate.sendGetRequest(Mockito.anyString(),Matchers.<ParameterizedTypeReference<String>>any()))
- .thenReturn(ResponseEntity.ok(responseBody));
- try {
- String result=SdnrRestClient.getCellList("12345");
- assertEquals(ResponseEntity.ok(responseBody).getBody(),result);
- } catch (ConfigDbNotFoundException e) {
- log.debug("ConfigDbNotFoundException {}",e.toString());;
- }
-
- }
@Test
public void getNbrListTest() {
- String responseBody="[\n" +
- " {\n" +
- " \"cellId\": \"string\",\n" +
- " \"pciValue\": 0\n" +
- " }\n" +
- "]";
+ String responseBody="{\n" +
+ " \"cellId\": \"string\",\n" +
+ " \"nbrList\": [\n" +
+ " {\n" +
+ " \"ho\": true,\n" +
+ " \"pciValue\": 0,\n" +
+ " \"targetCellId\": \"string\"\n" +
+ " }\n" +
+ " ]\n" +
+ "}";
PowerMockito.mockStatic(SonHandlerRestTemplate.class);
PowerMockito.mockStatic(Configuration.class);
PowerMockito.when(Configuration.getInstance()).thenReturn(configuration);
@@ -103,11 +86,14 @@ public class SdnrRestClientTest {
List<CellPciPair> result=SdnrRestClient.getNbrList("1");
List<CellPciPair> nbrList = new ArrayList<>();
String response=ResponseEntity.ok(responseBody).getBody();
- JSONArray nbrListObj = new JSONArray(response);
+ JSONObject responseJson = new JSONObject(response);
+ JSONArray nbrListObj = responseJson.getJSONArray("nbrList");
for (int i = 0; i < nbrListObj.length(); i++) {
JSONObject cellObj = nbrListObj.getJSONObject(i);
- CellPciPair cell = new CellPciPair(cellObj.getString("cellId"), cellObj.getInt("pciValue"));
- nbrList.add(cell);
+ if (cellObj.getBoolean("ho")) {
+ CellPciPair cell = new CellPciPair(cellObj.getString("targetCellId"), cellObj.getInt("pciValue"));
+ nbrList.add(cell);
+ }
}
assertEquals(nbrList,result);
} catch (ConfigDbNotFoundException e) {
diff --git a/src/test/resources/anrSolutions.json b/src/test/resources/anrSolutions.json
new file mode 100644
index 0000000..77291a3
--- /dev/null
+++ b/src/test/resources/anrSolutions.json
@@ -0,0 +1,15 @@
+[
+ {
+ "cellId":"cell1",
+ "removeableNeighbors":[
+ "cell2",
+ "cell3"
+ ]
+ },
+ {
+ "cellId":"cell8",
+ "removeableNeighbors":[
+ "cell9"
+ ]
+ }
+]
diff --git a/src/test/resources/pmNotification.json b/src/test/resources/pmNotification.json
index a956ae4..7b9dbe1 100644
--- a/src/test/resources/pmNotification.json
+++ b/src/test/resources/pmNotification.json
@@ -1,56 +1,44 @@
-
- {
- "event":{
+{
+ "event":{
"commonEventHeader":{
- "version":"4.0",
- "domain":"measurement",
- "eventName":"Measurement_RansimAgent-Wipro_HandoffMetric",
- "eventId":"measurement000001",
- "sequence":0,
- "priority":"Normal",
- "reportingEntityId":"cc305d54-75b4-431b-adb2-eb6b9e541234",
- "reportingEntityName":"ncserver1",
- "sourceId":"de305d54-75b4-431b-adb2-eb6b9e546456",
- "sourceName":"Chn0001",
- "startEpochMicrosec":1551772223000000,
- "lastEpochMicrosec":1551790542000000,
- "nfNamingCode":"RansimAgent",
- "nfVendorName":"Wipro",
- "vesEventListenerVersion":"7.0.1",
- "timeZoneOffset":"UTC-05:30"
+ "version":"4.0.1",
+ "domain":"measurement",
+ "eventName":"Measurement_RansimAgent-Wipro_HandoffMetric",
+ "eventId":"measurement000001",
+ "sequence":0,
+ "priority":"Normal",
+ "reportingEntityId":"cc305d54-75b4-431b-adb2-eb6b9e541234",
+ "reportingEntityName":"ncserver1",
+ "sourceId":"de305d54-75b4-431b-adb2-eb6b9e546456",
+ "sourceName":"Chn0001",
+ "startEpochMicrosec":1551772223000000,
+ "lastEpochMicrosec":1551790542000000,
+ "nfNamingCode":"RansimAgent",
+ "nfVendorName":"Wipro",
+ "vesEventListenerVersion":"7.0.1",
+ "timeZoneOffset":"UTC-05:30"
},
- "measurement":{
- "measurementInterval":180,
- "additionalMeasurements":[
- {
- "arrayOfNamedHashMap":[
- {
- "networkId":"plmnid1"
- },
- {
- "InterEnbOutAtt_X2HO":"200"
- },
- {
- "InterEnbOutSucc_X2HO":"190"
- }
- ],
- "name":"Chn0014"
- },
- {
- "arrayOfNamedHashMap":[
- {
- "networkId":"plmnid1"
- },
- {
- "InterEnbOutAtt_X2HO":"300"
- },
- {
- "InterEnbOutSucc_X2HO":"210"
- }
- ],
- "name":"Chn0013"
- }
- ]
+ "measurementFields":{
+ "measurementInterval":180,
+ "measurementFieldsVersion":"4.0",
+ "additionalMeasurements":[
+ {
+ "hashMap":{
+ "networkId":"plmnid1",
+ "InterEnbOutAtt_X2HO":"200",
+ "InterEnbOutSucc_X2HO":"190"
+ },
+ "name":"Chn0014"
+ },
+ {
+ "hashMap":{
+ "networkId":"plmnid1",
+ "InterEnbOutAtt_X2HO":"300",
+ "InterEnbOutSucc_X2HO":"210"
+ },
+ "name":"Chn0013"
+ }
+ ]
}
- }
- }
+ }
+} \ No newline at end of file
diff --git a/src/test/resources/pmNotification1.json b/src/test/resources/pmNotification1.json
index 0f046e2..2ad6aa7 100644
--- a/src/test/resources/pmNotification1.json
+++ b/src/test/resources/pmNotification1.json
@@ -1,55 +1,45 @@
-{
- "event": {
- "commonEventHeader": {
- "version": "4.0",
- "domain": "measurement",
- "eventName": "Measurement_RansimAgent-Wipro_HandoffMetric",
- "eventId": "measurement000002",
- "sequence": 0,
- "priority": "Normal",
- "reportingEntityId": "cc305d54-75b4-431b-adb2-eb6b9e544567",
- "reportingEntityName": "ncserver1",
- "sourceId": "de305d54-75b4-431b-adb2-eb6b9e546456",
- "sourceName": "Chn0002",
- "startEpochMicrosec": 1551772223000000,
- "lastEpochMicrosec": 1551790542000000,
- "nfNamingCode": "RansimAgent",
- "nfVendorName": "Wipro",
- "vesEventListenerVersion": "7.0.1",
- "timeZoneOffset": "UTC-05:30"
+
+ {
+ "event":{
+ "commonEventHeader":{
+ "version":"4.0.1",
+ "domain":"measurement",
+ "eventName":"Measurement_RansimAgent-Wipro_HandoffMetric",
+ "eventId":"measurement000001",
+ "sequence":0,
+ "priority":"Normal",
+ "reportingEntityId":"cc305d54-75b4-431b-adb2-eb6b9e541234",
+ "reportingEntityName":"ncserver1",
+ "sourceId":"de305d54-75b4-431b-adb2-eb6b9e546456",
+ "sourceName":"Chn0002",
+ "startEpochMicrosec":1551772223000000,
+ "lastEpochMicrosec":1551790542000000,
+ "nfNamingCode":"RansimAgent",
+ "nfVendorName":"Wipro",
+ "vesEventListenerVersion":"7.0.1",
+ "timeZoneOffset":"UTC-05:30"
},
- "measurement": {
- "measurementInterval": 180,
- "additionalMeasurements": [
- {
- "arrayOfNamedHashMap": [
- {
- "networkId":"plmnid1"
- },
- {
- "InterEnbOutAtt_X2HO":"300"
- },
- {
- "InterEnbOutSucc_X2HO":"100"
- }
- ],
- "name": "Chn0004"
- },
- {
- "arrayOfNamedHashMap": [
- {
- "networkId":"plmnid1"
- },
- {
- "InterEnbOutAtt_X2HO":"250"
- },
- {
- "InterEnbOutSucc_X2HO":"100"
- }
- ],
- "name": "Chn0001"
- }
- ]
+ "measurementFields":{
+ "measurementInterval":180,
+ "measurementFieldsVersion":"4.0",
+ "additionalMeasurements":[
+ {
+ "hashMap":{
+ "networkId":"plmnid1",
+ "InterEnbOutAtt_X2HO":"300",
+ "InterEnbOutSucc_X2HO":"100"
+ },
+ "name":"Chn0004"
+ },
+ {
+ "hashMap":{
+ "networkId":"plmnid1",
+ "InterEnbOutAtt_X2HO":"250",
+ "InterEnbOutSucc_X2HO":"100"
+ },
+ "name":"Chn0001"
+ }
+ ]
}
- }
- }
+ }
+} \ No newline at end of file
diff --git a/src/test/resources/policy_notification.json b/src/test/resources/policy_notification.json
index 3863d1c..b99a8b9 100644
--- a/src/test/resources/policy_notification.json
+++ b/src/test/resources/policy_notification.json
@@ -8,11 +8,11 @@
"requestID": "a4130fd5-2291-4a83-8992-04e4c9f32731",
"from": "PCIMS",
"version": "1.0.2",
- "payload": "{\"Configurations\":[{\"data\":{\"FAPService\":{\"alias\":\"Chn0330\",\"X0005b9Lte\":{\"phyCellIdInUse\":6,\"pnfName\":\"ncserver23\"},\"CellConfig\":{\"LTE\":{\"RAN\":{\"Common\":{\"CellIdentity\":\"Chn0330\"}}}}}}},{\"data\":{\"FAPService\":{\"alias\":\"Chn0331\",\"X0005b9Lte\":{\"phyCellIdInUse\":7,\"pnfName\":\"ncserver23\"},\"CellConfig\":{\"LTE\":{\"RAN\":{\"Common\":{\"CellIdentity\":\"Chn0331\"}}}}}}}]}",
+ "payload": "payloadString",
"AAI": {
"generic-vnf.prov-status": "ACTIVE",
"generic-vnf.is-closed-loop-disabled": "false",
"generic-vnf.vnf-id": "ncserver23"
},
- "Action": "ModifyConfig"
+ "Action": "action"
}