summaryrefslogtreecommitdiffstats
path: root/ms/controllerblueprints/modules
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2019-03-06 21:03:25 +0000
committerGerrit Code Review <gerrit@onap.org>2019-03-06 21:03:25 +0000
commit3b9237fc576986283b31a1b3761da2093e49f6a9 (patch)
treebe435b2f201428d2c9213533477aa64d70e183d0 /ms/controllerblueprints/modules
parentd4af6d44a96d11916b4ae678dea0849c3e4be0b5 (diff)
parent02273fa86a10af32bffcfff30bcd8e51baa09545 (diff)
Merge "Ressource resolution using configurable database"
Diffstat (limited to 'ms/controllerblueprints/modules')
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/BluePrintMetadataUtils.kt17
1 files changed, 8 insertions, 9 deletions
diff --git a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/BluePrintMetadataUtils.kt b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/BluePrintMetadataUtils.kt
index fa5e16477..c34a769e9 100644
--- a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/BluePrintMetadataUtils.kt
+++ b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/BluePrintMetadataUtils.kt
@@ -97,12 +97,9 @@ class BluePrintMetadataUtils {
val bluePrintContext: BluePrintContext = getBluePrintContext(blueprintBasePath)
- val context: MutableMap<String, JsonNode> = hashMapOf()
- context[BluePrintConstants.PROPERTY_BLUEPRINT_BASE_PATH] = blueprintBasePath.asJsonPrimitive()
- context[BluePrintConstants.PROPERTY_BLUEPRINT_PROCESS_ID] = id.asJsonPrimitive()
-
val bluePrintRuntimeService = DefaultBluePrintRuntimeService(id, bluePrintContext)
- bluePrintRuntimeService.setExecutionContext(context)
+ bluePrintRuntimeService.put(BluePrintConstants.PROPERTY_BLUEPRINT_BASE_PATH, blueprintBasePath.asJsonPrimitive())
+ bluePrintRuntimeService.put(BluePrintConstants.PROPERTY_BLUEPRINT_PROCESS_ID, id.asJsonPrimitive())
return bluePrintRuntimeService
}
@@ -110,12 +107,10 @@ class BluePrintMetadataUtils {
fun getBaseEnhancementBluePrintRuntime(id: String, blueprintBasePath: String): BluePrintRuntimeService<MutableMap<String, JsonNode>> {
val bluePrintContext: BluePrintContext = getBaseEnhancementBluePrintContext(blueprintBasePath)
- val context: MutableMap<String, JsonNode> = hashMapOf()
- context[BluePrintConstants.PROPERTY_BLUEPRINT_BASE_PATH] = blueprintBasePath.asJsonPrimitive()
- context[BluePrintConstants.PROPERTY_BLUEPRINT_PROCESS_ID] = id.asJsonPrimitive()
val bluePrintRuntimeService = DefaultBluePrintRuntimeService(id, bluePrintContext)
- bluePrintRuntimeService.setExecutionContext(context)
+ bluePrintRuntimeService.put(BluePrintConstants.PROPERTY_BLUEPRINT_BASE_PATH, blueprintBasePath.asJsonPrimitive())
+ bluePrintRuntimeService.put(BluePrintConstants.PROPERTY_BLUEPRINT_PROCESS_ID, id.asJsonPrimitive())
return bluePrintRuntimeService
}
@@ -123,6 +118,10 @@ class BluePrintMetadataUtils {
fun getBluePrintRuntime(id: String, blueprintBasePath: String, executionContext: MutableMap<String, JsonNode>): BluePrintRuntimeService<MutableMap<String, JsonNode>> {
val bluePrintContext: BluePrintContext = getBluePrintContext(blueprintBasePath)
val bluePrintRuntimeService = DefaultBluePrintRuntimeService(id, bluePrintContext)
+ executionContext.forEach{
+ bluePrintRuntimeService.put(it.key,it.value)
+ }
+
bluePrintRuntimeService.setExecutionContext(executionContext)
return bluePrintRuntimeService
}