From cf90f6988c717eb609f5da7d1aee04c668b21fe9 Mon Sep 17 00:00:00 2001 From: "Benjamin, Max (mb388a)" Date: Fri, 10 Aug 2018 17:19:31 -0400 Subject: Casablana bugfixes updated mock in unassignnetworkbbtest instead of base added mock to extract pojos method in unassignnetwork Return gBuildingBlockExecution from calls to VnfAdapter subprocess Correct JUnit data to expect modelInfoVfModule Enable Spring Security for logging of unauthorized/bad credentials errors Fix handling of a case of no VF Modules in a VNF resource. fix populating lookupKeyMap with resource ids removed unnecessary test resources Issue-ID: SO-848 Change-Id: Id89f075dcac4042bf8fb1e207e66d289d079171f Signed-off-by: Benjamin, Max (mb388a) --- .../scripts/DoUpdateVnfAndModules.groovy | 27 ++++++++++++---------- 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'bpmn/so-bpmn-infrastructure-common/src/main') diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVnfAndModules.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVnfAndModules.groovy index 34a73bd35c..6b42406883 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVnfAndModules.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVnfAndModules.groovy @@ -304,19 +304,22 @@ class DoUpdateVnfAndModules extends AbstractServiceTaskProcessor { VnfResource vnfResource = (VnfResource) execution.getVariable("vnfResourceDecomposition") List moduleResources = vnfResource.getVfModules() - for (j in 0..moduleResources.size()-1) { - ModelInfo modelInfo = moduleResources[j].getModelInfo() - String modelInvariantUuidFromDecomposition = modelInfo.getModelInvariantUuid() - msoLogger.debug("modelInvariantUuidFromDecomposition: " + modelInvariantUuidFromDecomposition) - - if (modelInvariantUuid.equals(modelInvariantUuidFromDecomposition)) { - String vfModuleModelInfo = modelInfo.toJsonString() - String vfModuleModelInfoValue = jsonUtil.getJsonValue(vfModuleModelInfo, "modelInfo") - execution.setVariable("DUVAM_vfModuleModelInfo", vfModuleModelInfoValue) - msoLogger.debug("vfModuleModelInfo: " + vfModuleModelInfoValue) - break + if (moduleResources != null && !moduleResources.isEmpty()) { + + for (j in 0..moduleResources.size()-1) { + ModelInfo modelInfo = moduleResources[j].getModelInfo() + String modelInvariantUuidFromDecomposition = modelInfo.getModelInvariantUuid() + msoLogger.debug("modelInvariantUuidFromDecomposition: " + modelInvariantUuidFromDecomposition) + + if (modelInvariantUuid.equals(modelInvariantUuidFromDecomposition)) { + String vfModuleModelInfo = modelInfo.toJsonString() + String vfModuleModelInfoValue = jsonUtil.getJsonValue(vfModuleModelInfo, "modelInfo") + execution.setVariable("DUVAM_vfModuleModelInfo", vfModuleModelInfoValue) + msoLogger.debug("vfModuleModelInfo: " + vfModuleModelInfoValue) + break + } + } - } }catch(Exception e){ -- cgit 1.2.3-korg