aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/common/eventmanager/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'controlloop/common/eventmanager/src/main/java')
-rw-r--r--controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java11
-rw-r--r--controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager.java8
2 files changed, 17 insertions, 2 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 b1674206b..4adcff048 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
@@ -560,7 +560,8 @@ public class ControlLoopEventManager implements LockCallback, Serializable {
}
public void queryAai(VirtualControlLoopEvent event) throws AAIException {
- if (event.AAI.get("vserver.is-closed-loop-disabled") == null) {
+ if (event.AAI.get("vserver.is-closed-loop-disabled") == null &&
+ event.AAI.get("generic-vnf.is-closed-loop-disabled") == null) {
try {
if (event.AAI.get("generic-vnf.vnf-id") != null) {
vnfResponse = getAAIVnfInfo(event);
@@ -635,7 +636,13 @@ public class ControlLoopEventManager implements LockCallback, Serializable {
"yes".equalsIgnoreCase(event.AAI.get("vserver.is-closed-loop-disabled")) ||
"Y".equalsIgnoreCase(event.AAI.get("vserver.is-closed-loop-disabled"))) {
return true;
- }
+ }
+ else if ("true".equalsIgnoreCase(event.AAI.get("generic-vnf.is-closed-loop-disabled")) ||
+ "T".equalsIgnoreCase(event.AAI.get("generic-vnf.is-closed-loop-disabled")) ||
+ "yes".equalsIgnoreCase(event.AAI.get("generic-vnf.is-closed-loop-disabled")) ||
+ "Y".equalsIgnoreCase(event.AAI.get("generic-vnf.is-closed-loop-disabled"))) {
+ return true;
+ }
return false;
}
diff --git a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager.java b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager.java
index cebdc1e9a..26a82fe57 100644
--- a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager.java
+++ b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager.java
@@ -145,6 +145,14 @@ public class ControlLoopOperationManager implements Serializable {
}
else if (this.onset.target.equalsIgnoreCase("generic-vnf.vnf-name")) {
/*
+ * If the onset is enriched with the vnf-id,
+ * we don't need an A&AI response
+ */
+ if (virtualOnset.AAI.containsKey("generic-vnf.vnf-id")) {
+ return virtualOnset.AAI.get("generic-vnf.vnf-id");
+ }
+
+ /*
* If the vnf-name was retrieved from the onset then the vnf-id
* must be obtained from the event manager's A&AI GET query
*/