From: Jozsef Csongvai Date: Thu, 22 Apr 2021 22:04:15 +0000 (-0400) Subject: Fix grpcProperties resolution for String values X-Git-Tag: 1.2.0~23 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F64%2F120864%2F1;p=ccsdk%2Fcds.git Fix grpcProperties resolution for String values When a CBA defines a String selector, it will be passed as TextNode. This enables using using application properties to define grpcClientProperties for py executor. Issue-ID: CCSDK-3272 Change-Id: Id4fcd4f43306e385458eb4decbb07f923a957cc0 Signed-off-by: Jozsef Csongvai --- diff --git a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/StreamingRemoteExecutionService.kt b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/StreamingRemoteExecutionService.kt index dadf72e04..e28a8c405 100644 --- a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/StreamingRemoteExecutionService.kt +++ b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/StreamingRemoteExecutionService.kt @@ -17,6 +17,7 @@ package org.onap.ccsdk.cds.blueprintsprocessor.services.execution import com.fasterxml.jackson.databind.JsonNode +import com.fasterxml.jackson.databind.node.TextNode import com.github.marcoferrer.krotoplus.coroutines.client.ClientBidiCallChannel import com.github.marcoferrer.krotoplus.coroutines.client.clientCallBidiStreaming import io.grpc.ManagedChannel @@ -193,8 +194,8 @@ class StreamingRemoteExecutionServiceImpl(private val bluePrintGrpcLibPropertySe private fun grpcProperties(selector: Any): GrpcClientProperties { return when (selector) { - is String -> { - bluePrintGrpcLibPropertyService.grpcClientProperties(selector.toString()) + is TextNode -> { + bluePrintGrpcLibPropertyService.grpcClientProperties(selector.asText()) } is JsonNode -> { bluePrintGrpcLibPropertyService.grpcClientProperties(selector)