summaryrefslogtreecommitdiffstats
path: root/controlloop/common/eventmanager
diff options
context:
space:
mode:
authorCharles Cole <cc847m@att.com>2017-09-26 14:43:58 -0500
committerCharles Cole <cc847m@att.com>2017-09-28 11:19:28 -0500
commit61af63956d0fa9022667c56c8874d83be35c8102 (patch)
treeba5be7e0c8f573fa38714b4d8389a7c080ace9ce /controlloop/common/eventmanager
parent400ca9b5ebb98c42c0c497d917f3cf139b03888a (diff)
Fix Sonar criticals
Fixed two Sonar criticals. Changed VFC actor service provider to eliminate redundant AAI queries. Issue-ID: POLICY-115 Change-Id: Ic4993b5d498a1cb3d3fc51ce1d2b4e90bb26353d Signed-off-by: Charles Cole <cc847m@att.com>
Diffstat (limited to 'controlloop/common/eventmanager')
-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.java2
2 files changed, 5 insertions, 8 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 7aaac9ead..f8f3b4cc8 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
@@ -72,14 +72,11 @@ public class ControlLoopEventManager implements LockCallback, Serializable {
private LinkedList<ControlLoopOperation> controlLoopHistory = new LinkedList<>();
private ControlLoopOperationManager currentOperation = null;
private transient TargetLock targetLock = null;
- private static AAIGETVnfResponse vnfResponse = null;
- private static AAIGETVserverResponse vserverResponse = null;
+ private AAIGETVnfResponse vnfResponse = null;
+ private AAIGETVserverResponse vserverResponse = null;
private static String aaiHostURL;
private static String aaiUser;
private static String aaiPassword;
- private static String aaiGetQueryByVserver;
- private static String aaiGetQueryByVnfID;
- private static String aaiGetQueryByVnfName;
private static Collection<String> requiredAAIKeys = new ArrayList<>();
static {
@@ -438,7 +435,7 @@ public class ControlLoopEventManager implements LockCallback, Serializable {
public NEW_EVENT_STATUS onNewEvent(VirtualControlLoopEvent event) {
try {
- ControlLoopEventManager.checkEventSyntax(event);
+ this.checkEventSyntax(event);
if (event.closedLoopEventStatus == ControlLoopEventStatus.ONSET) {
//
// Check if this is our original ONSET
@@ -521,7 +518,7 @@ public class ControlLoopEventManager implements LockCallback, Serializable {
return vserverResponse;
}
- public static void checkEventSyntax(VirtualControlLoopEvent event) throws ControlLoopException {
+ public void checkEventSyntax(VirtualControlLoopEvent event) throws ControlLoopException {
if (event.closedLoopEventStatus == null ||
(event.closedLoopEventStatus != ControlLoopEventStatus.ONSET &&
event.closedLoopEventStatus != ControlLoopEventStatus.ABATED)) {
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 e13352ac0..262c4c6de 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
@@ -225,7 +225,7 @@ public class ControlLoopOperationManager implements Serializable {
return operationRequest;
case "VFC":
- this.operationRequest = VFCActorServiceProvider.constructRequest((VirtualControlLoopEvent) onset, operation.operation, this.policy);
+ this.operationRequest = VFCActorServiceProvider.constructRequest((VirtualControlLoopEvent) onset, operation.operation, this.policy, this.eventManager.getVnfResponse());
this.currentOperation = operation;
return operationRequest;