diff options
author | Rob Daugherty <rd472p@att.com> | 2018-10-18 12:43:33 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-10-18 12:43:33 +0000 |
commit | 5f95907dfa4213d8ac23e221c194f930f568b970 (patch) | |
tree | dfed1668aeaff9402e2d2cbd663dd1e9a9e6abbd /bpmn/so-bpmn-infrastructure-common/src | |
parent | 19ca704576ea511935f7bb5d41e49886ce9a097c (diff) | |
parent | e761fa50f80b2d6888f510f67cab1d6e740fd28e (diff) |
Merge "Bug fixes October 16"
Diffstat (limited to 'bpmn/so-bpmn-infrastructure-common/src')
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') |