summaryrefslogtreecommitdiffstats
path: root/controlloop/common/actors/actor.vfc/src
diff options
context:
space:
mode:
authorLiam Fallon <liam.fallon@ericsson.com>2017-12-14 07:40:18 -0800
committerLiam Fallon <liam.fallon@ericsson.com>2017-12-14 20:07:40 -0800
commitfe4cd8e4c08a19ac543ca93c577b8b3a12a1524f (patch)
tree263a3c0dc2ad9504c6a891f6c5b9d025b0fa74b7 /controlloop/common/actors/actor.vfc/src
parent5cfd3b7066e6a6305e140fa59b1fccb8e3c5f81b (diff)
Cleanup of A&AI message model module.
Fields have been made fields private in POJOs, and wrote JUnit unit tests to bring up code coverage. AAIManager also changed to use non-static methods so that it can be stubbed with Mockito. Change-Id: I871427ced5db8a1dfd6495fef4e6d84adf264e65 Signed-off-by: Liam Fallon <liam.fallon@ericsson.com> Issue-ID: POLICY-455 Signed-off-by: Liam Fallon <liam.fallon@ericsson.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.java7
1 files changed, 4 insertions, 3 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 7bf5a2826..efa3dba1f 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
@@ -29,6 +29,7 @@ import org.onap.policy.vfc.VFCHealActionVmInfo;
import org.onap.policy.controlloop.ControlLoopOperation;
import org.onap.policy.controlloop.policy.Policy;
import org.onap.policy.drools.system.PolicyEngine;
+import org.onap.policy.rest.RESTManager;
import org.onap.policy.controlloop.actorServiceProvider.spi.Actor;
import com.google.common.collect.ImmutableList;
@@ -79,7 +80,7 @@ public class VFCActorServiceProvider implements Actor {
if (tempVnfResp == null)
return null;
}
- serviceInstance = tempVnfResp.serviceId;
+ serviceInstance = tempVnfResp.getServiceId();
}
request.nsInstanceId = serviceInstance;
request.requestId = onset.requestID;
@@ -113,10 +114,10 @@ public class VFCActorServiceProvider implements Actor {
try {
if (vnfName != null) {
String url = aaiUrl + "/aai/v11/network/generic-vnfs/generic-vnf?vnf-name=";
- response = AAIManager.getQueryByVnfName(url, aaiUsername, aaiPassword, requestID, vnfName);
+ response = new AAIManager(new RESTManager()).getQueryByVnfName(url, aaiUsername, aaiPassword, requestID, vnfName);
} else if (vnfID != null) {
String url = aaiUrl + "/aai/v11/network/generic-vnfs/generic-vnf/";
- response = AAIManager.getQueryByVnfID(url, aaiUsername, aaiPassword, requestID, vnfID);
+ response = new AAIManager(new RESTManager()).getQueryByVnfID(url, aaiUsername, aaiPassword, requestID, vnfID);
} else {
logger.error("getAAIServiceInstance failed");
}