diff options
author | Dan Timoney <dtimoney@att.com> | 2019-03-09 14:02:29 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-03-09 14:02:29 +0000 |
commit | a5d9a4ddb92bad7d3334d8a6f9bc93879b8009ef (patch) | |
tree | ce5dfbe697191447f0d2797403128c4b8452e0b2 /ms/controllerblueprints/modules/resource-dict | |
parent | 5d51986fd1fc4f22d107b2fe6b127a2704278d43 (diff) | |
parent | b2717e28c9e4a2d2531ff05571c04376c3b05bf7 (diff) |
Merge "Change resource definition population"
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") |