Fix resolution of keyIdentifiers 82/113582/1
authorJozsef Csongvai <jozsef.csongvai@bell.ca>
Tue, 6 Oct 2020 15:04:58 +0000 (11:04 -0400)
committerJozsef Csongvai <jozsef.csongvai@bell.ca>
Tue, 6 Oct 2020 18:18:07 +0000 (14:18 -0400)
Issue-ID: CCSDK-2875
Change-Id: Ie089ee7f186f74691556f65a52fbaa7c6c165061
Signed-off-by: Jozsef Csongvai <jozsef.csongvai@bell.ca>
ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DatabaseResourceAssignmentProcessor.kt
ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/RestResourceResolutionProcessor.kt

index 0417024..829af84 100644 (file)
@@ -101,7 +101,7 @@ open class DatabaseResourceAssignmentProcessor(
         }
 
         sourceProperties.inputKeyMapping
-            ?.mapValues { raRuntimeService.getDictionaryStore(it.value) }
+            ?.mapValues { raRuntimeService.getResolutionStore(it.value) }
             ?.map { KeyIdentifier(it.key, it.value) }
             ?.let { resourceAssignment.keyIdentifiers.addAll(it) }
 
index c2cf302..92a8533 100644 (file)
@@ -79,9 +79,9 @@ open class RestResourceResolutionProcessor(private val blueprintRestLibPropertyS
                     checkNotNull(sourceProperties.inputKeyMapping) { "failed to get input-key-mappings for $dName under $dSource properties" }
                 val resolvedInputKeyMapping = resolveInputKeyMappingVariables(inputKeyMapping).toMutableMap()
 
-                inputKeyMapping?.mapValues { raRuntimeService.getDictionaryStore(it.value) }
-                    ?.map { KeyIdentifier(it.key, it.value) }
-                    ?.let { resourceAssignment.keyIdentifiers.addAll(it) }
+                resolvedInputKeyMapping.map { KeyIdentifier(it.key, it.value) }.let {
+                    resourceAssignment.keyIdentifiers.addAll(it)
+                }
 
                 // Resolving content Variables
                 val payload = resolveFromInputKeyMapping(nullToEmpty(sourceProperties.payload), resolvedInputKeyMapping)