From: FrancescoFioraEst Date: Mon, 8 Sep 2025 07:29:11 +0000 (+0100) Subject: Removing restarting field in ACM X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F13%2F142013%2F5;p=policy%2Fclamp.git Removing restarting field in ACM Issue-ID: POLICY-5404 Change-Id: Ia11c3679e0e821cdc7377f540b149aae08fbe253 Signed-off-by: FrancescoFioraEst --- diff --git a/models/src/main/java/org/onap/policy/clamp/models/acm/concepts/AutomationCompositionElement.java b/models/src/main/java/org/onap/policy/clamp/models/acm/concepts/AutomationCompositionElement.java index 7d3acaa52..d3c655be4 100644 --- a/models/src/main/java/org/onap/policy/clamp/models/acm/concepts/AutomationCompositionElement.java +++ b/models/src/main/java/org/onap/policy/clamp/models/acm/concepts/AutomationCompositionElement.java @@ -1,6 +1,6 @@ /*- * ============LICENSE_START======================================================= - * Copyright (C) 2021-2024 Nordix Foundation. + * Copyright (C) 2021-2025 OpenInfra Foundation Europe. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -47,8 +47,6 @@ public class AutomationCompositionElement { @NonNull private UUID participantId = UUID.randomUUID(); - private Boolean restarting; - @NonNull private DeployState deployState = DeployState.UNDEPLOYED; @@ -83,7 +81,6 @@ public class AutomationCompositionElement { this.description = otherElement.description; this.properties = AcmUtils.cloneMap(otherElement.properties); this.outProperties = AcmUtils.cloneMap(otherElement.outProperties); - this.restarting = otherElement.restarting; this.deployState = otherElement.deployState; this.lockState = otherElement.lockState; this.subState = otherElement.subState; diff --git a/models/src/main/java/org/onap/policy/clamp/models/acm/concepts/NodeTemplateState.java b/models/src/main/java/org/onap/policy/clamp/models/acm/concepts/NodeTemplateState.java index cbe7ef04c..f8a650c57 100644 --- a/models/src/main/java/org/onap/policy/clamp/models/acm/concepts/NodeTemplateState.java +++ b/models/src/main/java/org/onap/policy/clamp/models/acm/concepts/NodeTemplateState.java @@ -1,6 +1,6 @@ /*- * ============LICENSE_START======================================================= - * Copyright (C) 2023 Nordix Foundation. + * Copyright (C) 2023,2025 OpenInfra Foundation Europe. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,8 +42,6 @@ public class NodeTemplateState { private ToscaConceptIdentifier nodeTemplateId; - private Boolean restarting; - private AcTypeState state; private String message; @@ -59,7 +57,6 @@ public class NodeTemplateState { this.nodeTemplateStateId = copyConstructor.nodeTemplateStateId; this.participantId = copyConstructor.participantId; this.nodeTemplateId = new ToscaConceptIdentifier(copyConstructor.nodeTemplateId); - this.restarting = copyConstructor.restarting; this.state = copyConstructor.state; this.message = copyConstructor.message; this.outProperties = PfUtils.mapMap(copyConstructor.outProperties, UnaryOperator.identity()); diff --git a/models/src/main/java/org/onap/policy/clamp/models/acm/persistence/concepts/JpaAutomationCompositionElement.java b/models/src/main/java/org/onap/policy/clamp/models/acm/persistence/concepts/JpaAutomationCompositionElement.java index 15f5479e1..2255aed5b 100644 --- a/models/src/main/java/org/onap/policy/clamp/models/acm/persistence/concepts/JpaAutomationCompositionElement.java +++ b/models/src/main/java/org/onap/policy/clamp/models/acm/persistence/concepts/JpaAutomationCompositionElement.java @@ -82,9 +82,6 @@ public class JpaAutomationCompositionElement extends Validated @NotNull private String participantId; - @Column - private Boolean restarting; - @Column @NotNull private DeployState deployState; @@ -175,11 +172,8 @@ public class JpaAutomationCompositionElement extends Validated this.definition = new PfConceptKey(copyConcept.definition); this.participantId = copyConcept.participantId; this.description = copyConcept.description; - this.properties = (copyConcept.properties != null ? new LinkedHashMap<>(copyConcept.properties) : null); - this.outProperties = - (copyConcept.outProperties != null ? new LinkedHashMap<>(copyConcept.outProperties) - : null); - this.restarting = copyConcept.restarting; + this.properties = PfUtils.mapMap(copyConcept.properties, UnaryOperator.identity()); + this.outProperties = PfUtils.mapMap(copyConcept.outProperties, UnaryOperator.identity()); this.deployState = copyConcept.deployState; this.lockState = copyConcept.lockState; this.subState = copyConcept.subState; @@ -208,7 +202,6 @@ public class JpaAutomationCompositionElement extends Validated element.setDescription(description); element.setProperties(PfUtils.mapMap(properties, UnaryOperator.identity())); element.setOutProperties(PfUtils.mapMap(outProperties, UnaryOperator.identity())); - element.setRestarting(restarting); element.setDeployState(deployState); element.setLockState(lockState); element.setSubState(subState); @@ -227,7 +220,6 @@ public class JpaAutomationCompositionElement extends Validated this.description = element.getDescription(); this.properties = PfUtils.mapMap(element.getProperties(), UnaryOperator.identity()); this.outProperties = PfUtils.mapMap(element.getOutProperties(), UnaryOperator.identity()); - this.restarting = element.getRestarting(); this.deployState = element.getDeployState(); this.lockState = element.getLockState(); this.subState = element.getSubState(); @@ -266,11 +258,6 @@ public class JpaAutomationCompositionElement extends Validated return result; } - result = ObjectUtils.compare(restarting, other.restarting); - if (result != 0) { - return result; - } - result = ObjectUtils.compare(deployState, other.deployState); if (result != 0) { return result; diff --git a/models/src/main/java/org/onap/policy/clamp/models/acm/persistence/concepts/JpaNodeTemplateState.java b/models/src/main/java/org/onap/policy/clamp/models/acm/persistence/concepts/JpaNodeTemplateState.java index 01d216717..f79e12e76 100644 --- a/models/src/main/java/org/onap/policy/clamp/models/acm/persistence/concepts/JpaNodeTemplateState.java +++ b/models/src/main/java/org/onap/policy/clamp/models/acm/persistence/concepts/JpaNodeTemplateState.java @@ -68,9 +68,6 @@ public class JpaNodeTemplateState extends Validated implements PfAuthorative