summaryrefslogtreecommitdiffstats
path: root/controlloop/common/eventmanager/src/main/java
diff options
context:
space:
mode:
authorJorge Hernandez <jh1730@att.com>2017-09-15 19:47:25 +0000
committerGerrit Code Review <gerrit@onap.org>2017-09-15 19:47:25 +0000
commit49137f3c5ecd0a3c2fbc7e9195ef18aa5b43fc11 (patch)
treeac717b8a987501b9c05887086392bb7721d47120 /controlloop/common/eventmanager/src/main/java
parentfb0b6e85027a345c23cb37ae74b23d3a8166627e (diff)
parentc30cfc0ffdf14e0ebc034817cadf7924531b618f (diff)
Merge "ONAP AAI GET Query code"
Diffstat (limited to 'controlloop/common/eventmanager/src/main/java')
-rw-r--r--controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java
index fd040494f..f891a2c6a 100644
--- a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java
+++ b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java
@@ -537,16 +537,25 @@ public class ControlLoopEventManager implements LockCallback, Serializable {
try {
if (event.AAI.get("generic-vnf.vnf-id") != null) {
vnfResponse = getAAIVnfInfo(event);
+ if (vnfResponse == null) {
+ throw new ControlLoopException("AAI Response is null (query by vnf-id)");
+ }
if (vnfResponse != null && isClosedLoopDisabled(vnfResponse) == true) {
throw new ControlLoopException("is-closed-loop-disabled is set to true");
}
} else if (event.AAI.get("generic-vnf.vnf-name") != null) {
vnfResponse = getAAIVnfInfo(event);
+ if (vnfResponse == null) {
+ throw new ControlLoopException("AAI Response is null (query by vnf-name)");
+ }
if (vnfResponse != null && isClosedLoopDisabled(vnfResponse) == true) {
throw new ControlLoopException("is-closed-loop-disabled is set to true");
}
} else if (event.AAI.get("vserver.vserver-name") != null) {
vserverResponse = getAAIVserverInfo(event);
+ if (vserverResponse == null) {
+ throw new ControlLoopException("AAI Response is null (query by vserver-name)");
+ }
if (vserverResponse != null && isClosedLoopDisabled(vserverResponse) == true) {
throw new ControlLoopException("is-closed-loop-disabled is set to true");
}