Fix enrichment for multiplicated assignments 51/131351/4
authorLukasz Rajewski <lukasz.rajewski@t-mobile.pl>
Fri, 30 Sep 2022 21:51:12 +0000 (23:51 +0200)
committerLukasz Rajewski <lukasz.rajewski@t-mobile.pl>
Wed, 5 Oct 2022 05:11:03 +0000 (05:11 +0000)
When different assignment mappings declare assignments of the same name,
only one of the data dictionaries used there is being enriched and others are ignored.
This change removes this limitation.

Issue-ID: CCSDK-3773
Signed-off-by: Lukasz Rajewski <lukasz.rajewski@t-mobile.pl>
Change-Id: I492b18e01265471f89459c6dd5a28818aa479e5e

ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/ResourceDefinitionEnhancerService.kt

index bbec8e6..75f171b 100644 (file)
@@ -106,9 +106,7 @@ class ResourceDefinitionEnhancerServiceImpl(private val resourceDefinitionRepoSe
             resourceAssignments.addAll(deferredResourceAssignment.await())
         }
 
-        val distinctResourceAssignments = resourceAssignments.distinctBy { it.name }
-        generateResourceDictionary(blueprintBasePath, distinctResourceAssignments)
-        // log.info("distinct Resource assignment ($distinctResourceAssignments)")
+        generateResourceDictionary(blueprintBasePath, resourceAssignments)
     }
 
     // Read the Resource Definitions from the Database and write to type file.