aboutsummaryrefslogtreecommitdiffstats
path: root/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/controller/RansimController.java
diff options
context:
space:
mode:
authorMichal Jagiello <michal.jagiello@t-mobile.pl>2022-05-06 06:31:38 +0000
committerGerrit Code Review <gerrit@onap.org>2022-05-06 06:31:38 +0000
commit292aa06f9fc6a48652411087b4fc34b9ab728f2b (patch)
tree1c17b1a679dd40fa8f2e5e87f6932db8e44cc038 /ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/controller/RansimController.java
parentb395e82cedb969d392fd4a1a2b13cfa8cf64cce7 (diff)
parent944c707bcd818e3581acab1c100710b218fb3c51 (diff)
Merge "ORAN Alignment - initial config updates and PM data updates for SON usecase"
Diffstat (limited to 'ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/controller/RansimController.java')
-rw-r--r--ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/controller/RansimController.java40
1 files changed, 40 insertions, 0 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 ddf2513..93b4f5c 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
@@ -345,6 +345,46 @@ public class RansimController {
}
}
+
+ @ApiOperation("Retrieves the neighbor list details for the cell with the mentioned cellId")
+ @RequestMapping(value = "/GetCUNeighborList", method = RequestMethod.POST)
+ @ApiResponses(
+ value = {@ApiResponse(code = 200, message = "Successful"),
+ @ApiResponse(code = 500, message = "Cannot Insert the given parameters")})
+ public ResponseEntity<String> getCUNeighborList(@RequestBody GetNeighborListReq req) throws Exception {
+
+ 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);
+ } catch (Exception eu) {
+ log.info("/getCUNeighborList", eu);
+ return new ResponseEntity<>("Failure", HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+
+ @ApiOperation("Sets the netconfserver for the cellId")
+ @RequestMapping(value = "/SetCUCPNetconfServer", method = RequestMethod.POST)
+ @ApiResponses(
+ value = {@ApiResponse(code = 200, message = "Successful"),
+ @ApiResponse(code = 500, message = "Cannot Insert the given parameters")})
+ public ResponseEntity<String> setNetconfServer(@RequestBody Integer cellLocalId) throws Exception {
+ log.debug("Inside setNetconfServer...");
+ try {
+ rscServices.setRanCUCPNetconfServers(cellLocalId);
+ return new ResponseEntity<>("Server set. ", HttpStatus.OK);
+ } catch (Exception eu) {
+ log.info("/SetCUCPNetconfServer", eu);
+ return new ResponseEntity<>("Failure", HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+
/**
* The function retrieves the neighbor list for the cell with the mentioned
* nodeId.