- @ApiOperation(value = "Modify neighbor cell relation based on Source Cell NR CGI and Target Cell NR PCI / NR CGI")
- @RequestMapping(value = "/cell/" + CELL_ID + "/{" + CELL_ID + "}", method = RequestMethod.PUT)
- public void modifyNcrt(@PathVariable(CELL_ID) String cellIdentifier, //
- @RequestBody NeighborCellRelationModTable ncrtModTable, //
- HttpServletResponse response) {
- logger.debug("modifyNcrt: cellIdentifier {} modTable {}", cellIdentifier, ncrtModTable);
- ncrtApi.modifyNcrt(cellIdentifier, ncrtModTable, null, null);
- response.setStatus(healthApi.getApiClient().getStatusCode().value());
+ // /ncrt/servingcells/{servCellNrcgi}/neighborcells/{neighCellNrpci} :
+ @ApiOperation(value = "Modify neighbor cell relation based on Serving Cell NRCGI and Neighbor Cell NRPCI")
+ @RequestMapping(value = "/ncrt/" + PP_SERVING + "/{" + PP_SERVING + "}/" + PP_NEIGHBOR + "/{" + PP_NEIGHBOR
+ + "}", method = RequestMethod.PUT)
+ public Object modifyNcrt(@PathVariable(PP_SERVING) String servingCellNrcgi, //
+ @PathVariable(PP_NEIGHBOR) String neighborCellNrpci, //
+ @RequestBody NeighborCellRelationMod ncrMod, HttpServletResponse response) {
+ logger.debug("modifyNcrt: servingCellNrcgi {}, neighborCellNrpci {}, ncrMod {}", servingCellNrcgi,
+ neighborCellNrpci, ncrMod);
+ try {
+ ncrtApi.modifyNcrt(servingCellNrcgi, neighborCellNrpci, ncrMod);
+ response.setStatus(healthApi.getApiClient().getStatusCode().value());
+ return null;
+ } catch (HttpStatusCodeException ex) {
+ logger.warn("modifyNcrt failed: {}", ex.toString());
+ return ResponseEntity.status(HttpServletResponse.SC_BAD_GATEWAY).body(ex.getResponseBodyAsString());
+ }