summaryrefslogtreecommitdiffstats
path: root/models-interactions/model-actors/actor.vfc
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2020-07-02 09:30:52 -0400
committerJim Hahn <jrh3@att.com>2020-07-02 12:49:44 -0400
commitc6012167b9692eb38bcb479f233543e93c51c998 (patch)
tree7a2a590eb659cd036f8815de9ce894e6099cf92b /models-interactions/model-actors/actor.vfc
parente7ba97a66db5c0a45626aff62f9a167f88da62c1 (diff)
Rename XxxActorServiceProvider to XxxActor
Renamed the actors and their test classes. Addressed review comments: - some license dates Issue-ID: POLICY-2684 Change-Id: Ic9d83e146ef36bb305496d541166cb9f80544025 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'models-interactions/model-actors/actor.vfc')
-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
3 files changed, 16 insertions, 16 deletions
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());