aboutsummaryrefslogtreecommitdiffstats
path: root/ms/controllerblueprints/modules/resource-dict/src/main
diff options
context:
space:
mode:
authorMuthuramalingam, Brinda Santh <brindasanth@in.ibm.com>2019-03-08 14:25:20 -0500
committerMuthuramalingam, Brinda Santh <brindasanth@in.ibm.com>2019-03-08 14:25:20 -0500
commitb2717e28c9e4a2d2531ff05571c04376c3b05bf7 (patch)
treeb48a55643fd29937741231135d60565073c93d46 /ms/controllerblueprints/modules/resource-dict/src/main
parent62919a6dfa67efce97c09325b2f75a33f3bc4518 (diff)
Change resource definition population
Change-Id: I95d3bcddb6b2027a523ca7411d0c6c7f98fa0f63 Issue-ID: CCSDK-1110 Signed-off-by: Muthuramalingam, Brinda Santh <brindasanth@in.ibm.com>
Diffstat (limited to 'ms/controllerblueprints/modules/resource-dict/src/main')
-rw-r--r--ms/controllerblueprints/modules/resource-dict/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/resource/dict/utils/ResourceDictionaryUtils.kt6
1 files changed, 6 insertions, 0 deletions
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<ResourceDefinition>) {
+ val resourceDefinitionMap = resourceDefinitions.map { it.name to it }.toMap()
+ writeResourceDefinitionTypes(basePath, resourceDefinitionMap)
+
+ }
+
fun writeResourceDefinitionTypes(basePath: String, resourceDefinitionMap: Map<String, ResourceDefinition>) {
val typePath = basePath.plus(File.separator).plus(BluePrintConstants.TOSCA_DEFINITIONS_DIR)
.plus(File.separator).plus("${ResourceDictionaryConstants.PATH_RESOURCE_DEFINITION_TYPE}.json")