aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/common/model-impl
diff options
context:
space:
mode:
authorCharles Cole <cc847m@att.com>2017-10-20 08:52:59 -0500
committerCharles Cole <cc847m@att.com>2017-10-23 11:16:59 -0500
commit140980d872f84e854d636a21ca872b251b15891b (patch)
tree160fa25a01657b2fd32c984dbe4ae4b0f106a12b /controlloop/common/model-impl
parent2f1ee658482437e0c5b45451d20468411e2e2b6a (diff)
Fix handling of aai 'get' errors
Now reject an event if the AAI get query for the event fails. Added test cases for this behavior. Fixed some issues from my previous pull request. Issue-Id: POLICY-314 Change-Id: I674e95302a271423c307a88d061064e12e491a7a Signed-off-by: Charles Cole <cc847m@att.com>
Diffstat (limited to 'controlloop/common/model-impl')
-rw-r--r--controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAIGETResponse.java3
-rw-r--r--controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAIManager.java2
-rw-r--r--controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQRequestError.java2
-rw-r--r--controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQServiceExcept.java (renamed from controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQServiceException.java)2
4 files changed, 6 insertions, 3 deletions
diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAIGETResponse.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAIGETResponse.java
index 46a4e5080..caba0596f 100644
--- a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAIGETResponse.java
+++ b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAIGETResponse.java
@@ -45,6 +45,9 @@ public class AAIGETResponse implements Serializable {
@SerializedName("relationship-list")
public RelationshipList relationshipList;
+
+ @SerializedName("requestError")
+ public AAINQRequestError requestError;
public AAIGETResponse() {
}
diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAIManager.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAIManager.java
index 6a0fb3adb..e22fe00e3 100644
--- a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAIManager.java
+++ b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAIManager.java
@@ -49,7 +49,7 @@ public final class AAIManager {
String requestJson = Serialization.gsonPretty.toJson(request);
netLogger.info("[OUT|{}|{}|]{}{}", "AAI", url, System.lineSeparator(), requestJson);
Pair<Integer, String> httpDetails = RESTManager.post(url, username, password, headers, "application/json", requestJson);
- logger.debug("RESTManager.post after");
+ logger.debug("RESTManager.post after");
if (httpDetails == null) {
logger.info("AAI POST Null Response to " + url);
diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQRequestError.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQRequestError.java
index f6439cc4a..f2498fb6e 100644
--- a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQRequestError.java
+++ b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQRequestError.java
@@ -29,5 +29,5 @@ public class AAINQRequestError implements Serializable {
private static final long serialVersionUID = -7742674155387022932L;
@SerializedName("serviceException")
- public AAINQServiceException serviceException;
+ public AAINQServiceExcept serviceExcept;
}
diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQServiceException.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQServiceExcept.java
index 64d407de4..acee98f04 100644
--- a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQServiceException.java
+++ b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQServiceExcept.java
@@ -24,7 +24,7 @@ import java.io.Serializable;
import com.google.gson.annotations.SerializedName;
-public class AAINQServiceException implements Serializable {
+public class AAINQServiceExcept implements Serializable {
private static final long serialVersionUID = 2858343404484338546L;