From 17d5f1b6eb34b1b0ca3d523223d74aa623692d3d Mon Sep 17 00:00:00 2001 From: "halil.cakal" Date: Wed, 25 Oct 2023 15:58:29 +0100 Subject: [BUG] CPS NCMP Change extension in health check URL - Align URL extension to default actuator URL Issue-ID: CPS-1922 Change-Id: Ifaa1eb32f3c6be5c48a63c4e360c27353d0e5e0f Signed-off-by: halil.cakal --- .../main/java/org/onap/cps/ncmp/api/impl/client/DmiRestClient.java | 5 +++-- 1 file 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 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; } -- cgit 1.2.3-korg