diff options
author | FrancescoFioraEst <francesco.fiora@est.tech> | 2022-12-13 13:57:47 +0000 |
---|---|---|
committer | Francesco Fiora <francesco.fiora@est.tech> | 2022-12-13 16:45:51 +0000 |
commit | a01c89adfa3a6fe0918d77282759295a7f0514e5 (patch) | |
tree | f5885152f94b408e3b3634ab600471e035d72da0 /runtime-acm/src | |
parent | 04ffb73ae3fcd3c666030d5c867febd88ef6537c (diff) |
Replace ToscaConceptIdentifier with UUID in Participant Messages ACM
Replace in all messages the reference to Automation Composition
ToscaConceptIdentifier(name, version) with instanceId(UUID).
Issue-ID: POLICY-4479
Change-Id: I7bc9a7494103b9c1752a1e2c6f6d5a527196913d
Signed-off-by: FrancescoFioraEst <francesco.fiora@est.tech>
Diffstat (limited to 'runtime-acm/src')
3 files changed, 3 insertions, 3 deletions
diff --git a/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/supervision/comm/AutomationCompositionStateChangePublisher.java b/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/supervision/comm/AutomationCompositionStateChangePublisher.java index 79b8f90c2..4c3cc958b 100644 --- a/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/supervision/comm/AutomationCompositionStateChangePublisher.java +++ b/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/supervision/comm/AutomationCompositionStateChangePublisher.java @@ -43,7 +43,7 @@ public class AutomationCompositionStateChangePublisher description = "AUTOMATION_COMPOSITION_STATE_CHANGE messages published") public void send(AutomationComposition automationComposition, int startPhase) { var acsc = new AutomationCompositionStateChange(); - acsc.setAutomationCompositionId(automationComposition.getKey().asIdentifier()); + acsc.setAutomationCompositionId(automationComposition.getInstanceId()); acsc.setMessageId(UUID.randomUUID()); acsc.setOrderedState(automationComposition.getOrderedState()); acsc.setStartPhase(startPhase); diff --git a/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/supervision/comm/AutomationCompositionUpdatePublisher.java b/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/supervision/comm/AutomationCompositionUpdatePublisher.java index 61ab78fad..c10e47bb4 100644 --- a/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/supervision/comm/AutomationCompositionUpdatePublisher.java +++ b/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/supervision/comm/AutomationCompositionUpdatePublisher.java @@ -70,7 +70,7 @@ public class AutomationCompositionUpdatePublisher extends AbstractParticipantPub public void send(AutomationComposition automationComposition, int startPhase) { var automationCompositionUpdateMsg = new AutomationCompositionUpdate(); automationCompositionUpdateMsg.setStartPhase(startPhase); - automationCompositionUpdateMsg.setAutomationCompositionId(automationComposition.getKey().asIdentifier()); + automationCompositionUpdateMsg.setAutomationCompositionId(automationComposition.getInstanceId()); automationCompositionUpdateMsg.setMessageId(UUID.randomUUID()); automationCompositionUpdateMsg.setTimestamp(Instant.now()); var toscaServiceTemplate = acDefinitionProvider.getAcDefinition(automationComposition.getCompositionId()); diff --git a/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/supervision/SupervisionHandlerTest.java b/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/supervision/SupervisionHandlerTest.java index 3a707cd52..832d25da0 100644 --- a/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/supervision/SupervisionHandlerTest.java +++ b/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/supervision/SupervisionHandlerTest.java @@ -62,7 +62,7 @@ import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier; class SupervisionHandlerTest { private static final String AC_INSTANTIATION_CREATE_JSON = "src/test/resources/rest/acm/AutomationComposition.json"; - private static final ToscaConceptIdentifier identifier = new ToscaConceptIdentifier("PMSHInstance0Crud", "1.0.1"); + private static final UUID identifier = UUID.randomUUID(); private static final ToscaConceptIdentifier participantId = new ToscaConceptIdentifier("ParticipantId", "1.0.0"); private static final ToscaConceptIdentifier participantType = new ToscaConceptIdentifier("ParticipantType", "1.0.0"); |