diff options
author | Muthuramalingam, Brinda Santh <brindasanth@in.ibm.com> | 2019-03-08 14:25:20 -0500 |
---|---|---|
committer | Muthuramalingam, Brinda Santh <brindasanth@in.ibm.com> | 2019-03-08 14:25:20 -0500 |
commit | b2717e28c9e4a2d2531ff05571c04376c3b05bf7 (patch) | |
tree | b48a55643fd29937741231135d60565073c93d46 /ms/controllerblueprints/modules/resource-dict | |
parent | 62919a6dfa67efce97c09325b2f75a33f3bc4518 (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')
-rw-r--r-- | ms/controllerblueprints/modules/resource-dict/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/resource/dict/utils/ResourceDictionaryUtils.kt | 6 |
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") |