diff options
3 files changed, 97 insertions, 64 deletions
@@ -2,6 +2,7 @@ project: 'so' project_creation_date: '2017-01-30' lifecycle_state: 'Incubation' +project_category: '' project_lead: &onap_releng_ptl name: 'Seshu Kumar' email: 'seshu.kumar.m@huawei.com' @@ -13,78 +14,100 @@ issue_tracking: type: 'jira' url: 'https://jira.onap.org/projects/SO' key: 'SO' +mailing_list: + type: 'groups.io' + url: 'lists.onap.org' + tag: '<[sub-project_name]>' +realtime_discussion: '' meetings: - type: 'zoom' - agenda: 'https://wiki.onap.org/display/DW/Minutes+Of+Meeting' - url: 'https://wiki.onap.org/display/DW/Service+Orchestrator+Project' - server: 'n/a' - channel: 'n/a' - repeats: 'weekly' - time: '14:00 UTC' + agenda: 'https://wiki.onap.org/display/DW/Minutes+Of+Meeting' + url: 'https://wiki.onap.org/display/DW/Service+Orchestrator+Project' + server: 'n/a' + channel: 'n/a' + repeats: 'weekly' + time: '14:00 UTC' +repositories: + - so + - so-chef-repo + - so-docker-config + - so-libs + - so-so-config committers: - <<: *onap_releng_ptl - name: 'Chuanyu Chen' - email: 'chenchuanyu@huawei.com' - company: 'Huawei' - id: 'boychuanyu' - timezone: 'Beijing/China' + email: 'chenchuanyu@huawei.com' + company: 'Huawei' + id: 'boychuanyu' + timezone: 'Asia/Shanghai' - name: 'Byung-Woo Jun' - email: 'byung-woo.jun@ericsson.com' - company: 'Ericsson' - id: 'byungwoojun' - timezone: '' + email: 'byung-woo.jun@ericsson.com' + company: 'Ericsson' + id: 'byungwoojun' + timezone: '' - name: 'DeWayne Filppi' - email: 'dewayne@cloudify.co' - company: 'Cloudify' - id: 'dfilppi' - timezone: '' - - name: 'Eric Debeau' - email: 'eric.debeau@orange.com' - company: 'Orange' - id: 'eric.debeau' - timezone: '' - - name: 'Ethan Lynn' - email: 'ethanlynnl@vmware.com' - company: 'VMware' - id: 'ethanlynnl' - timezone: 'France/Lannion' + email: 'dewayne@cloudify.co' + company: 'Cloudify' + id: 'dfilppi' + timezone: '' - name: 'Rob Daugherty' - email: 'rd472p@att.com' - company: 'ATT' - id: 'rd472p' - timezone: '' - - name: 'Chengli Wang' - email: 'wangchengli@chinamobile.com' - company: 'China Mobile' - id: 'wangchengli' - timezone: 'China/Beijing' + email: 'rd472p@att.com' + company: 'ATT' + id: 'rd472p' + timezone: '' + - name: 'Yan Yang' + email: 'yangyanyj@chinamobile.com' + company: 'China Mobile' + id: 'yangyan' + timezone: 'Asia/Shanghai' - name: 'Marcus Williams' - email: 'marcus.williams@intel.com' - company: 'Intel' - id: 'mgkwill' - timezone: 'America/Los Angeles' + email: 'marcus.williams@intel.com' + company: 'Intel' + id: 'mgkwill' + timezone: 'America/Los Angeles' - name: 'Sanchita Pathak' - email: 'sanchita@techmahindra.com' - company: 'Tech Mahindra' - id: 'sanchitap' - timezone: 'Asia/Kolkata' + email: 'sanchita@techmahindra.com' + company: 'Tech Mahindra' + id: 'sanchitap' + timezone: 'Asia/Kolkata' + - name: 'Steve Smokowski' + email: 'ss835w@att.com' + company: 'ATT' + id: 'stevesmokowski' + timezone: 'America/New_York' + - name: 'Subhash Kumar Singh' + email: 'Subhash.Kumar.Singh@huawei.com' + company: 'Huawei' + id: 'subhash_singh' + timezone: 'Asia/Kolkata' + - name: 'Lukasz Muszkieta' + email: 'lukasz.muszkieta@nokia.com' + company: 'Nokia' + id: 'lukaszM' + timezone: 'Europe/Warsaw' tsc: approval: 'https://lists.onap.org/pipermail/onap-tsc' changes: - type: 'removal' - name: 'Tal Liron' - name: 'Heliu Zhong' - name: 'Yuanwei Yang' - name: 'Christophe Closset' - name: 'Claude Noshpitz' - name: 'maopeng zhang' - name: 'Bin Hou' - name: 'Fu Jinhua' - name: 'Jie Feng' - name: 'jackie tian' - name: 'Deng Hui' - link: 'https://lists.onap.org/pipermail/onap-tsc/2018-May/004802.html' + name: 'Tal Liron' + name: 'Heliu Zhong' + name: 'Yuanwei Yang' + name: 'Christophe Closset' + name: 'Claude Noshpitz' + name: 'maopeng zhang' + name: 'Bin Hou' + name: 'Fu Jinhua' + name: 'Jie Feng' + name: 'jackie tian' + name: 'Deng Hui' + link: 'https://lists.onap.org/pipermail/onap-tsc/2018-May/004802.html' - type: 'addition' - name: 'Marcus Williams' - name: 'Sanchita Pathak' - link: 'https://lists.onap.org/pipermail/onap-tsc/2018-May/004802.html' + name: 'Marcus Williams' + name: 'Sanchita Pathak' + link: 'https://lists.onap.org/pipermail/onap-tsc/2018-May/004802.html' + - type: 'addition' + name: 'Steve Smokowski' + name: 'Subhash Kumar Singh' + name: 'Lukasz Muszkieta' + link: 'https://lists.onap.org/g/onap-tsc/message/4320' + 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 b794e4174b..9260580713 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 @@ -609,16 +609,27 @@ public class BBInputSetup implements JavaDelegate { vnf = createGenericVnf(lookupKeyMap, instanceName, platform, lineOfBusiness, resourceId, generatedVnfType, instanceParams); serviceInstance.getVnfs().add(vnf); + mapVnfcCollectionInstanceGroup(vnf, modelInfo, service); } if(vnf != null) { mapCatalogVnf(vnf, modelInfo, service); - mapVnfcCollectionInstanceGroup(vnf, modelInfo, service); - if (instanceGroupId != null && instanceGroupModelInfo != null) { + if (instanceGroupId != null && instanceGroupModelInfo != null + && instanceGroupModelInfo.getModelType().equals(ModelType.networkInstanceGroup) + && !instanceGroupInList(vnf, instanceGroupId)) { mapNetworkCollectionInstanceGroup(vnf, instanceGroupId); } } } + protected boolean instanceGroupInList(GenericVnf vnf, String instanceGroupId) { + for(InstanceGroup instanceGroup : vnf.getInstanceGroups()) { + if(instanceGroup.getId() != null && instanceGroup.getId().equalsIgnoreCase(instanceGroupId)) { + return true; + } + } + return false; + } + protected void mapVnfcCollectionInstanceGroup(GenericVnf genericVnf, ModelInfo modelInfo, Service service) { VnfResourceCustomization vnfResourceCustomization = getVnfResourceCustomizationFromService(modelInfo, service); if(vnfResourceCustomization != null) { diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java index f6e433bf38..78238f0271 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java @@ -1314,12 +1314,11 @@ public class BBInputSetupTest { doReturn(vnf2AAI).when(SPY_bbInputSetupUtils).getAAIGenericVnf(vnf2.getVnfId()); doNothing().when(SPY_bbInputSetup).mapCatalogVnf(vnf2, modelInfo, service); doNothing().when(SPY_bbInputSetup).mapNetworkCollectionInstanceGroup(vnf2, "{instanceGroupId}"); - doNothing().when(SPY_bbInputSetup).mapVnfcCollectionInstanceGroup(vnf2, modelInfo, service); SPY_bbInputSetup.populateGenericVnf(modelInfo, instanceName, platform, lineOfBusiness, service, bbName, serviceInstance, lookupKeyMap, requestDetails.getRelatedInstanceList(), resourceId, vnfType, null); verify(SPY_bbInputSetup, times(2)).mapCatalogVnf(vnf2, modelInfo, service); verify(SPY_bbInputSetup, times(2)).mapNetworkCollectionInstanceGroup(vnf2, "{instanceGroupId}"); - verify(SPY_bbInputSetup, times(2)).mapVnfcCollectionInstanceGroup(vnf2, modelInfo, service); + verify(SPY_bbInputSetup, times(1)).mapVnfcCollectionInstanceGroup(vnf2, modelInfo, service); } @Test |