summaryrefslogtreecommitdiffstats
path: root/participant/participant-impl/participant-impl-kubernetes/src/main
diff options
context:
space:
mode:
authorSirisha_Manchikanti <sirisha.manchikanti@est.tech>2021-08-20 17:21:11 +0100
committerSirisha_Manchikanti <sirisha.manchikanti@est.tech>2021-08-25 22:26:08 +0100
commit3971c419e094cb149c3e01781343d6265af64db6 (patch)
tree9c3098d2504642725cee1049324cc63510ed66b8 /participant/participant-impl/participant-impl-kubernetes/src/main
parente9fc4bb89eb992bc3ff51fffcda2e6187bcc8ab7 (diff)
Updated handling of ack messages
Issue-ID: POLICY-3417 Signed-off-by: Sirisha_Manchikanti <sirisha.manchikanti@est.tech> Change-Id: I5784debf2e17fd1018b3feb7c9e2ae08d5f93d23
Diffstat (limited to 'participant/participant-impl/participant-impl-kubernetes/src/main')
-rw-r--r--participant/participant-impl/participant-impl-kubernetes/src/main/java/org/onap/policy/clamp/controlloop/participant/kubernetes/handler/ControlLoopElementHandler.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/participant/participant-impl/participant-impl-kubernetes/src/main/java/org/onap/policy/clamp/controlloop/participant/kubernetes/handler/ControlLoopElementHandler.java b/participant/participant-impl/participant-impl-kubernetes/src/main/java/org/onap/policy/clamp/controlloop/participant/kubernetes/handler/ControlLoopElementHandler.java
index 8aa74f30f..24a075529 100644
--- a/participant/participant-impl/participant-impl-kubernetes/src/main/java/org/onap/policy/clamp/controlloop/participant/kubernetes/handler/ControlLoopElementHandler.java
+++ b/participant/participant-impl/participant-impl-kubernetes/src/main/java/org/onap/policy/clamp/controlloop/participant/kubernetes/handler/ControlLoopElementHandler.java
@@ -33,6 +33,7 @@ import lombok.Setter;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ControlLoopElement;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ControlLoopOrderedState;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ControlLoopState;
+import org.onap.policy.clamp.controlloop.models.messages.dmaap.participant.ParticipantMessageType;
import org.onap.policy.clamp.controlloop.participant.intermediary.api.ControlLoopElementListener;
import org.onap.policy.clamp.controlloop.participant.intermediary.api.ParticipantIntermediaryApi;
import org.onap.policy.clamp.controlloop.participant.kubernetes.exception.ServiceException;
@@ -96,7 +97,7 @@ public class ControlLoopElementHandler implements ControlLoopElementListener {
try {
chartService.uninstallChart(chart);
intermediaryApi.updateControlLoopElementState(controlLoopElementId, newState,
- ControlLoopState.UNINITIALISED);
+ ControlLoopState.UNINITIALISED, ParticipantMessageType.CONTROL_LOOP_STATE_CHANGE);
chartMap.remove(controlLoopElementId);
podStatusMap.remove(chart.getReleaseName());
} catch (ServiceException se) {
@@ -105,10 +106,12 @@ public class ControlLoopElementHandler implements ControlLoopElementListener {
}
break;
case PASSIVE:
- intermediaryApi.updateControlLoopElementState(controlLoopElementId, newState, ControlLoopState.PASSIVE);
+ intermediaryApi.updateControlLoopElementState(controlLoopElementId, newState, ControlLoopState.PASSIVE,
+ ParticipantMessageType.CONTROL_LOOP_STATE_CHANGE);
break;
case RUNNING:
- intermediaryApi.updateControlLoopElementState(controlLoopElementId, newState, ControlLoopState.RUNNING);
+ intermediaryApi.updateControlLoopElementState(controlLoopElementId, newState, ControlLoopState.RUNNING,
+ ParticipantMessageType.CONTROL_LOOP_STATE_CHANGE);
break;
default:
LOGGER.warn("cannot transition from state {} to state {}", currentState, newState);