summaryrefslogtreecommitdiffstats
path: root/controlloop/common/actors/actor.vfc/src
diff options
context:
space:
mode:
authorRitu Sood <ritu.sood@intel.com>2017-09-11 14:20:13 -0700
committerRitu Sood <ritu.sood@intel.com>2017-09-21 03:35:01 -0700
commit1aa30b7d83f97103097c7f5d3e4cbd2fad92f659 (patch)
tree8debfa85be42597ea094a298eadc1d0886e5d50f /controlloop/common/actors/actor.vfc/src
parentf5431672cc07c00f3d4e0a8a0a28d3edffb7d37e (diff)
Add VFC Response in Working Memory & JUNIT
Adding code to insert VFC reponse in working memory and handling that response. Also adding JUNIT and yaml file for VoLTE usecase. Issue-Id: POLICY-212 Change-Id: I74a13272ccd931478d27d80715d8c3ac756fb5c7 Signed-off-by: Ritu Sood <ritu.sood@intel.com>
Diffstat (limited to 'controlloop/common/actors/actor.vfc/src')
-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");