import javax.servlet.http.HttpServletResponse;
-import org.oransc.ric.anrxapp.client.api.GnodebsApi;
import org.oransc.ric.anrxapp.client.api.HealthApi;
import org.oransc.ric.anrxapp.client.api.NcrtApi;
import org.oransc.ric.anrxapp.client.model.GgNodeBTable;
// Populated by the autowired constructor
private final HealthApi healthApi;
- private final GnodebsApi gnodebsApi;
private final NcrtApi ncrtApi;
@Autowired
- public AnrXappController(final HealthApi healthApi, final GnodebsApi gnodebsApi, final NcrtApi ncrtApi) {
+ public AnrXappController(final HealthApi healthApi, final NcrtApi ncrtApi) {
Assert.notNull(healthApi, "API must not be null");
- Assert.notNull(gnodebsApi, "API must not be null");
Assert.notNull(ncrtApi, "API must not be null");
this.healthApi = healthApi;
- this.gnodebsApi = gnodebsApi;
this.ncrtApi = ncrtApi;
}
@ApiOperation(value = "Gets the ANR client library MANIFEST.MF property Implementation-Version.", response = SuccessTransport.class)
@RequestMapping(value = DashboardConstants.VERSION_PATH, method = RequestMethod.GET)
- public SuccessTransport getVersion() {
- logger.debug("getVersion enter");
+ public SuccessTransport getAnrXappClientVersion() {
return new SuccessTransport(200, DashboardApplication.getImplementationVersion(HealthApi.class));
}
@ApiOperation(value = "Performs a liveness probe on the ANR xApp, result expressed as the response code.")
@RequestMapping(value = "/health/alive", method = RequestMethod.GET)
- public void getHealthAlive(HttpServletResponse response) {
- logger.debug("getHealthAlive");
+ public void getAnrXappHealthAlive(HttpServletResponse response) {
healthApi.getHealthAlive();
response.setStatus(healthApi.getApiClient().getStatusCode().value());
}
@ApiOperation(value = "Performs a readiness probe on the ANR xApp, result expressed as the response code.")
@RequestMapping(value = "/health/ready", method = RequestMethod.GET)
- public void getHealthReady(HttpServletResponse response) {
- logger.debug("getHealthReady");
+ public void getAnrXappHealthReady(HttpServletResponse response) {
healthApi.getHealthReady();
response.setStatus(healthApi.getApiClient().getStatusCode().value());
}
@ApiOperation(value = "Returns list of gNodeB IDs based on NCRT in ANR", response = GgNodeBTable.class)
@RequestMapping(value = "/gnodebs", method = RequestMethod.GET)
public GgNodeBTable getGnodebs() {
- return gnodebsApi.getgNodeB();
+ return ncrtApi.getgNodeB();
}
@ApiOperation(value = "Returns neighbor cell relation table for all gNodeBs or based on query parameters", response = NeighborCellRelationTable.class)
@RequestMapping(value = "/ncrt", method = RequestMethod.GET)
- public NeighborCellRelationTable getNcrtInfo( //
+ public NeighborCellRelationTable getNcrt( //
@RequestParam(name = QP_NODEB, required = false) String ggnbId, //
@RequestParam(name = QP_SERVING, required = false) String servingCellNrcgi, //
@RequestParam(name = QP_NEIGHBOR, required = false) String neighborCellNrpci) {
- logger.debug("getNcrtInfo: ggnbid {}, servingCellNrpci {} neighborCellNrcgi {}", ggnbId, servingCellNrcgi,
+ logger.debug("getNcrt: ggnbid {}, servingCellNrpci {}, neighborCellNrcgi {}", ggnbId, servingCellNrcgi,
neighborCellNrpci);
- return ncrtApi.getNcrtInfo(ggnbId, servingCellNrcgi, neighborCellNrpci);
+ return ncrtApi.getNcrt(ggnbId, servingCellNrcgi, neighborCellNrpci);
}
// /ncrt/servingcells/{servCellNrcgi}/neighborcells/{neighCellNrpci} :
@ApiOperation(value = "Delete 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)
+ + "}", method = RequestMethod.DELETE)
public void deleteNcrt(@PathVariable(PP_SERVING) String servingCellNrcgi, //
@PathVariable(PP_NEIGHBOR) String neighborCellNrpci, //
HttpServletResponse response) {