summaryrefslogtreecommitdiffstats
path: root/models-interactions/model-impl/sdnc/src/main/java
diff options
context:
space:
mode:
authorwaynedunican <wayne.dunican@est.tech>2020-06-19 15:30:59 +0100
committerwaynedunican <wayne.dunican@est.tech>2020-06-26 15:30:23 +0100
commitf7da60fabf647665d61f142a0d6ba9a9fc940106 (patch)
tree93ddc1c8a089a847077ccc6c5a0ca7dee7737bf2 /models-interactions/model-impl/sdnc/src/main/java
parent93e2ba2e1756596323774398673736946b220090 (diff)
Clean up of Pair classes - models
Removed Pair class from policy-models and replaced with Aoache Common Pair class Issue-ID: POLICY-2202 Change-Id: I786467ac02ecb2d433dba94deba45785be3dcf23 Signed-off-by: waynedunican <wayne.dunican@est.tech>
Diffstat (limited to 'models-interactions/model-impl/sdnc/src/main/java')
-rw-r--r--models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncManager.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncManager.java b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncManager.java
index 65b655936..ec423c758 100644
--- a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncManager.java
+++ b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncManager.java
@@ -3,7 +3,7 @@
* Copyright (C) 2018 Huawei. All rights reserved.
* ================================================================================
* Modifications Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019-2020 Nordix Foundation.
* Modifications Copyright (C) 2019 Samsung Electronics Co., Ltd.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -25,11 +25,11 @@ package org.onap.policy.sdnc;
import com.google.gson.JsonSyntaxException;
import java.util.HashMap;
import java.util.Map;
+import org.apache.commons.lang3.tuple.Pair;
import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
import org.onap.policy.common.endpoints.utils.NetLoggerUtil;
import org.onap.policy.common.endpoints.utils.NetLoggerUtil.EventType;
import org.onap.policy.rest.RestManager;
-import org.onap.policy.rest.RestManager.Pair;
import org.onap.policy.sdnc.util.Serialization;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -125,9 +125,9 @@ public final class SdncManager implements Runnable {
}
try {
- SdncResponse response = Serialization.gsonPretty.fromJson(httpDetails.second, SdncResponse.class);
- NetLoggerUtil.log(EventType.IN, CommInfrastructure.REST, sdncUrl, httpDetails.second);
- logger.info("[IN|{}|{}|]{}{}", "Sdnc", sdncUrl, NetLoggerUtil.SYSTEM_LS, httpDetails.second);
+ SdncResponse response = Serialization.gsonPretty.fromJson(httpDetails.getRight(), SdncResponse.class);
+ NetLoggerUtil.log(EventType.IN, CommInfrastructure.REST, sdncUrl, httpDetails.getRight());
+ logger.info("[IN|{}|{}|]{}{}", "Sdnc", sdncUrl, NetLoggerUtil.SYSTEM_LS, httpDetails.getRight());
String body = Serialization.gsonPretty.toJson(response);
logger.info("Response to Sdnc Heal post:");
logger.info(body);
@@ -135,7 +135,8 @@ public final class SdncManager implements Runnable {
if (!"200".equals(response.getResponseOutput().getResponseCode())) {
logger.info(
- "Sdnc Heal Restcall failed with http error code {} {}", httpDetails.first, httpDetails.second
+ "Sdnc Heal Restcall failed with http error code {} {}",
+ httpDetails.getLeft(), httpDetails.getRight()
);
}