aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOInfrastructureBPMN/src/main/groovy/org
diff options
context:
space:
mode:
authorBancala, Ben (bb3476) <bb3476@att.com>2018-05-03 11:50:13 -0400
committerRob Daugherty <rd472p@att.com>2018-05-04 17:31:05 +0000
commit18463785dabe925f7e76f21f28fa7551c7d559e1 (patch)
tree5c321f814871c384f0f3975ea1462f6dd53e10cc /bpmn/MSOInfrastructureBPMN/src/main/groovy/org
parent3ee4ec41ac18e51a16eafa767e090502b1a33fb5 (diff)
fixed bug in createvnfinfra bpmn
Change-Id: I3e27ec0d1487eb68e8c54d27508b58233bf49808 Issue-ID: SO-602 Signed-off-by: Bancala, Ben (bb3476) <bb3476@att.com>
Diffstat (limited to 'bpmn/MSOInfrastructureBPMN/src/main/groovy/org')
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVfModuleInfra.groovy21
1 files changed, 21 insertions, 0 deletions
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVfModuleInfra.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVfModuleInfra.groovy
index 3f0b8d11f1..797086b125 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVfModuleInfra.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVfModuleInfra.groovy
@@ -35,6 +35,8 @@ import org.openecomp.mso.bpmn.common.scripts.VidUtils;
import org.openecomp.mso.bpmn.core.RollbackData
import org.openecomp.mso.bpmn.core.WorkflowException
import org.openecomp.mso.bpmn.core.json.JsonUtils
+import org.openecomp.mso.bpmn.infrastructure.aai.AAICreateResources;
+import org.onap.aai.domain.yang.v12.GenericVnf;
public class CreateVfModuleInfra extends AbstractServiceTaskProcessor {
@@ -287,6 +289,25 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor {
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in sendResponse(): ' + e.getMessage())
}
}
+
+ /**
+ * Query AAI for vnf orchestration status to determine if health check and config scaling should be run
+ */
+ public void queryAAIForVnfOrchestrationStatus(DelegateExecution execution) {
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ def vnfId = execution.getVariable("CVFMI_vnfId")
+ execution.setVariable("runHealthCheck", false);
+ execution.setVariable("runConfigScaleOut", false);
+ AAICreateResources aaiCreateResources = new AAICreateResources();
+ Optional<GenericVnf> vnf = aaiCreateResources.getVnfInstance(vnfId);
+ if(vnf.isPresent()){
+ def vnfOrchestrationStatus = vnf.get().getOrchestrationStatus();
+ if("active".equalsIgnoreCase(vnfOrchestrationStatus)){
+ execution.setVariable("runHealthCheck", true);
+ execution.setVariable("runConfigScaleOut", true);
+ }
+ }
+ }
/**
*