aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-infrastructure-common
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn/so-bpmn-infrastructure-common')
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModule.groovy4
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnf.groovy8
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModule.groovy21
3 files changed, 23 insertions, 10 deletions
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModule.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModule.groovy
index 1a3e8aa4e6..85e67c51a7 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModule.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModule.groovy
@@ -217,8 +217,8 @@ public class DoDeleteVfModule extends AbstractServiceTaskProcessor{
// Get vfModuleName from AAI response if it was not specified on the request
if (vfModuleName == null || vfModuleName.isEmpty()) {
if (execution.getVariable("vfModuleFromAAI") != null) {
- VfModule vfModuleFromAAI = execution.getVariable("vfModuleFromAAI")
- vfModuleName = vfModuleFromAAI.getElementText("vf-module-name")
+ org.onap.aai.domain.yang.VfModule vfModuleFromAAI = execution.getVariable("vfModuleFromAAI")
+ vfModuleName = vfModuleFromAAI.getVfModuleName()
}
}
String vfModuleModelName = execution.getVariable("vfModuleModelName")
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnf.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnf.groovy
index 456a9cfabf..47a4d55e0c 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnf.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnf.groovy
@@ -118,8 +118,12 @@ class DoDeleteVnf extends AbstractServiceTaskProcessor {
}
Optional<GenericVnf> vnf = wrapper.asBean(GenericVnf.class)
- if(!vnf.get().getVfModules().getVfModule().isEmpty()){
- execution.setVariable("DoDVNF_vnfInUse", true)
+ if (vnf.get() != null) {
+ if (vnf.get().getVfModules() != null) {
+ if((vnf.get().getVfModules().getVfModule() != null) && !vnf.get().getVfModules().getVfModule().isEmpty()){
+ execution.setVariable("DoDVNF_vnfInUse", true)
+ }
+ }
}
}else{
execution.setVariable("GENGV_FoundIndicator", false)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModule.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModule.groovy
index bce19795ac..33cb6d4760 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModule.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModule.groovy
@@ -458,8 +458,11 @@ public class DoUpdateVfModule extends VfModuleBase {
def vnfType = execution.getVariable('DOUPVfMod_vnfType')
def vfModuleId = execution.getVariable('DOUPVfMod_vfModuleId')
def vfModuleModelName = execution.getVariable('DOUPVfMod_vfModuleModelName')
- def VfModule vfModule = (VfModule) execution.getVariable('DOUPVfMod_vfModule')
- def vfModuleName = vfModule.getElementText('vf-module-name')
+ def vfModuleName = ""
+ if (execution.getVariable('DOUPVfMod_vfModule') != null) {
+ org.onap.aai.domain.yang.VfModule vfModule = execution.getVariable('DOUPVfMod_vfModule')
+ vfModuleName = vfModule.getVfModuleName()
+ }
def tenantId = execution.getVariable('DOUPVfMod_tenantId')
def aicCloudRegion = execution.getVariable('DOUPVfMod_aicCloudRegion')
boolean usePreload = execution.getVariable("DOUPVfMod_usePreload")
@@ -616,8 +619,11 @@ public class DoUpdateVfModule extends VfModuleBase {
def tenantId = execution.getVariable('DOUPVfMod_tenantId')
def volumeGroupId = execution.getVariable('DOUPVfMod_volumeGroupId')
def volumeGroupStackId = execution.getVariable('DOUPVfMod_volumeGroupStackId')
- def VfModule vfModule = (VfModule) execution.getVariable('DOUPVfMod_vfModule')
- def heatStackId = vfModule.getElementText('heat-stack-id')
+ def heatStackId = ""
+ if (execution.getVariable('DOUPVfMod_vfModule') != null) {
+ org.onap.aai.domain.yang.VfModule vfModule = execution.getVariable('DOUPVfMod_vfModule')
+ heatStackId = vfModule.getHeatStackId()
+ }
def cloudId = execution.getVariable('DOUPVfMod_aicCloudRegion')
def vnfType = execution.getVariable('DOUPVfMod_vnfType')
def vnfName = execution.getVariable('DOUPVfMod_vnfName')
@@ -836,8 +842,11 @@ public class DoUpdateVfModule extends VfModuleBase {
def vnfType = execution.getVariable('DOUPVfMod_vnfType')
def vfModuleId = execution.getVariable('DOUPVfMod_vfModuleId')
def vfModuleModelName = execution.getVariable('DOUPVfMod_vfModuleModelName')
- def VfModule vfModule = (VfModule) execution.getVariable('DOUPVfMod_vfModule')
- def vfModuleName = vfModule.getElementText('vf-module-name')
+ def vfModuleName = ""
+ if (execution.getVariable('DOUPVfMod_vfModule') != null) {
+ org.onap.aai.domain.yang.VfModule vfModule = execution.getVariable('DOUPVfMod_vfModule')
+ vfModuleName = vfModule.getVfModuleName()
+ }
def tenantId = execution.getVariable('DOUPVfMod_tenantId')
def aicCloudRegion = execution.getVariable('DOUPVfMod_aicCloudRegion')