diff options
author | FrancescoFioraEst <francesco.fiora@est.tech> | 2023-04-03 13:25:15 +0100 |
---|---|---|
committer | FrancescoFioraEst <francesco.fiora@est.tech> | 2023-04-04 15:53:59 +0100 |
commit | 2ca7552978f5389ef5ed2e5d4be3cb43e446f7c6 (patch) | |
tree | 086d61490aa7d506e02b00995b89f749babc2187 /runtime-acm/src | |
parent | a4393399d833b4bd4edb58077ecccca3f02d1d65 (diff) |
Fix Participant primed status in ACM
Fix Participant primed status is not updated correctly in the runtime
Issue-ID: POLICY-4625
Change-Id: I6a3ce7b73f5edaeedf84ec43c7f62c526cd99f36
Signed-off-by: FrancescoFioraEst <francesco.fiora@est.tech>
Diffstat (limited to 'runtime-acm/src')
2 files changed, 4 insertions, 2 deletions
diff --git a/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/commissioning/CommissioningProvider.java b/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/commissioning/CommissioningProvider.java index ca0b5c5ab..d8eddf558 100644 --- a/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/commissioning/CommissioningProvider.java +++ b/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/commissioning/CommissioningProvider.java @@ -47,7 +47,6 @@ import org.springframework.transaction.annotation.Transactional; * database to the callers. */ @Service -@Transactional @RequiredArgsConstructor public class CommissioningProvider { public static final String AUTOMATION_COMPOSITION_NODE_TYPE = "org.onap.policy.clamp.acm.AutomationComposition"; @@ -81,6 +80,7 @@ public class CommissioningProvider { * @param serviceTemplate the service template * @return the result of the commissioning operation */ + @Transactional public CommissioningResponse createAutomationCompositionDefinition(ToscaServiceTemplate serviceTemplate) { var acmDefinition = acDefinitionProvider.createAutomationCompositionDefinition(serviceTemplate); @@ -95,6 +95,7 @@ public class CommissioningProvider { * @param serviceTemplate the service template * @return the result of the commissioning operation */ + @Transactional public CommissioningResponse updateCompositionDefinition(UUID compositionId, ToscaServiceTemplate serviceTemplate) { if (verifyIfInstanceExists(compositionId)) { throw new PfModelRuntimeException(Status.BAD_REQUEST, @@ -116,6 +117,7 @@ public class CommissioningProvider { * @param compositionId The UUID of the automation composition definition to delete * @return the result of the deletion */ + @Transactional public CommissioningResponse deleteAutomationCompositionDefinition(UUID compositionId) { if (verifyIfInstanceExists(compositionId)) { throw new PfModelRuntimeException(Status.BAD_REQUEST, diff --git a/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/supervision/SupervisionHandler.java b/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/supervision/SupervisionHandler.java index d6bae3b5b..6a1e12f70 100644 --- a/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/supervision/SupervisionHandler.java +++ b/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/supervision/SupervisionHandler.java @@ -57,7 +57,7 @@ public class SupervisionHandler { var acDefinition = acDefinitionOpt.get(); if (!AcTypeState.PRIMING.equals(acDefinition.getState()) && !AcTypeState.DEPRIMING.equals(acDefinition.getState())) { - LOGGER.warn("AC Definition {} already primed/deprimed with participant {}", + LOGGER.error("AC Definition {} already primed/deprimed with participant {}", participantPrimeAckMessage.getCompositionId(), participantPrimeAckMessage.getParticipantId()); return; } |