From daf0b6edbce77e0a5de849ebff5c698993f9c372 Mon Sep 17 00:00:00 2001 From: "BENJAMIN, MAX" Date: Thu, 4 Mar 2021 10:11:19 -0500 Subject: create protected method for vf module bb logic create protected method for vf module bb logic Issue-ID: SO-3569 Signed-off-by: AT&T Open Source Change-Id: I66076655781c8593a78da380f74c028e635b4d5b --- .../servicedecomposition/tasks/BBInputSetup.java | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'bpmn') 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 7c283ab153..5cbadd6b75 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 @@ -410,15 +410,7 @@ public class BBInputSetup implements JavaDelegate { parameter.getLookupKeyMap().put(ResourceKey.VOLUME_GROUP_ID, parameter.getResourceId()); this.populateVolumeGroup(parameter); } else if (modelType.equals(ModelType.vfModule)) { - if (parameter.getBbName().contains("Configuration")) { - parameter.setResourceId(parameter.getLookupKeyMap().get(ResourceKey.CONFIGURATION_ID)); - parameter.getModelInfo().setModelCustomizationUuid(parameter.getConfigurationKey()); - populateConfiguration(parameter); - } else { - parameter.getLookupKeyMap().put(ResourceKey.VF_MODULE_ID, parameter.getResourceId()); - parameter.setCloudConfiguration(parameter.getRequestDetails().getCloudConfiguration()); - this.populateVfModule(parameter); - } + populateVfModuleOnAssignAndCreateFlows(parameter); } else if (modelType.equals(ModelType.instanceGroup)) { parameter.getLookupKeyMap().put(ResourceKey.INSTANCE_GROUP_ID, parameter.getResourceId()); this.populateInstanceGroup(parameter); @@ -435,6 +427,18 @@ public class BBInputSetup implements JavaDelegate { parameter.getServiceInstance().getInstanceGroups().add(instanceGroup); } + protected void populateVfModuleOnAssignAndCreateFlows(BBInputSetupParameter parameter) throws Exception { + if (parameter.getBbName().contains("Configuration")) { + parameter.setResourceId(parameter.getLookupKeyMap().get(ResourceKey.CONFIGURATION_ID)); + parameter.getModelInfo().setModelCustomizationUuid(parameter.getConfigurationKey()); + populateConfiguration(parameter); + } else { + parameter.getLookupKeyMap().put(ResourceKey.VF_MODULE_ID, parameter.getResourceId()); + parameter.setCloudConfiguration(parameter.getRequestDetails().getCloudConfiguration()); + this.populateVfModule(parameter); + } + } + protected void mapCatalogInstanceGroup(InstanceGroup instanceGroup, ModelInfo modelInfo, Service service) { // @TODO: this will populate the instanceGroup model info. // Dependent on MSO-5821 653458 US - MSO - Enhance Catalog DB Schema & Adapter -- cgit 1.2.3-korg