From 4a53e10178116152fd5f945d0a544775f5ab2cb1 Mon Sep 17 00:00:00 2001 From: vinal patel Date: Wed, 20 Feb 2019 16:02:44 -0500 Subject: Ressource resolution using configurable database Change-Id: I8589e4db45ba3d5bcb906f25bcc76b5136159608 Issue-ID: CCSDK-1092 Signed-off-by: vinal patel --- .../core/utils/BluePrintMetadataUtils.kt | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'ms/controllerblueprints/modules') 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 fa5e1647..c34a769e 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 = 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> { val bluePrintContext: BluePrintContext = getBaseEnhancementBluePrintContext(blueprintBasePath) - val context: MutableMap = 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): BluePrintRuntimeService> { val bluePrintContext: BluePrintContext = getBluePrintContext(blueprintBasePath) val bluePrintRuntimeService = DefaultBluePrintRuntimeService(id, bluePrintContext) + executionContext.forEach{ + bluePrintRuntimeService.put(it.key,it.value) + } + bluePrintRuntimeService.setExecutionContext(executionContext) return bluePrintRuntimeService } -- cgit 1.2.3-korg