diff options
author | raviteja.karumuri <raviteja.karumuri@est.tech> | 2023-01-25 13:45:59 +0000 |
---|---|---|
committer | raviteja.karumuri <raviteja.karumuri@est.tech> | 2023-02-10 11:49:22 +0000 |
commit | 1a6b1ef83417efbbb8ec7cfe204c105e49e7e1f2 (patch) | |
tree | ff8d77a06139509fe9b29dc98f194ccf1e356409 /bpmn/MSOCommonBPMN/src/main | |
parent | 9cb10c58aacb2c0a79b0c93accf1ca4fe29522f9 (diff) |
[SO] Create changes for SO-API and BPMN-INFRA to support CNF's through ASD
Issue-ID: SO-4069
Signed-off-by: raviteja.karumuri <raviteja.karumuri@est.tech>
Change-Id: Ia8defe62c70e126df683ca523b10efe55a26db87
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/main')
-rw-r--r-- | bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java | 16 |
1 files changed, 14 insertions, 2 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 0c5e2d1410..178612c4bd 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 @@ -8,6 +8,8 @@ * ================================================================================ * Modifications Copyright (c) 2020 Nokia * ================================================================================ + * Modifications Copyright (c) 2023 Nordix Foundation + * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -410,7 +412,7 @@ public class BBInputSetup implements JavaDelegate { if (modelType.equals(ModelType.network)) { parameter.getLookupKeyMap().put(ResourceKey.NETWORK_ID, parameter.getResourceId()); this.populateL3Network(parameter); - } else if (modelType.equals(ModelType.vnf)) { + } else if (modelType.equals(ModelType.vnf) || modelType.equals(ModelType.cnf)) { parameter.getLookupKeyMap().put(ResourceKey.GENERIC_VNF_ID, parameter.getResourceId()); this.populateGenericVnf(parameter); } else if (modelType.equals(ModelType.volumeGroup) || (modelType.equals(ModelType.vfModule) @@ -897,7 +899,8 @@ public class BBInputSetup implements JavaDelegate { break; } } - if (vnf == null && parameter.getBbName().equalsIgnoreCase(AssignFlows.VNF.toString())) { + if ((vnf == null && parameter.getBbName().equalsIgnoreCase(AssignFlows.VNF.toString())) + || (parameter.getRequestDetails() != null && this.isCnf(parameter.getRequestDetails()))) { vnf = createGenericVnf(parameter.getLookupKeyMap(), parameter.getInstanceName(), parameter.getPlatform(), parameter.getLineOfBusiness(), parameter.getResourceId(), generatedVnfType, parameter.getInstanceParams(), parameter.getProductFamilyId(), parameter.getApplicationId()); @@ -914,6 +917,15 @@ public class BBInputSetup implements JavaDelegate { } } + private boolean isCnf(final RequestDetails requestDetails) { + logger.debug("Executing isCNF to check the model type is CNF"); + if (requestDetails.getModelInfo() != null) { + return ModelType.cnf.equals(requestDetails.getModelInfo().getModelType()); + } + logger.debug("Not a CNF model type:{}", requestDetails); + return false; + } + protected boolean instanceGroupInList(GenericVnf vnf, String instanceGroupId) { for (InstanceGroup instanceGroup : vnf.getInstanceGroups()) { if (instanceGroup.getId() != null && instanceGroup.getId().equalsIgnoreCase(instanceGroupId)) { |