From 5cdf20e8b9a1a3fef125b760591b934dfeeb2787 Mon Sep 17 00:00:00 2001 From: Stanislav Marszalek Date: Tue, 14 Sep 2021 13:40:16 +0200 Subject: O1 PM Bulk - update Traffic Model with all UE Issue-ID: INT-1945 Signed-off-by: Stanislav Marszalek Change-Id: I02d3684c98d563d7f386de2fdf032e930ac82b3f --- docker/resources/ue.json | 2 +- .../org/onap/a1pesimulator/service/ves/RanCellEventCustomizer.java | 6 +++--- .../a1pesimulator/service/ves/RanCellFailureEventCustomizer.java | 6 +++--- src/main/java/org/onap/a1pesimulator/util/RanVesUtils.java | 6 ++---- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/docker/resources/ue.json b/docker/resources/ue.json index 2342723..72baae1 100644 --- a/docker/resources/ue.json +++ b/docker/resources/ue.json @@ -9,7 +9,7 @@ "id": "mobile_samsung_s20_02", "latitude": "50.05", "longitude": "19.95", - "cellId": "Cell3" + "cellId": "Cell2" }, { "id": "emergency_police_01", diff --git a/src/main/java/org/onap/a1pesimulator/service/ves/RanCellEventCustomizer.java b/src/main/java/org/onap/a1pesimulator/service/ves/RanCellEventCustomizer.java index 35c9215..7cb375f 100644 --- a/src/main/java/org/onap/a1pesimulator/service/ves/RanCellEventCustomizer.java +++ b/src/main/java/org/onap/a1pesimulator/service/ves/RanCellEventCustomizer.java @@ -62,12 +62,12 @@ public class RanCellEventCustomizer implements EventCustomizer { .equalsIgnoreCase( msrmnt.getName())) .findAny(); - identity.ifPresent(m -> addTrafficModelMeasurement(event, m)); + identity.ifPresent(m -> addTrafficModelMeasurement(event)); } - private void addTrafficModelMeasurement(VesEvent event, AdditionalMeasurement identity) { + private void addTrafficModelMeasurement(VesEvent event) { AdditionalMeasurement trafficModelMeasurement = - RanVesUtils.buildTrafficModelMeasurement(identity, ranUeHolder, UE_PARAM_TRAFFIC_MODEL_RANGE); + RanVesUtils.buildTrafficModelMeasurement( ranUeHolder, UE_PARAM_TRAFFIC_MODEL_RANGE); event.getMeasurementFields().getAdditionalMeasurements().add(trafficModelMeasurement); } } diff --git a/src/main/java/org/onap/a1pesimulator/service/ves/RanCellFailureEventCustomizer.java b/src/main/java/org/onap/a1pesimulator/service/ves/RanCellFailureEventCustomizer.java index c45c717..a21d1ad 100644 --- a/src/main/java/org/onap/a1pesimulator/service/ves/RanCellFailureEventCustomizer.java +++ b/src/main/java/org/onap/a1pesimulator/service/ves/RanCellFailureEventCustomizer.java @@ -103,12 +103,12 @@ public class RanCellFailureEventCustomizer implements EventCustomizer { .equalsIgnoreCase( msrmnt.getName())) .findAny(); - identity.ifPresent(m -> addTrafficModelMeasurement(event, m)); + identity.ifPresent(m -> addTrafficModelMeasurement(event)); } - private void addTrafficModelMeasurement(VesEvent event, AdditionalMeasurement identity) { + private void addTrafficModelMeasurement(VesEvent event) { AdditionalMeasurement trafficModelMeasurement = - RanVesUtils.buildTrafficModelMeasurement(identity, ranUeHolder, UE_PARAM_TRAFFIC_MODEL_RANGE); + RanVesUtils.buildTrafficModelMeasurement(ranUeHolder, UE_PARAM_TRAFFIC_MODEL_RANGE); event.getMeasurementFields().getAdditionalMeasurements().add(trafficModelMeasurement); collectAdditionalMeasurementValue(trafficModelMeasurement); diff --git a/src/main/java/org/onap/a1pesimulator/util/RanVesUtils.java b/src/main/java/org/onap/a1pesimulator/util/RanVesUtils.java index a0f4991..5ecbd6d 100644 --- a/src/main/java/org/onap/a1pesimulator/util/RanVesUtils.java +++ b/src/main/java/org/onap/a1pesimulator/util/RanVesUtils.java @@ -54,14 +54,12 @@ public class RanVesUtils { commonEventHeader.setStartEpochMicrosec(getStartEpochMicroseconds()); } - public static AdditionalMeasurement buildTrafficModelMeasurement(AdditionalMeasurement identityMeasurement, - RanUeHolder ranUeHolder, String valuePattern) { - String cellId = identityMeasurement.getHashMap().get(Constants.MEASUREMENT_FIELD_VALUE); + public static AdditionalMeasurement buildTrafficModelMeasurement(RanUeHolder ranUeHolder, String valuePattern) { AdditionalMeasurement trafficModel = new AdditionalMeasurement(); Map hashMap = new HashMap<>(); trafficModel.setName(UE_PARAM_TRAFFIC_MODEL); trafficModel.setHashMap(hashMap); - Collection cellUes = ranUeHolder.getUserEquipmentsConnectedToCell(cellId); + Collection cellUes = ranUeHolder.getUserEquipments(); cellUes.stream().map(UserEquipment::getId).forEach(ueId -> hashMap.put(ueId, valuePattern)); return trafficModel; -- cgit 1.2.3-korg