diff options
author | Sirisha_Manchikanti <sirisha.manchikanti@est.tech> | 2021-08-20 17:21:11 +0100 |
---|---|---|
committer | Sirisha_Manchikanti <sirisha.manchikanti@est.tech> | 2021-08-25 22:26:08 +0100 |
commit | 3971c419e094cb149c3e01781343d6265af64db6 (patch) | |
tree | 9c3098d2504642725cee1049324cc63510ed66b8 /participant/participant-impl/participant-impl-dcae/src/main | |
parent | e9fc4bb89eb992bc3ff51fffcda2e6187bcc8ab7 (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-dcae/src/main')
-rw-r--r-- | participant/participant-impl/participant-impl-dcae/src/main/java/org/onap/policy/clamp/controlloop/participant/dcae/main/handler/ControlLoopElementHandler.java | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/participant/participant-impl/participant-impl-dcae/src/main/java/org/onap/policy/clamp/controlloop/participant/dcae/main/handler/ControlLoopElementHandler.java b/participant/participant-impl/participant-impl-dcae/src/main/java/org/onap/policy/clamp/controlloop/participant/dcae/main/handler/ControlLoopElementHandler.java index b80fbfb5b..221635db0 100644 --- a/participant/participant-impl/participant-impl-dcae/src/main/java/org/onap/policy/clamp/controlloop/participant/dcae/main/handler/ControlLoopElementHandler.java +++ b/participant/participant-impl/participant-impl-dcae/src/main/java/org/onap/policy/clamp/controlloop/participant/dcae/main/handler/ControlLoopElementHandler.java @@ -30,6 +30,7 @@ import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ClElementSt 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.dcae.httpclient.ClampHttpClient; import org.onap.policy.clamp.controlloop.participant.dcae.httpclient.ConsulDcaeHttpClient; import org.onap.policy.clamp.controlloop.participant.dcae.main.parameters.ParticipantDcaeParameters; @@ -99,14 +100,16 @@ public class ControlLoopElementHandler implements ControlLoopElementListener { if (loop != null) { clampClient.undeploy(LOOP); intermediaryApi.updateControlLoopElementState(controlLoopElementId, newState, - ControlLoopState.UNINITIALISED); + ControlLoopState.UNINITIALISED, ParticipantMessageType.CONTROL_LOOP_STATE_CHANGE); } 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.debug("Unknown orderedstate {}", newState); @@ -157,7 +160,7 @@ public class ControlLoopElementHandler implements ControlLoopElementListener { String status = ClampHttpClient.getStatusCode(loop); if (MICROSERVICE_INSTALLED_SUCCESSFULLY.equals(status)) { intermediaryApi.updateControlLoopElementState(element.getId(), element.getOrderedState(), - ControlLoopState.PASSIVE); + ControlLoopState.PASSIVE, ParticipantMessageType.CONTROL_LOOP_UPDATE); deployedFlag = true; break; } @@ -165,7 +168,7 @@ public class ControlLoopElementHandler implements ControlLoopElementListener { if (!deployedFlag) { LOGGER.warn("DCAE is not deployed properly, ClElement state will be UNINITIALISED2PASSIVE"); intermediaryApi.updateControlLoopElementState(element.getId(), element.getOrderedState(), - ControlLoopState.UNINITIALISED2PASSIVE); + ControlLoopState.UNINITIALISED2PASSIVE, ParticipantMessageType.CONTROL_LOOP_UPDATE); } } } catch (PfModelException e) { |