aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/forwarding-plugins
diff options
context:
space:
mode:
authora.sreekumar <ajith.sreekumar@bell.ca>2021-03-19 15:08:45 +0000
committera.sreekumar <ajith.sreekumar@bell.ca>2021-03-19 15:08:49 +0000
commit4ec9a1396153a5a92d6471669cb7ed3cb2409643 (patch)
treec7b6bfcd5f7c52e0c851627cac912ef109cddc94 /plugins/forwarding-plugins
parent348b75b32cc157ab23fba1e337f787a4b4148d60 (diff)
Fixing PAP deployment API response check in policy-distribution
Cherrypicking the fix from https://gerrit.onap.org/r/c/policy/distribution/+/119516 Change-Id: Ic60bc562e7e343600535560a27ab08158e6be17b Issue-ID: POLICY-3154 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
Diffstat (limited to 'plugins/forwarding-plugins')
-rw-r--r--plugins/forwarding-plugins/src/main/java/org/onap/policy/distribution/forwarding/lifecycle/api/LifecycleApiPolicyForwarder.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/plugins/forwarding-plugins/src/main/java/org/onap/policy/distribution/forwarding/lifecycle/api/LifecycleApiPolicyForwarder.java b/plugins/forwarding-plugins/src/main/java/org/onap/policy/distribution/forwarding/lifecycle/api/LifecycleApiPolicyForwarder.java
index 242573cc..a4a5e057 100644
--- a/plugins/forwarding-plugins/src/main/java/org/onap/policy/distribution/forwarding/lifecycle/api/LifecycleApiPolicyForwarder.java
+++ b/plugins/forwarding-plugins/src/main/java/org/onap/policy/distribution/forwarding/lifecycle/api/LifecycleApiPolicyForwarder.java
@@ -32,7 +32,6 @@ import javax.ws.rs.client.Entity;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
-import javax.ws.rs.core.Response.Status;
import org.onap.policy.common.endpoints.event.comm.bus.internal.BusTopicParams;
import org.onap.policy.common.endpoints.http.client.HttpClient;
import org.onap.policy.common.endpoints.http.client.HttpClientConfigException;
@@ -144,7 +143,7 @@ public class LifecycleApiPolicyForwarder implements PolicyForwarder {
try {
response = getHttpClient(wantApi).post(path, entity, ImmutableMap.of(HttpHeaders.ACCEPT,
MediaType.APPLICATION_JSON, HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON));
- if (response.getStatus() != Status.OK.getStatusCode()) {
+ if (response.getStatus() / 100 != 2) {
LOGGER.error(
"Invocation of path {} failed for entity {}. Response status: {}, Response status info: {}",
path, entity, response.getStatus(), response.getStatusInfo());