diff options
author | FrancescoFioraEst <francesco.fiora@est.tech> | 2023-12-14 17:33:57 +0000 |
---|---|---|
committer | Francesco Fiora <francesco.fiora@est.tech> | 2024-03-08 16:14:43 +0000 |
commit | b75038fab6ae0816413ed9f925639f3befe4fddb (patch) | |
tree | b6867f9a3be4f7aacaa2eaa2a7d1440097ac87e7 /participant/participant-intermediary/src/main/java/org/onap | |
parent | 33751b41710ad0b31ee3b4aa8346591d5ecb36ad (diff) |
Update compositions and instances monitoring
Improved performance scanning only compositions and instances
that are in transition.
Issue-ID: POLICY-4906
Change-Id: I7a849e921f1d97509f67ff624c715c893a1432ab
Signed-off-by: FrancescoFioraEst <francesco.fiora@est.tech>
Diffstat (limited to 'participant/participant-intermediary/src/main/java/org/onap')
-rw-r--r-- | participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/handler/AutomationCompositionHandler.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/handler/AutomationCompositionHandler.java b/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/handler/AutomationCompositionHandler.java index fd82c37ba..fefa637da 100644 --- a/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/handler/AutomationCompositionHandler.java +++ b/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/handler/AutomationCompositionHandler.java @@ -40,6 +40,7 @@ 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.ParticipantDeploy; import org.onap.policy.clamp.models.acm.concepts.ParticipantRestartAc; +import org.onap.policy.clamp.models.acm.concepts.ParticipantState; import org.onap.policy.clamp.models.acm.concepts.ParticipantUtils; import org.onap.policy.clamp.models.acm.concepts.StateChangeResult; import org.onap.policy.clamp.models.acm.messages.kafka.participant.AutomationCompositionDeploy; @@ -47,6 +48,7 @@ import org.onap.policy.clamp.models.acm.messages.kafka.participant.AutomationCom import org.onap.policy.clamp.models.acm.messages.kafka.participant.AutomationCompositionMigration; import org.onap.policy.clamp.models.acm.messages.kafka.participant.AutomationCompositionStateChange; import org.onap.policy.clamp.models.acm.messages.kafka.participant.ParticipantMessageType; +import org.onap.policy.clamp.models.acm.messages.kafka.participant.ParticipantPrimeAck; import org.onap.policy.clamp.models.acm.messages.kafka.participant.PropertiesUpdate; import org.onap.policy.clamp.models.acm.messages.rest.instantiation.DeployOrder; import org.onap.policy.clamp.models.acm.messages.rest.instantiation.LockOrder; @@ -428,6 +430,16 @@ public class AutomationCompositionHandler { var acElementsDefinitions = cacheProvider.getAcElementsDefinitions().get(compositionId); if (acElementsDefinitions == null) { // this participant does not handle this composition + var participantPrimeAck = new ParticipantPrimeAck(); + participantPrimeAck.setCompositionId(compositionId); + participantPrimeAck.setMessage("Already deprimed or never primed"); + participantPrimeAck.setResult(true); + participantPrimeAck.setResponseTo(messageId); + participantPrimeAck.setCompositionState(AcTypeState.COMMISSIONED); + participantPrimeAck.setStateChangeResult(StateChangeResult.NO_ERROR); + participantPrimeAck.setParticipantId(cacheProvider.getParticipantId()); + participantPrimeAck.setState(ParticipantState.ON_LINE); + publisher.sendParticipantPrimeAck(participantPrimeAck); return; } var list = new ArrayList<>(acElementsDefinitions.values()); |