summaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/modules
diff options
context:
space:
mode:
Diffstat (limited to 'ms/blueprintsprocessor/modules')
-rw-r--r--ms/blueprintsprocessor/modules/commons/message-lib/pom.xml7
-rw-r--r--ms/blueprintsprocessor/modules/commons/ssh-lib/pom.xml7
-rw-r--r--ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentScriptExecutor.kt2
-rw-r--r--ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/RemoteScriptExecutionService.kt13
4 files changed, 14 insertions, 15 deletions
diff --git a/ms/blueprintsprocessor/modules/commons/message-lib/pom.xml b/ms/blueprintsprocessor/modules/commons/message-lib/pom.xml
index d423dfd06..65d1474f3 100644
--- a/ms/blueprintsprocessor/modules/commons/message-lib/pom.xml
+++ b/ms/blueprintsprocessor/modules/commons/message-lib/pom.xml
@@ -14,10 +14,7 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>commons</artifactId>
<groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
@@ -47,4 +44,4 @@
<scope>test</scope>
</dependency>
</dependencies>
-</project> \ No newline at end of file
+</project>
diff --git a/ms/blueprintsprocessor/modules/commons/ssh-lib/pom.xml b/ms/blueprintsprocessor/modules/commons/ssh-lib/pom.xml
index 6949c4f43..1ba04033d 100644
--- a/ms/blueprintsprocessor/modules/commons/ssh-lib/pom.xml
+++ b/ms/blueprintsprocessor/modules/commons/ssh-lib/pom.xml
@@ -14,10 +14,7 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>commons</artifactId>
<groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
@@ -43,4 +40,4 @@
<artifactId>sshd-core</artifactId>
</dependency>
</dependencies>
-</project> \ No newline at end of file
+</project>
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 056f7e96d..b5dac5a39 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
@@ -86,7 +86,7 @@ fun BluePrintTypes.componentScriptExecutor(): NodeType {
property(ComponentScriptExecutor.SCRIPT_TYPE, BluePrintConstants.DATA_TYPE_STRING, true,
"Script Type") {
defaultValue(BluePrintConstants.SCRIPT_INTERNAL)
- constrains {
+ constrain {
validValues(listOf(BluePrintConstants.SCRIPT_INTERNAL.asJsonPrimitive(),
BluePrintConstants.SCRIPT_JYTHON.asJsonPrimitive(),
BluePrintConstants.SCRIPT_KOTLIN.asJsonPrimitive()))
diff --git a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/RemoteScriptExecutionService.kt b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/RemoteScriptExecutionService.kt
index 3af57a22b..d4195ae45 100644
--- a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/RemoteScriptExecutionService.kt
+++ b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/RemoteScriptExecutionService.kt
@@ -22,6 +22,7 @@ import com.google.protobuf.Timestamp
import com.google.protobuf.util.JsonFormat
import io.grpc.ManagedChannel
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.*
+import org.onap.ccsdk.cds.blueprintsprocessor.grpc.service.BluePrintGrpcClientService
import org.onap.ccsdk.cds.blueprintsprocessor.grpc.service.BluePrintGrpcLibPropertyService
import org.onap.ccsdk.cds.controllerblueprints.command.api.*
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
@@ -31,9 +32,8 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
import org.springframework.context.annotation.Scope
import org.springframework.stereotype.Service
-
interface RemoteScriptExecutionService {
- suspend fun init(selector: String)
+ suspend fun init(selector: Any)
suspend fun prepareEnv(prepareEnvInput: PrepareRemoteEnvInput): RemoteScriptExecutionOutput
suspend fun executeCommand(remoteExecutionInput: RemoteScriptExecutionInput): RemoteScriptExecutionOutput
suspend fun close()
@@ -51,9 +51,14 @@ class GrpcRemoteScriptExecutionService(private val bluePrintGrpcLibPropertyServi
private var channel: ManagedChannel? = null
private lateinit var commandExecutorServiceGrpc: CommandExecutorServiceGrpc.CommandExecutorServiceBlockingStub
- override suspend fun init(selector: String) {
+ override suspend fun init(selector: Any) {
// Get the GRPC Client Service based on selector
- val grpcClientService = bluePrintGrpcLibPropertyService.blueprintGrpcClientService(selector)
+ val grpcClientService: BluePrintGrpcClientService
+ if (selector is JsonNode) {
+ grpcClientService = bluePrintGrpcLibPropertyService.blueprintGrpcClientService(selector)
+ } else {
+ grpcClientService = bluePrintGrpcLibPropertyService.blueprintGrpcClientService(selector.toString())
+ }
// Get the GRPC Channel
channel = grpcClientService.channel()
// Create Non Blocking Stub