* ========================LICENSE_START=================================
* O-RAN-SC
* %%
- * Copyright (C) 2019 AT&T Intellectual Property and Nokia
+ * Copyright (C) 2019 AT&T Intellectual Property
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import io.swagger.annotations.ApiOperation;
/**
- * Provides methods to contact the ANR xApp which manages a Neighbor Cell
- * Relation Table (NCRT).
+ * Proxies calls from the front end to the ANR xApp, which manages a Neighbor
+ * Cell Relation Table (NCRT).
+ *
+ * If a method throws RestClientResponseException, it is handled by
+ * {@link CustomResponseEntityExceptionHandler#handleProxyMethodException(Exception, org.springframework.web.context.request.WebRequest)}
+ * which returns status 502. All other exceptions are handled by Spring which
+ * returns status 500.
*/
@Configuration
@RestController
logger.debug("modifyNcrt: servingCellNrcgi {}, neighborCellNrpci {}, ncrMod {}", servingCellNrcgi,
neighborCellNrpci, ncrMod);
ncrtApi.modifyNcrt(servingCellNrcgi, neighborCellNrpci, ncrMod);
- response.setStatus(healthApi.getApiClient().getStatusCode().value());
+ response.setStatus(ncrtApi.getApiClient().getStatusCode().value());
}
@ApiOperation(value = "Delete neighbor cell relation based on Serving Cell NRCGI and Neighbor Cell NRPCI")
HttpServletResponse response) {
logger.debug("deleteNcrt: servingCellNrcgi {}, neighborCellNrpci {}", servingCellNrcgi, neighborCellNrpci);
ncrtApi.deleteNcrt(servingCellNrcgi, neighborCellNrpci);
- response.setStatus(healthApi.getApiClient().getStatusCode().value());
+ response.setStatus(ncrtApi.getApiClient().getStatusCode().value());
}
}