diff options
author | Wojciech Sliwka <wojciech.sliwka@nokia.com> | 2019-06-19 11:06:54 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-06-19 11:06:54 +0000 |
commit | 7f0e6936709cc19e3e1e1ad035e5b7d00809d6c6 (patch) | |
tree | 163542e67746e7693daf12e7835f5b2f6c78255a /vid-app-common/src/main/java/org/onap/vid/asdc/rest/SdcRestClient.java | |
parent | 46adb535d3af416773475b9aabb2ace8e1e9e1de (diff) | |
parent | 72b3fb69e548cf665204ec025d2778dcf3ce0216 (diff) |
Merge "Extend probe mechanism"
Diffstat (limited to 'vid-app-common/src/main/java/org/onap/vid/asdc/rest/SdcRestClient.java')
-rw-r--r-- | vid-app-common/src/main/java/org/onap/vid/asdc/rest/SdcRestClient.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/asdc/rest/SdcRestClient.java b/vid-app-common/src/main/java/org/onap/vid/asdc/rest/SdcRestClient.java index ab07aaeed..428083e7b 100644 --- a/vid-app-common/src/main/java/org/onap/vid/asdc/rest/SdcRestClient.java +++ b/vid-app-common/src/main/java/org/onap/vid/asdc/rest/SdcRestClient.java @@ -22,6 +22,7 @@ package org.onap.vid.asdc.rest; import com.att.eelf.configuration.EELFLogger; import com.google.common.collect.ImmutableMap; +import io.joshworks.restclient.http.HttpResponse; import io.vavr.control.Try; import org.onap.portalsdk.core.util.SystemProperties; import org.onap.vid.asdc.AsdcCatalogException; @@ -97,6 +98,13 @@ public class SdcRestClient implements AsdcClient { } + public HttpResponse<String> checkSDCConnectivity() { + String finalUrl = baseUrl + URIS.HEALTH_CHECK_ENDPOINT; + + return syncRestClient + .get(finalUrl, prepareHeaders(auth, APPLICATION_JSON), Collections.emptyMap(), String.class); + } + private Map<String, String> prepareHeaders(String auth, String contentType) { return ImmutableMap.of( X_ECOMP_INSTANCE_ID, SystemProperties.getProperty(APP_DISPLAY_NAME), |