summaryrefslogtreecommitdiffstats
path: root/cps-ncmp-service/src
diff options
context:
space:
mode:
authorhalil.cakal <halil.cakal@est.tech>2023-10-25 15:58:29 +0100
committerhalil.cakal <halil.cakal@est.tech>2023-10-26 10:43:07 +0100
commit17d5f1b6eb34b1b0ca3d523223d74aa623692d3d (patch)
treea6f936cd8ebcc6296d8e41feada1b2e602a79345 /cps-ncmp-service/src
parent4266fbbaad4ab3741accf1b3911278835ca19795 (diff)
[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 <halil.cakal@est.tech>
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;
}