summaryrefslogtreecommitdiffstats
path: root/models-interactions
diff options
context:
space:
mode:
Diffstat (limited to 'models-interactions')
-rw-r--r--models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiActor.java (renamed from models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiActorServiceProvider.java)4
-rw-r--r--models-interactions/model-actors/actor.aai/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor2
-rw-r--r--models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiActorTest.java (renamed from models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiActorServiceProviderTest.java)6
-rw-r--r--models-interactions/model-actors/actor.appc/src/main/java/org/onap/policy/controlloop/actor/appc/AppcActor.java (renamed from models-interactions/model-actors/actor.appc/src/main/java/org/onap/policy/controlloop/actor/appc/AppcActorServiceProvider.java)8
-rw-r--r--models-interactions/model-actors/actor.appc/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor2
-rw-r--r--models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/AppcActorTest.java (renamed from models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/AppcServiceProviderTest.java)18
-rw-r--r--models-interactions/model-actors/actor.appclcm/src/main/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmActor.java (renamed from models-interactions/model-actors/actor.appclcm/src/main/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmActorServiceProvider.java)6
-rw-r--r--models-interactions/model-actors/actor.appclcm/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor2
-rw-r--r--models-interactions/model-actors/actor.appclcm/src/test/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmActorTest.java (renamed from models-interactions/model-actors/actor.appclcm/src/test/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmActorServiceProviderTest.java)58
-rw-r--r--models-interactions/model-actors/actor.cds/src/main/java/org/onap/policy/controlloop/actor/cds/CdsActor.java (renamed from models-interactions/model-actors/actor.cds/src/main/java/org/onap/policy/controlloop/actor/cds/CdsActorServiceProvider.java)6
-rw-r--r--models-interactions/model-actors/actor.cds/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor2
-rw-r--r--models-interactions/model-actors/actor.cds/src/test/java/org/onap/policy/controlloop/actor/cds/CdsActorTest.java (renamed from models-interactions/model-actors/actor.cds/src/test/java/org/onap/policy/controlloop/actor/cds/CdsActorServiceProviderTest.java)14
-rw-r--r--models-interactions/model-actors/actor.guard/src/main/java/org/onap/policy/controlloop/actor/guard/GuardActor.java (renamed from models-interactions/model-actors/actor.guard/src/main/java/org/onap/policy/controlloop/actor/guard/GuardActorServiceProvider.java)6
-rw-r--r--models-interactions/model-actors/actor.guard/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor2
-rw-r--r--models-interactions/model-actors/actor.guard/src/test/java/org/onap/policy/controlloop/actor/guard/GuardActorTest.java (renamed from models-interactions/model-actors/actor.guard/src/test/java/org/onap/policy/controlloop/actor/guard/GuardActorServiceProviderTest.java)6
-rw-r--r--models-interactions/model-actors/actor.sdnc/src/main/java/org/onap/policy/controlloop/actor/sdnc/SdncActor.java (renamed from models-interactions/model-actors/actor.sdnc/src/main/java/org/onap/policy/controlloop/actor/sdnc/SdncActorServiceProvider.java)8
-rw-r--r--models-interactions/model-actors/actor.sdnc/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor2
-rw-r--r--models-interactions/model-actors/actor.sdnc/src/test/java/org/onap/policy/controlloop/actor/sdnc/SdncActorTest.java (renamed from models-interactions/model-actors/actor.sdnc/src/test/java/org/onap/policy/controlloop/actor/sdnc/SdncActorServiceProviderTest.java)12
-rw-r--r--models-interactions/model-actors/actor.sdnr/src/main/java/org/onap/policy/controlloop/actor/sdnr/SdnrActor.java (renamed from models-interactions/model-actors/actor.sdnr/src/main/java/org/onap/policy/controlloop/actor/sdnr/SdnrActorServiceProvider.java)8
-rw-r--r--models-interactions/model-actors/actor.sdnr/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor2
-rw-r--r--models-interactions/model-actors/actor.sdnr/src/test/java/org/onap/policy/controlloop/actor/sdnr/SdnrActorTest.java (renamed from models-interactions/model-actors/actor.sdnr/src/test/java/org/onap/policy/controlloop/actor/sdnr/SdnrActorServiceProviderTest.java)22
-rw-r--r--models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/SoActor.java (renamed from models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/SoActorServiceProvider.java)8
-rw-r--r--models-interactions/model-actors/actor.so/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor2
-rw-r--r--models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/SoActorTest.java (renamed from models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/SoActorServiceProviderTest.java)45
-rw-r--r--models-interactions/model-actors/actor.vfc/src/main/java/org/onap/policy/controlloop/actor/vfc/VfcActor.java (renamed from models-interactions/model-actors/actor.vfc/src/main/java/org/onap/policy/controlloop/actor/vfc/VfcActorServiceProvider.java)4
-rw-r--r--models-interactions/model-actors/actor.vfc/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor2
-rw-r--r--models-interactions/model-actors/actor.vfc/src/test/java/org/onap/policy/controlloop/actor/vfc/VfcActorTest.java (renamed from models-interactions/model-actors/actor.vfc/src/test/java/org/onap/policy/controlloop/actor/vfc/VfcActorServiceProviderTest.java)26
27 files changed, 141 insertions, 142 deletions
diff --git a/models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiActorServiceProvider.java b/models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiActor.java
index 0fe70b7ea..e8d1241f7 100644
--- a/models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiActorServiceProvider.java
+++ b/models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiActor.java
@@ -28,13 +28,13 @@ import org.onap.policy.controlloop.actorserviceprovider.parameters.HttpActorPara
/**
* A&AI Actor.
*/
-public class AaiActorServiceProvider extends HttpActor<HttpActorParams> {
+public class AaiActor extends HttpActor<HttpActorParams> {
public static final String NAME = AaiConstants.ACTOR_NAME;
/**
* Constructs the object.
*/
- public AaiActorServiceProvider() {
+ public AaiActor() {
super(NAME, HttpActorParams.class);
addOperator(new HttpOperator(NAME, AaiCustomQueryOperation.NAME, AaiCustomQueryOperation::new));
diff --git a/models-interactions/model-actors/actor.aai/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor b/models-interactions/model-actors/actor.aai/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor
index 6a52e3f17..eb6ec902e 100644
--- a/models-interactions/model-actors/actor.aai/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor
+++ b/models-interactions/model-actors/actor.aai/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor
@@ -1 +1 @@
-org.onap.policy.controlloop.actor.aai.AaiActorServiceProvider
+org.onap.policy.controlloop.actor.aai.AaiActor
diff --git a/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiActorServiceProviderTest.java b/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiActorTest.java
index 97a8491b2..e56a55139 100644
--- a/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiActorServiceProviderTest.java
+++ b/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiActorTest.java
@@ -29,11 +29,11 @@ import java.util.stream.Collectors;
import org.junit.Test;
import org.onap.policy.controlloop.actor.test.BasicActor;
-public class AaiActorServiceProviderTest extends BasicActor {
+public class AaiActorTest extends BasicActor {
@Test
public void testAaiActorServiceProvider() {
- final AaiActorServiceProvider prov = new AaiActorServiceProvider();
+ final AaiActor prov = new AaiActor();
// verify that it has the operators we expect
List<String> expected = new LinkedList<>();
@@ -48,6 +48,6 @@ public class AaiActorServiceProviderTest extends BasicActor {
assertEquals(expected.toString(), actual.toString());
// verify that it all plugs into the ActorService
- verifyActorService(AaiActorServiceProvider.NAME, "service.yaml");
+ verifyActorService(AaiActor.NAME, "service.yaml");
}
}
diff --git a/models-interactions/model-actors/actor.appc/src/main/java/org/onap/policy/controlloop/actor/appc/AppcActorServiceProvider.java b/models-interactions/model-actors/actor.appc/src/main/java/org/onap/policy/controlloop/actor/appc/AppcActor.java
index 0a03957ec..8634fbf6a 100644
--- a/models-interactions/model-actors/actor.appc/src/main/java/org/onap/policy/controlloop/actor/appc/AppcActorServiceProvider.java
+++ b/models-interactions/model-actors/actor.appc/src/main/java/org/onap/policy/controlloop/actor/appc/AppcActor.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * APPCActorServiceProvider
+ * ONAP
* ================================================================================
* Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2019 Nordix Foundation.
@@ -41,10 +41,10 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class AppcActorServiceProvider extends BidirectionalTopicActor<BidirectionalTopicActorParams> {
+public class AppcActor extends BidirectionalTopicActor<BidirectionalTopicActorParams> {
public static final String NAME = "APPC";
- private static final Logger logger = LoggerFactory.getLogger(AppcActorServiceProvider.class);
+ private static final Logger logger = LoggerFactory.getLogger(AppcActor.class);
// TODO old code: remove lines down to **HERE**
@@ -74,7 +74,7 @@ public class AppcActorServiceProvider extends BidirectionalTopicActor<Bidirectio
/**
* Constructs the object.
*/
- public AppcActorServiceProvider() {
+ public AppcActor() {
super(NAME, BidirectionalTopicActorParams.class);
addOperator(new BidirectionalTopicOperator(NAME, ModifyConfigOperation.NAME, this, AppcOperation.SELECTOR_KEYS,
diff --git a/models-interactions/model-actors/actor.appc/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor b/models-interactions/model-actors/actor.appc/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor
index f1002a301..313b668d1 100644
--- a/models-interactions/model-actors/actor.appc/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor
+++ b/models-interactions/model-actors/actor.appc/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor
@@ -1 +1 @@
-org.onap.policy.controlloop.actor.appc.AppcActorServiceProvider \ No newline at end of file
+org.onap.policy.controlloop.actor.appc.AppcActor
diff --git a/models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/AppcServiceProviderTest.java b/models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/AppcActorTest.java
index 0fd3a8a42..47773f23f 100644
--- a/models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/AppcServiceProviderTest.java
+++ b/models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/AppcActorTest.java
@@ -1,8 +1,8 @@
/*-
* ============LICENSE_START=======================================================
- * AppcServiceProviderTest
+ * ONAP
* ================================================================================
- * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -52,7 +52,7 @@ import org.onap.policy.simulators.Util;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class AppcServiceProviderTest extends BasicActor {
+public class AppcActorTest extends BasicActor {
private static final String GENERIC_VNF_ID = "generic-vnf.vnf-id";
@@ -60,7 +60,7 @@ public class AppcServiceProviderTest extends BasicActor {
private static final String JSON_OUTPUT = "JSON Output: \n";
- private static final Logger logger = LoggerFactory.getLogger(AppcServiceProviderTest.class);
+ private static final Logger logger = LoggerFactory.getLogger(AppcActorTest.class);
private static final VirtualControlLoopEvent onsetEvent;
private static final ControlLoopOperation operation;
@@ -133,7 +133,7 @@ public class AppcServiceProviderTest extends BasicActor {
@Test
public void testConstructor() {
- AppcActorServiceProvider prov = new AppcActorServiceProvider();
+ AppcActor prov = new AppcActor();
assertEquals(0, prov.getSequenceNumber());
// verify that it has the operators we expect
@@ -146,7 +146,7 @@ public class AppcServiceProviderTest extends BasicActor {
@Test
public void testActorService() {
// verify that it all plugs into the ActorService
- verifyActorService(AppcActorServiceProvider.NAME, "service.yaml");
+ verifyActorService(AppcActor.NAME, "service.yaml");
}
@Test
@@ -156,7 +156,7 @@ public class AppcServiceProviderTest extends BasicActor {
policy.getPayload().put(KEY2, VALUE2);
Request appcRequest;
- appcRequest = AppcActorServiceProvider.constructRequest(onsetEvent, operation, policy, "vnf01");
+ appcRequest = AppcActor.constructRequest(onsetEvent, operation, policy, "vnf01");
/* The service provider must return a non null APPC request */
assertNotNull(appcRequest);
@@ -207,7 +207,7 @@ public class AppcServiceProviderTest extends BasicActor {
public void testConstructModifyConfigRequest_NullPayload() {
Request appcRequest;
- appcRequest = AppcActorServiceProvider.constructRequest(onsetEvent, operation, policy, "vnf01");
+ appcRequest = AppcActor.constructRequest(onsetEvent, operation, policy, "vnf01");
/* The service provider must return a non null APPC request */
assertNotNull(appcRequest);
@@ -249,7 +249,7 @@ public class AppcServiceProviderTest extends BasicActor {
@Test
public void testMethods() {
- AppcActorServiceProvider sp = new AppcActorServiceProvider();
+ AppcActor sp = new AppcActor();
assertEquals("APPC", sp.actor());
assertEquals(4, sp.recipes().size());
diff --git a/models-interactions/model-actors/actor.appclcm/src/main/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmActorServiceProvider.java b/models-interactions/model-actors/actor.appclcm/src/main/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmActor.java
index 393ce0ccb..04ef55aeb 100644
--- a/models-interactions/model-actors/actor.appclcm/src/main/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmActorServiceProvider.java
+++ b/models-interactions/model-actors/actor.appclcm/src/main/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmActor.java
@@ -49,7 +49,7 @@ import org.onap.policy.controlloop.policy.PolicyResult;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class AppcLcmActorServiceProvider extends BidirectionalTopicActor<BidirectionalTopicActorParams> {
+public class AppcLcmActor extends BidirectionalTopicActor<BidirectionalTopicActorParams> {
/*
* Confirmed by Daniel, should be 'APPC'.
@@ -59,7 +59,7 @@ public class AppcLcmActorServiceProvider extends BidirectionalTopicActor<Bidirec
*/
public static final String NAME = "APPC";
- private static final Logger logger = LoggerFactory.getLogger(AppcLcmActorServiceProvider.class);
+ private static final Logger logger = LoggerFactory.getLogger(AppcLcmActor.class);
/* To be used in future releases to restart a single vm */
private static final String APPC_VM_ID = "vm-id";
@@ -89,7 +89,7 @@ public class AppcLcmActorServiceProvider extends BidirectionalTopicActor<Bidirec
/**
* Constructs the object.
*/
- public AppcLcmActorServiceProvider() {
+ public AppcLcmActor() {
super(NAME, BidirectionalTopicActorParams.class);
// add LCM operations first as they take precedence
diff --git a/models-interactions/model-actors/actor.appclcm/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor b/models-interactions/model-actors/actor.appclcm/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor
index 403ad9859..53d2c2a7c 100644
--- a/models-interactions/model-actors/actor.appclcm/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor
+++ b/models-interactions/model-actors/actor.appclcm/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor
@@ -1 +1 @@
-org.onap.policy.controlloop.actor.appclcm.AppcLcmActorServiceProvider \ No newline at end of file
+org.onap.policy.controlloop.actor.appclcm.AppcLcmActor
diff --git a/models-interactions/model-actors/actor.appclcm/src/test/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmActorServiceProviderTest.java b/models-interactions/model-actors/actor.appclcm/src/test/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmActorTest.java
index 56ce047dd..e2bbb10db 100644
--- a/models-interactions/model-actors/actor.appclcm/src/test/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmActorServiceProviderTest.java
+++ b/models-interactions/model-actors/actor.appclcm/src/test/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmActorTest.java
@@ -51,7 +51,7 @@ import org.onap.policy.simulators.Util;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class AppcLcmActorServiceProviderTest {
+public class AppcLcmActorTest {
private static final String VNF01 = "vnf01";
@@ -63,7 +63,7 @@ public class AppcLcmActorServiceProviderTest {
private static final String FAILURE = "FAILURE";
- private static final Logger logger = LoggerFactory.getLogger(AppcLcmActorServiceProviderTest.class);
+ private static final Logger logger = LoggerFactory.getLogger(AppcLcmActorTest.class);
private static final VirtualControlLoopEvent onsetEvent;
private static final ControlLoopOperation operation;
@@ -177,7 +177,7 @@ public class AppcLcmActorServiceProviderTest {
@Test
public void testConstructor() {
- AppcLcmActorServiceProvider prov = new AppcLcmActorServiceProvider();
+ AppcLcmActor prov = new AppcLcmActor();
assertEquals(-1, prov.getSequenceNumber());
// verify that it has the operators we expect
@@ -194,7 +194,7 @@ public class AppcLcmActorServiceProviderTest {
public void constructRestartRequestTest() {
AppcLcmDmaapWrapper dmaapRequest =
- AppcLcmActorServiceProvider.constructRequest(onsetEvent, operation, policy, VNF01);
+ AppcLcmActor.constructRequest(onsetEvent, operation, policy, VNF01);
/* The service provider must return a non null DMAAP request wrapper */
assertNotNull(dmaapRequest);
@@ -229,7 +229,7 @@ public class AppcLcmActorServiceProviderTest {
@Test
public void processRestartResponseSuccessTest() {
AbstractMap.SimpleEntry<PolicyResult, String> result =
- AppcLcmActorServiceProvider.processResponse(dmaapResponse);
+ AppcLcmActor.processResponse(dmaapResponse);
assertEquals(PolicyResult.SUCCESS, result.getKey());
assertEquals("Restart Successful", result.getValue());
}
@@ -240,7 +240,7 @@ public class AppcLcmActorServiceProviderTest {
*/
@Test(expected = NullPointerException.class)
public void processNullBodyResponseTest() {
- AppcLcmActorServiceProvider.processResponse(new AppcLcmDmaapWrapper());
+ AppcLcmActor.processResponse(new AppcLcmDmaapWrapper());
}
/**
@@ -251,7 +251,7 @@ public class AppcLcmActorServiceProviderTest {
public void processNullOutputResponseTest() {
AppcLcmDmaapWrapper dmaapWrapper = new AppcLcmDmaapWrapper();
dmaapWrapper.setBody(new AppcLcmBody());
- AppcLcmActorServiceProvider.processResponse(dmaapWrapper);
+ AppcLcmActor.processResponse(dmaapWrapper);
}
/**
@@ -265,82 +265,82 @@ public class AppcLcmActorServiceProviderTest {
/* If APPC accepts, PolicyResult is null */
dmaapResponse.getBody().getOutput().getStatus().setCode(100);
dmaapResponse.getBody().getOutput().getStatus().setMessage("ACCEPTED");
- result = AppcLcmActorServiceProvider.processResponse(dmaapResponse);
+ result = AppcLcmActor.processResponse(dmaapResponse);
assertNull(result.getKey());
/* If APPC is successful, PolicyResult is success */
dmaapResponse.getBody().getOutput().getStatus().setCode(400);
dmaapResponse.getBody().getOutput().getStatus().setMessage("SUCCESS");
- result = AppcLcmActorServiceProvider.processResponse(dmaapResponse);
+ result = AppcLcmActor.processResponse(dmaapResponse);
assertEquals(PolicyResult.SUCCESS, result.getKey());
/* If APPC returns an error, PolicyResult is failure exception */
dmaapResponse.getBody().getOutput().getStatus().setCode(200);
dmaapResponse.getBody().getOutput().getStatus().setMessage("ERROR");
- result = AppcLcmActorServiceProvider.processResponse(dmaapResponse);
+ result = AppcLcmActor.processResponse(dmaapResponse);
assertEquals(PolicyResult.FAILURE_EXCEPTION, result.getKey());
/* If APPC rejects, PolicyResult is failure exception */
dmaapResponse.getBody().getOutput().getStatus().setCode(300);
dmaapResponse.getBody().getOutput().getStatus().setMessage(REJECT);
- result = AppcLcmActorServiceProvider.processResponse(dmaapResponse);
+ result = AppcLcmActor.processResponse(dmaapResponse);
assertEquals(PolicyResult.FAILURE_EXCEPTION, result.getKey());
/* Test multiple reject codes */
dmaapResponse.getBody().getOutput().getStatus().setCode(306);
dmaapResponse.getBody().getOutput().getStatus().setMessage(REJECT);
- result = AppcLcmActorServiceProvider.processResponse(dmaapResponse);
+ result = AppcLcmActor.processResponse(dmaapResponse);
assertEquals(PolicyResult.FAILURE_EXCEPTION, result.getKey());
dmaapResponse.getBody().getOutput().getStatus().setCode(313);
dmaapResponse.getBody().getOutput().getStatus().setMessage(REJECT);
- result = AppcLcmActorServiceProvider.processResponse(dmaapResponse);
+ result = AppcLcmActor.processResponse(dmaapResponse);
assertEquals(PolicyResult.FAILURE_EXCEPTION, result.getKey());
/* If APPC returns failure, PolicyResult is failure */
dmaapResponse.getBody().getOutput().getStatus().setCode(401);
dmaapResponse.getBody().getOutput().getStatus().setMessage(FAILURE);
- result = AppcLcmActorServiceProvider.processResponse(dmaapResponse);
+ result = AppcLcmActor.processResponse(dmaapResponse);
assertEquals(PolicyResult.FAILURE, result.getKey());
/* Test multiple failure codes */
dmaapResponse.getBody().getOutput().getStatus().setCode(406);
dmaapResponse.getBody().getOutput().getStatus().setMessage(FAILURE);
- result = AppcLcmActorServiceProvider.processResponse(dmaapResponse);
+ result = AppcLcmActor.processResponse(dmaapResponse);
assertEquals(PolicyResult.FAILURE, result.getKey());
dmaapResponse.getBody().getOutput().getStatus().setCode(450);
dmaapResponse.getBody().getOutput().getStatus().setMessage(FAILURE);
- result = AppcLcmActorServiceProvider.processResponse(dmaapResponse);
+ result = AppcLcmActor.processResponse(dmaapResponse);
assertEquals(PolicyResult.FAILURE, result.getKey());
/* If APPC returns partial success, PolicyResult is failure exception */
dmaapResponse.getBody().getOutput().getStatus().setCode(500);
dmaapResponse.getBody().getOutput().getStatus().setMessage("PARTIAL SUCCESS");
- result = AppcLcmActorServiceProvider.processResponse(dmaapResponse);
+ result = AppcLcmActor.processResponse(dmaapResponse);
assertEquals(PolicyResult.FAILURE_EXCEPTION, result.getKey());
/* If APPC returns partial failure, PolicyResult is failure exception */
dmaapResponse.getBody().getOutput().getStatus().setCode(501);
dmaapResponse.getBody().getOutput().getStatus().setMessage(PARTIAL_FAILURE);
- result = AppcLcmActorServiceProvider.processResponse(dmaapResponse);
+ result = AppcLcmActor.processResponse(dmaapResponse);
assertEquals(PolicyResult.FAILURE_EXCEPTION, result.getKey());
/* Test multiple partial failure codes */
dmaapResponse.getBody().getOutput().getStatus().setCode(599);
dmaapResponse.getBody().getOutput().getStatus().setMessage(PARTIAL_FAILURE);
- result = AppcLcmActorServiceProvider.processResponse(dmaapResponse);
+ result = AppcLcmActor.processResponse(dmaapResponse);
assertEquals(PolicyResult.FAILURE_EXCEPTION, result.getKey());
dmaapResponse.getBody().getOutput().getStatus().setCode(550);
dmaapResponse.getBody().getOutput().getStatus().setMessage(PARTIAL_FAILURE);
- result = AppcLcmActorServiceProvider.processResponse(dmaapResponse);
+ result = AppcLcmActor.processResponse(dmaapResponse);
assertEquals(PolicyResult.FAILURE_EXCEPTION, result.getKey());
/* If APPC code is unknown to Policy, PolicyResult is failure exception */
dmaapResponse.getBody().getOutput().getStatus().setCode(700);
dmaapResponse.getBody().getOutput().getStatus().setMessage("UNKNOWN");
- result = AppcLcmActorServiceProvider.processResponse(dmaapResponse);
+ result = AppcLcmActor.processResponse(dmaapResponse);
assertEquals(PolicyResult.FAILURE_EXCEPTION, result.getKey());
}
@@ -349,7 +349,7 @@ public class AppcLcmActorServiceProviderTest {
*/
@Test
public void testMethods() {
- AppcLcmActorServiceProvider sp = new AppcLcmActorServiceProvider();
+ AppcLcmActor sp = new AppcLcmActor();
assertEquals("APPC", sp.actor());
assertEquals(4, sp.recipes().size());
@@ -366,11 +366,11 @@ public class AppcLcmActorServiceProviderTest {
// when
AppcLcmDmaapWrapper migrateRequest =
- AppcLcmActorServiceProvider.constructRequest(onsetEvent, operation, migratePolicy, VNF01);
+ AppcLcmActor.constructRequest(onsetEvent, operation, migratePolicy, VNF01);
AppcLcmDmaapWrapper rebuildRequest =
- AppcLcmActorServiceProvider.constructRequest(onsetEvent, operation, rebuildPolicy, VNF01);
+ AppcLcmActor.constructRequest(onsetEvent, operation, rebuildPolicy, VNF01);
AppcLcmDmaapWrapper restartRequest =
- AppcLcmActorServiceProvider.constructRequest(onsetEvent, operation, restartPolicy, VNF01);
+ AppcLcmActor.constructRequest(onsetEvent, operation, restartPolicy, VNF01);
// then
assertNull(migrateRequest.getBody().getInput().getPayload());
@@ -386,9 +386,9 @@ public class AppcLcmActorServiceProviderTest {
// when
AppcLcmDmaapWrapper noPayloadRequest =
- AppcLcmActorServiceProvider.constructRequest(onsetEvent, operation, noPayloadPolicy, VNF01);
+ AppcLcmActor.constructRequest(onsetEvent, operation, noPayloadPolicy, VNF01);
AppcLcmDmaapWrapper emptyPayloadRequest =
- AppcLcmActorServiceProvider.constructRequest(onsetEvent, operation, emptyPayloadPolicy, VNF01);
+ AppcLcmActor.constructRequest(onsetEvent, operation, emptyPayloadPolicy, VNF01);
// then
assertNull(noPayloadRequest.getBody().getInput().getPayload());
@@ -404,7 +404,7 @@ public class AppcLcmActorServiceProviderTest {
// when
AppcLcmDmaapWrapper dmaapRequest =
- AppcLcmActorServiceProvider.constructRequest(onsetEvent, operation, otherPolicy, VNF01);
+ AppcLcmActor.constructRequest(onsetEvent, operation, otherPolicy, VNF01);
// then
assertEquals("{\"requestParameters\": {\"host-ip-address\":\"10.183.37.25\"}}",
@@ -424,7 +424,7 @@ public class AppcLcmActorServiceProviderTest {
// when
AppcLcmDmaapWrapper dmaapRequest =
- AppcLcmActorServiceProvider.constructRequest(onsetEvent, operation, otherPolicy, VNF01);
+ AppcLcmActor.constructRequest(onsetEvent, operation, otherPolicy, VNF01);
// then
assertEquals(dmaapRequest.getBody().getInput().getPayload(), "{\"requestParameters\": "
diff --git a/models-interactions/model-actors/actor.cds/src/main/java/org/onap/policy/controlloop/actor/cds/CdsActorServiceProvider.java b/models-interactions/model-actors/actor.cds/src/main/java/org/onap/policy/controlloop/actor/cds/CdsActor.java
index 45ef34495..d630d18ae 100644
--- a/models-interactions/model-actors/actor.cds/src/main/java/org/onap/policy/controlloop/actor/cds/CdsActorServiceProvider.java
+++ b/models-interactions/model-actors/actor.cds/src/main/java/org/onap/policy/controlloop/actor/cds/CdsActor.java
@@ -58,15 +58,15 @@ import org.slf4j.LoggerFactory;
* CDS is an unusual actor in that it uses a single, generic operator to initiate all
* operation types. The action taken is always the same, only the operation name changes.
*/
-public class CdsActorServiceProvider extends ActorImpl {
+public class CdsActor extends ActorImpl {
public static final String NAME = CdsActorConstants.CDS_ACTOR;
- private static final Logger LOGGER = LoggerFactory.getLogger(CdsActorServiceProvider.class);
+ private static final Logger LOGGER = LoggerFactory.getLogger(CdsActor.class);
/**
* Constructs the object.
*/
- public CdsActorServiceProvider() {
+ public CdsActor() {
super(CdsActorConstants.CDS_ACTOR);
addOperator(new GrpcOperator(CdsActorConstants.CDS_ACTOR, GrpcOperation.NAME, GrpcOperation::new));
diff --git a/models-interactions/model-actors/actor.cds/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor b/models-interactions/model-actors/actor.cds/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor
index e91d41989..69d1780bc 100644
--- a/models-interactions/model-actors/actor.cds/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor
+++ b/models-interactions/model-actors/actor.cds/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor
@@ -1 +1 @@
-org.onap.policy.controlloop.actor.cds.CdsActorServiceProvider
+org.onap.policy.controlloop.actor.cds.CdsActor
diff --git a/models-interactions/model-actors/actor.cds/src/test/java/org/onap/policy/controlloop/actor/cds/CdsActorServiceProviderTest.java b/models-interactions/model-actors/actor.cds/src/test/java/org/onap/policy/controlloop/actor/cds/CdsActorTest.java
index 73787da3f..706f170fb 100644
--- a/models-interactions/model-actors/actor.cds/src/test/java/org/onap/policy/controlloop/actor/cds/CdsActorServiceProviderTest.java
+++ b/models-interactions/model-actors/actor.cds/src/test/java/org/onap/policy/controlloop/actor/cds/CdsActorTest.java
@@ -55,13 +55,13 @@ import org.onap.policy.cds.client.CdsProcessorGrpcClient;
import org.onap.policy.cds.properties.CdsServerProperties;
import org.onap.policy.controlloop.ControlLoopOperation;
import org.onap.policy.controlloop.VirtualControlLoopEvent;
-import org.onap.policy.controlloop.actor.cds.CdsActorServiceProvider.CdsActorServiceManager;
+import org.onap.policy.controlloop.actor.cds.CdsActor.CdsActorServiceManager;
import org.onap.policy.controlloop.actor.cds.constants.CdsActorConstants;
import org.onap.policy.controlloop.actor.test.BasicActor;
import org.onap.policy.controlloop.actorserviceprovider.Operator;
import org.onap.policy.controlloop.policy.Policy;
-public class CdsActorServiceProviderTest extends BasicActor {
+public class CdsActorTest extends BasicActor {
private static final String CDS_BLUEPRINT_NAME = "vfw-cds";
private static final String CDS_BLUEPRINT_VERSION = "1.0.0";
@@ -71,7 +71,7 @@ public class CdsActorServiceProviderTest extends BasicActor {
@Mock
private CdsProcessorGrpcClient cdsClient;
- private CdsActorServiceProvider cdsActor;
+ private CdsActor cdsActor;
private Policy policy;
private CdsServerProperties cdsProps;
private Map<String, String> aaiParams;
@@ -114,7 +114,7 @@ public class CdsActorServiceProviderTest extends BasicActor {
when(cdsClient.sendRequest(any(ExecutionServiceInput.class))).thenReturn(mock(CountDownLatch.class));
// Setup the cdsActor
- cdsActor = new CdsActorServiceProvider();
+ cdsActor = new CdsActor();
// Setup onset event
onset = new VirtualControlLoopEvent();
@@ -138,7 +138,7 @@ public class CdsActorServiceProviderTest extends BasicActor {
@Test
public void testGetOperator() {
- CdsActorServiceProvider sp = new CdsActorServiceProvider();
+ CdsActor sp = new CdsActor();
// should always return the same operator regardless of the name
Operator oper = sp.getOperator("unknown");
@@ -206,7 +206,7 @@ public class CdsActorServiceProviderTest extends BasicActor {
any(TimeUnit.class));
when(cdsClient.sendRequest(any(ExecutionServiceInput.class))).thenReturn(countDownLatch);
- CdsActorServiceProvider.CdsActorServiceManager cdsActorSvcMgr = cdsActor.new CdsActorServiceManager();
+ CdsActor.CdsActorServiceManager cdsActorSvcMgr = cdsActor.new CdsActorServiceManager();
CdsResponse response =
cdsActorSvcMgr.sendRequestToCds(cdsClient, cdsProps, ExecutionServiceInput.newBuilder().build());
assertTrue(Thread.interrupted());
@@ -216,7 +216,7 @@ public class CdsActorServiceProviderTest extends BasicActor {
@Test
public void testSendRequestToCdsLatchTimedOut() {
- CdsActorServiceProvider.CdsActorServiceManager cdsActorSvcMgr = cdsActor.new CdsActorServiceManager();
+ CdsActor.CdsActorServiceManager cdsActorSvcMgr = cdsActor.new CdsActorServiceManager();
CdsResponse response =
cdsActorSvcMgr.sendRequestToCds(cdsClient, cdsProps, ExecutionServiceInput.newBuilder().build());
assertNotNull(response);
diff --git a/models-interactions/model-actors/actor.guard/src/main/java/org/onap/policy/controlloop/actor/guard/GuardActorServiceProvider.java b/models-interactions/model-actors/actor.guard/src/main/java/org/onap/policy/controlloop/actor/guard/GuardActor.java
index 1cf09d399..59b509291 100644
--- a/models-interactions/model-actors/actor.guard/src/main/java/org/onap/policy/controlloop/actor/guard/GuardActorServiceProvider.java
+++ b/models-interactions/model-actors/actor.guard/src/main/java/org/onap/policy/controlloop/actor/guard/GuardActor.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * SdncActorServiceProvider
+ * ONAP
* ================================================================================
* Copyright (C) 2018-2019 Huawei Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2019 Nordix Foundation.
@@ -25,14 +25,14 @@ package org.onap.policy.controlloop.actor.guard;
import org.onap.policy.controlloop.actorserviceprovider.impl.HttpActor;
import org.onap.policy.controlloop.actorserviceprovider.impl.OperationPartial;
-public class GuardActorServiceProvider extends HttpActor<GuardActorParams> {
+public class GuardActor extends HttpActor<GuardActorParams> {
// actor name
public static final String NAME = OperationPartial.GUARD_ACTOR_NAME;
/**
* Constructs the object.
*/
- public GuardActorServiceProvider() {
+ public GuardActor() {
super(NAME, GuardActorParams.class);
addOperator(new DecisionOperator(NAME, DecisionOperation.NAME, DecisionOperation::new));
diff --git a/models-interactions/model-actors/actor.guard/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor b/models-interactions/model-actors/actor.guard/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor
index dd4368504..16d7591fa 100644
--- a/models-interactions/model-actors/actor.guard/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor
+++ b/models-interactions/model-actors/actor.guard/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor
@@ -1 +1 @@
-org.onap.policy.controlloop.actor.guard.GuardActorServiceProvider
+org.onap.policy.controlloop.actor.guard.GuardActor
diff --git a/models-interactions/model-actors/actor.guard/src/test/java/org/onap/policy/controlloop/actor/guard/GuardActorServiceProviderTest.java b/models-interactions/model-actors/actor.guard/src/test/java/org/onap/policy/controlloop/actor/guard/GuardActorTest.java
index 0ad8161c6..e5c3f139d 100644
--- a/models-interactions/model-actors/actor.guard/src/test/java/org/onap/policy/controlloop/actor/guard/GuardActorServiceProviderTest.java
+++ b/models-interactions/model-actors/actor.guard/src/test/java/org/onap/policy/controlloop/actor/guard/GuardActorTest.java
@@ -28,11 +28,11 @@ import java.util.stream.Collectors;
import org.junit.Test;
import org.onap.policy.controlloop.actor.test.BasicActor;
-public class GuardActorServiceProviderTest extends BasicActor {
+public class GuardActorTest extends BasicActor {
@Test
public void test() {
- final GuardActorServiceProvider prov = new GuardActorServiceProvider();
+ final GuardActor prov = new GuardActor();
// verify that it has the operators we expect
var expected = Arrays.asList(DecisionOperation.NAME).stream().sorted().collect(Collectors.toList());
@@ -41,7 +41,7 @@ public class GuardActorServiceProviderTest extends BasicActor {
assertEquals(expected.toString(), actual.toString());
// verify that it all plugs into the ActorService
- verifyActorService(GuardActorServiceProvider.NAME, "service.yaml");
+ verifyActorService(GuardActor.NAME, "service.yaml");
assertTrue(prov.getOperator(DecisionOperation.NAME) instanceof DecisionOperator);
}
diff --git a/models-interactions/model-actors/actor.sdnc/src/main/java/org/onap/policy/controlloop/actor/sdnc/SdncActorServiceProvider.java b/models-interactions/model-actors/actor.sdnc/src/main/java/org/onap/policy/controlloop/actor/sdnc/SdncActor.java
index cd9ad1ac2..a5cf65f34 100644
--- a/models-interactions/model-actors/actor.sdnc/src/main/java/org/onap/policy/controlloop/actor/sdnc/SdncActorServiceProvider.java
+++ b/models-interactions/model-actors/actor.sdnc/src/main/java/org/onap/policy/controlloop/actor/sdnc/SdncActor.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * SdncActorServiceProvider
+ * ONAP
* ================================================================================
* Copyright (C) 2018-2019 Huawei Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2019 Nordix Foundation.
@@ -47,8 +47,8 @@ import org.onap.policy.sdnc.SdncRequest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class SdncActorServiceProvider extends HttpActor<HttpActorParams> {
- private static final Logger logger = LoggerFactory.getLogger(SdncActorServiceProvider.class);
+public class SdncActor extends HttpActor<HttpActorParams> {
+ private static final Logger logger = LoggerFactory.getLogger(SdncActor.class);
public static final String NAME = "SDNC";
@@ -75,7 +75,7 @@ public class SdncActorServiceProvider extends HttpActor<HttpActorParams> {
/**
* Constructs the object.
*/
- public SdncActorServiceProvider() {
+ public SdncActor() {
super(NAME, HttpActorParams.class);
addOperator(new HttpOperator(NAME, RerouteOperation.NAME, RerouteOperation::new));
diff --git a/models-interactions/model-actors/actor.sdnc/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor b/models-interactions/model-actors/actor.sdnc/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor
index f4d1e975e..0c66fdf75 100644
--- a/models-interactions/model-actors/actor.sdnc/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor
+++ b/models-interactions/model-actors/actor.sdnc/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor
@@ -1 +1 @@
-org.onap.policy.controlloop.actor.sdnc.SdncActorServiceProvider \ No newline at end of file
+org.onap.policy.controlloop.actor.sdnc.SdncActor
diff --git a/models-interactions/model-actors/actor.sdnc/src/test/java/org/onap/policy/controlloop/actor/sdnc/SdncActorServiceProviderTest.java b/models-interactions/model-actors/actor.sdnc/src/test/java/org/onap/policy/controlloop/actor/sdnc/SdncActorTest.java
index 752cb9125..020b09e8c 100644
--- a/models-interactions/model-actors/actor.sdnc/src/test/java/org/onap/policy/controlloop/actor/sdnc/SdncActorServiceProviderTest.java
+++ b/models-interactions/model-actors/actor.sdnc/src/test/java/org/onap/policy/controlloop/actor/sdnc/SdncActorTest.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * TestSdncActorServiceProvider
+ * ONAP
* ================================================================================
* Copyright (C) 2018-2019 Huawei. All rights reserved.
* Modifications Copyright (C) 2018-2020 AT&T Corp. All rights reserved.
@@ -40,7 +40,7 @@ import org.onap.policy.controlloop.actor.test.BasicActor;
import org.onap.policy.controlloop.policy.Policy;
import org.onap.policy.sdnc.SdncRequest;
-public class SdncActorServiceProviderTest extends BasicActor {
+public class SdncActorTest extends BasicActor {
private static final String REROUTE = RerouteOperation.NAME;
@@ -61,7 +61,7 @@ public class SdncActorServiceProviderTest extends BasicActor {
@Test
public void testSdncActorServiceProvider() {
- final SdncActorServiceProvider prov = new SdncActorServiceProvider();
+ final SdncActor prov = new SdncActor();
// verify that it has the operators we expect
var expected = Arrays.asList(BandwidthOnDemandOperation.NAME, RerouteOperation.NAME).stream().sorted()
@@ -71,7 +71,7 @@ public class SdncActorServiceProviderTest extends BasicActor {
assertEquals(expected.toString(), actual.toString());
// verify that it all plugs into the ActorService
- verifyActorService(SdncActorServiceProvider.NAME, "service.yaml");
+ verifyActorService(SdncActor.NAME, "service.yaml");
}
@Test
@@ -82,7 +82,7 @@ public class SdncActorServiceProviderTest extends BasicActor {
Policy policy = new Policy();
policy.setRecipe(REROUTE);
- SdncActorServiceProvider provider = new SdncActorServiceProvider();
+ SdncActor provider = new SdncActor();
assertNull(provider.constructRequest(onset, operation, policy));
onset.getAai().put("network-information.network-id", "network-5555");
@@ -113,7 +113,7 @@ public class SdncActorServiceProviderTest extends BasicActor {
@Test
public void testMethods() {
- SdncActorServiceProvider sp = new SdncActorServiceProvider();
+ SdncActor sp = new SdncActor();
assertEquals("SDNC", sp.actor());
assertEquals(1, sp.recipes().size());
diff --git a/models-interactions/model-actors/actor.sdnr/src/main/java/org/onap/policy/controlloop/actor/sdnr/SdnrActorServiceProvider.java b/models-interactions/model-actors/actor.sdnr/src/main/java/org/onap/policy/controlloop/actor/sdnr/SdnrActor.java
index a43dcf774..b9f477d30 100644
--- a/models-interactions/model-actors/actor.sdnr/src/main/java/org/onap/policy/controlloop/actor/sdnr/SdnrActorServiceProvider.java
+++ b/models-interactions/model-actors/actor.sdnr/src/main/java/org/onap/policy/controlloop/actor/sdnr/SdnrActor.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * SdnrActorServiceProvider
+ * ONAP
* ================================================================================
* Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
@@ -48,13 +48,13 @@ import org.slf4j.LoggerFactory;
* SDNR is an unusual actor in that it uses a single, generic operator to initiate all
* operation types. The action taken is always the same, only the operation name changes.
*/
-public class SdnrActorServiceProvider extends BidirectionalTopicActor<BidirectionalTopicActorParams> {
+public class SdnrActor extends BidirectionalTopicActor<BidirectionalTopicActorParams> {
public static final String NAME = "SDNR";
// TODO old code: remove lines down to **HERE**
- private static final Logger logger = LoggerFactory.getLogger(SdnrActorServiceProvider.class);
+ private static final Logger logger = LoggerFactory.getLogger(SdnrActor.class);
// Strings for targets
private static final String TARGET_VNF = "VNF";
@@ -77,7 +77,7 @@ public class SdnrActorServiceProvider extends BidirectionalTopicActor<Bidirectio
/**
* Constructor.
*/
- public SdnrActorServiceProvider() {
+ public SdnrActor() {
super(NAME, BidirectionalTopicActorParams.class);
addOperator(new BidirectionalTopicOperator(NAME, SdnrOperation.NAME, this, SdnrOperation.SELECTOR_KEYS,
diff --git a/models-interactions/model-actors/actor.sdnr/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor b/models-interactions/model-actors/actor.sdnr/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor
index c8d5e4c41..af71a9ff3 100644
--- a/models-interactions/model-actors/actor.sdnr/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor
+++ b/models-interactions/model-actors/actor.sdnr/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor
@@ -1 +1 @@
-org.onap.policy.controlloop.actor.sdnr.SdnrActorServiceProvider
+org.onap.policy.controlloop.actor.sdnr.SdnrActor
diff --git a/models-interactions/model-actors/actor.sdnr/src/test/java/org/onap/policy/controlloop/actor/sdnr/SdnrActorServiceProviderTest.java b/models-interactions/model-actors/actor.sdnr/src/test/java/org/onap/policy/controlloop/actor/sdnr/SdnrActorTest.java
index 799872d08..48c16d05a 100644
--- a/models-interactions/model-actors/actor.sdnr/src/test/java/org/onap/policy/controlloop/actor/sdnr/SdnrActorServiceProviderTest.java
+++ b/models-interactions/model-actors/actor.sdnr/src/test/java/org/onap/policy/controlloop/actor/sdnr/SdnrActorTest.java
@@ -1,8 +1,8 @@
/*-
- * SdnrActorServiceProviderTest
+ * ONAP
* ================================================================================
* Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -48,11 +48,11 @@ import org.onap.policy.sdnr.util.Serialization;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class SdnrActorServiceProviderTest extends BasicActor {
+public class SdnrActorTest extends BasicActor {
private static final String MODIFY_CONFIG = "ModifyConfig";
- private static final Logger logger = LoggerFactory.getLogger(SdnrActorServiceProviderTest.class);
+ private static final Logger logger = LoggerFactory.getLogger(SdnrActorTest.class);
private static final VirtualControlLoopEvent onsetEvent;
private static final ControlLoopOperation operation;
@@ -99,7 +99,7 @@ public class SdnrActorServiceProviderTest extends BasicActor {
@Test
public void testConstructor() {
- SdnrActorServiceProvider prov = new SdnrActorServiceProvider();
+ SdnrActor prov = new SdnrActor();
assertEquals(0, prov.getSequenceNumber());
// verify that it has the operators we expect
@@ -112,12 +112,12 @@ public class SdnrActorServiceProviderTest extends BasicActor {
@Test
public void testActorService() {
// verify that it all plugs into the ActorService
- verifyActorService(SdnrActorServiceProvider.NAME, "service.yaml");
+ verifyActorService(SdnrActor.NAME, "service.yaml");
}
@Test
public void testGetOperator() {
- SdnrActorServiceProvider sp = new SdnrActorServiceProvider();
+ SdnrActor sp = new SdnrActor();
// should always return the same operator regardless of the name
Operator oper = sp.getOperator("unknown");
@@ -128,7 +128,7 @@ public class SdnrActorServiceProviderTest extends BasicActor {
@Test
public void testGetControlLoopResponse() {
PciRequest sdnrRequest;
- sdnrRequest = SdnrActorServiceProvider.constructRequest(onsetEvent, operation, policy).getBody();
+ sdnrRequest = SdnrActor.constructRequest(onsetEvent, operation, policy).getBody();
PciResponse sdnrResponse = new PciResponse(sdnrRequest);
sdnrResponse.getStatus().setCode(200);
sdnrResponse.getStatus().setValue("SDNR success");
@@ -139,7 +139,7 @@ public class SdnrActorServiceProviderTest extends BasicActor {
PciResponseWrapper pciResponseWrapper = new PciResponseWrapper();
pciResponseWrapper.setBody(sdnrResponse);
- ControlLoopResponse clRsp = SdnrActorServiceProvider.getControlLoopResponse(pciResponseWrapper, onsetEvent);
+ ControlLoopResponse clRsp = SdnrActor.getControlLoopResponse(pciResponseWrapper, onsetEvent);
assertEquals(clRsp.getClosedLoopControlName(), onsetEvent.getClosedLoopControlName());
assertEquals(clRsp.getRequestId(), onsetEvent.getRequestId());
assertEquals(clRsp.getPolicyName(), onsetEvent.getPolicyName());
@@ -154,7 +154,7 @@ public class SdnrActorServiceProviderTest extends BasicActor {
public void testConstructModifyConfigRequest() {
PciRequest sdnrRequest;
- sdnrRequest = SdnrActorServiceProvider.constructRequest(onsetEvent, operation, policy).getBody();
+ sdnrRequest = SdnrActor.constructRequest(onsetEvent, operation, policy).getBody();
/* The service provider must return a non null SDNR request */
assertNotNull(sdnrRequest);
@@ -193,7 +193,7 @@ public class SdnrActorServiceProviderTest extends BasicActor {
@Test
public void testMethods() {
- SdnrActorServiceProvider sp = new SdnrActorServiceProvider();
+ SdnrActor sp = new SdnrActor();
assertEquals("SDNR", sp.actor());
assertEquals(1, sp.recipes().size());
diff --git a/models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/SoActorServiceProvider.java b/models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/SoActor.java
index 642e2b455..2b2fddec5 100644
--- a/models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/SoActorServiceProvider.java
+++ b/models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/SoActor.java
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * SOActorServiceProvider
+ * ONAP
* ================================================================================
* Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2019 Nordix Foundation.
@@ -53,8 +53,8 @@ import org.onap.policy.so.util.Serialization;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class SoActorServiceProvider extends HttpActor<HttpPollingActorParams> {
- private static final Logger logger = LoggerFactory.getLogger(SoActorServiceProvider.class);
+public class SoActor extends HttpActor<HttpPollingActorParams> {
+ private static final Logger logger = LoggerFactory.getLogger(SoActor.class);
public static final String NAME = "SO";
@@ -97,7 +97,7 @@ public class SoActorServiceProvider extends HttpActor<HttpPollingActorParams> {
/**
* Constructs the object.
*/
- public SoActorServiceProvider() {
+ public SoActor() {
super(NAME, HttpPollingActorParams.class);
addOperator(new HttpPollingOperator(NAME, VfModuleCreate.NAME, VfModuleCreate::new));
diff --git a/models-interactions/model-actors/actor.so/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor b/models-interactions/model-actors/actor.so/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor
index a955eb71c..365c8f980 100644
--- a/models-interactions/model-actors/actor.so/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor
+++ b/models-interactions/model-actors/actor.so/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor
@@ -1 +1 @@
-org.onap.policy.controlloop.actor.so.SoActorServiceProvider \ No newline at end of file
+org.onap.policy.controlloop.actor.so.SoActor
diff --git a/models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/SoActorServiceProviderTest.java b/models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/SoActorTest.java
index cdd8a334c..783380855 100644
--- a/models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/SoActorServiceProviderTest.java
+++ b/models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/SoActorTest.java
@@ -1,10 +1,9 @@
/*
* ============LICENSE_START=======================================================
- * TestSOActorServiceProvider
+ * ONAP
* ================================================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
- * ================================================================================
- * Modifications Copyright (C) 2018-2019 AT&T. All rights reserved.
+ * Modifications Copyright (C) 2018-2020 AT&T. All rights reserved.
* Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -50,7 +49,7 @@ import org.onap.policy.so.SoRequest;
import org.onap.policy.so.SoRequestParameters;
import org.onap.policy.so.util.Serialization;
-public class SoActorServiceProviderTest extends BasicActor {
+public class SoActorTest extends BasicActor {
private static final String C_VALUE = "cvalue";
private static final String A_VALUE = "avalue";
@@ -71,7 +70,7 @@ public class SoActorServiceProviderTest extends BasicActor {
@Test
public void testConstructor() {
- SoActorServiceProvider prov = new SoActorServiceProvider();
+ SoActor prov = new SoActor();
// verify that it has the operators we expect
var expected = Arrays.asList(VfModuleCreate.NAME, VfModuleDelete.NAME).stream().sorted()
@@ -84,18 +83,18 @@ public class SoActorServiceProviderTest extends BasicActor {
@Test
public void testActorService() {
// verify that it all plugs into the ActorService
- verifyActorService(SoActorServiceProvider.NAME, "service.yaml");
+ verifyActorService(SoActor.NAME, "service.yaml");
}
@Test
public void testSendRequest() {
- assertThatCode(() -> SoActorServiceProvider.sendRequest(UUID.randomUUID().toString(), null, null, null, null,
+ assertThatCode(() -> SoActor.sendRequest(UUID.randomUUID().toString(), null, null, null, null,
null)).doesNotThrowAnyException();
}
@Test
public void testMethods() {
- SoActorServiceProvider sp = new SoActorServiceProvider();
+ SoActor sp = new SoActor();
assertEquals("SO", sp.actor());
assertEquals(2, sp.recipes().size());
@@ -121,16 +120,16 @@ public class SoActorServiceProviderTest extends BasicActor {
instantiateTargetCq(policy);
- assertNull(new SoActorServiceProvider().constructRequestCq(onset, operation, policy, aaiCqResp));
+ assertNull(new SoActor().constructRequestCq(onset, operation, policy, aaiCqResp));
policy.setActor("SO");
- assertNull(new SoActorServiceProvider().constructRequestCq(onset, operation, policy, aaiCqRespMissing));
+ assertNull(new SoActor().constructRequestCq(onset, operation, policy, aaiCqRespMissing));
policy.setRecipe(VF_MODULE_CREATE);
// empty policy payload
- SoRequest request = new SoActorServiceProvider().constructRequestCq(onset, operation, policy, aaiCqResp);
+ SoRequest request = new SoActor().constructRequestCq(onset, operation, policy, aaiCqResp);
assertNotNull(request);
assertEquals("vfModuleName", request.getRequestDetails().getRequestInfo().getInstanceName());
@@ -139,7 +138,7 @@ public class SoActorServiceProviderTest extends BasicActor {
// non-empty policy payload
policy.setPayload(makePayload());
- request = new SoActorServiceProvider().constructRequestCq(onset, operation, policy, aaiCqResp);
+ request = new SoActor().constructRequestCq(onset, operation, policy, aaiCqResp);
assertNotNull(request);
assertEquals(true, request.getRequestDetails().getRequestParameters().isUsePreload());
assertEquals(A_VALUE, request.getRequestDetails().getRequestParameters().getUserParams().get(0).get("akey"));
@@ -148,26 +147,26 @@ public class SoActorServiceProviderTest extends BasicActor {
// payload with config, but no request params
policy.setPayload(makePayload());
- policy.getPayload().remove(SoActorServiceProvider.REQ_PARAM_NM);
- request = new SoActorServiceProvider().constructRequestCq(onset, operation, policy, aaiCqResp);
+ policy.getPayload().remove(SoActor.REQ_PARAM_NM);
+ request = new SoActor().constructRequestCq(onset, operation, policy, aaiCqResp);
assertNotNull(request);
assertNull(request.getRequestDetails().getRequestParameters());
assertNotNull(request.getRequestDetails().getConfigurationParameters());
// payload with request, but no config params
policy.setPayload(makePayload());
- policy.getPayload().remove(SoActorServiceProvider.CONFIG_PARAM_NM);
- request = new SoActorServiceProvider().constructRequestCq(onset, operation, policy, aaiCqResp);
+ policy.getPayload().remove(SoActor.CONFIG_PARAM_NM);
+ request = new SoActor().constructRequestCq(onset, operation, policy, aaiCqResp);
assertNotNull(request);
assertNotNull(request.getRequestDetails().getRequestParameters());
assertNull(request.getRequestDetails().getConfigurationParameters());
// null response
- assertNull(new SoActorServiceProvider().constructRequestCq(onset, operation, policy, null));
+ assertNull(new SoActor().constructRequestCq(onset, operation, policy, null));
instantiateTargetCq(policy);
policy.setRecipe(VF_MODULE_DELETE);
- SoRequest deleteRequest = new SoActorServiceProvider().constructRequestCq(onset, operation, policy, aaiCqResp);
+ SoRequest deleteRequest = new SoActor().constructRequestCq(onset, operation, policy, aaiCqResp);
assertNotNull(deleteRequest);
assertEquals(SoOperationType.DELETE_VF_MODULE, deleteRequest.getOperationType());
@@ -178,12 +177,12 @@ public class SoActorServiceProviderTest extends BasicActor {
policy.setRecipe(VF_MODULE_CREATE);
// null tenant
- assertNull(new SoActorServiceProvider().constructRequestCq(onset, operation, policy, aaiCqRespMissing));
+ assertNull(new SoActor().constructRequestCq(onset, operation, policy, aaiCqRespMissing));
// null service item
- assertNull(new SoActorServiceProvider().constructRequestCq(onset, operation, policy, aaiCqRespMissing));
+ assertNull(new SoActor().constructRequestCq(onset, operation, policy, aaiCqRespMissing));
- assertNull(new SoActorServiceProvider().constructRequestCq(onset, operation, policy, null));
+ assertNull(new SoActor().constructRequestCq(onset, operation, policy, null));
}
/**
@@ -208,8 +207,8 @@ public class SoActorServiceProviderTest extends BasicActor {
private Map<String, String> makePayload() {
Map<String, String> payload = new TreeMap<>();
- payload.put(SoActorServiceProvider.REQ_PARAM_NM, makeReqParams());
- payload.put(SoActorServiceProvider.CONFIG_PARAM_NM, makeConfigParams());
+ payload.put(SoActor.REQ_PARAM_NM, makeReqParams());
+ payload.put(SoActor.CONFIG_PARAM_NM, makeConfigParams());
return payload;
}
diff --git a/models-interactions/model-actors/actor.vfc/src/main/java/org/onap/policy/controlloop/actor/vfc/VfcActorServiceProvider.java b/models-interactions/model-actors/actor.vfc/src/main/java/org/onap/policy/controlloop/actor/vfc/VfcActor.java
index 768ad4c11..cf4173176 100644
--- a/models-interactions/model-actors/actor.vfc/src/main/java/org/onap/policy/controlloop/actor/vfc/VfcActorServiceProvider.java
+++ b/models-interactions/model-actors/actor.vfc/src/main/java/org/onap/policy/controlloop/actor/vfc/VfcActor.java
@@ -36,7 +36,7 @@ import org.onap.policy.vfc.VfcHealAdditionalParams;
import org.onap.policy.vfc.VfcHealRequest;
import org.onap.policy.vfc.VfcRequest;
-public class VfcActorServiceProvider extends HttpActor<HttpPollingActorParams> {
+public class VfcActor extends HttpActor<HttpPollingActorParams> {
private static final String GENERIC_VNF_ID = "generic-vnf.vnf-id";
// TODO old code: remove lines down to **HERE**
@@ -61,7 +61,7 @@ public class VfcActorServiceProvider extends HttpActor<HttpPollingActorParams> {
/**
* Constructor.
*/
- public VfcActorServiceProvider() {
+ public VfcActor() {
super(NAME, HttpPollingActorParams.class);
addOperator(new HttpPollingOperator(NAME, Restart.NAME, Restart::new));
diff --git a/models-interactions/model-actors/actor.vfc/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor b/models-interactions/model-actors/actor.vfc/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor
index e43c726cf..a9e6a1d9b 100644
--- a/models-interactions/model-actors/actor.vfc/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor
+++ b/models-interactions/model-actors/actor.vfc/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor
@@ -1 +1 @@
-org.onap.policy.controlloop.actor.vfc.VfcActorServiceProvider
+org.onap.policy.controlloop.actor.vfc.VfcActor
diff --git a/models-interactions/model-actors/actor.vfc/src/test/java/org/onap/policy/controlloop/actor/vfc/VfcActorServiceProviderTest.java b/models-interactions/model-actors/actor.vfc/src/test/java/org/onap/policy/controlloop/actor/vfc/VfcActorTest.java
index 9e05f22e1..bd4bb0980 100644
--- a/models-interactions/model-actors/actor.vfc/src/test/java/org/onap/policy/controlloop/actor/vfc/VfcActorServiceProviderTest.java
+++ b/models-interactions/model-actors/actor.vfc/src/test/java/org/onap/policy/controlloop/actor/vfc/VfcActorTest.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * ONAP - Policy Drools Applications
+ * ONAP
* ================================================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
* Modifications Copyright (C) 2018-2019 AT&T Corp. All rights reserved.
@@ -45,7 +45,7 @@ import org.onap.policy.controlloop.policy.Policy;
import org.onap.policy.simulators.Util;
import org.onap.policy.vfc.VfcRequest;
-public class VfcActorServiceProviderTest extends BasicActor {
+public class VfcActorTest extends BasicActor {
private static final String DOROTHY_GALE_1939 = "dorothy.gale.1939";
private static final String CQ_RESPONSE_JSON = "aai/AaiCqResponse.json";
@@ -67,7 +67,7 @@ public class VfcActorServiceProviderTest extends BasicActor {
@Test
public void testConstructor() {
- VfcActorServiceProvider prov = new VfcActorServiceProvider();
+ VfcActor prov = new VfcActor();
assertEquals(0, prov.getSequenceNumber());
// verify that it has the operators we expect
@@ -80,12 +80,12 @@ public class VfcActorServiceProviderTest extends BasicActor {
@Test
public void testActorService() {
// verify that it all plugs into the ActorService
- verifyActorService(VfcActorServiceProvider.NAME, "service.yaml");
+ verifyActorService(VfcActor.NAME, "service.yaml");
}
@Test
public void testMethods() {
- VfcActorServiceProvider sp = new VfcActorServiceProvider();
+ VfcActor sp = new VfcActor();
assertEquals("VFC", sp.actor());
assertEquals(1, sp.recipes().size());
@@ -102,31 +102,31 @@ public class VfcActorServiceProviderTest extends BasicActor {
Policy policy = new Policy();
policy.setRecipe("GoToOz");
- assertNull(VfcActorServiceProvider.constructRequestCq(onset, operation, policy, null));
+ assertNull(VfcActor.constructRequestCq(onset, operation, policy, null));
onset.getAai().put("generic-vnf.vnf-id", DOROTHY_GALE_1939);
- assertNull(VfcActorServiceProvider.constructRequestCq(onset, operation, policy, null));
+ assertNull(VfcActor.constructRequestCq(onset, operation, policy, null));
UUID requestId = UUID.randomUUID();
onset.setRequestId(requestId);
- assertNull(VfcActorServiceProvider.constructRequestCq(onset, operation, policy, null));
+ assertNull(VfcActor.constructRequestCq(onset, operation, policy, null));
onset.getAai().put("generic-vnf.vnf-name", "Dorothy");
- assertNull(VfcActorServiceProvider.constructRequestCq(onset, operation, policy, null));
+ assertNull(VfcActor.constructRequestCq(onset, operation, policy, null));
onset.getAai().put("service-instance.service-instance-id", "");
- assertNull(VfcActorServiceProvider.constructRequestCq(onset, operation, policy, null));
+ assertNull(VfcActor.constructRequestCq(onset, operation, policy, null));
- assertNull(VfcActorServiceProvider.constructRequestCq(onset, operation, policy,
+ assertNull(VfcActor.constructRequestCq(onset, operation, policy,
loadAaiResponse(CQ_RESPONSE_JSON)));
policy.setRecipe(RESTART);
- assertNotNull(VfcActorServiceProvider.constructRequestCq(onset, operation, policy,
+ assertNotNull(VfcActor.constructRequestCq(onset, operation, policy,
loadAaiResponse(CQ_RESPONSE_JSON)));
- VfcRequest request = VfcActorServiceProvider.constructRequestCq(onset, operation, policy,
+ VfcRequest request = VfcActor.constructRequestCq(onset, operation, policy,
loadAaiResponse(CQ_RESPONSE_JSON));
assertEquals(requestId, Objects.requireNonNull(request).getRequestId());