diff options
Diffstat (limited to 'models-interactions')
8 files changed, 28 insertions, 28 deletions
diff --git a/models-interactions/model-actors/actor.guard/src/main/java/org/onap/policy/controlloop/actor/guard/GuardOperation.java b/models-interactions/model-actors/actor.guard/src/main/java/org/onap/policy/controlloop/actor/guard/DecisionOperation.java index a21886bf2..6a7b6fd93 100644 --- a/models-interactions/model-actors/actor.guard/src/main/java/org/onap/policy/controlloop/actor/guard/GuardOperation.java +++ b/models-interactions/model-actors/actor.guard/src/main/java/org/onap/policy/controlloop/actor/guard/DecisionOperation.java @@ -55,8 +55,8 @@ import org.slf4j.LoggerFactory; * <dd>generated</dd> * </dl> */ -public class GuardOperation extends HttpOperation<DecisionResponse> { - private static final Logger logger = LoggerFactory.getLogger(GuardOperation.class); +public class DecisionOperation extends HttpOperation<DecisionResponse> { + private static final Logger logger = LoggerFactory.getLogger(DecisionOperation.class); // operation name public static final String NAME = OperationPartial.GUARD_OPERATION_NAME; @@ -80,7 +80,7 @@ public class GuardOperation extends HttpOperation<DecisionResponse> { * @param params operation parameters * @param config configuration for this operation */ - public GuardOperation(ControlLoopOperationParams params, HttpConfig config) { + public DecisionOperation(ControlLoopOperationParams params, HttpConfig config) { super(params, config, DecisionResponse.class); this.config = (GuardConfig) config; } diff --git a/models-interactions/model-actors/actor.guard/src/main/java/org/onap/policy/controlloop/actor/guard/GuardOperator.java b/models-interactions/model-actors/actor.guard/src/main/java/org/onap/policy/controlloop/actor/guard/DecisionOperator.java index b3a47fd71..6375e95eb 100644 --- a/models-interactions/model-actors/actor.guard/src/main/java/org/onap/policy/controlloop/actor/guard/GuardOperator.java +++ b/models-interactions/model-actors/actor.guard/src/main/java/org/onap/policy/controlloop/actor/guard/DecisionOperator.java @@ -32,9 +32,9 @@ import org.onap.policy.controlloop.actorserviceprovider.parameters.ParameterVali /** * Guard Operator. */ -public class GuardOperator extends HttpOperator { +public class DecisionOperator extends HttpOperator { - public GuardOperator(String actorName, String name, + public DecisionOperator(String actorName, String name, @SuppressWarnings("rawtypes") OperationMaker<HttpConfig, HttpOperation> operationMaker) { super(actorName, name, operationMaker); } 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/GuardActorServiceProvider.java index 0053213f5..1cf09d399 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/GuardActorServiceProvider.java @@ -35,6 +35,6 @@ public class GuardActorServiceProvider extends HttpActor<GuardActorParams> { public GuardActorServiceProvider() { super(NAME, GuardActorParams.class); - addOperator(new GuardOperator(NAME, GuardOperation.NAME, GuardOperation::new)); + addOperator(new DecisionOperator(NAME, DecisionOperation.NAME, DecisionOperation::new)); } } diff --git a/models-interactions/model-actors/actor.guard/src/test/java/org/onap/policy/controlloop/actor/guard/GuardOperationTest.java b/models-interactions/model-actors/actor.guard/src/test/java/org/onap/policy/controlloop/actor/guard/DecisionOperationTest.java index daf4dff6e..da0ee95b5 100644 --- a/models-interactions/model-actors/actor.guard/src/test/java/org/onap/policy/controlloop/actor/guard/GuardOperationTest.java +++ b/models-interactions/model-actors/actor.guard/src/test/java/org/onap/policy/controlloop/actor/guard/DecisionOperationTest.java @@ -54,7 +54,7 @@ import org.onap.policy.models.decisions.concepts.DecisionRequest; import org.onap.policy.models.decisions.concepts.DecisionResponse; import org.onap.policy.simulators.GuardSimulatorJaxRs; -public class GuardOperationTest extends BasicHttpOperation<DecisionRequest> { +public class DecisionOperationTest extends BasicHttpOperation<DecisionRequest> { @Mock private Consumer<OperationOutcome> started; @@ -62,7 +62,7 @@ public class GuardOperationTest extends BasicHttpOperation<DecisionRequest> { private Consumer<OperationOutcome> completed; private GuardConfig guardConfig; - private GuardOperation oper; + private DecisionOperation oper; /** * Starts the simulator. @@ -105,7 +105,7 @@ public class GuardOperationTest extends BasicHttpOperation<DecisionRequest> { params = params.toBuilder().startCallback(started).completeCallback(completed).build(); - oper = new GuardOperation(params, config); + oper = new DecisionOperation(params, config); } /** @@ -117,7 +117,7 @@ public class GuardOperationTest extends BasicHttpOperation<DecisionRequest> { config = new GuardConfig(blockingExecutor, opParams, HttpClientFactoryInstance.getClientFactory()); params = params.toBuilder().retry(0).timeoutSec(5).executor(blockingExecutor).build(); - oper = new GuardOperation(params, config); + oper = new DecisionOperation(params, config); outcome = oper.start().get(); assertEquals(PolicyResult.SUCCESS, outcome.getResult()); @@ -134,7 +134,7 @@ public class GuardOperationTest extends BasicHttpOperation<DecisionRequest> { params = params.toBuilder().retry(0).timeoutSec(5).executor(blockingExecutor) .payload(Map.of("clname", GuardSimulatorJaxRs.DENY_CLNAME)).build(); - oper = new GuardOperation(params, config); + oper = new DecisionOperation(params, config); outcome = oper.start().get(); assertEquals(PolicyResult.FAILURE, outcome.getResult()); @@ -154,7 +154,7 @@ public class GuardOperationTest extends BasicHttpOperation<DecisionRequest> { assertFalse(future2.isDone()); DecisionResponse resp = new DecisionResponse(); - resp.setStatus(GuardOperation.PERMIT); + resp.setStatus(DecisionOperation.PERMIT); when(rawResponse.readEntity(String.class)).thenReturn(Util.translate("", resp, String.class)); verify(client).post(callbackCaptor.capture(), any(), requestCaptor.capture(), any()); @@ -205,7 +205,7 @@ public class GuardOperationTest extends BasicHttpOperation<DecisionRequest> { // null payload - start with fresh parameters and operation params = params.toBuilder().payload(null).build(); - oper = new GuardOperation(params, config); + oper = new DecisionOperation(params, config); assertThatIllegalArgumentException().isThrownBy(() -> oper.makeRequest()); } diff --git a/models-interactions/model-actors/actor.guard/src/test/java/org/onap/policy/controlloop/actor/guard/GuardOperatorTest.java b/models-interactions/model-actors/actor.guard/src/test/java/org/onap/policy/controlloop/actor/guard/DecisionOperatorTest.java index 36263329a..170bcdf7e 100644 --- a/models-interactions/model-actors/actor.guard/src/test/java/org/onap/policy/controlloop/actor/guard/GuardOperatorTest.java +++ b/models-interactions/model-actors/actor.guard/src/test/java/org/onap/policy/controlloop/actor/guard/DecisionOperatorTest.java @@ -35,7 +35,7 @@ import org.onap.policy.common.endpoints.http.client.HttpClientFactory; import org.onap.policy.controlloop.actorserviceprovider.Util; import org.onap.policy.controlloop.actorserviceprovider.parameters.ParameterValidationRuntimeException; -public class GuardOperatorTest { +public class DecisionOperatorTest { private static final String ACTOR = "my-actor"; private static final String OPERATION = "my-name"; private static final String CLIENT = "my-client"; @@ -53,7 +53,7 @@ public class GuardOperatorTest { private HttpClientFactory factory; - private GuardOperator oper; + private DecisionOperator oper; /** * Initializes fields, including {@link #oper}, and resets the static fields used by @@ -92,7 +92,7 @@ public class GuardOperatorTest { } - private class MyOperator extends GuardOperator { + private class MyOperator extends DecisionOperator { public MyOperator() { super(ACTOR, OPERATION, null); } 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/GuardActorServiceProviderTest.java index 6721ff7d0..0ad8161c6 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/GuardActorServiceProviderTest.java @@ -35,7 +35,7 @@ public class GuardActorServiceProviderTest extends BasicActor { final GuardActorServiceProvider prov = new GuardActorServiceProvider(); // verify that it has the operators we expect - var expected = Arrays.asList(GuardOperation.NAME).stream().sorted().collect(Collectors.toList()); + var expected = Arrays.asList(DecisionOperation.NAME).stream().sorted().collect(Collectors.toList()); var actual = prov.getOperationNames().stream().sorted().collect(Collectors.toList()); assertEquals(expected.toString(), actual.toString()); @@ -43,6 +43,6 @@ public class GuardActorServiceProviderTest extends BasicActor { // verify that it all plugs into the ActorService verifyActorService(GuardActorServiceProvider.NAME, "service.yaml"); - assertTrue(prov.getOperator(GuardOperation.NAME) instanceof GuardOperator); + assertTrue(prov.getOperator(DecisionOperation.NAME) instanceof DecisionOperator); } } diff --git a/models-interactions/model-actors/pom.xml b/models-interactions/model-actors/pom.xml index b2c737930..950142869 100644 --- a/models-interactions/model-actors/pom.xml +++ b/models-interactions/model-actors/pom.xml @@ -1,7 +1,7 @@ <!-- ============LICENSE_START======================================================= Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved. - Modifications Copyright (C) 2019 Nordix Foundation. + Modifications Copyright (C) 2020 Nordix Foundation. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -20,18 +20,18 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <packaging>pom</packaging> - + <parent> <groupId>org.onap.policy.models</groupId> <artifactId>policy-models-interactions</artifactId> <version>2.3.0-SNAPSHOT</version> </parent> - + <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId> <artifactId>model-actors</artifactId> <properties> - <jacoco.dataFile>${project.basedir}/../../../../target/code-coverage/jacoco-ut.exec</jacoco.dataFile> + <jacoco.dataFile>${project.basedir}/../../../target/code-coverage/jacoco-ut.exec</jacoco.dataFile> </properties> <modules> diff --git a/models-interactions/model-impl/pom.xml b/models-interactions/model-impl/pom.xml index 1bb9b33b7..32ee9cf24 100644 --- a/models-interactions/model-impl/pom.xml +++ b/models-interactions/model-impl/pom.xml @@ -3,14 +3,14 @@ controlloop-model-impl ================================================================================ Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved. - Modifications Copyright (C) 2019 Nordix Foundation + Modifications Copyright (C) 2020 Nordix Foundation ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - + http://www.apache.org/licenses/LICENSE-2.0 - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -23,18 +23,18 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <packaging>pom</packaging> - + <parent> <groupId>org.onap.policy.models</groupId> <artifactId>policy-models-interactions</artifactId> <version>2.3.0-SNAPSHOT</version> </parent> - + <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId> <artifactId>model-impl</artifactId> <properties> - <jacoco.dataFile>${project.basedir}/../../../../target/code-coverage/jacoco-ut.exec</jacoco.dataFile> + <jacoco.dataFile>${project.basedir}/../../../target/code-coverage/jacoco-ut.exec</jacoco.dataFile> </properties> <modules> |