diff options
Diffstat (limited to 'ms/blueprintsprocessor/modules/commons/grpc-lib/src')
2 files changed, 12 insertions, 12 deletions
diff --git a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BluePrintGrpcLibPropertyService.kt b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BluePrintGrpcLibPropertyService.kt index f4933a3ad..fbc9ddd86 100644 --- a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BluePrintGrpcLibPropertyService.kt +++ b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BluePrintGrpcLibPropertyService.kt @@ -18,7 +18,7 @@ package org.onap.ccsdk.cds.blueprintsprocessor.grpc.service import com.fasterxml.jackson.databind.JsonNode -import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintProperties +import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService import org.onap.ccsdk.cds.blueprintsprocessor.grpc.* import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException import org.onap.ccsdk.cds.controllerblueprints.core.returnNullIfMissing @@ -26,7 +26,7 @@ import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils import org.springframework.stereotype.Service @Service(GRPCLibConstants.SERVICE_BLUEPRINT_GRPC_LIB_PROPERTY) -open class BluePrintGrpcLibPropertyService(private var bluePrintProperties: BluePrintProperties) { +open class BluePrintGrpcLibPropertyService(private var bluePrintPropertiesService: BluePrintPropertiesService) { /** GRPC Server Lib Property Service */ fun grpcServerProperties(jsonNode: JsonNode): GrpcServerProperties { @@ -44,7 +44,7 @@ open class BluePrintGrpcLibPropertyService(private var bluePrintProperties: Blue } fun grpcServerProperties(prefix: String): GrpcServerProperties { - val type = bluePrintProperties.propertyBeanType( + val type = bluePrintPropertiesService.propertyBeanType( "$prefix.type", String::class.java) return when (type) { GRPCLibConstants.TYPE_TOKEN_AUTH -> { @@ -60,11 +60,11 @@ open class BluePrintGrpcLibPropertyService(private var bluePrintProperties: Blue } private fun tokenAuthGrpcServerProperties(prefix: String): TokenAuthGrpcServerProperties { - return bluePrintProperties.propertyBeanType(prefix, TokenAuthGrpcServerProperties::class.java) + return bluePrintPropertiesService.propertyBeanType(prefix, TokenAuthGrpcServerProperties::class.java) } private fun tlsAuthGrpcServerProperties(prefix: String): TLSAuthGrpcServerProperties { - return bluePrintProperties.propertyBeanType(prefix, TLSAuthGrpcServerProperties::class.java) + return bluePrintPropertiesService.propertyBeanType(prefix, TLSAuthGrpcServerProperties::class.java) } /** GRPC Client Lib Property Service */ @@ -101,7 +101,7 @@ open class BluePrintGrpcLibPropertyService(private var bluePrintProperties: Blue } fun grpcClientProperties(prefix: String): GrpcClientProperties { - val type = bluePrintProperties.propertyBeanType( + val type = bluePrintPropertiesService.propertyBeanType( "$prefix.type", String::class.java) return when (type) { GRPCLibConstants.TYPE_TOKEN_AUTH -> { @@ -139,14 +139,14 @@ open class BluePrintGrpcLibPropertyService(private var bluePrintProperties: Blue } private fun tokenAuthGrpcClientProperties(prefix: String): TokenAuthGrpcClientProperties { - return bluePrintProperties.propertyBeanType(prefix, TokenAuthGrpcClientProperties::class.java) + return bluePrintPropertiesService.propertyBeanType(prefix, TokenAuthGrpcClientProperties::class.java) } private fun tlsAuthGrpcClientProperties(prefix: String): TLSAuthGrpcClientProperties { - return bluePrintProperties.propertyBeanType(prefix, TLSAuthGrpcClientProperties::class.java) + return bluePrintPropertiesService.propertyBeanType(prefix, TLSAuthGrpcClientProperties::class.java) } private fun basicAuthGrpcClientProperties(prefix: String): BasicAuthGrpcClientProperties { - return bluePrintProperties.propertyBeanType(prefix, BasicAuthGrpcClientProperties::class.java) + return bluePrintPropertiesService.propertyBeanType(prefix, BasicAuthGrpcClientProperties::class.java) } }
\ No newline at end of file diff --git a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BluePrintGrpcLibPropertyServiceTest.kt b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BluePrintGrpcLibPropertyServiceTest.kt index b7ddc1569..e4bfd5d7c 100644 --- a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BluePrintGrpcLibPropertyServiceTest.kt +++ b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BluePrintGrpcLibPropertyServiceTest.kt @@ -21,8 +21,8 @@ import com.fasterxml.jackson.databind.JsonNode import com.fasterxml.jackson.databind.ObjectMapper import org.junit.Test import org.junit.runner.RunWith -import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintProperties -import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration +import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService +import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration import org.onap.ccsdk.cds.blueprintsprocessor.grpc.* import org.onap.ccsdk.cds.controllerblueprints.core.jsonAsJsonType import org.springframework.beans.factory.annotation.Autowired @@ -35,7 +35,7 @@ import kotlin.test.assertTrue @RunWith(SpringRunner::class) @ContextConfiguration(classes = [BluePrintGrpcLibConfiguration::class, - BlueprintPropertyConfiguration::class, BluePrintProperties::class]) + BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class]) @TestPropertySource(properties = ["blueprintsprocessor.grpcclient.sample.type=basic-auth", "blueprintsprocessor.grpcclient.sample.host=127.0.0.1", |