summaryrefslogtreecommitdiffstats
path: root/ms/controllerblueprints/modules/resource-dict/src
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
commitfc3e34836f7be8eda28a8f996d733e8dfca01450 (patch)
tree74d19f88ff32919466ed7d1956feb77d63fc6411 /ms/controllerblueprints/modules/resource-dict/src
parent3b9237fc576986283b31a1b3761da2093e49f6a9 (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')
-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 1aeda0ba1..69ee1cfd4 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")