diff options
author | FrancescoFioraEst <francesco.fiora@est.tech> | 2024-01-04 11:15:14 +0000 |
---|---|---|
committer | Francesco Fiora <francesco.fiora@est.tech> | 2024-01-04 13:06:41 +0000 |
commit | 2064e725f74edf8fc7873c9ebef1d8bf7f65c5a8 (patch) | |
tree | cf068355e05e72fa16154744316763546a751cec /participant/participant-intermediary/src/main/java/org/onap | |
parent | 664af40d4c073404d6c067731e25fc44dab3f2c2 (diff) |
Add support for OutProperties instance in deploy scenario
Add support for OutProperties instance, operationalState
and useState in deploy scenario.
Issue-ID: POLICY-4911
Change-Id: I47b5e63b21e4fedd625413de8e80797138fb8d8a
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/CacheProvider.java | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/handler/CacheProvider.java b/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/handler/CacheProvider.java index 08d5ccd32..dc1bb051a 100644 --- a/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/handler/CacheProvider.java +++ b/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/handler/CacheProvider.java @@ -1,6 +1,6 @@ /*- * ============LICENSE_START======================================================= - * Copyright (C) 2023 Nordix Foundation. + * Copyright (C) 2023-2024 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -133,6 +133,7 @@ public class CacheProvider { */ public void initializeAutomationComposition(@NonNull UUID compositionId, @NonNull UUID instanceId, ParticipantDeploy participantDeploy) { + var acLast = automationCompositions.get(instanceId); Map<UUID, AutomationCompositionElement> acElementMap = new LinkedHashMap<>(); for (var element : participantDeploy.getAcElementList()) { var acElement = new AutomationCompositionElement(); @@ -142,14 +143,19 @@ public class CacheProvider { acElement.setDeployState(DeployState.DEPLOYING); acElement.setLockState(LockState.NONE); acElement.setProperties(element.getProperties()); + var acElementLast = acLast != null ? acLast.getElements().get(element.getId()) : null; + if (acElementLast != null) { + acElement.setOutProperties(acElementLast.getOutProperties()); + acElement.setOperationalState(acElementLast.getOperationalState()); + acElement.setUseState(acElementLast.getUseState()); + } acElementMap.put(element.getId(), acElement); } - var automationComposition = new AutomationComposition(); automationComposition.setCompositionId(compositionId); automationComposition.setInstanceId(instanceId); automationComposition.setElements(acElementMap); - automationCompositions.put(automationComposition.getInstanceId(), automationComposition); + automationCompositions.put(instanceId, automationComposition); } /** |