diff options
author | Steve Smokowski <ss835w@att.com> | 2019-02-01 13:16:19 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-02-01 13:16:19 +0000 |
commit | 62572d10fe5ea77726371c624b6bcbb33ff1707b (patch) | |
tree | a6be37e568bf6ac17b8888e657a185784dd72d97 /bpmn/MSOCommonBPMN/src/main/java | |
parent | 3d46775fa205e66c24da18473bf2e9de9f3ec0b4 (diff) | |
parent | 1d2cd3801c1824b09743b38c6728f5fa27da876d (diff) |
Merge "Add setting of serviceId to productFamilyId"
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/main/java')
-rw-r--r-- | bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java | 20 |
1 files changed, 14 insertions, 6 deletions
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 63f832d706..ca0a78a3f2 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 @@ -107,6 +107,7 @@ public class BBInputSetup implements JavaDelegate { private static final String NETWORK = "Network"; private static final String VNF = "Vnf"; private static final String NETWORK_COLLECTION = "NetworkCollection"; + private static final String PREPROV = "PREPROV"; @Autowired private BBInputSetupUtils bbInputSetupUtils; @@ -273,10 +274,11 @@ public class BBInputSetup implements JavaDelegate { throws Exception { ModelInfo modelInfo = requestDetails.getModelInfo(); String instanceName = requestDetails.getRequestInfo().getInstanceName(); + String productFamilyId = requestDetails.getRequestInfo().getProductFamilyId(); ModelType modelType = modelInfo.getModelType(); RelatedInstanceList[] relatedInstanceList = requestDetails.getRelatedInstanceList(); - org.onap.so.serviceinstancebeans.Platform platform = requestDetails.getPlatform(); + org.onap.so.serviceinstancebeans.Platform platform = requestDetails.getPlatform(); org.onap.so.serviceinstancebeans.LineOfBusiness lineOfBusiness = requestDetails.getLineOfBusiness(); if (modelType.equals(ModelType.network)) { @@ -285,7 +287,7 @@ public class BBInputSetup implements JavaDelegate { } else if (modelType.equals(ModelType.vnf)) { lookupKeyMap.put(ResourceKey.GENERIC_VNF_ID, resourceId); this.populateGenericVnf(modelInfo, instanceName, platform, lineOfBusiness, service, bbName, serviceInstance, - lookupKeyMap, relatedInstanceList, resourceId, vnfType, null); + lookupKeyMap, relatedInstanceList, resourceId, vnfType, null, productFamilyId); } else if (modelType.equals(ModelType.volumeGroup)) { lookupKeyMap.put(ResourceKey.VOLUME_GROUP_ID, resourceId); this.populateVolumeGroup(modelInfo, service, bbName, serviceInstance, lookupKeyMap, resourceId, @@ -579,7 +581,8 @@ public class BBInputSetup implements JavaDelegate { org.onap.so.serviceinstancebeans.Platform platform, org.onap.so.serviceinstancebeans.LineOfBusiness lineOfBusiness, Service service, String bbName, ServiceInstance serviceInstance, Map<ResourceKey, String> lookupKeyMap, - RelatedInstanceList[] relatedInstanceList, String resourceId, String vnfType, List<Map<String, String>> instanceParams) { + RelatedInstanceList[] relatedInstanceList, String resourceId, String vnfType, List<Map<String, String>> instanceParams, + String productFamilyId) { GenericVnf vnf = null; ModelInfo instanceGroupModelInfo = null; String instanceGroupId = null; @@ -607,7 +610,7 @@ public class BBInputSetup implements JavaDelegate { } if (vnf == null && bbName.equalsIgnoreCase(AssignFlows.VNF.toString())) { vnf = createGenericVnf(lookupKeyMap, instanceName, platform, lineOfBusiness, - resourceId, generatedVnfType, instanceParams); + resourceId, generatedVnfType, instanceParams, productFamilyId); serviceInstance.getVnfs().add(vnf); mapVnfcCollectionInstanceGroup(vnf, modelInfo, service); } @@ -658,13 +661,16 @@ public class BBInputSetup implements JavaDelegate { protected GenericVnf createGenericVnf(Map<ResourceKey, String> lookupKeyMap, String instanceName, org.onap.so.serviceinstancebeans.Platform platform, - org.onap.so.serviceinstancebeans.LineOfBusiness lineOfBusiness, String vnfId, String vnfType, List<Map<String, String>> instanceParams) { + org.onap.so.serviceinstancebeans.LineOfBusiness lineOfBusiness, String vnfId, String vnfType, List<Map<String, String>> instanceParams, + String productFamilyId) { lookupKeyMap.put(ResourceKey.GENERIC_VNF_ID, vnfId); GenericVnf genericVnf = new GenericVnf(); genericVnf.setVnfId(vnfId); genericVnf.setVnfName(instanceName); genericVnf.setOrchestrationStatus(OrchestrationStatus.PRECREATED); genericVnf.setVnfType(vnfType); + genericVnf.setProvStatus(PREPROV); + genericVnf.setServiceId(productFamilyId); if (platform != null) { genericVnf.setPlatform(this.mapperLayer.mapRequestPlatform(platform)); } @@ -1169,8 +1175,10 @@ public class BBInputSetup implements JavaDelegate { if (request != null) { this.bbInputSetupUtils.updateInfraActiveRequestVnfId(request, vnfId); } + String productFamilyId = requestDetails.getRequestInfo().getProductFamilyId(); this.populateGenericVnf(vnfs.getModelInfo(), vnfs.getInstanceName(), vnfs.getPlatform(), - vnfs.getLineOfBusiness(), service, bbName, serviceInstance, lookupKeyMap, null, vnfId, vnfType, vnfs.getInstanceParams()); + vnfs.getLineOfBusiness(), service, bbName, serviceInstance, lookupKeyMap, null, vnfId, vnfType, vnfs.getInstanceParams(), + productFamilyId); } else if (bbName.contains(VF_MODULE) || bbName.contains(VOLUME_GROUP)) { Pair<Vnfs, VfModules> vnfsAndVfModules = getVfModulesAndItsVnfsByKey(key, resources); vfModules = vnfsAndVfModules.getValue1(); |