aboutsummaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/modules/services
diff options
context:
space:
mode:
authorLukasz Rajewski <lukasz.rajewski@orange.com>2021-02-09 19:54:19 +0100
committerKAPIL SINGAL <ks220y@att.com>2021-02-09 19:21:03 +0000
commit953fc8acec004526b0b002555dd034e36ee14fe7 (patch)
tree40e8e5ed25360a0e38f6b6040353d48343650220 /ms/blueprintsprocessor/modules/services
parent2829e4c361d440eebdd8dc4f3e3dda3a9989cb64 (diff)
Instance dependencies in ComponentScriptExecutor
Issue-ID: CCSDK-3146 Signed-off-by: Lukasz Rajewski <lukasz.rajewski@orange.com> Change-Id: I6502abd0d2a3fa85cefc3bc6a900f27171b51569
Diffstat (limited to 'ms/blueprintsprocessor/modules/services')
-rw-r--r--ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentScriptExecutor.kt8
1 files changed, 7 insertions, 1 deletions
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<String>) {
- /** Place holder for Child to add extra dependencies */
+ val instanceDependenciesNode = operationInputs.get(INPUT_INSTANCE_DEPENDENCIES) as? ArrayNode
+ instanceDependenciesNode?.forEach { instanceName ->
+ scriptDependencies.add(instanceName.textValue())
+ }
}
}