aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/common/actors/actor.vfc
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2017-09-22 15:08:34 +0000
committerGerrit Code Review <gerrit@onap.org>2017-09-22 15:08:34 +0000
commit7d39eea7a0537b4a1dd6f0d1ac9d30b268e1d91d (patch)
treebd84bd4e32f6f3ff3ec48d56bc01a86adbfd2530 /controlloop/common/actors/actor.vfc
parentb2b8f46ab3a524eae487fa932d9ceb2b884a68f5 (diff)
parent1aa30b7d83f97103097c7f5d3e4cbd2fad92f659 (diff)
Merge "Add VFC Response in Working Memory & JUNIT"
Diffstat (limited to 'controlloop/common/actors/actor.vfc')
-rw-r--r--controlloop/common/actors/actor.vfc/src/main/java/org/onap/policy/controlloop/actor/vfc/VFCActorServiceProvider.java16
1 files changed, 5 insertions, 11 deletions
diff --git a/controlloop/common/actors/actor.vfc/src/main/java/org/onap/policy/controlloop/actor/vfc/VFCActorServiceProvider.java b/controlloop/common/actors/actor.vfc/src/main/java/org/onap/policy/controlloop/actor/vfc/VFCActorServiceProvider.java
index 49b93e8aa..1ea65faa5 100644
--- a/controlloop/common/actors/actor.vfc/src/main/java/org/onap/policy/controlloop/actor/vfc/VFCActorServiceProvider.java
+++ b/controlloop/common/actors/actor.vfc/src/main/java/org/onap/policy/controlloop/actor/vfc/VFCActorServiceProvider.java
@@ -19,10 +19,8 @@
package org.onap.policy.controlloop.actor.vfc;
import java.util.Collections;
-import java.util.HashMap;
import java.util.List;
-import java.util.Map;
-
+import java.util.UUID;
import org.onap.policy.controlloop.VirtualControlLoopEvent;
import org.onap.policy.vfc.VFCRequest;
import org.onap.policy.vfc.VFCHealRequest;
@@ -30,15 +28,12 @@ import org.onap.policy.vfc.VFCHealAdditionalParams;
import org.onap.policy.vfc.VFCHealActionVmInfo;
import org.onap.policy.controlloop.ControlLoopOperation;
import org.onap.policy.controlloop.policy.Policy;
-
import org.onap.policy.controlloop.actorServiceProvider.spi.Actor;
+
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import org.onap.policy.aai.AAIManager;
import org.onap.policy.aai.AAIGETVnfResponse;
-
-import java.util.UUID;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -76,7 +71,7 @@ public class VFCActorServiceProvider implements Actor {
VFCRequest request = new VFCRequest();
// TODO: Verify service-instance-id is part of onset event
request.nsInstanceId = getAAIServiceInstance(onset); // onset.AAI.get("service-instance.service-instance-id");
-
+ request.requestId = onset.requestID;
request.healRequest = new VFCHealRequest();
request.healRequest.vnfInstanceId = onset.AAI.get("generic-vnf.vnf-id");
request.healRequest.cause = operation.message;
@@ -110,14 +105,13 @@ public class VFCActorServiceProvider implements Actor {
String password = "testPass";
if (serviceInstance == null) {
try {
- AAIManager manager = new AAIManager();
if (vnfName != null) {
String url = urlBase + "/aai/v11/network/generic-vnfs/generic-vnf?vnf-name=";
- response = manager.getQueryByVnfName(url, username, password, requestID, vnfName);
+ response = AAIManager.getQueryByVnfName(url, username, password, requestID, vnfName);
serviceInstance = response.serviceId;
} else if (vnfID != null) {
String url = urlBase + "/aai/v11/network/generic-vnfs/generic-vnf/";
- response = manager.getQueryByVnfID(url, username, password, requestID, vnfID);
+ response = AAIManager.getQueryByVnfID(url, username, password, requestID, vnfID);
serviceInstance = response.serviceId;
} else {
logger.error("getAAIServiceInstance failed");