From b2717e28c9e4a2d2531ff05571c04376c3b05bf7 Mon Sep 17 00:00:00 2001 From: "Muthuramalingam, Brinda Santh" Date: Fri, 8 Mar 2019 14:25:20 -0500 Subject: Change resource definition population Change-Id: I95d3bcddb6b2027a523ca7411d0c6c7f98fa0f63 Issue-ID: CCSDK-1110 Signed-off-by: Muthuramalingam, Brinda Santh --- .../resource/dict/utils/ResourceDictionaryUtils.kt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ms/controllerblueprints/modules/resource-dict/src') diff --git a/ms/controllerblueprints/modules/resource-dict/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/resource/dict/utils/ResourceDictionaryUtils.kt b/ms/controllerblueprints/modules/resource-dict/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/resource/dict/utils/ResourceDictionaryUtils.kt index 1aeda0ba..69ee1cfd 100644 --- a/ms/controllerblueprints/modules/resource-dict/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/resource/dict/utils/ResourceDictionaryUtils.kt +++ b/ms/controllerblueprints/modules/resource-dict/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/resource/dict/utils/ResourceDictionaryUtils.kt @@ -85,6 +85,12 @@ object ResourceDictionaryUtils { ?: throw BluePrintProcessorException("couldn't get ResourceAssignment definitions for the file($filePath)") } + fun writeResourceDefinitionTypes(basePath: String, resourceDefinitions: List) { + val resourceDefinitionMap = resourceDefinitions.map { it.name to it }.toMap() + writeResourceDefinitionTypes(basePath, resourceDefinitionMap) + + } + fun writeResourceDefinitionTypes(basePath: String, resourceDefinitionMap: Map) { val typePath = basePath.plus(File.separator).plus(BluePrintConstants.TOSCA_DEFINITIONS_DIR) .plus(File.separator).plus("${ResourceDictionaryConstants.PATH_RESOURCE_DEFINITION_TYPE}.json") -- cgit 1.2.3-korg