diff options
author | FrancescoFioraEst <francesco.fiora@est.tech> | 2024-01-04 10:28:13 +0000 |
---|---|---|
committer | Francesco Fiora <francesco.fiora@est.tech> | 2024-01-04 10:32:05 +0000 |
commit | d8ecbcfb5461ad13f72a6def9224a600d29f1090 (patch) | |
tree | 63e54f6001d4185249f96d002634589a9aa41443 /models/src/main | |
parent | 664af40d4c073404d6c067731e25fc44dab3f2c2 (diff) |
Add OutProperties instance support for restart scenario in acm-model
Add support for OutProperties instance, operationalState
and useState in restart scenario.
Issue-ID: POLICY-4909
Change-Id: I2106bc3bd60ba9ca568acfa64c09a2984ad8a337
Signed-off-by: FrancescoFioraEst <francesco.fiora@est.tech>
Diffstat (limited to 'models/src/main')
-rw-r--r-- | models/src/main/java/org/onap/policy/clamp/models/acm/concepts/AcElementRestart.java | 10 | ||||
-rwxr-xr-x | models/src/main/java/org/onap/policy/clamp/models/acm/utils/AcmUtils.java | 5 |
2 files changed, 13 insertions, 2 deletions
diff --git a/models/src/main/java/org/onap/policy/clamp/models/acm/concepts/AcElementRestart.java b/models/src/main/java/org/onap/policy/clamp/models/acm/concepts/AcElementRestart.java index 3815989f7..3f0dff2bb 100644 --- a/models/src/main/java/org/onap/policy/clamp/models/acm/concepts/AcElementRestart.java +++ b/models/src/main/java/org/onap/policy/clamp/models/acm/concepts/AcElementRestart.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. @@ -50,12 +50,17 @@ public class AcElementRestart { // State of the AutomationCompositionElement private LockState lockState; + private String operationalState; + private String useState; + private ToscaServiceTemplate toscaServiceTemplateFragment; // A map indexed by the property name. Each map entry is the serialized value of the property, // which can be deserialized into an instance of the type of the property. private Map<String, Object> properties = new LinkedHashMap<>(); + private Map<String, Object> outProperties = new LinkedHashMap<>(); + /** * Copy constructor, does a deep copy but as all fields here are immutable, it's just a regular copy. * @@ -66,8 +71,11 @@ public class AcElementRestart { this.definition = new ToscaConceptIdentifier(otherElement.definition); this.deployState = otherElement.deployState; this.lockState = otherElement.lockState; + this.operationalState = otherElement.operationalState; + this.useState = otherElement.useState; this.toscaServiceTemplateFragment = otherElement.toscaServiceTemplateFragment; this.properties = PfUtils.mapMap(otherElement.properties, UnaryOperator.identity()); + this.outProperties = PfUtils.mapMap(otherElement.outProperties, UnaryOperator.identity()); } } diff --git a/models/src/main/java/org/onap/policy/clamp/models/acm/utils/AcmUtils.java b/models/src/main/java/org/onap/policy/clamp/models/acm/utils/AcmUtils.java index 0fd7ab95c..504d3ef06 100755 --- a/models/src/main/java/org/onap/policy/clamp/models/acm/utils/AcmUtils.java +++ b/models/src/main/java/org/onap/policy/clamp/models/acm/utils/AcmUtils.java @@ -1,6 +1,6 @@ /*- * ============LICENSE_START======================================================= - * Copyright (C) 2021-2023 Nordix Foundation. + * Copyright (C) 2021-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. @@ -437,7 +437,10 @@ public final class AcmUtils { acElementRestart.setDefinition(new ToscaConceptIdentifier(element.getDefinition())); acElementRestart.setDeployState(element.getDeployState()); acElementRestart.setLockState(element.getLockState()); + acElementRestart.setOperationalState(element.getOperationalState()); + acElementRestart.setUseState(element.getUseState()); acElementRestart.setProperties(PfUtils.mapMap(element.getProperties(), UnaryOperator.identity())); + acElementRestart.setOutProperties(PfUtils.mapMap(element.getOutProperties(), UnaryOperator.identity())); return acElementRestart; } } |