summaryrefslogtreecommitdiffstats
path: root/models-interactions/model-actors/actor.sdnr
diff options
context:
space:
mode:
Diffstat (limited to 'models-interactions/model-actors/actor.sdnr')
-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
3 files changed, 16 insertions, 16 deletions
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());