From f65448561b7c062c73c5d562e196c82b0e94e207 Mon Sep 17 00:00:00 2001 From: sreejatechm Date: Mon, 10 Jan 2022 12:26:46 +0530 Subject: CNF Healthcheck query based on helm status -Enhancement of CNFO model with helm upgrade -Included code changes with respect to HealthCheckBB Issue-ID: SO-3814 Signed-off-by: sreejatechm Change-Id: I44f11f156c132d713f42f0a855adb6730b7c6abe --- .../servicedecomposition/tasks/BBInputSetup.java | 27 +++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'bpmn/MSOCommonBPMN') diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java index d39da5ee37..603e11d458 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java @@ -1250,7 +1250,7 @@ public class BBInputSetup implements JavaDelegate { || requestAction.equalsIgnoreCase("activateFabricConfiguration") || requestAction.equalsIgnoreCase("recreateInstance") || requestAction.equalsIgnoreCase("replaceInstance") - || requestAction.equalsIgnoreCase("upgradeInstance")) { + || requestAction.equalsIgnoreCase("upgradeInstance") || requestAction.equalsIgnoreCase("healthCheck")) { return getGBBMacroExistingService(executeBB, lookupKeyMap, bbName, requestAction, requestDetails.getCloudConfiguration()); } @@ -1564,6 +1564,9 @@ public class BBInputSetup implements JavaDelegate { break; } } + } else if (bbName.equals("HealthCheckBB") + && (VNF).equalsIgnoreCase(executeBB.getBuildingBlock().getBpmnScope())) { + this.setisHelmforHealthCheckBB(service, serviceInstance, gBB); } if (executeBB.getWorkflowResourceIds() != null) { parameter.setResourceId(executeBB.getWorkflowResourceIds().getNetworkCollectionId()); @@ -2112,6 +2115,28 @@ public class BBInputSetup implements JavaDelegate { return collection; } + private void setisHelmforHealthCheckBB(Service service, ServiceInstance serviceInstance, GeneralBuildingBlock gBB) { + for (GenericVnf vnf : serviceInstance.getVnfs()) { + for (VfModule vfModule : vnf.getVfModules()) { + String vnfModelCustomizationUUID = + this.bbInputSetupUtils.getAAIGenericVnf(vnf.getVnfId()).getModelCustomizationId(); + ModelInfo vnfModelInfo = new ModelInfo(); + vnfModelInfo.setModelCustomizationUuid(vnfModelCustomizationUUID); + this.mapCatalogVnf(vnf, vnfModelInfo, service); + String vfModuleCustomizationUUID = this.bbInputSetupUtils + .getAAIVfModule(vnf.getVnfId(), vfModule.getVfModuleId()).getModelCustomizationId(); + ModelInfo vfModuleModelInfo = new ModelInfo(); + vfModuleModelInfo.setModelCustomizationId(vfModuleCustomizationUUID); + this.mapCatalogVfModule(vfModule, vfModuleModelInfo, service, vnfModelCustomizationUUID); + if (vfModule.getModelInfoVfModule() != null && vfModule.getModelInfoVfModule().getModelName() != null + && vfModule.getModelInfoVfModule().getModelName().contains("helm")) { + gBB.getRequestContext().setIsHelm(true); + break; + } + } + } + } + protected void mapL3Networks(List list, List l3Networks) { for (AAIResourceUri aaiResourceUri : list) { l3Networks.add(this.mapL3Network(aaiResourceUri)); -- cgit 1.2.3-korg