aboutsummaryrefslogtreecommitdiffstats
path: root/runtime-acm/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'runtime-acm/src/main/java')
-rwxr-xr-x[-rw-r--r--]runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/instantiation/AutomationCompositionInstantiationProvider.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/instantiation/AutomationCompositionInstantiationProvider.java b/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/instantiation/AutomationCompositionInstantiationProvider.java
index 710a975f0..84944e74c 100644..100755
--- a/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/instantiation/AutomationCompositionInstantiationProvider.java
+++ b/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/instantiation/AutomationCompositionInstantiationProvider.java
@@ -35,6 +35,7 @@ import org.onap.policy.clamp.models.acm.concepts.AutomationCompositions;
import org.onap.policy.clamp.models.acm.concepts.DeployState;
import org.onap.policy.clamp.models.acm.concepts.LockState;
import org.onap.policy.clamp.models.acm.concepts.NodeTemplateState;
+import org.onap.policy.clamp.models.acm.concepts.StateChangeResult;
import org.onap.policy.clamp.models.acm.messages.rest.instantiation.AcInstanceStateUpdate;
import org.onap.policy.clamp.models.acm.messages.rest.instantiation.InstantiationResponse;
import org.onap.policy.clamp.models.acm.persistence.provider.AcDefinitionProvider;
@@ -254,6 +255,11 @@ public class AutomationCompositionInstantiationProvider {
throw new PfModelRuntimeException(Response.Status.BAD_REQUEST,
"Automation composition state is still " + automationComposition.getDeployState());
}
+ if (DeployState.DELETING.equals(automationComposition.getDeployState())
+ && StateChangeResult.NO_ERROR.equals(automationComposition.getStateChangeResult())) {
+ throw new PfModelRuntimeException(Response.Status.BAD_REQUEST,
+ "Automation composition state is still " + automationComposition.getDeployState());
+ }
if (automationComposition.getRestarting() != null) {
throw new PfModelRuntimeException(Status.BAD_REQUEST, "There is a restarting process, Delete not allowed");
}