From 953fc8acec004526b0b002555dd034e36ee14fe7 Mon Sep 17 00:00:00 2001 From: Lukasz Rajewski Date: Tue, 9 Feb 2021 19:54:19 +0100 Subject: Instance dependencies in ComponentScriptExecutor Issue-ID: CCSDK-3146 Signed-off-by: Lukasz Rajewski Change-Id: I6502abd0d2a3fa85cefc3bc6a900f27171b51569 --- .../services/execution/ComponentScriptExecutor.kt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'ms/blueprintsprocessor/modules/services/execution-service') diff --git a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentScriptExecutor.kt b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentScriptExecutor.kt index 597426a5f..213d21eae 100644 --- a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentScriptExecutor.kt +++ b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentScriptExecutor.kt @@ -1,5 +1,6 @@ /* * Copyright © 2019 IBM. + * Copyright © 2021 Orange. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,6 +17,7 @@ package org.onap.ccsdk.cds.blueprintsprocessor.services.execution +import com.fasterxml.jackson.databind.node.ArrayNode import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput import org.onap.ccsdk.cds.controllerblueprints.core.getAsString import org.springframework.beans.factory.config.ConfigurableBeanFactory @@ -36,6 +38,7 @@ open class ComponentScriptExecutor(private var componentFunctionScriptingService const val INPUT_SCRIPT_TYPE = "script-type" const val INPUT_SCRIPT_CLASS_REFERENCE = "script-class-reference" const val INPUT_DYNAMIC_PROPERTIES = "dynamic-properties" + const val INPUT_INSTANCE_DEPENDENCIES = "instance-dependencies" const val ATTRIBUTE_RESPONSE_DATA = "response-data" const val ATTRIBUTE_STATUS = "status" @@ -69,6 +72,9 @@ open class ComponentScriptExecutor(private var componentFunctionScriptingService } open fun populateScriptDependencies(scriptDependencies: MutableList) { - /** Place holder for Child to add extra dependencies */ + val instanceDependenciesNode = operationInputs.get(INPUT_INSTANCE_DEPENDENCIES) as? ArrayNode + instanceDependenciesNode?.forEach { instanceName -> + scriptDependencies.add(instanceName.textValue()) + } } } -- cgit 1.2.3-korg