aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/common/actors/actor.vfc/src
diff options
context:
space:
mode:
authormmis <michael.morris@ericsson.com>2018-03-22 16:36:47 +0000
committermmis <michael.morris@ericsson.com>2018-03-26 16:28:38 +0100
commitf6a81de0fd84186d499c39fe5f2d75c20cb0e301 (patch)
tree3a3ecfafe9dbdc750c75122c9702b1aea1a1777d /controlloop/common/actors/actor.vfc/src
parent3508a11ff75f9def26bcc601bb758115487bd349 (diff)
Removed checkstyle warnings
Removed checkstyle warnings from policy/drools-applications/controlloop/common/model-impl/aai including renaming classes: AAI* -> Aai* PNF* -> Pnf* and renaming some methods in those classes Issue-ID: POLICY-705 Change-Id: I2d59a668728aa58a2c9fbe78c44e924e6cfb4531 Signed-off-by: mmis <michael.morris@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.java16
-rw-r--r--controlloop/common/actors/actor.vfc/src/test/java/org/onap/policy/controlloop/actor/vfc/TestVFCActorServiceProvider.java8
2 files changed, 12 insertions, 12 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 839b07e2b..83f44a1ed 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
@@ -25,8 +25,8 @@ import java.util.Collections;
import java.util.List;
import java.util.UUID;
-import org.onap.policy.aai.AAIGETVnfResponse;
-import org.onap.policy.aai.AAIManager;
+import org.onap.policy.aai.AaiGetVnfResponse;
+import org.onap.policy.aai.AaiManager;
import org.onap.policy.controlloop.ControlLoopOperation;
import org.onap.policy.controlloop.VirtualControlLoopEvent;
import org.onap.policy.controlloop.actorserviceprovider.spi.Actor;
@@ -86,13 +86,13 @@ public class VFCActorServiceProvider implements Actor {
* @return the constructed request
*/
public static VFCRequest constructRequest(VirtualControlLoopEvent onset, ControlLoopOperation operation,
- Policy policy, AAIGETVnfResponse vnfResponse) {
+ Policy policy, AaiGetVnfResponse vnfResponse) {
// Construct an VFC request
VFCRequest request = new VFCRequest();
String serviceInstance = onset.getAAI().get("service-instance.service-instance-id");
if (serviceInstance == null || "".equals(serviceInstance)) {
- AAIGETVnfResponse tempVnfResp = vnfResponse;
+ AaiGetVnfResponse tempVnfResp = vnfResponse;
if (tempVnfResp == null) { // if the response is null, we haven't queried
// This does the AAI query since we haven't already
tempVnfResp = getAaiServiceInstance(onset);
@@ -122,8 +122,8 @@ public class VFCActorServiceProvider implements Actor {
return request;
}
- private static AAIGETVnfResponse getAaiServiceInstance(VirtualControlLoopEvent event) {
- AAIGETVnfResponse response = null;
+ private static AaiGetVnfResponse getAaiServiceInstance(VirtualControlLoopEvent event) {
+ AaiGetVnfResponse response = null;
UUID requestId = event.getRequestID();
String vnfName = event.getAAI().get("generic-vnf.vnf-name");
String vnfId = event.getAAI().get("generic-vnf.vnf-id");
@@ -133,11 +133,11 @@ public class VFCActorServiceProvider implements Actor {
try {
if (vnfName != null) {
String url = aaiUrl + "/aai/v11/network/generic-vnfs/generic-vnf?vnf-name=";
- response = new AAIManager(new RESTManager()).getQueryByVnfName(url, aaiUsername, aaiPassword, requestId,
+ 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 = new AAIManager(new RESTManager()).getQueryByVnfID(url, aaiUsername, aaiPassword, requestId,
+ response = new AaiManager(new RESTManager()).getQueryByVnfId(url, aaiUsername, aaiPassword, requestId,
vnfId);
} else {
logger.error("getAAIServiceInstance failed");
diff --git a/controlloop/common/actors/actor.vfc/src/test/java/org/onap/policy/controlloop/actor/vfc/TestVFCActorServiceProvider.java b/controlloop/common/actors/actor.vfc/src/test/java/org/onap/policy/controlloop/actor/vfc/TestVFCActorServiceProvider.java
index 39be472ae..8c0ab22eb 100644
--- a/controlloop/common/actors/actor.vfc/src/test/java/org/onap/policy/controlloop/actor/vfc/TestVFCActorServiceProvider.java
+++ b/controlloop/common/actors/actor.vfc/src/test/java/org/onap/policy/controlloop/actor/vfc/TestVFCActorServiceProvider.java
@@ -30,7 +30,7 @@ import java.util.UUID;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
-import org.onap.policy.aai.AAIGETVnfResponse;
+import org.onap.policy.aai.AaiGetVnfResponse;
import org.onap.policy.controlloop.ControlLoopOperation;
import org.onap.policy.controlloop.VirtualControlLoopEvent;
import org.onap.policy.controlloop.policy.Policy;
@@ -90,13 +90,13 @@ public class TestVFCActorServiceProvider {
onset.getAAI().put("service-instance.service-instance-id", "");
assertNull(VFCActorServiceProvider.constructRequest(onset, operation, policy, null));
- assertNull(VFCActorServiceProvider.constructRequest(onset, operation, policy, new AAIGETVnfResponse()));
+ assertNull(VFCActorServiceProvider.constructRequest(onset, operation, policy, new AaiGetVnfResponse()));
policy.setRecipe("Restart");
- assertNotNull(VFCActorServiceProvider.constructRequest(onset, operation, policy, new AAIGETVnfResponse()));
+ assertNotNull(VFCActorServiceProvider.constructRequest(onset, operation, policy, new AaiGetVnfResponse()));
VFCRequest request =
- VFCActorServiceProvider.constructRequest(onset, operation, policy, new AAIGETVnfResponse());
+ VFCActorServiceProvider.constructRequest(onset, operation, policy, new AaiGetVnfResponse());
assertEquals(requestId, request.getRequestId());
assertEquals("dorothy.gale.1939", request.getHealRequest().getVnfInstanceId());