From d699c905603620c18089d6d18108d6de7b7557d6 Mon Sep 17 00:00:00 2001 From: malar Date: Wed, 21 Dec 2022 11:17:39 +0000 Subject: ORAN Alignment updates for SON usecase Issue-ID: INT-2184 Signed-off-by: Malarvizhi Paramasivam Change-Id: I198e86baa0945515baef2cf8448fcccfad225890 --- .../rest/api/controller/RansimController.java | 51 +++++++++++++++------- 1 file changed, 35 insertions(+), 16 deletions(-) diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/controller/RansimController.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/controller/RansimController.java index c518109..6f425a8 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/controller/RansimController.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/controller/RansimController.java @@ -353,7 +353,7 @@ public class RansimController { if (message != null) { log.info("message.getNodeId(): " + message.getNodeId()); - + Gson gson = new Gson(); jsonStr = gson.toJson(message); } @@ -375,14 +375,21 @@ public class RansimController { log.debug("Inside getNeighborList..."); try { - String jsonStr = ""; - GetNeighborList message = rsPciHdlr.generateNeighborList(req.getNodeId()); - if (message != null) { - log.info("message.getNodeId(): " + message.getNodeId()); - Gson gson = new Gson(); - jsonStr = gson.toJson(message); - } - return new ResponseEntity<>(jsonStr, HttpStatus.OK); + String jsonStr = ""; + NRCellCU neighborList = ransimRepo.getCellRelation(Integer.valueOf(req.getNodeId())); + List result = new ArrayList(); + for (NRCellRelation nd : neighborList.getNrCellRelationsList()) { + + result.add(nd.getIdNRCellRelation()); + } + + if (result != null) { + Gson gson = new Gson(); + jsonStr = gson.toJson(result); + } + + return new ResponseEntity<>(jsonStr, HttpStatus.OK); + } catch (Exception eu) { log.info("/getCUNeighborList", eu); return new ResponseEntity<>("Failure", HttpStatus.INTERNAL_SERVER_ERROR); @@ -425,13 +432,13 @@ public class RansimController { try { String jsonStr = ""; - CellNeighbor neighborList = ransimRepo.getCellNeighbor(req.getNodeId()); + NRCellCU neighborList = ransimRepo.getCellRelation(Integer.valueOf(req.getNodeId())); - Map result = new ConcurrentHashMap(); + Map result = new ConcurrentHashMap(); - for (NeighborDetails nd : neighborList.getNeighborList()) { + for (NRCellRelation nd : neighborList.getNrCellRelationsList()) { - result.put(nd.getNeigbor().getNeighborCell(), "" + nd.isBlacklisted()); + result.put(nd.getIdNRCellRelation(), "" + nd.getisHOAllowed()); } if (result != null) { @@ -520,10 +527,22 @@ public class RansimController { try { String jsonStr = null; - CellDetails cd = ransimRepo.getCellDetail(req.getNodeId()); - if (cd != null) { + NRCellCU celldata = ransimRepo.getNRCellCUDetail(Integer.valueOf(req.getNodeId())); + NRCellDU ducell = ransimRepo.getNRCellDUDetail(celldata.getCellLocalId()); + CellDetails cell = new CellDetails(); + cell.setScreenX(celldata.getScreenX()); + cell.setScreenY(celldata.getScreenY()); + cell.setPciConfusionDetected(celldata.isPciConfusionDetected()); + cell.setPciCollisionDetected(celldata.isPciCollisionDetected()); + cell.setColor(celldata.getColor()); + cell.setNodeName(celldata.getCellLocalId().toString()); + cell.setServerId(celldata.getgNBCUCPFunction().getgNBCUName()); + cell.setPhysicalCellId(ducell.getnRPCI()); + cell.setNetworkId(ducell.getNetworkId()); + + if (cell != null){ Gson gson = new Gson(); - jsonStr = gson.toJson(cd); + jsonStr = gson.toJson(cell); } return new ResponseEntity<>(jsonStr, HttpStatus.OK); -- cgit 1.2.3-korg