diff options
author | krishna <krishna.moorthy6@wipro.com> | 2019-05-23 20:15:02 +0530 |
---|---|---|
committer | krishna <krishna.moorthy6@wipro.com> | 2019-05-23 22:54:31 +0530 |
commit | 4ac8ebc8e27ff7c87472f2ddacb7887f00cd284d (patch) | |
tree | 9ab439708e4b4a0def697132cf548720535407e9 /src/main/java/org/onap/dcaegen2/services/sonhms/restclient/OofRestClient.java | |
parent | 2e5cff2dd7950ca969a8b0b225d7344075495484 (diff) |
Add second control loop name, Change restclient to support SSL4.0.0-ONAP1.0.3dublin
Change-Id: I5ab334676f7f79cf2c42a9325ec1b7bfe8add6c5
Issue-ID: DCAEGEN2-1529
Signed-off-by: krishna <krishna.moorthy6@wipro.com>
Diffstat (limited to 'src/main/java/org/onap/dcaegen2/services/sonhms/restclient/OofRestClient.java')
-rw-r--r-- | src/main/java/org/onap/dcaegen2/services/sonhms/restclient/OofRestClient.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/org/onap/dcaegen2/services/sonhms/restclient/OofRestClient.java b/src/main/java/org/onap/dcaegen2/services/sonhms/restclient/OofRestClient.java index 97668ed..d6b6c74 100644 --- a/src/main/java/org/onap/dcaegen2/services/sonhms/restclient/OofRestClient.java +++ b/src/main/java/org/onap/dcaegen2/services/sonhms/restclient/OofRestClient.java @@ -96,15 +96,19 @@ public class OofRestClient { } log.info("requestBody{}", requestBody); - String requestUrl = configuration.getOofService() + "/api/oof/pci/v1"; - log.debug("requestUrl {}", requestUrl); + String requestUrl = configuration.getOofService() + configuration.getOofEndpoint(); + log.info("requestUrl {}", requestUrl); ResponseEntity<String> response = null; response = SonHandlerRestTemplate.sendPostRequestToOof(requestUrl, requestBody, new ParameterizedTypeReference<String>() { }); + if (response == null) { throw new OofNotFoundException("Request to oof failed"); } + else if (response.getStatusCodeValue() != 202) { + throw new OofNotFoundException("Request to oof failed with status code" + response.getStatusCodeValue()); + } log.info("response {}", response); return response.getBody(); |