diff options
18 files changed, 2 insertions, 402 deletions
diff --git a/models/src/main/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantStateChange.java b/models/src/main/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantStateChange.java deleted file mode 100644 index 5f5150077..000000000 --- a/models/src/main/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantStateChange.java +++ /dev/null @@ -1,56 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * Copyright (C) 2021 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. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - * ============LICENSE_END========================================================= - */ - -package org.onap.policy.clamp.controlloop.models.messages.dmaap.participant; - -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; -import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ParticipantState; - -/** - * Class to represent the PARTICIPANT_STATE_CHANGE message that the control loop runtime will send to participants - * to change their state. - */ -@Getter -@Setter -@ToString(callSuper = true) -public class ParticipantStateChange extends ParticipantMessage { - private ParticipantState state; - - /** - * Constructor for instantiating ParticipantStateChange class with message name. - * - */ - public ParticipantStateChange() { - super(ParticipantMessageType.PARTICIPANT_STATE_CHANGE); - } - - /** - * Constructs the object, making a deep copy. - * - * @param source source from which to copy - */ - public ParticipantStateChange(ParticipantStateChange source) { - super(source); - - this.state = source.state; - } -} diff --git a/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantControlLoopStateChangeTest.java b/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantControlLoopStateChangeTest.java index c37268ac0..789da1e64 100644 --- a/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantControlLoopStateChangeTest.java +++ b/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantControlLoopStateChangeTest.java @@ -37,7 +37,7 @@ class ParticipantControlLoopStateChangeTest { @Test void testCopyConstructor() { - assertThatThrownBy(() -> new ParticipantStateChange(null)).isInstanceOf(NullPointerException.class); + assertThatThrownBy(() -> new ParticipantControlLoopStateChange(null)).isInstanceOf(NullPointerException.class); ParticipantControlLoopStateChange orig = new ParticipantControlLoopStateChange(); diff --git a/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantHealthCheckTest.java b/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantHealthCheckTest.java index 7f595fbbb..52f1cc480 100644 --- a/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantHealthCheckTest.java +++ b/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantHealthCheckTest.java @@ -37,7 +37,7 @@ class ParticipantHealthCheckTest { @Test void testCopyConstructor() { - assertThatThrownBy(() -> new ParticipantStateChange(null)).isInstanceOf(NullPointerException.class); + assertThatThrownBy(() -> new ParticipantHealthCheck(null)).isInstanceOf(NullPointerException.class); ParticipantHealthCheck orig = new ParticipantHealthCheck(); diff --git a/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantStateChangeTest.java b/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantStateChangeTest.java deleted file mode 100644 index 6c73c6d3e..000000000 --- a/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantStateChangeTest.java +++ /dev/null @@ -1,61 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * Copyright (C) 2021 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. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - * ============LICENSE_END========================================================= - */ - -package org.onap.policy.clamp.controlloop.models.messages.dmaap.participant; - -import static org.assertj.core.api.Assertions.assertThatThrownBy; -import static org.junit.Assert.assertEquals; -import static org.onap.policy.clamp.controlloop.models.messages.dmaap.participant.ParticipantMessageUtils.removeVariableFields; - -import java.time.Instant; -import java.util.UUID; -import org.junit.jupiter.api.Test; -import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ParticipantState; -import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier; - -/** - * Test the copy constructor and the other methods. - */ -class ParticipantStateChangeTest { - - @Test - void testCopyConstructor() { - assertThatThrownBy(() -> new ParticipantStateChange(null)).isInstanceOf(NullPointerException.class); - - ParticipantStateChange orig = new ParticipantStateChange(); - - // verify with null values - assertEquals(removeVariableFields(orig.toString()), - removeVariableFields(new ParticipantStateChange(orig).toString())); - - // verify with all values - ToscaConceptIdentifier id = new ToscaConceptIdentifier(); - id.setName("id"); - id.setVersion("1.2.3"); - orig.setControlLoopId(id); - orig.setParticipantId(id); - orig.setMessageId(UUID.randomUUID()); - orig.setState(ParticipantState.ACTIVE); - orig.setTimestamp(Instant.ofEpochMilli(3000)); - - assertEquals(removeVariableFields(orig.toString()), - removeVariableFields(new ParticipantStateChange(orig).toString())); - } -} diff --git a/participant/participant-impl/participant-impl-dcae/src/test/java/org/onap/policy/clamp/controlloop/participant/dcae/main/rest/TestListenerUtils.java b/participant/participant-impl/participant-impl-dcae/src/test/java/org/onap/policy/clamp/controlloop/participant/dcae/main/rest/TestListenerUtils.java index 7f8eb0937..6801e19fe 100644 --- a/participant/participant-impl/participant-impl-dcae/src/test/java/org/onap/policy/clamp/controlloop/participant/dcae/main/rest/TestListenerUtils.java +++ b/participant/participant-impl/participant-impl-dcae/src/test/java/org/onap/policy/clamp/controlloop/participant/dcae/main/rest/TestListenerUtils.java @@ -33,7 +33,6 @@ import org.onap.policy.clamp.controlloop.models.controlloop.concepts.Participant import org.onap.policy.clamp.controlloop.models.messages.dmaap.participant.ControlLoopUpdate; import org.onap.policy.clamp.controlloop.models.messages.dmaap.participant.ParticipantControlLoopStateChange; import org.onap.policy.clamp.controlloop.models.messages.dmaap.participant.ParticipantHealthCheck; -import org.onap.policy.clamp.controlloop.models.messages.dmaap.participant.ParticipantStateChange; import org.onap.policy.common.utils.coder.Coder; import org.onap.policy.common.utils.coder.CoderException; import org.onap.policy.common.utils.coder.StandardCoder; @@ -88,26 +87,6 @@ public class TestListenerUtils { } /** - * Method to create ParticipantStateChange message from the arguments passed. - * - * @param participantState participant State - * - * @return ParticipantStateChange message - */ - public static ParticipantStateChange createParticipantStateChangeMsg(final ParticipantState participantState) { - final ParticipantStateChange participantStateChangeMsg = new ParticipantStateChange(); - ToscaConceptIdentifier participantId = new ToscaConceptIdentifier(); - participantId.setName("DCAEParticipant0"); - participantId.setVersion("1.0.0"); - - participantStateChangeMsg.setParticipantId(participantId); - participantStateChangeMsg.setTimestamp(Instant.now()); - participantStateChangeMsg.setState(participantState); - - return participantStateChangeMsg; - } - - /** * Method to create ControlLoopStateChange message from the arguments passed. * * @param controlLoopOrderedState controlLoopOrderedState diff --git a/participant/participant-impl/participant-impl-policy/src/test/java/org/onap/policy/clamp/controlloop/participant/policy/main/utils/TestListenerUtils.java b/participant/participant-impl/participant-impl-policy/src/test/java/org/onap/policy/clamp/controlloop/participant/policy/main/utils/TestListenerUtils.java index 6b1b7e30f..49bf8bb6b 100644 --- a/participant/participant-impl/participant-impl-policy/src/test/java/org/onap/policy/clamp/controlloop/participant/policy/main/utils/TestListenerUtils.java +++ b/participant/participant-impl/participant-impl-policy/src/test/java/org/onap/policy/clamp/controlloop/participant/policy/main/utils/TestListenerUtils.java @@ -38,7 +38,6 @@ import org.onap.policy.clamp.controlloop.models.controlloop.concepts.Participant import org.onap.policy.clamp.controlloop.models.messages.dmaap.participant.ControlLoopUpdate; import org.onap.policy.clamp.controlloop.models.messages.dmaap.participant.ParticipantControlLoopStateChange; import org.onap.policy.clamp.controlloop.models.messages.dmaap.participant.ParticipantHealthCheck; -import org.onap.policy.clamp.controlloop.models.messages.dmaap.participant.ParticipantStateChange; import org.onap.policy.clamp.controlloop.models.messages.dmaap.participant.ParticipantUpdate; import org.onap.policy.clamp.controlloop.participant.policy.main.parameters.CommonTestData; import org.onap.policy.common.utils.coder.Coder; @@ -100,26 +99,6 @@ public class TestListenerUtils { } /** - * Method to create ParticipantStateChange message from the arguments passed. - * - * @param participantState participant State - * - * @return ParticipantStateChange message - */ - public static ParticipantStateChange createParticipantStateChangeMsg(final ParticipantState participantState) { - final ParticipantStateChange participantStateChangeMsg = new ParticipantStateChange(); - ToscaConceptIdentifier participantId = new ToscaConceptIdentifier(); - participantId.setName("org.onap.PM_Policy"); - participantId.setVersion("0.0.0"); - - participantStateChangeMsg.setParticipantId(participantId); - participantStateChangeMsg.setTimestamp(Instant.now()); - participantStateChangeMsg.setState(participantState); - - return participantStateChangeMsg; - } - - /** * Method to create ControlLoopStateChange message from the arguments passed. * * @param controlLoopOrderedState controlLoopOrderedState diff --git a/participant/participant-impl/participant-impl-simulator/src/test/java/org/onap/policy/clamp/controlloop/participant/simulator/main/rest/TestListenerUtils.java b/participant/participant-impl/participant-impl-simulator/src/test/java/org/onap/policy/clamp/controlloop/participant/simulator/main/rest/TestListenerUtils.java index 2c0c450ed..7894e696f 100644 --- a/participant/participant-impl/participant-impl-simulator/src/test/java/org/onap/policy/clamp/controlloop/participant/simulator/main/rest/TestListenerUtils.java +++ b/participant/participant-impl/participant-impl-simulator/src/test/java/org/onap/policy/clamp/controlloop/participant/simulator/main/rest/TestListenerUtils.java @@ -36,7 +36,6 @@ import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ControlLoop import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ParticipantState; import org.onap.policy.clamp.controlloop.models.messages.dmaap.participant.ControlLoopUpdate; import org.onap.policy.clamp.controlloop.models.messages.dmaap.participant.ParticipantControlLoopStateChange; -import org.onap.policy.clamp.controlloop.models.messages.dmaap.participant.ParticipantStateChange; import org.onap.policy.clamp.controlloop.participant.simulator.main.parameters.CommonTestData; import org.onap.policy.common.utils.coder.Coder; import org.onap.policy.common.utils.coder.CoderException; @@ -98,24 +97,6 @@ public class TestListenerUtils { } /** - * Method to create ParticipantStateChange message from the arguments passed. - * - * @param participantState participant State - * - * @return ParticipantStateChange message - */ - public static ParticipantStateChange createParticipantStateChangeMsg(final ParticipantState participantState) { - final ParticipantStateChange participantStateChangeMsg = new ParticipantStateChange(); - ToscaConceptIdentifier participantId = new ToscaConceptIdentifier("org.onap.PM_CDS_Blueprint", "1.0.0"); - - participantStateChangeMsg.setParticipantId(participantId); - participantStateChangeMsg.setTimestamp(Instant.now()); - participantStateChangeMsg.setState(participantState); - - return participantStateChangeMsg; - } - - /** * Method to create ControlLoopStateChange message from the arguments passed. * * @param controlLoopOrderedState controlLoopOrderedState diff --git a/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/controlloop/participant/intermediary/comm/ParticipantStateChangeListener.java b/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/controlloop/participant/intermediary/comm/ParticipantStateChangeListener.java deleted file mode 100644 index ec6548a7c..000000000 --- a/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/controlloop/participant/intermediary/comm/ParticipantStateChangeListener.java +++ /dev/null @@ -1,42 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * Copyright (C) 2021 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. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - * ============LICENSE_END========================================================= - */ - -package org.onap.policy.clamp.controlloop.participant.intermediary.comm; - -import org.onap.policy.clamp.controlloop.models.messages.dmaap.participant.ParticipantStateChange; -import org.onap.policy.clamp.controlloop.participant.intermediary.handler.ParticipantHandler; -import org.springframework.stereotype.Component; - -/** - * Listener for Participant State Change messages sent by CLAMP. - * - */ -@Component -public class ParticipantStateChangeListener extends ParticipantListener<ParticipantStateChange> { - - /** - * Constructs the object. - * - * @param participantHandler the handler for managing the state of the participant - */ - public ParticipantStateChangeListener(final ParticipantHandler participantHandler) { - super(ParticipantStateChange.class, participantHandler, participantHandler::handleParticipantStateChange); - } -} diff --git a/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/controlloop/participant/intermediary/handler/IntermediaryActivator.java b/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/controlloop/participant/intermediary/handler/IntermediaryActivator.java index 38674896b..68ee93f4f 100644 --- a/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/controlloop/participant/intermediary/handler/IntermediaryActivator.java +++ b/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/controlloop/participant/intermediary/handler/IntermediaryActivator.java @@ -30,7 +30,6 @@ import org.onap.policy.clamp.controlloop.participant.intermediary.comm.ControlLo import org.onap.policy.clamp.controlloop.participant.intermediary.comm.ParticipantDeregisterAckListener; import org.onap.policy.clamp.controlloop.participant.intermediary.comm.ParticipantHealthCheckListener; import org.onap.policy.clamp.controlloop.participant.intermediary.comm.ParticipantRegisterAckListener; -import org.onap.policy.clamp.controlloop.participant.intermediary.comm.ParticipantStateChangeListener; import org.onap.policy.clamp.controlloop.participant.intermediary.comm.ParticipantUpdateListener; import org.onap.policy.clamp.controlloop.participant.intermediary.parameters.ParticipantParameters; import org.onap.policy.common.endpoints.event.comm.TopicEndpointManager; @@ -120,9 +119,6 @@ public class IntermediaryActivator extends ServiceManagerContainer implements Cl private void registerMsgDispatcher() { MessageTypeDispatcher msgDispatcher = applicationContext.getBean(MessageTypeDispatcher.class); - msgDispatcher.register(ParticipantMessageType.PARTICIPANT_STATE_CHANGE.name(), - applicationContext.getBean(ParticipantStateChangeListener.class)); - msgDispatcher.register(ParticipantMessageType.PARTICIPANT_HEALTH_CHECK.name(), applicationContext.getBean(ParticipantHealthCheckListener.class)); diff --git a/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/controlloop/participant/intermediary/handler/ParticipantHandler.java b/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/controlloop/participant/intermediary/handler/ParticipantHandler.java index 4842c3edd..5b9b74092 100644 --- a/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/controlloop/participant/intermediary/handler/ParticipantHandler.java +++ b/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/controlloop/participant/intermediary/handler/ParticipantHandler.java @@ -42,7 +42,6 @@ import org.onap.policy.clamp.controlloop.models.messages.dmaap.participant.Parti import org.onap.policy.clamp.controlloop.models.messages.dmaap.participant.ParticipantRegisterAck; import org.onap.policy.clamp.controlloop.models.messages.dmaap.participant.ParticipantResponseDetails; import org.onap.policy.clamp.controlloop.models.messages.dmaap.participant.ParticipantResponseStatus; -import org.onap.policy.clamp.controlloop.models.messages.dmaap.participant.ParticipantStateChange; import org.onap.policy.clamp.controlloop.models.messages.dmaap.participant.ParticipantStatus; import org.onap.policy.clamp.controlloop.models.messages.dmaap.participant.ParticipantUpdate; import org.onap.policy.clamp.controlloop.models.messages.dmaap.participant.ParticipantUpdateAck; @@ -98,46 +97,6 @@ public class ParticipantHandler implements Closeable { } /** - * Method which handles a participant state change event from clamp. - * - * @param stateChangeMsg participant state change message - */ - public void handleParticipantStateChange(final ParticipantStateChange stateChangeMsg) { - - if (!stateChangeMsg.appliesTo(participantType, participantId)) { - return; - } - - var response = new ParticipantResponseDetails(stateChangeMsg); - - switch (stateChangeMsg.getState()) { - case PASSIVE: - handlePassiveState(response); - break; - case ACTIVE: - handleActiveState(response); - break; - case SAFE: - handleSafeState(response); - break; - case TEST: - handleTestState(response); - break; - case TERMINATED: - handleTerminatedState(response); - break; - default: - LOGGER.debug("StateChange message has no state, state is null {}", stateChangeMsg.getParticipantId()); - response.setResponseStatus(ParticipantResponseStatus.FAIL); - response.setResponseMessage( - "StateChange message has invalid state for participantId " + stateChangeMsg.getParticipantId()); - break; - } - - sender.sendResponse(response); - } - - /** * Method which handles a participant health check event from clamp. * * @param healthCheckMsg participant health check message @@ -168,51 +127,6 @@ public class ParticipantHandler implements Closeable { controlLoopHandler.handleControlLoopStateChange(stateChangeMsg); } - /** - * Method to handle when the new state from participant is active. - * - * @param response participant response - */ - private void handleActiveState(final ParticipantResponseDetails response) { - handleStateChange(ParticipantState.ACTIVE, response); - } - - /** - * Method to handle when the new state from participant is passive. - * - * @param response participant response - */ - private void handlePassiveState(final ParticipantResponseDetails response) { - handleStateChange(ParticipantState.PASSIVE, response); - } - - /** - * Method to handle when the new state from participant is safe. - * - * @param response participant response - */ - private void handleSafeState(final ParticipantResponseDetails response) { - handleStateChange(ParticipantState.SAFE, response); - } - - /** - * Method to handle when the new state from participant is TEST. - * - * @param response participant response - */ - private void handleTestState(final ParticipantResponseDetails response) { - handleStateChange(ParticipantState.TEST, response); - } - - /** - * Method to handle when the new state from participant is Terminated. - * - * @param response participant response - */ - private void handleTerminatedState(final ParticipantResponseDetails response) { - handleStateChange(ParticipantState.TERMINATED, response); - } - private void handleStateChange(ParticipantState newParticipantState, ParticipantResponseDetails response) { if (state.equals(newParticipantState)) { response.setResponseStatus(ParticipantResponseStatus.SUCCESS); diff --git a/runtime-controlloop/src/main/java/org/onap/policy/clamp/controlloop/runtime/main/parameters/ClRuntimeParameterGroup.java b/runtime-controlloop/src/main/java/org/onap/policy/clamp/controlloop/runtime/main/parameters/ClRuntimeParameterGroup.java index f46b90294..86473caa8 100644 --- a/runtime-controlloop/src/main/java/org/onap/policy/clamp/controlloop/runtime/main/parameters/ClRuntimeParameterGroup.java +++ b/runtime-controlloop/src/main/java/org/onap/policy/clamp/controlloop/runtime/main/parameters/ClRuntimeParameterGroup.java @@ -57,9 +57,6 @@ public class ClRuntimeParameterGroup { private long supervisionScannerIntervalSec; @Min(value = 0) - private long participantStateChangeIntervalSec; - - @Min(value = 0) private long participantClUpdateIntervalSec; @Min(value = 0) diff --git a/runtime-controlloop/src/main/java/org/onap/policy/clamp/controlloop/runtime/main/parameters/ParticipantParameters.java b/runtime-controlloop/src/main/java/org/onap/policy/clamp/controlloop/runtime/main/parameters/ParticipantParameters.java index a4e84af0d..47a99ca29 100644 --- a/runtime-controlloop/src/main/java/org/onap/policy/clamp/controlloop/runtime/main/parameters/ParticipantParameters.java +++ b/runtime-controlloop/src/main/java/org/onap/policy/clamp/controlloop/runtime/main/parameters/ParticipantParameters.java @@ -49,9 +49,4 @@ public class ParticipantParameters { @Valid @NotNull private ParticipantUpdateParameters updateParameters; - - @Valid - @NotNull - private ParticipantStateChangeParameters stateChangeParameters; - } diff --git a/runtime-controlloop/src/main/java/org/onap/policy/clamp/controlloop/runtime/main/parameters/ParticipantStateChangeParameters.java b/runtime-controlloop/src/main/java/org/onap/policy/clamp/controlloop/runtime/main/parameters/ParticipantStateChangeParameters.java deleted file mode 100644 index a3e2eee2e..000000000 --- a/runtime-controlloop/src/main/java/org/onap/policy/clamp/controlloop/runtime/main/parameters/ParticipantStateChangeParameters.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2021 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. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.policy.clamp.controlloop.runtime.main.parameters; - -import javax.validation.constraints.Min; -import lombok.Getter; -import lombok.Setter; -import org.springframework.validation.annotation.Validated; - -/** - * Parameters for Participant STATE-CHANGE requests. - */ -@Getter -@Setter -@Validated -public class ParticipantStateChangeParameters { - - /** - * Maximum number of times to re-send a request to a PDP. - */ - @Min(value = 0) - private int maxRetryCount; - - /** - * Maximum time to wait, in milliseconds, for a PDP response. - */ - @Min(value = 0) - private long maxWaitMs; - -} diff --git a/runtime-controlloop/src/main/java/org/onap/policy/clamp/controlloop/runtime/supervision/SupervisionHandler.java b/runtime-controlloop/src/main/java/org/onap/policy/clamp/controlloop/runtime/supervision/SupervisionHandler.java index baf0b176d..92af24107 100644 --- a/runtime-controlloop/src/main/java/org/onap/policy/clamp/controlloop/runtime/supervision/SupervisionHandler.java +++ b/runtime-controlloop/src/main/java/org/onap/policy/clamp/controlloop/runtime/supervision/SupervisionHandler.java @@ -53,7 +53,6 @@ import org.onap.policy.clamp.controlloop.runtime.supervision.comm.ControlLoopUpd import org.onap.policy.clamp.controlloop.runtime.supervision.comm.ParticipantControlLoopStateChangePublisher; import org.onap.policy.clamp.controlloop.runtime.supervision.comm.ParticipantDeregisterAckPublisher; import org.onap.policy.clamp.controlloop.runtime.supervision.comm.ParticipantRegisterAckPublisher; -import org.onap.policy.clamp.controlloop.runtime.supervision.comm.ParticipantStateChangePublisher; import org.onap.policy.clamp.controlloop.runtime.supervision.comm.ParticipantStatusListener; import org.onap.policy.clamp.controlloop.runtime.supervision.comm.ParticipantUpdatePublisher; import org.onap.policy.common.endpoints.event.comm.TopicSink; diff --git a/runtime-controlloop/src/main/java/org/onap/policy/clamp/controlloop/runtime/supervision/comm/ParticipantStateChangePublisher.java b/runtime-controlloop/src/main/java/org/onap/policy/clamp/controlloop/runtime/supervision/comm/ParticipantStateChangePublisher.java deleted file mode 100644 index b63cbdf03..000000000 --- a/runtime-controlloop/src/main/java/org/onap/policy/clamp/controlloop/runtime/supervision/comm/ParticipantStateChangePublisher.java +++ /dev/null @@ -1,32 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * Copyright (C) 2021 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. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - * ============LICENSE_END========================================================= - */ - -package org.onap.policy.clamp.controlloop.runtime.supervision.comm; - -import org.onap.policy.clamp.controlloop.models.messages.dmaap.participant.ParticipantStateChange; -import org.springframework.stereotype.Component; - -/** - * This class is used to send ParticipantStateChange messages to participants on DMaaP. - */ -@Component -public class ParticipantStateChangePublisher extends AbstractParticipantPublisher<ParticipantStateChange> { - -} diff --git a/runtime-controlloop/src/main/resources/application.yaml b/runtime-controlloop/src/main/resources/application.yaml index 3bc2749ed..01466abf6 100644 --- a/runtime-controlloop/src/main/resources/application.yaml +++ b/runtime-controlloop/src/main/resources/application.yaml @@ -20,7 +20,6 @@ server: runtime: supervisionScannerIntervalSec: 1000 - participantStateChangeIntervalSec: 1000 participantClUpdateIntervalSec: 1000 participantClStateChangeIntervalSec: 1000 participantParameters: diff --git a/runtime-controlloop/src/test/resources/application_test.properties b/runtime-controlloop/src/test/resources/application_test.properties index e51db25ce..ad2a4b12c 100644 --- a/runtime-controlloop/src/test/resources/application_test.properties +++ b/runtime-controlloop/src/test/resources/application_test.properties @@ -7,7 +7,6 @@ server.servlet.context-path=/onap/controlloop server.error.path=/error runtime.supervisionScannerIntervalSec=1000 -runtime.participantStateChangeIntervalSec=1000 runtime.participantClUpdateIntervalSec=1000 runtime.participantClStateChangeIntervalSec=1000 runtime.participantParameters.heartBeatMs=120000 diff --git a/runtime-controlloop/src/test/resources/parameters/TestParameters.json b/runtime-controlloop/src/test/resources/parameters/TestParameters.json index 07c90d7b2..99fc43d21 100644 --- a/runtime-controlloop/src/test/resources/parameters/TestParameters.json +++ b/runtime-controlloop/src/test/resources/parameters/TestParameters.json @@ -1,7 +1,6 @@ { "name": "ControlLoopRuntimeGroup", "supervisionScannerIntervalSec": 1000, - "participantStateChangeIntervalSec": 1000, "participantClUpdateIntervalSec": 1000, "participantClStateChangeIntervalSec": 1000, "participantParameters": { |