diff options
author | Benjamin, Max (mb388a) <mb388a@us.att.com> | 2018-10-16 16:46:17 -0400 |
---|---|---|
committer | Benjamin, Max (mb388a) <mb388a@us.att.com> | 2018-10-17 10:02:42 -0400 |
commit | e761fa50f80b2d6888f510f67cab1d6e740fd28e (patch) | |
tree | 16bbf0ee87ad7234a0da6c1cc483cf96858f6f2a /bpmn/so-bpmn-infrastructure-common/src | |
parent | dae0218b5134920ddbbc76be657aebcb3314e1bd (diff) |
Bug fixes October 16
Treat the VfModule returned from PrepareUpdateAAIVfModule call as an
AAI object
collection create, connect instanceGroup to cloudRegion
Fix a typo in the name of the method for getting a variable
testing mapping of instance group role
test NetworkInstanceGroup role to be SUB-INTERFACE
use enum value with hyphen for subtype
Some updates based on feedback to java codes
updated client to use optional instead of passing null
added case where client sends null due to mapping issue
added generic response object and pinc returns response
build relationship now correctly removes wrapper
Ensure that no null object gets referenced while checking if VNF is
empty.
Change-Id: I6177877518475c1f2e8e4e9dbd2ad1e2f3e10d18
Issue-ID: SO-1144
Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
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') |