summaryrefslogtreecommitdiffstats
path: root/cps-ncmp-service/src
diff options
context:
space:
mode:
authorSourabh Sourabh <sourabh.sourabh@est.tech>2023-10-27 08:53:00 +0000
committerGerrit Code Review <gerrit@onap.org>2023-10-27 08:53:00 +0000
commite5c66c7fec638412e10d5abef14d2a7afc86cb23 (patch)
tree6895f3a35e88022d59884f381ed57931ca41496f /cps-ncmp-service/src
parent6634835c44975195cc4c1f993cb12c2d3ba805fb (diff)
parent17d5f1b6eb34b1b0ca3d523223d74aa623692d3d (diff)
Merge "[BUG] CPS NCMP Change extension in health check URL"
Diffstat (limited to 'cps-ncmp-service/src')
-rw-r--r--cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/client/DmiRestClient.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/client/DmiRestClient.java b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/client/DmiRestClient.java
index e8ce050b2e..4ef4003cd0 100644
--- a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/client/DmiRestClient.java
+++ b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/client/DmiRestClient.java
@@ -41,6 +41,7 @@ import org.springframework.web.client.RestTemplate;
@Slf4j
public class DmiRestClient {
+ private static final String HEALTH_CHECK_URL_EXTENSION = "/actuator/health";
private RestTemplate restTemplate;
private DmiProperties dmiProperties;
@@ -73,8 +74,8 @@ public class DmiRestClient {
public DmiPluginStatus getDmiPluginStatus(final String dmiPluginBaseUrl) {
try {
final HttpEntity<Object> httpHeaders = new HttpEntity<>(configureHttpHeaders(new HttpHeaders()));
- final JsonNode dmiPluginHealthStatus = restTemplate.getForObject(dmiPluginBaseUrl + "/manage/health",
- JsonNode.class, httpHeaders);
+ final JsonNode dmiPluginHealthStatus = restTemplate
+ .getForObject(dmiPluginBaseUrl + HEALTH_CHECK_URL_EXTENSION, JsonNode.class, httpHeaders);
if (dmiPluginHealthStatus != null && dmiPluginHealthStatus.get("status").asText().equals("UP")) {
return DmiPluginStatus.UP;
}