From a4f095aac46fcdd61877fdfc290080a76c119409 Mon Sep 17 00:00:00 2001 From: Pamela Dragosh Date: Thu, 14 Sep 2017 18:00:36 -0400 Subject: Clear eclipse warnings and sonar Removing warnings introduced with A&AI code. This should also address sonar criticals and majors. Issue-ID: POLICY-140 Change-Id: I3f8186dd9c5aa52bfbb061bf95d67b5614b3fb2e Signed-off-by: Pamela Dragosh --- .../eventmanager/ControlLoopEventManager.java | 27 ++++++---------------- 1 file changed, 7 insertions(+), 20 deletions(-) (limited to 'controlloop/common/eventmanager/src/main') 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 2248fcd48..0fb25b1bf 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 @@ -26,18 +26,17 @@ import java.net.URLDecoder; import java.util.ArrayList; import java.util.Collection; import java.util.LinkedList; -import java.util.List; import java.util.UUID; -import java.util.HashMap; -import java.util.Map; -import java.util.Iterator; +import org.onap.policy.aai.AAIGETVnfResponse; +import org.onap.policy.aai.AAIGETVserverResponse; +import org.onap.policy.aai.AAIManager; import org.onap.policy.controlloop.ControlLoopEventStatus; +import org.onap.policy.controlloop.ControlLoopException; import org.onap.policy.controlloop.ControlLoopNotificationType; import org.onap.policy.controlloop.ControlLoopOperation; import org.onap.policy.controlloop.VirtualControlLoopEvent; import org.onap.policy.controlloop.VirtualControlLoopNotification; -import org.onap.policy.controlloop.ControlLoopException; import org.onap.policy.controlloop.policy.FinalResult; import org.onap.policy.controlloop.policy.Policy; import org.onap.policy.controlloop.processor.ControlLoopProcessor; @@ -49,13 +48,6 @@ import org.onap.policy.guard.TargetLock; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.onap.policy.aai.AAIManager; -import org.onap.policy.aai.AAIGETVserverResponse; -import org.onap.policy.aai.AAIGETVnfResponse; -import org.onap.policy.aai.RelatedToPropertyItem; -import org.onap.policy.aai.RelationshipList; -import org.onap.policy.aai.Relationship; - public class ControlLoopEventManager implements LockCallback, Serializable { /** @@ -580,7 +572,6 @@ public class ControlLoopEventManager implements LockCallback, Serializable { } public static boolean isClosedLoopDisabled(AAIGETVnfResponse aaiResponse) { - RelationshipList relationshipList = new RelationshipList(); if (aaiResponse != null && aaiResponse.isClosedLoopDisabled != null) { String value = aaiResponse.isClosedLoopDisabled; if ("true".equalsIgnoreCase(value) || "T".equalsIgnoreCase(value) || @@ -593,7 +584,6 @@ public class ControlLoopEventManager implements LockCallback, Serializable { } public static boolean isClosedLoopDisabled(AAIGETVserverResponse aaiResponse) { - RelationshipList relationshipList = new RelationshipList(); if (aaiResponse != null && aaiResponse.isClosedLoopDisabled != null) { String value = aaiResponse.isClosedLoopDisabled; if ("true".equalsIgnoreCase(value) || "T".equalsIgnoreCase(value) || @@ -624,9 +614,8 @@ public class ControlLoopEventManager implements LockCallback, Serializable { try { if (vserverName != null) { - AAIManager manager = new AAIManager(); String url = "https://aai-ext1.test.att.com:8443/aai/v11/nodes/vservers?vserver-name="; - response = manager.getQueryByVserverName(url, user, password, requestID, vserverName); + response = AAIManager.getQueryByVserverName(url, user, password, requestID, vserverName); } } catch (Exception e) { logger.error("getAAIVserverInfo exception: ", e); @@ -646,13 +635,11 @@ public class ControlLoopEventManager implements LockCallback, Serializable { try { if (vnfName != null) { - AAIManager manager = new AAIManager(); String url = "https://aai-ext1.test.att.com:8443/aai/v11/network/generic-vnfs/generic-vnf?vnf-name="; - response = manager.getQueryByVnfName(url, user, password, requestID, vnfName); + response = AAIManager.getQueryByVnfName(url, user, password, requestID, vnfName); } else if (vnfID != null) { - AAIManager manager = new AAIManager(); String url = "https://aai-ext1.test.att.com:8443/aai/v11/network/generic-vnfs/generic-vnf/"; - response = manager.getQueryByVnfID(url, user, password, requestID, vnfID); + response = AAIManager.getQueryByVnfID(url, user, password, requestID, vnfID); } } catch (Exception e) { logger.error("getAAIVnfInfo exception: ", e); -- cgit 1.2.3-korg