diff options
author | malar <malarvizhi.44@wipro.com> | 2022-12-21 11:17:39 +0000 |
---|---|---|
committer | Lukasz Rajewski <lukasz.rajewski@t-mobile.pl> | 2023-04-17 12:45:08 +0000 |
commit | d699c905603620c18089d6d18108d6de7b7557d6 (patch) | |
tree | 809ae2a9179e23ec8659203719e7cf85d18f2c48 | |
parent | bf7531619b68489039dbeda8b9dde818efe1c843 (diff) |
ORAN Alignment updates for SON usecase
Issue-ID: INT-2184
Signed-off-by: Malarvizhi Paramasivam <malarvizhi.44@wipro.com>
Change-Id: I198e86baa0945515baef2cf8448fcccfad225890
-rw-r--r-- | ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/controller/RansimController.java | 51 |
1 files 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<Integer> result = new ArrayList<Integer>(); + 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<String, String> result = new ConcurrentHashMap<String, String>(); + Map<Integer, String> result = new ConcurrentHashMap<Integer, String>(); - 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); |