Merge "Resource resolution should return a string"
authorDan Timoney <dtimoney@att.com>
Mon, 12 Aug 2019 13:14:12 +0000 (13:14 +0000)
committerGerrit Code Review <gerrit@onap.org>
Mon, 12 Aug 2019 13:14:12 +0000 (13:14 +0000)
1  2 
ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionService.kt

@@@ -93,17 -83,17 +93,17 @@@ open class ResourceResolutionServiceImp
  
      override suspend fun resolveResources(bluePrintRuntimeService: BluePrintRuntimeService<*>, nodeTemplateName: String,
                                            artifactNames: List<String>,
-                                           properties: Map<String, Any>): MutableMap<String, JsonNode> {
+                                           properties: Map<String, Any>): MutableMap<String, String> {
  
          val resourceAssignmentRuntimeService =
 -            ResourceAssignmentUtils.transformToRARuntimeService(bluePrintRuntimeService, artifactNames.toString())
 +                ResourceAssignmentUtils.transformToRARuntimeService(bluePrintRuntimeService, artifactNames.toString())
  
-         val resolvedParams: MutableMap<String, JsonNode> = hashMapOf()
+         val resolvedParams: MutableMap<String, String> = hashMapOf()
          artifactNames.forEach { artifactName ->
              val resolvedContent = resolveResources(resourceAssignmentRuntimeService, nodeTemplateName,
 -                artifactName, properties)
 +                    artifactName, properties)
  
-             resolvedParams[artifactName] = resolvedContent.asJsonType()
+             resolvedParams[artifactName] = resolvedContent
          }
          return resolvedParams
      }