aboutsummaryrefslogtreecommitdiffstats
path: root/participant/participant-impl/participant-impl-simulator/src/main/java/org
diff options
context:
space:
mode:
authorFrancescoFioraEst <francesco.fiora@est.tech>2024-06-14 14:10:58 +0100
committerFrancesco Fiora <francesco.fiora@est.tech>2024-06-17 09:04:18 +0000
commitca2ee94054c580827fcfc7f07c9db641301d6b9a (patch)
tree837edef253934aa10a09ecafa5819035b9ca0097 /participant/participant-impl/participant-impl-simulator/src/main/java/org
parentb52e095b34ee7c576f7ee83df05e2a09366a8c8a (diff)
Remove restarting implementation from participants
Remove restarting implementation from participants and Remove local Map from a1pms and kserve participants. Issue-ID: POLICY-5046 Change-Id: I9cc2a33d603751c60007475414b45ca54f0aac25 Signed-off-by: FrancescoFioraEst <francesco.fiora@est.tech>
Diffstat (limited to 'participant/participant-impl/participant-impl-simulator/src/main/java/org')
-rw-r--r--participant/participant-impl/participant-impl-simulator/src/main/java/org/onap/policy/clamp/acm/participant/sim/main/handler/AutomationCompositionElementHandlerV1.java60
-rw-r--r--participant/participant-impl/participant-impl-simulator/src/main/java/org/onap/policy/clamp/acm/participant/sim/main/handler/AutomationCompositionElementHandlerV2.java53
2 files changed, 0 insertions, 113 deletions
diff --git a/participant/participant-impl/participant-impl-simulator/src/main/java/org/onap/policy/clamp/acm/participant/sim/main/handler/AutomationCompositionElementHandlerV1.java b/participant/participant-impl/participant-impl-simulator/src/main/java/org/onap/policy/clamp/acm/participant/sim/main/handler/AutomationCompositionElementHandlerV1.java
index f503987a2..03a0517e0 100644
--- a/participant/participant-impl/participant-impl-simulator/src/main/java/org/onap/policy/clamp/acm/participant/sim/main/handler/AutomationCompositionElementHandlerV1.java
+++ b/participant/participant-impl/participant-impl-simulator/src/main/java/org/onap/policy/clamp/acm/participant/sim/main/handler/AutomationCompositionElementHandlerV1.java
@@ -28,10 +28,7 @@ import org.onap.policy.clamp.acm.participant.intermediary.api.impl.AcElementList
import org.onap.policy.clamp.models.acm.concepts.AcElementDeploy;
import org.onap.policy.clamp.models.acm.concepts.AcTypeState;
import org.onap.policy.clamp.models.acm.concepts.AutomationCompositionElementDefinition;
-import org.onap.policy.clamp.models.acm.concepts.DeployState;
-import org.onap.policy.clamp.models.acm.concepts.LockState;
import org.onap.policy.clamp.models.acm.concepts.StateChangeResult;
-import org.onap.policy.clamp.models.acm.utils.AcmUtils;
import org.onap.policy.models.base.PfModelException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -104,63 +101,6 @@ public class AutomationCompositionElementHandlerV1 extends AcElementListenerV1 {
}
@Override
- public void handleRestartComposition(UUID compositionId,
- List<AutomationCompositionElementDefinition> elementDefinitionList, AcTypeState state)
- throws PfModelException {
- LOGGER.debug("restart composition definition call compositionId: {}, elementDefinitionList: {}, state: {}",
- compositionId, elementDefinitionList, state);
-
- switch (state) {
- case PRIMING:
- prime(compositionId, elementDefinitionList);
- break;
-
- case DEPRIMING:
- deprime(compositionId);
- break;
-
- default:
- intermediaryApi.updateCompositionState(compositionId, state, StateChangeResult.NO_ERROR, "Restarted");
- }
- }
-
- @Override
- public void handleRestartInstance(UUID instanceId, AcElementDeploy element,
- Map<String, Object> properties, DeployState deployState, LockState lockState) throws PfModelException {
- LOGGER.debug("restart instance call instanceId: {}, element: {}, properties: {},"
- + "deployState: {}, lockState: {}", instanceId, element, properties, deployState, lockState);
-
- if (!AcmUtils.isInTransitionalState(deployState, lockState)) {
- intermediaryApi.updateAutomationCompositionElementState(instanceId, element.getId(),
- deployState, lockState, StateChangeResult.NO_ERROR, "Restarted");
- return;
- }
- if (DeployState.DEPLOYING.equals(deployState)) {
- deploy(instanceId, element, properties);
- return;
- }
- if (DeployState.UNDEPLOYING.equals(deployState)) {
- undeploy(instanceId, element.getId());
- return;
- }
- if (DeployState.UPDATING.equals(deployState)) {
- update(instanceId, element, properties);
- return;
- }
- if (DeployState.DELETING.equals(deployState)) {
- delete(instanceId, element.getId());
- return;
- }
- if (LockState.LOCKING.equals(lockState)) {
- lock(instanceId, element.getId());
- return;
- }
- if (LockState.UNLOCKING.equals(lockState)) {
- unlock(instanceId, element.getId());
- }
- }
-
- @Override
public void migrate(UUID instanceId, AcElementDeploy element, UUID compositionTargetId,
Map<String, Object> properties) throws PfModelException {
LOGGER.debug("migrate call instanceId: {}, element: {}, compositionTargetId: {}, properties: {}",
diff --git a/participant/participant-impl/participant-impl-simulator/src/main/java/org/onap/policy/clamp/acm/participant/sim/main/handler/AutomationCompositionElementHandlerV2.java b/participant/participant-impl/participant-impl-simulator/src/main/java/org/onap/policy/clamp/acm/participant/sim/main/handler/AutomationCompositionElementHandlerV2.java
index e836c9874..28bade22f 100644
--- a/participant/participant-impl/participant-impl-simulator/src/main/java/org/onap/policy/clamp/acm/participant/sim/main/handler/AutomationCompositionElementHandlerV2.java
+++ b/participant/participant-impl/participant-impl-simulator/src/main/java/org/onap/policy/clamp/acm/participant/sim/main/handler/AutomationCompositionElementHandlerV2.java
@@ -123,59 +123,6 @@ public class AutomationCompositionElementHandlerV2 extends AcElementListenerV2 {
}
@Override
- public void handleRestartComposition(CompositionDto composition, AcTypeState state) throws PfModelException {
- LOGGER.debug("restart composition definition call");
- switch (state) {
- case PRIMING:
- prime(composition);
- break;
-
- case DEPRIMING:
- deprime(composition);
- break;
-
- default:
- intermediaryApi.updateCompositionState(composition.compositionId(), state,
- StateChangeResult.NO_ERROR, "Restarted");
- }
- }
-
- @Override
- public void handleRestartInstance(CompositionElementDto compositionElement, InstanceElementDto instanceElement,
- DeployState deployState, LockState lockState) throws PfModelException {
- LOGGER.debug("restart instance call");
- if (!AcmUtils.isInTransitionalState(deployState, lockState)) {
- intermediaryApi.updateAutomationCompositionElementState(
- instanceElement.instanceId(), instanceElement.elementId(), deployState, lockState,
- StateChangeResult.NO_ERROR, "Restarted");
- return;
- }
- if (DeployState.DEPLOYING.equals(deployState)) {
- deploy(compositionElement, instanceElement);
- return;
- }
- if (DeployState.UNDEPLOYING.equals(deployState)) {
- undeploy(compositionElement, instanceElement);
- return;
- }
- if (DeployState.UPDATING.equals(deployState)) {
- update(compositionElement, instanceElement, instanceElement);
- return;
- }
- if (DeployState.DELETING.equals(deployState)) {
- delete(compositionElement, instanceElement);
- return;
- }
- if (LockState.LOCKING.equals(lockState)) {
- lock(compositionElement, instanceElement);
- return;
- }
- if (LockState.UNLOCKING.equals(lockState)) {
- unlock(compositionElement, instanceElement);
- }
- }
-
- @Override
public void migrate(CompositionElementDto compositionElement, CompositionElementDto compositionElementTarget,
InstanceElementDto instanceElement, InstanceElementDto instanceElementMigrate)
throws PfModelException {