package org.onap.ccsdk.apps.blueprintsprocessor.functions.python.executor
import com.fasterxml.jackson.databind.JsonNode
-import com.fasterxml.jackson.databind.node.JsonNodeFactory
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ActionIdentifiers
-import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.CommonHeader
import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ExecutionServiceInput
import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.apps.controllerblueprints.core.asJsonNode
@Test
fun testPythonComponentInjection() {
- /*
- val executionServiceInput = ExecutionServiceInput()
- executionServiceInput.payload = JsonNodeFactory.instance.objectNode()
-
- val commonHeader = CommonHeader()
- commonHeader.requestId = "1234"
- executionServiceInput.commonHeader = commonHeader
-
- val actionIdentifiers = ActionIdentifiers()
- actionIdentifiers.blueprintName = "baseconfiguration"
- actionIdentifiers.blueprintVersion = "1.0.0"
- actionIdentifiers.actionName = "activate"
- executionServiceInput.actionIdentifiers = actionIdentifiers
-
- */
val executionServiceInput = JacksonUtils.readValueFromClassPathFile("payload/requests/sample-activate-request.json",
ExecutionServiceInput::class.java)!!
val bluePrintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime("1234",
- "./../../../../components/model-catalog/blueprint-model/starter-blueprint/baseconfiguration")
+ "./../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration")
val stepMetaData: MutableMap<String, JsonNode> = hashMapOf()
stepMetaData.putJsonElement(BluePrintConstants.PROPERTY_CURRENT_NODE_TEMPLATE, "activate-jython")