aboutsummaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/modules/commons
diff options
context:
space:
mode:
Diffstat (limited to 'ms/blueprintsprocessor/modules/commons')
-rw-r--r--ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BluePrintDBLibConfiguration.kt (renamed from ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintDBLibConfiguration.kt)24
-rw-r--r--ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BluePrintDBLibData.kt (renamed from ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintDBLibData.kt)0
-rw-r--r--ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BluePrintDBLibGenericService.kt (renamed from ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintDBLibGenericService.kt)4
-rw-r--r--ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/DatabasePropertiesDSL.kt30
-rw-r--r--ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/BluePrintDBLibPropertyService.kt (renamed from ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/BlueprintDBLibPropertyService.kt)20
-rw-r--r--ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/MSSqlDatabaseConfiguration.kt4
-rw-r--r--ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/MariaDatabaseConfiguration.kt4
-rw-r--r--ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/MySqlDatabaseConfiguration.kt4
-rw-r--r--ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/service/BlueprintCatalogServiceImpl.kt38
-rwxr-xr-xms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/service/BlueprintProcessorCatalogServiceImpl.kt54
-rw-r--r--ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintProcessorCatalogServiceImplTest.kt20
-rw-r--r--ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/DatabasePropertiesDSLTest.kt10
-rw-r--r--ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/TestDatabaseConfiguration.kt2
-rw-r--r--ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/mock/MockBlueprintProcessorCatalogServiceImpl.kt12
-rw-r--r--ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/AafAuthDmaapClientService.kt2
-rw-r--r--ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/BluePrintDmaapClientService.kt (renamed from ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/BlueprintDmaapClientService.kt)4
-rw-r--r--ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/BluePrintDmaapLibConfiguration.kt (renamed from ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/BlueprintDmaapLibConfiguration.kt)2
-rw-r--r--ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/BluePrintDmaapLibPropertyService.kt (renamed from ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/BlueprintDmaapLibPropertyService.kt)20
-rw-r--r--ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/HttpNoAuthDmaapClientService.kt2
-rw-r--r--ms/blueprintsprocessor/modules/commons/dmaap-lib/src/test/kotlin/org/ccsdk/cds/blueprintprocessor/dmaap/TestDmaapEventPublisher.kt14
-rw-r--r--ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/BluePrintGrpcExtensions.kt (renamed from ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/BlueprintGrpcExtensions.kt)0
-rw-r--r--ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/BluePrintGrpcLibConfiguration.kt (renamed from ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/BlueprintGrpcLibConfiguration.kt)14
-rw-r--r--ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/BluePrintGrpcLibData.kt (renamed from ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/BlueprintGrpcLibData.kt)0
-rw-r--r--ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/GrpcPropertiesDSL.kt60
-rw-r--r--ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/interceptor/GrpcServerLoggingInterceptor.kt22
-rw-r--r--ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BasicAuthGrpcClientService.kt2
-rw-r--r--ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BluePrintGrpcLibPropertyService.kt (renamed from ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BlueprintGrpcLibPropertyService.kt)32
-rw-r--r--ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BluePrintGrpcService.kt (renamed from ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BlueprintGrpcService.kt)4
-rw-r--r--ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/GrpcLoggerService.kt14
-rw-r--r--ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/TLSAuthGrpcClientService.kt2
-rw-r--r--ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/TLSAuthGrpcServerService.kt2
-rw-r--r--ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/TokenAuthGrpcClientService.kt2
-rw-r--r--ms/blueprintsprocessor/modules/commons/grpc-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/GrpcPropertiesDSLTest.kt18
-rw-r--r--ms/blueprintsprocessor/modules/commons/grpc-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BluePrintGrpcLibPropertyServiceTest.kt (renamed from ms/blueprintsprocessor/modules/commons/grpc-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BlueprintGrpcLibPropertyServiceTest.kt)14
-rw-r--r--ms/blueprintsprocessor/modules/commons/grpc-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BluePrintGrpcServerTest.kt (renamed from ms/blueprintsprocessor/modules/commons/grpc-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BlueprintGrpcServerTest.kt)6
-rw-r--r--ms/blueprintsprocessor/modules/commons/grpc-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/MockTLSBluePrintProcessingServer.kt (renamed from ms/blueprintsprocessor/modules/commons/grpc-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/MockTLSBlueprintProcessingServer.kt)8
-rw-r--r--ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/BluePrintMessageExtensions.kt (renamed from ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/BlueprintMessageExtensions.kt)0
-rw-r--r--ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/BluePrintMessageLibConfiguration.kt (renamed from ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/BlueprintMessageLibConfiguration.kt)16
-rw-r--r--ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/BluePrintMessageLibData.kt (renamed from ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/BlueprintMessageLibData.kt)0
-rw-r--r--ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/MessagePropertiesDSL.kt94
-rw-r--r--ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/kafka/AbstractKafkaTopologyComponents.kt6
-rw-r--r--ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/kafka/KafkaJDBCStores.kt8
-rw-r--r--ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BluePrintMessageLibPropertyService.kt (renamed from ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BlueprintMessageLibPropertyService.kt)18
-rw-r--r--ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BlueprintMessageConsumerService.kt6
-rw-r--r--ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/KafkaStreamsConsumerService.kt6
-rw-r--r--ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/MessageLoggerService.kt14
-rw-r--r--ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/utils/BlueprintMessageUtils.kt4
-rw-r--r--ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/MessagePropertiesDSLTest.kt18
-rw-r--r--ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BlueprintMessageConsumerServiceTest.kt12
-rw-r--r--ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BlueprintMessageProducerServiceTest.kt18
-rw-r--r--ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/KafkaStreamsConsumerServiceTest.kt12
-rw-r--r--ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/MessageLoggerServiceTest.kt4
-rw-r--r--ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/MockKafkaTopologyComponents.kt4
-rw-r--r--ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/utils/BlueprintMessageUtilsTest.kt4
-rw-r--r--ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/BluePrintNatsExtensions.kt (renamed from ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/BlueprintNatsExtensions.kt)0
-rw-r--r--ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/BluePrintNatsLibConfiguration.kt (renamed from ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/BlueprintNatsLibConfiguration.kt)12
-rw-r--r--ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/BluePrintNatsLibData.kt (renamed from ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/BlueprintNatsLibData.kt)0
-rw-r--r--ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/NatsPropertiesDSL.kt30
-rw-r--r--ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BluePrintNatsLibPropertyService.kt (renamed from ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BlueprintNatsLibPropertyService.kt)18
-rw-r--r--ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BluePrintNatsService.kt (renamed from ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BlueprintNatsService.kt)2
-rw-r--r--ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/TLSAuthNatsService.kt2
-rw-r--r--ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/TokenAuthNatsService.kt2
-rw-r--r--ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/utils/NatsClusterUtils.kt6
-rw-r--r--ms/blueprintsprocessor/modules/commons/nats-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/NatsPropertiesDSLTest.kt10
-rw-r--r--ms/blueprintsprocessor/modules/commons/nats-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BluePrintNatsExtensionsTest.kt (renamed from ms/blueprintsprocessor/modules/commons/nats-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BlueprintNatsExtensionsTest.kt)2
-rw-r--r--ms/blueprintsprocessor/modules/commons/nats-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BluePrintNatsLibPropertyServiceTest.kt (renamed from ms/blueprintsprocessor/modules/commons/nats-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BlueprintNatsLibPropertyServiceTest.kt)14
-rw-r--r--ms/blueprintsprocessor/modules/commons/nats-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BluePrintNatsServiceTest.kt (renamed from ms/blueprintsprocessor/modules/commons/nats-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BlueprintNatsServiceTest.kt)28
-rw-r--r--ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/BluePrintCoreConfiguration.kt (renamed from ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/BlueprintCoreConfiguration.kt)22
-rw-r--r--ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/api/data/BlueprintProcessorData.kt4
-rw-r--r--ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/cluster/BluePrintClusterExtensions.kt (renamed from ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/cluster/BlueprintClusterExtensions.kt)22
-rw-r--r--ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/cluster/HazelcastClusterService.kt24
-rw-r--r--ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/factory/ComponentNodeFactory.kt10
-rw-r--r--ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/listeners/BlueprintCompilerCacheMessageListener.kt12
-rw-r--r--ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/service/BluePrintClusterService.kt (renamed from ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/service/BlueprintClusterService.kt)6
-rw-r--r--ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/utils/PayloadUtils.kt18
-rw-r--r--ms/blueprintsprocessor/modules/commons/processor-core/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/BluePrintPropertiesTest.kt (renamed from ms/blueprintsprocessor/modules/commons/processor-core/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/BlueprintPropertiesTest.kt)2
-rw-r--r--ms/blueprintsprocessor/modules/commons/processor-core/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/cluster/BluePrintClusterExtensionsTest.kt (renamed from ms/blueprintsprocessor/modules/commons/processor-core/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/cluster/BlueprintClusterExtensionsTest.kt)6
-rw-r--r--ms/blueprintsprocessor/modules/commons/processor-core/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/cluster/HazelcastClusterServiceTest.kt30
-rw-r--r--ms/blueprintsprocessor/modules/commons/processor-core/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/utils/BluePrintMappingsTest.kt (renamed from ms/blueprintsprocessor/modules/commons/processor-core/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/utils/BlueprintMappingsTest.kt)2
-rw-r--r--ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/BluePrintRestLibConfiguration.kt (renamed from ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/BlueprintRestLibConfiguration.kt)12
-rw-r--r--ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/BluePrintRestLibData.kt (renamed from ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/BlueprintRestLibData.kt)0
-rw-r--r--ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/RestClientPropertiesDSL.kt38
-rw-r--r--ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BluePrintRestLibPropertyService.kt (renamed from ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintRestLibPropertyService.kt)12
-rw-r--r--ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintWebClientService.kt18
-rw-r--r--ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestLoggerService.kt16
-rw-r--r--ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BluePrintRestLibPropertyServiceTest.kt (renamed from ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintRestLibPropertyServiceTest.kt)44
-rw-r--r--ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientPropertiesDSLTest.kt10
-rw-r--r--ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientServiceTest.kt12
-rw-r--r--ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/BluePrintSshLibConfiguration.kt (renamed from ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/BlueprintSshLibConfiguration.kt)12
-rw-r--r--ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/BluePrintSshLibData.kt (renamed from ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/BlueprintSshLibData.kt)0
-rw-r--r--ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/SshPropertiesDSL.kt26
-rw-r--r--ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BasicAuthSshClientService.kt10
-rw-r--r--ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BluePrintSshLibPropertyService.kt (renamed from ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BlueprintSshLibPropertyService.kt)14
-rw-r--r--ms/blueprintsprocessor/modules/commons/ssh-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/SshPropertiesDSLTest.kt10
-rw-r--r--ms/blueprintsprocessor/modules/commons/ssh-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BluePrintSshLibPropertyServiceTest.kt (renamed from ms/blueprintsprocessor/modules/commons/ssh-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BlueprintSshLibPropertyServiceTest.kt)14
-rw-r--r--ms/blueprintsprocessor/modules/commons/ssh-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BlueprintSshClientServiceTest.kt14
96 files changed, 630 insertions, 630 deletions
diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintDBLibConfiguration.kt b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BluePrintDBLibConfiguration.kt
index ff1072c94..6cff85e68 100644
--- a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintDBLibConfiguration.kt
+++ b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BluePrintDBLibConfiguration.kt
@@ -16,11 +16,11 @@
package org.onap.ccsdk.cds.blueprintsprocessor.db
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintCoreConfiguration
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
-import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.BlueprintDBLibPropertyService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintCoreConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.BluePrintDBLibPropertyService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
import org.springframework.boot.context.properties.EnableConfigurationProperties
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
@@ -30,12 +30,12 @@ import javax.sql.DataSource
@Configuration
@Import(
- BlueprintPropertyConfiguration::class,
- BlueprintPropertiesService::class,
- BlueprintCoreConfiguration::class
+ BluePrintPropertyConfiguration::class,
+ BluePrintPropertiesService::class,
+ BluePrintCoreConfiguration::class
)
@EnableConfigurationProperties
-open class BlueprintDBLibConfiguration(private var bluePrintPropertiesService: BlueprintPropertiesService) {
+open class BluePrintDBLibConfiguration(private var bluePrintPropertiesService: BluePrintPropertiesService) {
@Bean("primary-database-properties")
open fun getPrimaryProperties(): PrimaryDataSourceProperties {
@@ -54,10 +54,10 @@ open class BlueprintDBLibConfiguration(private var bluePrintPropertiesService: B
/**
* Exposed Dependency Service by this SSH Lib Module
*/
-fun BlueprintDependencyService.dbLibPropertyService(): BlueprintDBLibPropertyService =
- instance(BlueprintDBLibPropertyService::class)
+fun BluePrintDependencyService.dbLibPropertyService(): BluePrintDBLibPropertyService =
+ instance(BluePrintDBLibPropertyService::class)
-fun BlueprintDependencyService.primaryDBLibGenericService(): BlueprintDBLibGenericService =
+fun BluePrintDependencyService.primaryDBLibGenericService(): BluePrintDBLibGenericService =
instance(PrimaryDBLibGenericService::class)
class DBLibConstants {
diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintDBLibData.kt b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BluePrintDBLibData.kt
index 2da83823c..2da83823c 100644
--- a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintDBLibData.kt
+++ b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BluePrintDBLibData.kt
diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintDBLibGenericService.kt b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BluePrintDBLibGenericService.kt
index 6c382377d..aeb87fd66 100644
--- a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintDBLibGenericService.kt
+++ b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BluePrintDBLibGenericService.kt
@@ -18,7 +18,7 @@ package org.onap.ccsdk.cds.blueprintsprocessor.db
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate
-interface BlueprintDBLibGenericService {
+interface BluePrintDBLibGenericService {
fun namedParameterJdbcTemplate(): NamedParameterJdbcTemplate
@@ -28,7 +28,7 @@ interface BlueprintDBLibGenericService {
}
abstract class AbstractDBLibGenericService(private val namedParameterJdbcTemplate: NamedParameterJdbcTemplate) :
- BlueprintDBLibGenericService {
+ BluePrintDBLibGenericService {
override fun namedParameterJdbcTemplate(): NamedParameterJdbcTemplate {
return namedParameterJdbcTemplate
diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/DatabasePropertiesDSL.kt b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/DatabasePropertiesDSL.kt
index fd51da152..34dd0a417 100644
--- a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/DatabasePropertiesDSL.kt
+++ b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/DatabasePropertiesDSL.kt
@@ -17,8 +17,8 @@
package org.onap.ccsdk.cds.blueprintsprocessor.db
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonNode
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.data.RelationshipType
@@ -30,25 +30,25 @@ import org.onap.ccsdk.cds.controllerblueprints.core.dsl.relationshipType
/** Relationships Types DSL for Database Producer */
fun ServiceTemplateBuilder.relationshipTypeConnectsToDb() {
- val relationshipType = BlueprintTypes.relationshipTypeConnectsToDb()
+ val relationshipType = BluePrintTypes.relationshipTypeConnectsToDb()
if (this.relationshipTypes == null) this.relationshipTypes = hashMapOf()
this.relationshipTypes!![relationshipType.id!!] = relationshipType
}
-fun BlueprintTypes.relationshipTypeConnectsToDb(): RelationshipType {
+fun BluePrintTypes.relationshipTypeConnectsToDb(): RelationshipType {
return relationshipType(
- id = BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_DB,
- version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO,
+ id = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_DB,
+ version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO,
description = "Relationship connects to through Database."
) {
property(
- BlueprintConstants.PROPERTY_CONNECTION_CONFIG,
- BlueprintConstants.DATA_TYPE_MAP,
+ BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
+ BluePrintConstants.DATA_TYPE_MAP,
true,
"Connection Config details."
)
- validTargetTypes(arrayListOf(BlueprintConstants.MODEL_TYPE_CAPABILITY_TYPE_ENDPOINT))
+ validTargetTypes(arrayListOf(BluePrintConstants.MODEL_TYPE_CAPABILITY_TYPE_ENDPOINT))
}
}
@@ -66,25 +66,25 @@ fun TopologyTemplateBuilder.relationshipTemplateDb(
class DbRelationshipTemplateBuilder(name: String, description: String) :
RelationshipTemplateBuilder(
name,
- BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_DB, description
+ BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_DB, description
) {
fun mariaDb(block: DbMariaDataSourcePropertiesAssignmentBuilder.() -> Unit) {
- property(BlueprintConstants.PROPERTY_CONNECTION_CONFIG, BlueprintTypes.mariaDbProperties(block))
+ property(BluePrintConstants.PROPERTY_CONNECTION_CONFIG, BluePrintTypes.mariaDbProperties(block))
}
fun mySqlDb(block: DbMySqlDataSourcePropertiesAssignmentBuilder.() -> Unit) {
- property(BlueprintConstants.PROPERTY_CONNECTION_CONFIG, BlueprintTypes.mySqlDbProperties(block))
+ property(BluePrintConstants.PROPERTY_CONNECTION_CONFIG, BluePrintTypes.mySqlDbProperties(block))
}
}
-fun BlueprintTypes.mariaDbProperties(block: DbMariaDataSourcePropertiesAssignmentBuilder.() -> Unit): JsonNode {
+fun BluePrintTypes.mariaDbProperties(block: DbMariaDataSourcePropertiesAssignmentBuilder.() -> Unit): JsonNode {
val assignments = DbMariaDataSourcePropertiesAssignmentBuilder().apply(block).build()
assignments[DBDataSourceProperties::type.name] = DBLibConstants.MARIA_DB.asJsonPrimitive()
return assignments.asJsonNode()
}
-fun BlueprintTypes.mySqlDbProperties(block: DbMySqlDataSourcePropertiesAssignmentBuilder.() -> Unit): JsonNode {
+fun BluePrintTypes.mySqlDbProperties(block: DbMySqlDataSourcePropertiesAssignmentBuilder.() -> Unit): JsonNode {
val assignments = DbMySqlDataSourcePropertiesAssignmentBuilder().apply(block).build()
assignments[DBDataSourceProperties::type.name] = DBLibConstants.MYSQL_DB.asJsonPrimitive()
return assignments.asJsonNode()
diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/BlueprintDBLibPropertyService.kt b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/BluePrintDBLibPropertyService.kt
index 3dbd76c13..436f2fcab 100644
--- a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/BlueprintDBLibPropertyService.kt
+++ b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/BluePrintDBLibPropertyService.kt
@@ -17,8 +17,8 @@
package org.onap.ccsdk.cds.blueprintsprocessor.db.primary
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
-import org.onap.ccsdk.cds.blueprintsprocessor.db.BlueprintDBLibGenericService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.db.BluePrintDBLibGenericService
import org.onap.ccsdk.cds.blueprintsprocessor.db.DBDataSourceProperties
import org.onap.ccsdk.cds.blueprintsprocessor.db.DBLibConstants.Companion.MARIA_DB
import org.onap.ccsdk.cds.blueprintsprocessor.db.DBLibConstants.Companion.MYSQL_DB
@@ -27,17 +27,17 @@ import org.onap.ccsdk.cds.blueprintsprocessor.db.DBLibConstants.Companion.PROCES
import org.onap.ccsdk.cds.blueprintsprocessor.db.MariaDataSourceProperties
import org.onap.ccsdk.cds.blueprintsprocessor.db.MySqlDataSourceProperties
import org.onap.ccsdk.cds.blueprintsprocessor.db.MSSqlDataSourceProperties
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.stereotype.Service
@Service
-class BlueprintDBLibPropertyService(private var bluePrintPropertiesService: BlueprintPropertiesService) {
+class BluePrintDBLibPropertyService(private var bluePrintPropertiesService: BluePrintPropertiesService) {
- fun JdbcTemplate(jsonNode: JsonNode): BlueprintDBLibGenericService =
+ fun JdbcTemplate(jsonNode: JsonNode): BluePrintDBLibGenericService =
blueprintDBDataSourceService(dBDataSourceProperties(jsonNode))
- fun JdbcTemplate(selector: String): BlueprintDBLibGenericService =
+ fun JdbcTemplate(selector: String): BluePrintDBLibGenericService =
blueprintDBDataSourceService(dBDataSourceProperties("blueprintsprocessor.db.$selector"))
private fun dBDataSourceProperties(jsonNode: JsonNode): DBDataSourceProperties =
@@ -46,7 +46,7 @@ class BlueprintDBLibPropertyService(private var bluePrintPropertiesService: Blue
MARIA_DB -> JacksonUtils.readValue(jsonNode, MariaDataSourceProperties::class.java)
MSSQL_DB -> JacksonUtils.readValue(jsonNode, MSSqlDataSourceProperties::class.java)
else -> {
- throw BlueprintProcessorException(
+ throw BluePrintProcessorException(
"DB type ($type) is not supported. Valid types: $MARIA_DB, $MYSQL_DB, $MSSQL_DB"
)
}
@@ -59,19 +59,19 @@ class BlueprintDBLibPropertyService(private var bluePrintPropertiesService: Blue
MYSQL_DB -> mySqlDBConnectionProperties(prefix)
MSSQL_DB -> mssqlDBConnectionProperties(prefix)
else -> {
- throw BlueprintProcessorException(
+ throw BluePrintProcessorException(
"DB type ($it) is not supported. Valid types: $MARIA_DB, $MYSQL_DB, $PROCESSOR_DB"
)
}
}
}
- private fun blueprintDBDataSourceService(dBConnetionProperties: DBDataSourceProperties): BlueprintDBLibGenericService =
+ private fun blueprintDBDataSourceService(dBConnetionProperties: DBDataSourceProperties): BluePrintDBLibGenericService =
when (dBConnetionProperties) {
is MariaDataSourceProperties -> MariaDatabaseConfiguration(dBConnetionProperties)
is MySqlDataSourceProperties -> MySqlDatabaseConfiguration(dBConnetionProperties)
is MSSqlDataSourceProperties -> MSSqlDatabaseConfiguration(dBConnetionProperties)
- else -> throw BlueprintProcessorException(
+ else -> throw BluePrintProcessorException(
"Failed to create db configuration for ${dBConnetionProperties.url}"
)
}
diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/MSSqlDatabaseConfiguration.kt b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/MSSqlDatabaseConfiguration.kt
index d0ff5b6f3..01f5318ac 100644
--- a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/MSSqlDatabaseConfiguration.kt
+++ b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/MSSqlDatabaseConfiguration.kt
@@ -16,14 +16,14 @@
package org.onap.ccsdk.cds.blueprintsprocessor.db.primary
-import org.onap.ccsdk.cds.blueprintsprocessor.db.BlueprintDBLibGenericService
+import org.onap.ccsdk.cds.blueprintsprocessor.db.BluePrintDBLibGenericService
import org.onap.ccsdk.cds.blueprintsprocessor.db.MSSqlDataSourceProperties
import org.slf4j.LoggerFactory
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate
import org.springframework.jdbc.datasource.DriverManagerDataSource
import javax.sql.DataSource
-class MSSqlDatabaseConfiguration(private val msSqlDataSourceProperties: MSSqlDataSourceProperties) : BlueprintDBLibGenericService {
+class MSSqlDatabaseConfiguration(private val msSqlDataSourceProperties: MSSqlDataSourceProperties) : BluePrintDBLibGenericService {
override fun namedParameterJdbcTemplate(): NamedParameterJdbcTemplate {
return msSqlNamedParameterJdbcTemplate(msSqlDataSource())
}
diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/MariaDatabaseConfiguration.kt b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/MariaDatabaseConfiguration.kt
index 6132190c2..82895257a 100644
--- a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/MariaDatabaseConfiguration.kt
+++ b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/MariaDatabaseConfiguration.kt
@@ -16,14 +16,14 @@
package org.onap.ccsdk.cds.blueprintsprocessor.db.primary
-import org.onap.ccsdk.cds.blueprintsprocessor.db.BlueprintDBLibGenericService
+import org.onap.ccsdk.cds.blueprintsprocessor.db.BluePrintDBLibGenericService
import org.onap.ccsdk.cds.blueprintsprocessor.db.MariaDataSourceProperties
import org.slf4j.LoggerFactory
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate
import org.springframework.jdbc.datasource.DriverManagerDataSource
import javax.sql.DataSource
-class MariaDatabaseConfiguration(private val mariaDataSourceProperties: MariaDataSourceProperties) : BlueprintDBLibGenericService {
+class MariaDatabaseConfiguration(private val mariaDataSourceProperties: MariaDataSourceProperties) : BluePrintDBLibGenericService {
val log = LoggerFactory.getLogger(MariaDatabaseConfiguration::class.java)!!
diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/MySqlDatabaseConfiguration.kt b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/MySqlDatabaseConfiguration.kt
index ea13dfb83..0761b72d2 100644
--- a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/MySqlDatabaseConfiguration.kt
+++ b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/MySqlDatabaseConfiguration.kt
@@ -16,14 +16,14 @@
package org.onap.ccsdk.cds.blueprintsprocessor.db.primary
-import org.onap.ccsdk.cds.blueprintsprocessor.db.BlueprintDBLibGenericService
+import org.onap.ccsdk.cds.blueprintsprocessor.db.BluePrintDBLibGenericService
import org.onap.ccsdk.cds.blueprintsprocessor.db.MySqlDataSourceProperties
import org.slf4j.LoggerFactory
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate
import org.springframework.jdbc.datasource.DriverManagerDataSource
import javax.sql.DataSource
-class MySqlDatabaseConfiguration(private val mySqlDataSourceProperties: MySqlDataSourceProperties) : BlueprintDBLibGenericService {
+class MySqlDatabaseConfiguration(private val mySqlDataSourceProperties: MySqlDataSourceProperties) : BluePrintDBLibGenericService {
override fun namedParameterJdbcTemplate(): NamedParameterJdbcTemplate {
return mySqlNamedParameterJdbcTemplate(mySqlDataSource())
diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/service/BlueprintCatalogServiceImpl.kt b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/service/BlueprintCatalogServiceImpl.kt
index fe6da176b..9d1826395 100644
--- a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/service/BlueprintCatalogServiceImpl.kt
+++ b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/service/BlueprintCatalogServiceImpl.kt
@@ -18,16 +18,16 @@
package org.onap.ccsdk.cds.blueprintsprocessor.db.primary.service
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
-import org.onap.ccsdk.cds.controllerblueprints.core.config.BlueprintLoadConfiguration
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.config.BluePrintLoadConfiguration
import org.onap.ccsdk.cds.controllerblueprints.core.deCompress
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintCatalogService
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintCatalogService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintValidatorService
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedFile
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedPathName
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintArchiveUtils
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintArchiveUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
import org.slf4j.LoggerFactory
import java.io.File
import java.nio.file.Path
@@ -35,9 +35,9 @@ import javax.persistence.MappedSuperclass
@MappedSuperclass
abstract class BlueprintCatalogServiceImpl(
- private val bluePrintLoadConfiguration: BlueprintLoadConfiguration,
- private val blueprintValidator: BlueprintValidatorService
-) : BlueprintCatalogService {
+ private val bluePrintLoadConfiguration: BluePrintLoadConfiguration,
+ private val blueprintValidator: BluePrintValidatorService
+) : BluePrintCatalogService {
private val log = LoggerFactory.getLogger(BlueprintCatalogServiceImpl::class.java)!!
@@ -51,8 +51,8 @@ abstract class BlueprintCatalogServiceImpl(
workingDir = blueprintFile.absolutePath
archiveFile = normalizedFile(bluePrintLoadConfiguration.blueprintArchivePath, processingId, "cba.zip")
- if (!BlueprintArchiveUtils.compress(blueprintFile, archiveFile)) {
- throw BlueprintException("Fail to compress blueprint")
+ if (!BluePrintArchiveUtils.compress(blueprintFile, archiveFile)) {
+ throw BluePrintException("Fail to compress blueprint")
}
} else {
// Compressed File
@@ -63,16 +63,16 @@ abstract class BlueprintCatalogServiceImpl(
blueprintFile.deCompress(workingDir)
}
- var valid = BlueprintConstants.FLAG_N
+ var valid = BluePrintConstants.FLAG_N
if (validate) {
- blueprintValidator.validateBlueprints(workingDir!!)
- valid = BlueprintConstants.FLAG_Y
+ blueprintValidator.validateBluePrints(workingDir!!)
+ valid = BluePrintConstants.FLAG_Y
}
- val bluePrintRuntimeService = BlueprintMetadataUtils.getBlueprintRuntime(processingId, workingDir!!)
+ val bluePrintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime(processingId, workingDir!!)
val metadata = bluePrintRuntimeService.bluePrintContext().metadata!!
- metadata[BlueprintConstants.PROPERTY_BLUEPRINT_PROCESS_ID] = processingId
- metadata[BlueprintConstants.PROPERTY_BLUEPRINT_VALID] = valid
+ metadata[BluePrintConstants.PROPERTY_BLUEPRINT_PROCESS_ID] = processingId
+ metadata[BluePrintConstants.PROPERTY_BLUEPRINT_VALID] = valid
save(metadata, archiveFile)
@@ -83,7 +83,7 @@ abstract class BlueprintCatalogServiceImpl(
name, version,
extract
)
- ?: throw BlueprintException("Could not find blueprint $name:$version from database")
+ ?: throw BluePrintException("Could not find blueprint $name:$version from database")
override suspend fun deleteFromDatabase(name: String, version: String) = delete(name, version)
diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/service/BlueprintProcessorCatalogServiceImpl.kt b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/service/BlueprintProcessorCatalogServiceImpl.kt
index 5b9853855..9c007da31 100755
--- a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/service/BlueprintProcessorCatalogServiceImpl.kt
+++ b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/service/BlueprintProcessorCatalogServiceImpl.kt
@@ -23,21 +23,21 @@ import org.onap.ccsdk.cds.blueprintsprocessor.core.cluster.optionalClusterServic
import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.domain.BlueprintModel
import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.domain.BlueprintModelContent
import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.repository.BlueprintModelRepository
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.common.ApplicationConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.config.BlueprintLoadConfiguration
+import org.onap.ccsdk.cds.controllerblueprints.core.config.BluePrintLoadConfiguration
import org.onap.ccsdk.cds.controllerblueprints.core.data.ErrorCode
import org.onap.ccsdk.cds.controllerblueprints.core.deCompress
import org.onap.ccsdk.cds.controllerblueprints.core.deleteNBDir
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintValidatorService
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedFile
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedPathName
import org.onap.ccsdk.cds.controllerblueprints.core.reCreateNBDirs
-import org.onap.ccsdk.cds.controllerblueprints.core.scripts.BlueprintCompileCache
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintFileUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.scripts.BluePrintCompileCache
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintFileUtils
import org.slf4j.LoggerFactory
import org.springframework.dao.DataIntegrityViolationException
import org.springframework.stereotype.Service
@@ -51,8 +51,8 @@ import java.util.UUID
*/
@Service("blueprintsProcessorCatalogService")
class BlueprintProcessorCatalogServiceImpl(
- bluePrintRuntimeValidatorService: BlueprintValidatorService,
- private val bluePrintLoadConfiguration: BlueprintLoadConfiguration,
+ bluePrintRuntimeValidatorService: BluePrintValidatorService,
+ private val bluePrintLoadConfiguration: BluePrintLoadConfiguration,
private val blueprintModelRepository: BlueprintModelRepository
) :
BlueprintCatalogServiceImpl(bluePrintLoadConfiguration, bluePrintRuntimeValidatorService) {
@@ -61,7 +61,7 @@ class BlueprintProcessorCatalogServiceImpl(
override suspend fun delete(name: String, version: String) {
// Clean blueprint script cache
- val cacheKey = BlueprintFileUtils
+ val cacheKey = BluePrintFileUtils
.compileCacheKey(normalizedPathName(bluePrintLoadConfiguration.blueprintDeployPath, name, version))
cleanClassLoader(cacheKey)
log.info("removed cba file name($name), version($version) from cache")
@@ -100,11 +100,11 @@ class BlueprintProcessorCatalogServiceImpl(
}
check(deployFile.exists() && deployFile.list().isNotEmpty()) {
- throw BlueprintProcessorException("file check failed")
+ throw BluePrintProcessorException("file check failed")
}
} catch (e: Exception) {
deleteNBDir(deployFile.absolutePath)
- throw BlueprintProcessorException(
+ throw BluePrintProcessorException(
"failed to get get cba file name($name), version($version) from db" +
" : ${e.message}"
)
@@ -121,11 +121,11 @@ class BlueprintProcessorCatalogServiceImpl(
}
override suspend fun save(metadata: MutableMap<String, String>, archiveFile: File) {
- val artifactName = metadata[BlueprintConstants.METADATA_TEMPLATE_NAME]
- val artifactVersion = metadata[BlueprintConstants.METADATA_TEMPLATE_VERSION]
+ val artifactName = metadata[BluePrintConstants.METADATA_TEMPLATE_NAME]
+ val artifactVersion = metadata[BluePrintConstants.METADATA_TEMPLATE_VERSION]
check(archiveFile.isFile && !archiveFile.isDirectory) {
- throw BlueprintException("Not a valid Archive file(${archiveFile.absolutePath})")
+ throw BluePrintException("Not a valid Archive file(${archiveFile.absolutePath})")
}
blueprintModelRepository.findByArtifactNameAndArtifactVersion(artifactName!!, artifactVersion!!)?.let {
@@ -134,7 +134,7 @@ class BlueprintProcessorCatalogServiceImpl(
val deployFile =
normalizedPathName(bluePrintLoadConfiguration.blueprintDeployPath, artifactName, artifactVersion)
- val cacheKey = BlueprintFileUtils.compileCacheKey(deployFile)
+ val cacheKey = BluePrintFileUtils.compileCacheKey(deployFile)
cleanClassLoader(cacheKey)
deleteNBDir(deployFile).let {
@@ -144,20 +144,20 @@ class BlueprintProcessorCatalogServiceImpl(
}
val blueprintModel = BlueprintModel()
- blueprintModel.id = metadata[BlueprintConstants.PROPERTY_BLUEPRINT_PROCESS_ID]
+ blueprintModel.id = metadata[BluePrintConstants.PROPERTY_BLUEPRINT_PROCESS_ID]
blueprintModel.artifactType = ApplicationConstants.ASDC_ARTIFACT_TYPE_SDNC_MODEL
- blueprintModel.published = metadata[BlueprintConstants.PROPERTY_BLUEPRINT_VALID]
- ?: BlueprintConstants.FLAG_N
+ blueprintModel.published = metadata[BluePrintConstants.PROPERTY_BLUEPRINT_VALID]
+ ?: BluePrintConstants.FLAG_N
blueprintModel.artifactName = artifactName
blueprintModel.artifactVersion = artifactVersion
- blueprintModel.updatedBy = metadata[BlueprintConstants.METADATA_TEMPLATE_AUTHOR]!!
- blueprintModel.tags = metadata[BlueprintConstants.METADATA_TEMPLATE_TAGS]!!
+ blueprintModel.updatedBy = metadata[BluePrintConstants.METADATA_TEMPLATE_AUTHOR]!!
+ blueprintModel.tags = metadata[BluePrintConstants.METADATA_TEMPLATE_TAGS]!!
val description =
- if (null != metadata[BlueprintConstants.METADATA_TEMPLATE_DESCRIPTION]) metadata[BlueprintConstants.METADATA_TEMPLATE_DESCRIPTION] else ""
+ if (null != metadata[BluePrintConstants.METADATA_TEMPLATE_DESCRIPTION]) metadata[BluePrintConstants.METADATA_TEMPLATE_DESCRIPTION] else ""
blueprintModel.artifactDescription = description
val blueprintModelContent = BlueprintModelContent()
- blueprintModelContent.id = metadata[BlueprintConstants.PROPERTY_BLUEPRINT_PROCESS_ID]
+ blueprintModelContent.id = metadata[BluePrintConstants.PROPERTY_BLUEPRINT_PROCESS_ID]
blueprintModelContent.contentType = "CBA_ZIP"
blueprintModelContent.name = "$artifactName:$artifactVersion"
blueprintModelContent.description = "$artifactName:$artifactVersion CBA Zip Content"
@@ -169,7 +169,7 @@ class BlueprintProcessorCatalogServiceImpl(
try {
blueprintModelRepository.saveAndFlush(blueprintModel)
} catch (ex: DataIntegrityViolationException) {
- throw BlueprintException(
+ throw BluePrintException(
ErrorCode.CONFLICT_ADDING_RESOURCE.value,
"The blueprint entry " +
"is already exist in database: ${ex.message}",
@@ -179,10 +179,10 @@ class BlueprintProcessorCatalogServiceImpl(
}
private suspend fun cleanClassLoader(cacheKey: String) {
- val clusterService = BlueprintDependencyService.optionalClusterService()
+ val clusterService = BluePrintDependencyService.optionalClusterService()
if (clusterService != null && clusterService.clusterJoined()) {
log.info("Sending ClusterMessage: Clean Classloader Cache")
clusterService.sendMessage(BlueprintClusterTopic.BLUEPRINT_CLEAN_COMPILER_CACHE, cacheKey)
- } else BlueprintCompileCache.cleanClassLoader(cacheKey)
+ } else BluePrintCompileCache.cleanClassLoader(cacheKey)
}
}
diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintProcessorCatalogServiceImplTest.kt b/ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintProcessorCatalogServiceImplTest.kt
index 4084e156c..b7b1f78cf 100644
--- a/ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintProcessorCatalogServiceImplTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintProcessorCatalogServiceImplTest.kt
@@ -20,16 +20,16 @@ package org.onap.ccsdk.cds.blueprintsprocessor.db
import kotlinx.coroutines.runBlocking
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintCoreConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintCoreConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.db.mock.MockBlueprintProcessorCatalogServiceImpl
import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.service.BlueprintCatalogServiceImpl
import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.service.BlueprintProcessorCatalogServiceImpl
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.compress
import org.onap.ccsdk.cds.controllerblueprints.core.deleteDir
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedFile
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.autoconfigure.EnableAutoConfiguration
import org.springframework.context.annotation.ComponentScan
@@ -46,7 +46,7 @@ import kotlin.test.assertTrue
@ComponentScan(basePackages = ["org.onap.ccsdk.cds.blueprintsprocessor"])
@ContextConfiguration(
classes = [
- BlueprintProcessorCatalogServiceImpl::class, BlueprintCoreConfiguration::class,
+ BlueprintProcessorCatalogServiceImpl::class, BluePrintCoreConfiguration::class,
MockBlueprintProcessorCatalogServiceImpl::class
]
)
@@ -57,9 +57,9 @@ class BlueprintProcessorCatalogServiceImplTest {
lateinit var blueprintsProcessorCatalogService: BlueprintCatalogServiceImpl
@Autowired
- lateinit var blueprintCoreConfiguration: BlueprintCoreConfiguration
+ lateinit var blueprintCoreConfiguration: BluePrintCoreConfiguration
- private lateinit var bluePrintRuntimeService: BlueprintRuntimeService<*>
+ private lateinit var bluePrintRuntimeService: BluePrintRuntimeService<*>
private val blueprintId = "1234"
@@ -72,7 +72,7 @@ class BlueprintProcessorCatalogServiceImplTest {
normalizedFile("./../../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration")
.compress(normalizedFile("./target/blueprints/generated-cba.zip"))
- bluePrintRuntimeService = BlueprintMetadataUtils.bluePrintRuntime(
+ bluePrintRuntimeService = BluePrintMetadataUtils.bluePrintRuntime(
blueprintId,
"./../../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
)
@@ -103,7 +103,7 @@ class BlueprintProcessorCatalogServiceImplTest {
val file = normalizedFile("./target/blueprints/generated-cba.zip")
assertTrue(file.exists(), "couldnt get file ${file.absolutePath}")
val metadata = bluePrintRuntimeService.bluePrintContext().metadata!!
- metadata[BlueprintConstants.PROPERTY_BLUEPRINT_PROCESS_ID] = blueprintId
+ metadata[BluePrintConstants.PROPERTY_BLUEPRINT_PROCESS_ID] = blueprintId
blueprintsProcessorCatalogService.save(metadata, file)
}
@@ -115,7 +115,7 @@ class BlueprintProcessorCatalogServiceImplTest {
val file = normalizedFile("./target/blueprints/generated-cba.zip")
assertTrue(file.exists(), "couldnt get file ${file.absolutePath}")
val metadata = bluePrintRuntimeService.bluePrintContext().metadata!!
- metadata[BlueprintConstants.PROPERTY_BLUEPRINT_PROCESS_ID] = blueprintId
+ metadata[BluePrintConstants.PROPERTY_BLUEPRINT_PROCESS_ID] = blueprintId
blueprintsProcessorCatalogService.save(metadata, file)
blueprintsProcessorCatalogService.get("baseconfiguration", "1.0.0", true)
diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/DatabasePropertiesDSLTest.kt b/ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/DatabasePropertiesDSLTest.kt
index d182651af..dd84e5b02 100644
--- a/ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/DatabasePropertiesDSLTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/DatabasePropertiesDSLTest.kt
@@ -17,7 +17,7 @@
package org.onap.ccsdk.cds.blueprintsprocessor.db
import org.junit.Test
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.relationshipTypeConnectsTo
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.serviceTemplate
import kotlin.test.assertEquals
@@ -68,12 +68,12 @@ class DatabasePropertiesDSLTest {
assertNotNull(relationshipTypes, "failed to get relationship types")
assertEquals(2, relationshipTypes.size, "relationshipTypes doesn't match")
assertNotNull(
- relationshipTypes[BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO],
- "failed to get ${BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO}"
+ relationshipTypes[BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO],
+ "failed to get ${BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO}"
)
assertNotNull(
- relationshipTypes[BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_DB],
- "failed to get ${BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_DB}"
+ relationshipTypes[BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_DB],
+ "failed to get ${BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_DB}"
)
}
}
diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/TestDatabaseConfiguration.kt b/ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/TestDatabaseConfiguration.kt
index 38a8ef427..d8192acfa 100644
--- a/ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/TestDatabaseConfiguration.kt
+++ b/ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/TestDatabaseConfiguration.kt
@@ -27,7 +27,7 @@ import org.springframework.transaction.PlatformTransactionManager
import javax.sql.DataSource
@Configuration
-@Import(BlueprintDBLibConfiguration::class)
+@Import(BluePrintDBLibConfiguration::class)
@EnableJpaRepositories(
basePackages = ["org.onap.ccsdk.cds.blueprintsprocessor.db.primary"],
entityManagerFactoryRef = "primaryEntityManager",
diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/mock/MockBlueprintProcessorCatalogServiceImpl.kt b/ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/mock/MockBlueprintProcessorCatalogServiceImpl.kt
index 6135f5bbd..248181f16 100644
--- a/ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/mock/MockBlueprintProcessorCatalogServiceImpl.kt
+++ b/ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/mock/MockBlueprintProcessorCatalogServiceImpl.kt
@@ -17,8 +17,8 @@ package org.onap.ccsdk.cds.blueprintsprocessor.db.mock
import io.mockk.coEvery
import io.mockk.mockk
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintValidatorService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
@@ -26,10 +26,10 @@ import org.springframework.context.annotation.Configuration
open class MockBlueprintProcessorCatalogServiceImpl {
@Bean(name = ["bluePrintRuntimeValidatorService"])
- open fun bluePrintRuntimeValidatorService(): BlueprintValidatorService {
- val bluePrintValidatorService = mockk<BlueprintValidatorService>()
- coEvery { bluePrintValidatorService.validateBlueprints(any<String>()) } returns true
- coEvery { bluePrintValidatorService.validateBlueprints(any<BlueprintRuntimeService<*>>()) } returns true
+ open fun bluePrintRuntimeValidatorService(): BluePrintValidatorService {
+ val bluePrintValidatorService = mockk<BluePrintValidatorService>()
+ coEvery { bluePrintValidatorService.validateBluePrints(any<String>()) } returns true
+ coEvery { bluePrintValidatorService.validateBluePrints(any<BluePrintRuntimeService<*>>()) } returns true
return bluePrintValidatorService
}
}
diff --git a/ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/AafAuthDmaapClientService.kt b/ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/AafAuthDmaapClientService.kt
index 587e020a4..dfe95733f 100644
--- a/ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/AafAuthDmaapClientService.kt
+++ b/ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/AafAuthDmaapClientService.kt
@@ -30,7 +30,7 @@ import com.att.nsa.mr.client.impl.MRSimplerBatchPublisher
class AafAuthDmaapClientService(
private val clientProps: AafAuthDmaapClientProperties
) :
- BlueprintDmaapClientService {
+ BluePrintDmaapClientService {
/**
* The constructed DMAAP client.
diff --git a/ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/BlueprintDmaapClientService.kt b/ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/BluePrintDmaapClientService.kt
index c275e7e8b..82c3f3a80 100644
--- a/ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/BlueprintDmaapClientService.kt
+++ b/ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/BluePrintDmaapClientService.kt
@@ -31,7 +31,7 @@ import java.util.concurrent.TimeUnit
* properties provided. This abstraction also provides a mechanism to send
* messages with the given partition in a session and closing the same.
*/
-interface BlueprintDmaapClientService {
+interface BluePrintDmaapClientService {
/**
* Static variable for logging.
@@ -39,7 +39,7 @@ interface BlueprintDmaapClientService {
companion object {
var log = LoggerFactory.getLogger(
- BlueprintDmaapClientService::class.java
+ BluePrintDmaapClientService::class.java
)!!
}
diff --git a/ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/BlueprintDmaapLibConfiguration.kt b/ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/BluePrintDmaapLibConfiguration.kt
index c64c33231..20d9afdef 100644
--- a/ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/BlueprintDmaapLibConfiguration.kt
+++ b/ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/BluePrintDmaapLibConfiguration.kt
@@ -31,7 +31,7 @@ import org.springframework.context.annotation.Configuration
@Configuration
@ComponentScan
@EnableConfigurationProperties
-open class BlueprintDmaapLibConfiguration
+open class BluePrintDmaapLibConfiguration
/**
* Util constants required for DMAAP library to use.
diff --git a/ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/BlueprintDmaapLibPropertyService.kt b/ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/BluePrintDmaapLibPropertyService.kt
index 7bc9d605f..e5c9d432f 100644
--- a/ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/BlueprintDmaapLibPropertyService.kt
+++ b/ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/BluePrintDmaapLibPropertyService.kt
@@ -21,11 +21,11 @@
package org.onap.ccsdk.cds.blueprintsprocessor.dmaap
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
import org.onap.ccsdk.cds.blueprintsprocessor.dmaap.DmaapLibConstants.Companion.SERVICE_BLUEPRINT_DMAAP_LIB_PROPERTY
import org.onap.ccsdk.cds.blueprintsprocessor.dmaap.DmaapLibConstants.Companion.TYPE_HTTP_AAF_AUTH
import org.onap.ccsdk.cds.blueprintsprocessor.dmaap.DmaapLibConstants.Companion.TYPE_HTTP_NO_AUTH
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.annotation.Autowired
@@ -46,7 +46,7 @@ import java.util.Properties
@Service(SERVICE_BLUEPRINT_DMAAP_LIB_PROPERTY)
@Configuration
@PropertySources(PropertySource("classpath:event.properties"))
-open class BlueprintDmaapLibPropertyService(private var bluePrintPropertiesService: BlueprintPropertiesService) {
+open class BluePrintDmaapLibPropertyService(private var bluePrintPropertiesService: BluePrintPropertiesService) {
/**
* Static variable for logging.
@@ -54,7 +54,7 @@ open class BlueprintDmaapLibPropertyService(private var bluePrintPropertiesServi
companion object {
var log = LoggerFactory.getLogger(
- BlueprintDmaapLibPropertyService::class.java
+ BluePrintDmaapLibPropertyService::class.java
)!!
}
@@ -70,7 +70,7 @@ open class BlueprintDmaapLibPropertyService(private var bluePrintPropertiesServi
* node.
*/
fun blueprintDmaapClientService(jsonNode: JsonNode):
- BlueprintDmaapClientService {
+ BluePrintDmaapClientService {
val dmaapProps = dmaapClientProperties(jsonNode)
return blueprintDmaapClientService(dmaapProps)
}
@@ -80,7 +80,7 @@ open class BlueprintDmaapLibPropertyService(private var bluePrintPropertiesServi
* selector string.
*/
fun blueprintDmaapClientService(selector: String):
- BlueprintDmaapClientService {
+ BluePrintDmaapClientService {
val prefix = "blueprintsprocessor.dmaapclient.$selector"
val dmaapProps = dmaapClientProperties(prefix)
return blueprintDmaapClientService(dmaapProps)
@@ -112,7 +112,7 @@ open class BlueprintDmaapLibPropertyService(private var bluePrintPropertiesServi
}
else -> {
- throw BlueprintProcessorException(
+ throw BluePrintProcessorException(
"DMAAP adaptor($type) is " +
"not supported"
)
@@ -147,7 +147,7 @@ open class BlueprintDmaapLibPropertyService(private var bluePrintPropertiesServi
}
else -> {
- throw BlueprintProcessorException(
+ throw BluePrintProcessorException(
"DMAAP adaptor($type) is " +
"not supported"
)
@@ -160,7 +160,7 @@ open class BlueprintDmaapLibPropertyService(private var bluePrintPropertiesServi
* Returns DMAAP client service according to the type of client properties.
*/
private fun blueprintDmaapClientService(clientProps: DmaapClientProperties):
- BlueprintDmaapClientService {
+ BluePrintDmaapClientService {
when (clientProps) {
is HttpNoAuthDmaapClientProperties -> {
return HttpNoAuthDmaapClientService(clientProps)
@@ -171,7 +171,7 @@ open class BlueprintDmaapLibPropertyService(private var bluePrintPropertiesServi
}
else -> {
- throw BlueprintProcessorException(
+ throw BluePrintProcessorException(
"Unable to get the DMAAP " +
"client"
)
diff --git a/ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/HttpNoAuthDmaapClientService.kt b/ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/HttpNoAuthDmaapClientService.kt
index 4f9f89ae2..d4adfcaac 100644
--- a/ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/HttpNoAuthDmaapClientService.kt
+++ b/ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/HttpNoAuthDmaapClientService.kt
@@ -31,7 +31,7 @@ class HttpNoAuthDmaapClientService(
private val clientProps:
HttpNoAuthDmaapClientProperties
) :
- BlueprintDmaapClientService {
+ BluePrintDmaapClientService {
/**
* The constructed DMAAP client.
diff --git a/ms/blueprintsprocessor/modules/commons/dmaap-lib/src/test/kotlin/org/ccsdk/cds/blueprintprocessor/dmaap/TestDmaapEventPublisher.kt b/ms/blueprintsprocessor/modules/commons/dmaap-lib/src/test/kotlin/org/ccsdk/cds/blueprintprocessor/dmaap/TestDmaapEventPublisher.kt
index c44f6a4a3..e6043caae 100644
--- a/ms/blueprintsprocessor/modules/commons/dmaap-lib/src/test/kotlin/org/ccsdk/cds/blueprintprocessor/dmaap/TestDmaapEventPublisher.kt
+++ b/ms/blueprintsprocessor/modules/commons/dmaap-lib/src/test/kotlin/org/ccsdk/cds/blueprintprocessor/dmaap/TestDmaapEventPublisher.kt
@@ -23,10 +23,10 @@ package org.ccsdk.apps.blueprintprocessor.dmaap
import com.fasterxml.jackson.databind.ObjectMapper
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
-import org.onap.ccsdk.cds.blueprintsprocessor.dmaap.BlueprintDmaapLibConfiguration
-import org.onap.ccsdk.cds.blueprintsprocessor.dmaap.BlueprintDmaapLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.dmaap.BluePrintDmaapLibConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.dmaap.BluePrintDmaapLibPropertyService
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.autoconfigure.EnableAutoConfiguration
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
@@ -51,8 +51,8 @@ import kotlin.test.assertNotNull
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
@ContextConfiguration(
classes = [
- BlueprintDmaapLibConfiguration::class, TestController::class,
- BlueprintPropertyConfiguration::class, BlueprintPropertiesService::class
+ BluePrintDmaapLibConfiguration::class, TestController::class,
+ BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class
]
)
@TestPropertySource(
@@ -69,7 +69,7 @@ import kotlin.test.assertNotNull
class TestDmaapEventPublisher {
@Autowired
- lateinit var dmaapService: BlueprintDmaapLibPropertyService
+ lateinit var dmaapService: BluePrintDmaapLibPropertyService
/**
* Tests the event properties being set properly and sent as request.
diff --git a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/BlueprintGrpcExtensions.kt b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/BluePrintGrpcExtensions.kt
index 97b462a3c..97b462a3c 100644
--- a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/BlueprintGrpcExtensions.kt
+++ b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/BluePrintGrpcExtensions.kt
diff --git a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/BlueprintGrpcLibConfiguration.kt b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/BluePrintGrpcLibConfiguration.kt
index 806e4c6f2..e94400d9b 100644
--- a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/BlueprintGrpcLibConfiguration.kt
+++ b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/BluePrintGrpcLibConfiguration.kt
@@ -18,27 +18,27 @@
package org.onap.ccsdk.cds.blueprintsprocessor.grpc
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.blueprintsprocessor.grpc.service.BlueprintGrpcClientService
-import org.onap.ccsdk.cds.blueprintsprocessor.grpc.service.BlueprintGrpcLibPropertyService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
+import org.onap.ccsdk.cds.blueprintsprocessor.grpc.service.BluePrintGrpcClientService
+import org.onap.ccsdk.cds.blueprintsprocessor.grpc.service.BluePrintGrpcLibPropertyService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
import org.springframework.context.annotation.ComponentScan
import org.springframework.context.annotation.Configuration
@Configuration
@ComponentScan
-open class BlueprintGrpcLibConfiguration
+open class BluePrintGrpcLibConfiguration
/**
* Exposed Dependency Service by this GRPC Lib Module
*/
-fun BlueprintDependencyService.grpcLibPropertyService(): BlueprintGrpcLibPropertyService =
+fun BluePrintDependencyService.grpcLibPropertyService(): BluePrintGrpcLibPropertyService =
instance(GRPCLibConstants.SERVICE_BLUEPRINT_GRPC_LIB_PROPERTY)
-fun BlueprintDependencyService.grpcClientService(selector: String): BlueprintGrpcClientService {
+fun BluePrintDependencyService.grpcClientService(selector: String): BluePrintGrpcClientService {
return grpcLibPropertyService().blueprintGrpcClientService(selector)
}
-fun BlueprintDependencyService.grpcClientService(jsonNode: JsonNode): BlueprintGrpcClientService {
+fun BluePrintDependencyService.grpcClientService(jsonNode: JsonNode): BluePrintGrpcClientService {
return grpcLibPropertyService().blueprintGrpcClientService(jsonNode)
}
diff --git a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/BlueprintGrpcLibData.kt b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/BluePrintGrpcLibData.kt
index ebb9a5b32..ebb9a5b32 100644
--- a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/BlueprintGrpcLibData.kt
+++ b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/BluePrintGrpcLibData.kt
diff --git a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/GrpcPropertiesDSL.kt b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/GrpcPropertiesDSL.kt
index 853f74930..8063e8909 100644
--- a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/GrpcPropertiesDSL.kt
+++ b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/GrpcPropertiesDSL.kt
@@ -17,8 +17,8 @@
package org.onap.ccsdk.cds.blueprintsprocessor.grpc
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonNode
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.data.RelationshipType
@@ -30,48 +30,48 @@ import org.onap.ccsdk.cds.controllerblueprints.core.dsl.relationshipType
/** Relationships Types DSL for GRPC Server Producer */
fun ServiceTemplateBuilder.relationshipTypeConnectsToGrpcServer() {
- val relationshipType = BlueprintTypes.relationshipTypeConnectsToGrpcServer()
+ val relationshipType = BluePrintTypes.relationshipTypeConnectsToGrpcServer()
if (this.relationshipTypes == null) this.relationshipTypes = hashMapOf()
this.relationshipTypes!![relationshipType.id!!] = relationshipType
}
-fun BlueprintTypes.relationshipTypeConnectsToGrpcServer(): RelationshipType {
+fun BluePrintTypes.relationshipTypeConnectsToGrpcServer(): RelationshipType {
return relationshipType(
- id = BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_GRPC_SERVER,
- version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO,
+ id = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_GRPC_SERVER,
+ version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO,
description = "Relationship connects to through GRPC Server."
) {
property(
- BlueprintConstants.PROPERTY_CONNECTION_CONFIG,
- BlueprintConstants.DATA_TYPE_MAP,
+ BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
+ BluePrintConstants.DATA_TYPE_MAP,
true,
"Connection Config details."
)
- validTargetTypes(arrayListOf(BlueprintConstants.MODEL_TYPE_CAPABILITY_TYPE_ENDPOINT))
+ validTargetTypes(arrayListOf(BluePrintConstants.MODEL_TYPE_CAPABILITY_TYPE_ENDPOINT))
}
}
fun ServiceTemplateBuilder.relationshipTypeConnectsToGrpcClient() {
- val relationshipType = BlueprintTypes.relationshipTypeConnectsToGrpcClient()
+ val relationshipType = BluePrintTypes.relationshipTypeConnectsToGrpcClient()
if (this.relationshipTypes == null) this.relationshipTypes = hashMapOf()
this.relationshipTypes!![relationshipType.id!!] = relationshipType
}
-fun BlueprintTypes.relationshipTypeConnectsToGrpcClient(): RelationshipType {
+fun BluePrintTypes.relationshipTypeConnectsToGrpcClient(): RelationshipType {
return relationshipType(
- id = BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_GRPC_CLIENT,
- version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO,
+ id = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_GRPC_CLIENT,
+ version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO,
description = "Relationship connects to through GRPC Client."
) {
property(
- BlueprintConstants.PROPERTY_CONNECTION_CONFIG,
- BlueprintConstants.DATA_TYPE_MAP,
+ BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
+ BluePrintConstants.DATA_TYPE_MAP,
true,
"Connection Config details."
)
- validTargetTypes(arrayListOf(BlueprintConstants.MODEL_TYPE_CAPABILITY_TYPE_ENDPOINT))
+ validTargetTypes(arrayListOf(BluePrintConstants.MODEL_TYPE_CAPABILITY_TYPE_ENDPOINT))
}
}
@@ -89,25 +89,25 @@ fun TopologyTemplateBuilder.relationshipTemplateGrpcServer(
class GrpcServerRelationshipTemplateBuilder(name: String, description: String) :
RelationshipTemplateBuilder(
name,
- BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_GRPC_SERVER, description
+ BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_GRPC_SERVER, description
) {
fun tokenAuth(block: GrpcServerTokenAuthPropertiesAssignmentBuilder.() -> Unit) {
- property(BlueprintConstants.PROPERTY_CONNECTION_CONFIG, BlueprintTypes.tokenAuthGrpcServerProperties(block))
+ property(BluePrintConstants.PROPERTY_CONNECTION_CONFIG, BluePrintTypes.tokenAuthGrpcServerProperties(block))
}
fun tlsAuth(block: GrpcServerTLSAuthPropertiesAssignmentBuilder.() -> Unit) {
- property(BlueprintConstants.PROPERTY_CONNECTION_CONFIG, BlueprintTypes.tlsAuthGrpcServerProperties(block))
+ property(BluePrintConstants.PROPERTY_CONNECTION_CONFIG, BluePrintTypes.tlsAuthGrpcServerProperties(block))
}
}
-fun BlueprintTypes.tokenAuthGrpcServerProperties(block: GrpcServerTokenAuthPropertiesAssignmentBuilder.() -> Unit): JsonNode {
+fun BluePrintTypes.tokenAuthGrpcServerProperties(block: GrpcServerTokenAuthPropertiesAssignmentBuilder.() -> Unit): JsonNode {
val assignments = GrpcServerTokenAuthPropertiesAssignmentBuilder().apply(block).build()
assignments[GrpcServerProperties::type.name] = GRPCLibConstants.TYPE_TOKEN_AUTH.asJsonPrimitive()
return assignments.asJsonNode()
}
-fun BlueprintTypes.tlsAuthGrpcServerProperties(block: GrpcServerTLSAuthPropertiesAssignmentBuilder.() -> Unit): JsonNode {
+fun BluePrintTypes.tlsAuthGrpcServerProperties(block: GrpcServerTLSAuthPropertiesAssignmentBuilder.() -> Unit): JsonNode {
val assignments = GrpcServerTLSAuthPropertiesAssignmentBuilder().apply(block).build()
assignments[GrpcServerProperties::type.name] = GRPCLibConstants.TYPE_TLS_AUTH.asJsonPrimitive()
return assignments.asJsonNode()
@@ -158,35 +158,35 @@ fun TopologyTemplateBuilder.relationshipTemplateGrpcClient(
class GrpcClientRelationshipTemplateBuilder(name: String, description: String) :
RelationshipTemplateBuilder(
name,
- BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_GRPC_CLIENT, description
+ BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_GRPC_CLIENT, description
) {
fun basicAuth(block: GrpcClientBasicAuthPropertiesAssignmentBuilder.() -> Unit) {
- property(BlueprintConstants.PROPERTY_CONNECTION_CONFIG, BlueprintTypes.basicAuthGrpcClientProperties(block))
+ property(BluePrintConstants.PROPERTY_CONNECTION_CONFIG, BluePrintTypes.basicAuthGrpcClientProperties(block))
}
fun tokenAuth(block: GrpcClientTokenAuthPropertiesAssignmentBuilder.() -> Unit) {
- property(BlueprintConstants.PROPERTY_CONNECTION_CONFIG, BlueprintTypes.tokenAuthGrpcClientProperties(block))
+ property(BluePrintConstants.PROPERTY_CONNECTION_CONFIG, BluePrintTypes.tokenAuthGrpcClientProperties(block))
}
fun tlsAuth(block: GrpcClientTLSAuthPropertiesAssignmentBuilder.() -> Unit) {
- property(BlueprintConstants.PROPERTY_CONNECTION_CONFIG, BlueprintTypes.tlsAuthGrpcClientProperties(block))
+ property(BluePrintConstants.PROPERTY_CONNECTION_CONFIG, BluePrintTypes.tlsAuthGrpcClientProperties(block))
}
}
-fun BlueprintTypes.basicAuthGrpcClientProperties(block: GrpcClientBasicAuthPropertiesAssignmentBuilder.() -> Unit): JsonNode {
+fun BluePrintTypes.basicAuthGrpcClientProperties(block: GrpcClientBasicAuthPropertiesAssignmentBuilder.() -> Unit): JsonNode {
val assignments = GrpcClientBasicAuthPropertiesAssignmentBuilder().apply(block).build()
assignments[GrpcClientProperties::type.name] = GRPCLibConstants.TYPE_BASIC_AUTH.asJsonPrimitive()
return assignments.asJsonNode()
}
-fun BlueprintTypes.tokenAuthGrpcClientProperties(block: GrpcClientTokenAuthPropertiesAssignmentBuilder.() -> Unit): JsonNode {
+fun BluePrintTypes.tokenAuthGrpcClientProperties(block: GrpcClientTokenAuthPropertiesAssignmentBuilder.() -> Unit): JsonNode {
val assignments = GrpcClientTokenAuthPropertiesAssignmentBuilder().apply(block).build()
assignments[GrpcClientProperties::type.name] = GRPCLibConstants.TYPE_TOKEN_AUTH.asJsonPrimitive()
return assignments.asJsonNode()
}
-fun BlueprintTypes.tlsAuthGrpcClientProperties(block: GrpcClientTLSAuthPropertiesAssignmentBuilder.() -> Unit): JsonNode {
+fun BluePrintTypes.tlsAuthGrpcClientProperties(block: GrpcClientTLSAuthPropertiesAssignmentBuilder.() -> Unit): JsonNode {
val assignments = GrpcClientTLSAuthPropertiesAssignmentBuilder().apply(block).build()
assignments[GrpcClientProperties::type.name] = GRPCLibConstants.TYPE_TLS_AUTH.asJsonPrimitive()
return assignments.asJsonNode()
diff --git a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/interceptor/GrpcServerLoggingInterceptor.kt b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/interceptor/GrpcServerLoggingInterceptor.kt
index 7465ba044..aaa4d5f26 100644
--- a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/interceptor/GrpcServerLoggingInterceptor.kt
+++ b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/interceptor/GrpcServerLoggingInterceptor.kt
@@ -23,11 +23,11 @@ import io.grpc.ServerCall
import io.grpc.ServerCallHandler
import io.grpc.ServerInterceptor
import org.onap.ccsdk.cds.blueprintsprocessor.grpc.service.GrpcLoggerService
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.logger
-import org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintDownloadInput
-import org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintRemoveInput
-import org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintUploadInput
+import org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintDownloadInput
+import org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintRemoveInput
+import org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintUploadInput
import org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceInput
import org.slf4j.MDC
@@ -62,22 +62,22 @@ class GrpcServerLoggingInterceptor : ServerInterceptor {
when (message) {
is ExecutionServiceInput -> {
val commonHeader = message.commonHeader
- ?: throw BlueprintProcessorException("missing common header in request")
+ ?: throw BluePrintProcessorException("missing common header in request")
loggingService.grpcRequesting(call, commonHeader, next)
}
- is BlueprintUploadInput -> {
+ is BluePrintUploadInput -> {
val commonHeader = message.commonHeader
- ?: throw BlueprintProcessorException("missing common header in request")
+ ?: throw BluePrintProcessorException("missing common header in request")
loggingService.grpcRequesting(call, commonHeader, next)
}
- is BlueprintDownloadInput -> {
+ is BluePrintDownloadInput -> {
val commonHeader = message.commonHeader
- ?: throw BlueprintProcessorException("missing common header in request")
+ ?: throw BluePrintProcessorException("missing common header in request")
loggingService.grpcRequesting(call, commonHeader, next)
}
- is BlueprintRemoveInput -> {
+ is BluePrintRemoveInput -> {
val commonHeader = message.commonHeader
- ?: throw BlueprintProcessorException("missing common header in request")
+ ?: throw BluePrintProcessorException("missing common header in request")
loggingService.grpcRequesting(call, commonHeader, next)
}
else -> {
diff --git a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BasicAuthGrpcClientService.kt b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BasicAuthGrpcClientService.kt
index 72453f596..f7be8c66d 100644
--- a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BasicAuthGrpcClientService.kt
+++ b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BasicAuthGrpcClientService.kt
@@ -22,7 +22,7 @@ import io.grpc.netty.NettyChannelBuilder
import org.onap.ccsdk.cds.blueprintsprocessor.grpc.BasicAuthGrpcClientProperties
open class BasicAuthGrpcClientService(private val basicAuthGrpcClientProperties: BasicAuthGrpcClientProperties) :
- BlueprintGrpcClientService {
+ BluePrintGrpcClientService {
override suspend fun channel(): ManagedChannel {
val managedChannel = NettyChannelBuilder
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 9b95edfc3..a102ee6da 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.BlueprintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
import org.onap.ccsdk.cds.blueprintsprocessor.grpc.BasicAuthGrpcClientProperties
import org.onap.ccsdk.cds.blueprintsprocessor.grpc.GRPCLibConstants
import org.onap.ccsdk.cds.blueprintsprocessor.grpc.GrpcClientProperties
@@ -27,20 +27,20 @@ import org.onap.ccsdk.cds.blueprintsprocessor.grpc.TLSAuthGrpcClientProperties
import org.onap.ccsdk.cds.blueprintsprocessor.grpc.TLSAuthGrpcServerProperties
import org.onap.ccsdk.cds.blueprintsprocessor.grpc.TokenAuthGrpcClientProperties
import org.onap.ccsdk.cds.blueprintsprocessor.grpc.TokenAuthGrpcServerProperties
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.returnNullIfMissing
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 bluePrintPropertiesService: BlueprintPropertiesService) {
+open class BluePrintGrpcLibPropertyService(private var bluePrintPropertiesService: BluePrintPropertiesService) {
- fun blueprintGrpcServerService(jsonNode: JsonNode): BlueprintGrpcServerService {
+ fun blueprintGrpcServerService(jsonNode: JsonNode): BluePrintGrpcServerService {
val grpcServerProperties = grpcServerProperties(jsonNode)
return blueprintGrpcServerService(grpcServerProperties)
}
- fun blueprintGrpcServerService(selector: String): BlueprintGrpcServerService {
+ fun blueprintGrpcServerService(selector: String): BluePrintGrpcServerService {
val prefix = "${GRPCLibConstants.PROPERTY_GRPC_SERVER_PREFIX}$selector"
val grpcServerProperties = grpcServerProperties(prefix)
return blueprintGrpcServerService(grpcServerProperties)
@@ -56,7 +56,7 @@ open class BlueprintGrpcLibPropertyService(private var bluePrintPropertiesServic
JacksonUtils.readValue(jsonNode, TLSAuthGrpcServerProperties::class.java)!!
}
else -> {
- throw BlueprintProcessorException("Grpc type($type) not supported")
+ throw BluePrintProcessorException("Grpc type($type) not supported")
}
}
}
@@ -73,7 +73,7 @@ open class BlueprintGrpcLibPropertyService(private var bluePrintPropertiesServic
tlsAuthGrpcServerProperties(prefix)
}
else -> {
- throw BlueprintProcessorException("Grpc type($type) not supported")
+ throw BluePrintProcessorException("Grpc type($type) not supported")
}
}
}
@@ -87,25 +87,25 @@ open class BlueprintGrpcLibPropertyService(private var bluePrintPropertiesServic
}
private fun blueprintGrpcServerService(grpcServerProperties: GrpcServerProperties):
- BlueprintGrpcServerService {
+ BluePrintGrpcServerService {
when (grpcServerProperties) {
is TLSAuthGrpcServerProperties -> {
return TLSAuthGrpcServerService(grpcServerProperties)
}
else -> {
- throw BlueprintProcessorException("couldn't get grpc client service for properties $grpcServerProperties")
+ throw BluePrintProcessorException("couldn't get grpc client service for properties $grpcServerProperties")
}
}
}
/** GRPC Client Lib Property Service */
- fun blueprintGrpcClientService(jsonNode: JsonNode): BlueprintGrpcClientService {
+ fun blueprintGrpcClientService(jsonNode: JsonNode): BluePrintGrpcClientService {
val restClientProperties = grpcClientProperties(jsonNode)
return blueprintGrpcClientService(restClientProperties)
}
- fun blueprintGrpcClientService(selector: String): BlueprintGrpcClientService {
+ fun blueprintGrpcClientService(selector: String): BluePrintGrpcClientService {
val prefix = "${GRPCLibConstants.PROPERTY_GRPC_CLIENT_PREFIX}$selector"
val restClientProperties = grpcClientProperties(prefix)
return blueprintGrpcClientService(restClientProperties)
@@ -113,7 +113,7 @@ open class BlueprintGrpcLibPropertyService(private var bluePrintPropertiesServic
fun grpcClientProperties(jsonNode: JsonNode): GrpcClientProperties {
val type = jsonNode.get("type").returnNullIfMissing()?.textValue()
- ?: BlueprintProcessorException("missing type property")
+ ?: BluePrintProcessorException("missing type property")
return when (type) {
GRPCLibConstants.TYPE_TOKEN_AUTH -> {
JacksonUtils.readValue(jsonNode, TokenAuthGrpcClientProperties::class.java)!!
@@ -125,7 +125,7 @@ open class BlueprintGrpcLibPropertyService(private var bluePrintPropertiesServic
JacksonUtils.readValue(jsonNode, BasicAuthGrpcClientProperties::class.java)!!
}
else -> {
- throw BlueprintProcessorException("Grpc type($type) not supported")
+ throw BluePrintProcessorException("Grpc type($type) not supported")
}
}
}
@@ -145,13 +145,13 @@ open class BlueprintGrpcLibPropertyService(private var bluePrintPropertiesServic
basicAuthGrpcClientProperties(prefix)
}
else -> {
- throw BlueprintProcessorException("Grpc type($type) not supported")
+ throw BluePrintProcessorException("Grpc type($type) not supported")
}
}
}
fun blueprintGrpcClientService(grpcClientProperties: GrpcClientProperties):
- BlueprintGrpcClientService {
+ BluePrintGrpcClientService {
return when (grpcClientProperties) {
is TokenAuthGrpcClientProperties -> {
TokenAuthGrpcClientService(grpcClientProperties)
@@ -163,7 +163,7 @@ open class BlueprintGrpcLibPropertyService(private var bluePrintPropertiesServic
BasicAuthGrpcClientService(grpcClientProperties)
}
else -> {
- throw BlueprintProcessorException("couldn't get grpc service for type(${grpcClientProperties.type})")
+ throw BluePrintProcessorException("couldn't get grpc service for type(${grpcClientProperties.type})")
}
}
}
diff --git a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BlueprintGrpcService.kt b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BluePrintGrpcService.kt
index a9485b3c3..d2db14a53 100644
--- a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BlueprintGrpcService.kt
+++ b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BluePrintGrpcService.kt
@@ -20,12 +20,12 @@ package org.onap.ccsdk.cds.blueprintsprocessor.grpc.service
import io.grpc.ManagedChannel
import io.grpc.netty.NettyServerBuilder
-interface BlueprintGrpcServerService {
+interface BluePrintGrpcServerService {
fun serverBuilder(): NettyServerBuilder
}
-interface BlueprintGrpcClientService {
+interface BluePrintGrpcClientService {
suspend fun channel(): ManagedChannel
}
diff --git a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/GrpcLoggerService.kt b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/GrpcLoggerService.kt
index a2be05d4d..732f4fecf 100644
--- a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/GrpcLoggerService.kt
+++ b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/GrpcLoggerService.kt
@@ -23,11 +23,11 @@ import io.grpc.ServerCallHandler
import org.onap.ccsdk.cds.blueprintsprocessor.grpc.getStringKey
import org.onap.ccsdk.cds.blueprintsprocessor.grpc.putStringKeyValue
import org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants.ONAP_INVOCATION_ID
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants.ONAP_PARTNER_NAME
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants.ONAP_REQUEST_ID
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants.ONAP_INVOCATION_ID
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants.ONAP_PARTNER_NAME
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants.ONAP_REQUEST_ID
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.defaultToEmpty
import org.onap.ccsdk.cds.controllerblueprints.core.defaultToUUID
import org.onap.ccsdk.cds.controllerblueprints.core.logger
@@ -75,7 +75,7 @@ class GrpcLoggerService {
val localhost = InetAddress.getLocalHost()
val clientSocketAddress = call.attributes.get(Grpc.TRANSPORT_ATTR_REMOTE_ADDR) as? InetSocketAddress
- ?: throw BlueprintProcessorException("failed to get client address")
+ ?: throw BluePrintProcessorException("failed to get client address")
val serviceName = call.methodDescriptor.fullMethodName
MDC.put("InvokeTimestamp", ZonedDateTime.now(ZoneOffset.UTC).format(DateTimeFormatter.ISO_INSTANT))
@@ -94,7 +94,7 @@ class GrpcLoggerService {
fun grpcInvoking(requestHeader: Metadata) {
requestHeader.putStringKeyValue(ONAP_REQUEST_ID, MDC.get("InvocationID").defaultToUUID())
requestHeader.putStringKeyValue(ONAP_INVOCATION_ID, UUID.randomUUID().toString())
- requestHeader.putStringKeyValue(ONAP_PARTNER_NAME, BlueprintConstants.APP_NAME)
+ requestHeader.putStringKeyValue(ONAP_PARTNER_NAME, BluePrintConstants.APP_NAME)
}
/** Used when server returns response */
diff --git a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/TLSAuthGrpcClientService.kt b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/TLSAuthGrpcClientService.kt
index a8374d6e7..44df5fbe5 100644
--- a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/TLSAuthGrpcClientService.kt
+++ b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/TLSAuthGrpcClientService.kt
@@ -26,7 +26,7 @@ import org.onap.ccsdk.cds.blueprintsprocessor.grpc.interceptor.GrpcClientLogging
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedFile
class TLSAuthGrpcClientService(private val tlsAuthGrpcClientProperties: TLSAuthGrpcClientProperties) :
- BlueprintGrpcClientService {
+ BluePrintGrpcClientService {
override suspend fun channel(): ManagedChannel {
diff --git a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/TLSAuthGrpcServerService.kt b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/TLSAuthGrpcServerService.kt
index c5f8df425..915ea1730 100644
--- a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/TLSAuthGrpcServerService.kt
+++ b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/TLSAuthGrpcServerService.kt
@@ -25,7 +25,7 @@ import org.onap.ccsdk.cds.blueprintsprocessor.grpc.TLSAuthGrpcServerProperties
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedFile
class TLSAuthGrpcServerService(private val tlsAuthGrpcServerProperties: TLSAuthGrpcServerProperties) :
- BlueprintGrpcServerService {
+ BluePrintGrpcServerService {
override fun serverBuilder(): NettyServerBuilder {
return NettyServerBuilder
diff --git a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/TokenAuthGrpcClientService.kt b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/TokenAuthGrpcClientService.kt
index b14e1d6ad..4c991df1f 100644
--- a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/TokenAuthGrpcClientService.kt
+++ b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/TokenAuthGrpcClientService.kt
@@ -30,7 +30,7 @@ import org.onap.ccsdk.cds.blueprintsprocessor.grpc.TokenAuthGrpcClientProperties
import org.onap.ccsdk.cds.blueprintsprocessor.grpc.interceptor.GrpcClientLoggingInterceptor
class TokenAuthGrpcClientService(private val tokenAuthGrpcClientProperties: TokenAuthGrpcClientProperties) :
- BlueprintGrpcClientService {
+ BluePrintGrpcClientService {
override suspend fun channel(): ManagedChannel {
val target =
diff --git a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/GrpcPropertiesDSLTest.kt b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/GrpcPropertiesDSLTest.kt
index 1e7000e37..3de857fa5 100644
--- a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/GrpcPropertiesDSLTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/GrpcPropertiesDSLTest.kt
@@ -17,7 +17,7 @@
package org.onap.ccsdk.cds.blueprintsprocessor.grpc
import org.junit.Test
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.relationshipTypeConnectsTo
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.serviceTemplate
import kotlin.test.assertEquals
@@ -60,12 +60,12 @@ class GrpcPropertiesDSLTest {
assertNotNull(relationshipTypes, "failed to get relationship types")
assertEquals(2, relationshipTypes.size, "relationshipTypes doesn't match")
assertNotNull(
- relationshipTypes[BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO],
- "failed to get ${BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO}"
+ relationshipTypes[BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO],
+ "failed to get ${BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO}"
)
assertNotNull(
- relationshipTypes[BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_GRPC_SERVER],
- "failed to get ${BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_GRPC_SERVER}"
+ relationshipTypes[BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_GRPC_SERVER],
+ "failed to get ${BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_GRPC_SERVER}"
)
}
@@ -115,12 +115,12 @@ class GrpcPropertiesDSLTest {
assertNotNull(relationshipTypes, "failed to get relationship types")
assertEquals(2, relationshipTypes.size, "relationshipTypes doesn't match")
assertNotNull(
- relationshipTypes[BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO],
- "failed to get ${BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO}"
+ relationshipTypes[BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO],
+ "failed to get ${BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO}"
)
assertNotNull(
- relationshipTypes[BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_GRPC_CLIENT],
- "failed to get ${BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_GRPC_CLIENT}"
+ relationshipTypes[BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_GRPC_CLIENT],
+ "failed to get ${BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_GRPC_CLIENT}"
)
}
}
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 40e245ade..30722c8e3 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
@@ -22,10 +22,10 @@ import com.fasterxml.jackson.databind.ObjectMapper
import org.junit.Assert
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
-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.BasicAuthGrpcClientProperties
-import org.onap.ccsdk.cds.blueprintsprocessor.grpc.BlueprintGrpcLibConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.grpc.BluePrintGrpcLibConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.grpc.TLSAuthGrpcClientProperties
import org.onap.ccsdk.cds.blueprintsprocessor.grpc.TLSAuthGrpcServerProperties
import org.onap.ccsdk.cds.blueprintsprocessor.grpc.TokenAuthGrpcClientProperties
@@ -41,8 +41,8 @@ import kotlin.test.assertTrue
@RunWith(SpringRunner::class)
@ContextConfiguration(
classes = [
- BlueprintGrpcLibConfiguration::class,
- BlueprintPropertyConfiguration::class, BlueprintPropertiesService::class
+ BluePrintGrpcLibConfiguration::class,
+ BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class
]
)
@TestPropertySource(
@@ -74,10 +74,10 @@ import kotlin.test.assertTrue
"blueprintsprocessor.grpcclient.tls-sample.clientPrivateKey=client.key"
]
)
-class BlueprintGrpcLibPropertyServiceTest {
+class BluePrintGrpcLibPropertyServiceTest {
@Autowired
- lateinit var bluePrintGrpcLibPropertyService: BlueprintGrpcLibPropertyService
+ lateinit var bluePrintGrpcLibPropertyService: BluePrintGrpcLibPropertyService
/**
* Tests the GRPC client properties with selector for basic auth.
diff --git a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BlueprintGrpcServerTest.kt b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BluePrintGrpcServerTest.kt
index 130175e64..026fe5af5 100644
--- a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BlueprintGrpcServerTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BluePrintGrpcServerTest.kt
@@ -28,13 +28,13 @@ import org.onap.ccsdk.cds.blueprintsprocessor.grpc.TLSAuthGrpcServerProperties
import org.onap.ccsdk.cds.controllerblueprints.common.api.ActionIdentifiers
import org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader
import org.onap.ccsdk.cds.controllerblueprints.common.api.EventType
-import org.onap.ccsdk.cds.controllerblueprints.processing.api.BlueprintProcessingServiceGrpc
+import org.onap.ccsdk.cds.controllerblueprints.processing.api.BluePrintProcessingServiceGrpc
import org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceInput
import java.util.UUID
import kotlin.test.Test
import kotlin.test.assertNotNull
-class BlueprintGrpcServerTest {
+class BluePrintGrpcServerTest {
private val tlsAuthGrpcServerProperties = TLSAuthGrpcServerProperties().apply {
port = 50052
@@ -69,7 +69,7 @@ class BlueprintGrpcServerTest {
val grpcChannel = tlsAuthGrpcClientService.channel()
/** Get Send and Receive Channel for bidirectional process method*/
val (reqChannel, resChannel) = clientCallBidiStreaming(
- BlueprintProcessingServiceGrpc.getProcessMethod(),
+ BluePrintProcessingServiceGrpc.getProcessMethod(),
grpcChannel
)
launch {
diff --git a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/MockTLSBlueprintProcessingServer.kt b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/MockTLSBluePrintProcessingServer.kt
index 5426d7327..78fa27d3a 100644
--- a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/MockTLSBlueprintProcessingServer.kt
+++ b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/MockTLSBluePrintProcessingServer.kt
@@ -23,11 +23,11 @@ import org.onap.ccsdk.cds.blueprintsprocessor.grpc.interceptor.GrpcServerLogging
import org.onap.ccsdk.cds.controllerblueprints.common.api.EventType
import org.onap.ccsdk.cds.controllerblueprints.common.api.Status
import org.onap.ccsdk.cds.controllerblueprints.core.logger
-import org.onap.ccsdk.cds.controllerblueprints.processing.api.BlueprintProcessingServiceGrpc
+import org.onap.ccsdk.cds.controllerblueprints.processing.api.BluePrintProcessingServiceGrpc
import org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceInput
import org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceOutput
-val log = logger(MockTLSBlueprintProcessingServer::class)
+val log = logger(MockTLSBluePrintProcessingServer::class)
/** For Integration testing stat this server, Set the working path to run this method */
fun main() {
@@ -40,7 +40,7 @@ fun main() {
}
val server = TLSAuthGrpcServerService(tlsAuthGrpcServerProperties).serverBuilder()
.intercept(GrpcServerLoggingInterceptor())
- .addService(MockTLSBlueprintProcessingServer())
+ .addService(MockTLSBluePrintProcessingServer())
.build()
server.start()
log.info("GRPC Serve started(${server.isShutdown}) on port(${server.port})...")
@@ -50,7 +50,7 @@ fun main() {
}
}
-class MockTLSBlueprintProcessingServer : BlueprintProcessingServiceGrpc.BlueprintProcessingServiceImplBase() {
+class MockTLSBluePrintProcessingServer : BluePrintProcessingServiceGrpc.BluePrintProcessingServiceImplBase() {
override fun process(responseObserver: StreamObserver<ExecutionServiceOutput>): StreamObserver<ExecutionServiceInput> {
diff --git a/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/BlueprintMessageExtensions.kt b/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/BluePrintMessageExtensions.kt
index 509689eca..509689eca 100644
--- a/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/BlueprintMessageExtensions.kt
+++ b/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/BluePrintMessageExtensions.kt
diff --git a/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/BlueprintMessageLibConfiguration.kt b/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/BluePrintMessageLibConfiguration.kt
index 88931d13f..659295a6b 100644
--- a/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/BlueprintMessageLibConfiguration.kt
+++ b/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/BluePrintMessageLibConfiguration.kt
@@ -18,10 +18,10 @@
package org.onap.ccsdk.cds.blueprintsprocessor.message
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.blueprintsprocessor.message.service.BlueprintMessageLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.message.service.BluePrintMessageLibPropertyService
import org.onap.ccsdk.cds.blueprintsprocessor.message.service.BlueprintMessageConsumerService
import org.onap.ccsdk.cds.blueprintsprocessor.message.service.BlueprintMessageProducerService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
import org.springframework.boot.context.properties.EnableConfigurationProperties
import org.springframework.context.annotation.ComponentScan
import org.springframework.context.annotation.Configuration
@@ -29,29 +29,29 @@ import org.springframework.context.annotation.Configuration
@Configuration
@ComponentScan
@EnableConfigurationProperties
-open class BlueprintMessageLibConfiguration
+open class BluePrintMessageLibConfiguration
/**
* Exposed Dependency Service by this Message Lib Module
*/
-fun BlueprintDependencyService.messageLibPropertyService(): BlueprintMessageLibPropertyService =
+fun BluePrintDependencyService.messageLibPropertyService(): BluePrintMessageLibPropertyService =
instance(MessageLibConstants.SERVICE_BLUEPRINT_MESSAGE_LIB_PROPERTY)
/** Extension functions for message producer service **/
-fun BlueprintDependencyService.messageProducerService(selector: String): BlueprintMessageProducerService {
+fun BluePrintDependencyService.messageProducerService(selector: String): BlueprintMessageProducerService {
return messageLibPropertyService().blueprintMessageProducerService(selector)
}
-fun BlueprintDependencyService.messageProducerService(jsonNode: JsonNode): BlueprintMessageProducerService {
+fun BluePrintDependencyService.messageProducerService(jsonNode: JsonNode): BlueprintMessageProducerService {
return messageLibPropertyService().blueprintMessageProducerService(jsonNode)
}
/** Extension functions for message consumer service **/
-fun BlueprintDependencyService.messageConsumerService(selector: String): BlueprintMessageConsumerService {
+fun BluePrintDependencyService.messageConsumerService(selector: String): BlueprintMessageConsumerService {
return messageLibPropertyService().blueprintMessageConsumerService(selector)
}
-fun BlueprintDependencyService.messageConsumerService(jsonNode: JsonNode): BlueprintMessageConsumerService {
+fun BluePrintDependencyService.messageConsumerService(jsonNode: JsonNode): BlueprintMessageConsumerService {
return messageLibPropertyService().blueprintMessageConsumerService(jsonNode)
}
diff --git a/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/BlueprintMessageLibData.kt b/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/BluePrintMessageLibData.kt
index 3e7db9597..3e7db9597 100644
--- a/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/BlueprintMessageLibData.kt
+++ b/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/BluePrintMessageLibData.kt
diff --git a/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/MessagePropertiesDSL.kt b/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/MessagePropertiesDSL.kt
index 527374f02..8b31de9b9 100644
--- a/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/MessagePropertiesDSL.kt
+++ b/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/MessagePropertiesDSL.kt
@@ -17,8 +17,8 @@
package org.onap.ccsdk.cds.blueprintsprocessor.message
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
import org.onap.ccsdk.cds.controllerblueprints.core.data.RelationshipType
@@ -30,48 +30,48 @@ import org.onap.ccsdk.cds.controllerblueprints.core.dsl.relationshipType
/** Relationships Types DSL for Message Producer */
fun ServiceTemplateBuilder.relationshipTypeConnectsToMessageProducer() {
- val relationshipType = BlueprintTypes.relationshipTypeConnectsToMessageProducer()
+ val relationshipType = BluePrintTypes.relationshipTypeConnectsToMessageProducer()
if (this.relationshipTypes == null) this.relationshipTypes = hashMapOf()
this.relationshipTypes!![relationshipType.id!!] = relationshipType
}
-fun BlueprintTypes.relationshipTypeConnectsToMessageProducer(): RelationshipType {
+fun BluePrintTypes.relationshipTypeConnectsToMessageProducer(): RelationshipType {
return relationshipType(
- id = BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_MESSAGE_PRODUCER,
- version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO,
+ id = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_MESSAGE_PRODUCER,
+ version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO,
description = "Relationship connects to through message producer."
) {
property(
- BlueprintConstants.PROPERTY_CONNECTION_CONFIG,
- BlueprintConstants.DATA_TYPE_MAP,
+ BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
+ BluePrintConstants.DATA_TYPE_MAP,
true,
"Connection Config details."
)
- validTargetTypes(arrayListOf(BlueprintConstants.MODEL_TYPE_CAPABILITY_TYPE_ENDPOINT))
+ validTargetTypes(arrayListOf(BluePrintConstants.MODEL_TYPE_CAPABILITY_TYPE_ENDPOINT))
}
}
fun ServiceTemplateBuilder.relationshipTypeConnectsToMessageConsumer() {
- val relationshipType = BlueprintTypes.relationshipTypeConnectsToMessageConsumer()
+ val relationshipType = BluePrintTypes.relationshipTypeConnectsToMessageConsumer()
if (this.relationshipTypes == null) this.relationshipTypes = hashMapOf()
this.relationshipTypes!![relationshipType.id!!] = relationshipType
}
-fun BlueprintTypes.relationshipTypeConnectsToMessageConsumer(): RelationshipType {
+fun BluePrintTypes.relationshipTypeConnectsToMessageConsumer(): RelationshipType {
return relationshipType(
- id = BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_MESSAGE_CONSUMER,
- version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO,
+ id = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_MESSAGE_CONSUMER,
+ version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO,
description = "Relationship type connects to message consumer."
) {
property(
- BlueprintConstants.PROPERTY_CONNECTION_CONFIG,
- BlueprintConstants.DATA_TYPE_MAP,
+ BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
+ BluePrintConstants.DATA_TYPE_MAP,
true,
"Connection Config details."
)
- validTargetTypes(arrayListOf(BlueprintConstants.MODEL_TYPE_CAPABILITY_TYPE_ENDPOINT))
+ validTargetTypes(arrayListOf(BluePrintConstants.MODEL_TYPE_CAPABILITY_TYPE_ENDPOINT))
}
}
@@ -90,46 +90,46 @@ fun TopologyTemplateBuilder.relationshipTemplateMessageProducer(
class MessageProducerRelationshipTemplateBuilder(name: String, description: String) :
RelationshipTemplateBuilder(
name,
- BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_MESSAGE_PRODUCER, description
+ BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_MESSAGE_PRODUCER, description
) {
fun kafkaBasicAuth(block: KafkaBasicAuthMessageProducerPropertiesAssignmentBuilder.() -> Unit) {
property(
- BlueprintConstants.PROPERTY_CONNECTION_CONFIG,
- BlueprintTypes.kafkaBasicAuthMessageProducerProperties(block)
+ BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
+ BluePrintTypes.kafkaBasicAuthMessageProducerProperties(block)
)
}
fun kafkaSslAuth(block: KafkaSslAuthMessageProducerPropertiesAssignmentBuilder.() -> Unit) {
property(
- BlueprintConstants.PROPERTY_CONNECTION_CONFIG,
- BlueprintTypes.kafkaSslAuthMessageProducerProperties(block)
+ BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
+ BluePrintTypes.kafkaSslAuthMessageProducerProperties(block)
)
}
fun kafkaScramSslAuth(block: KafkaScramSslAuthMessageProducerPropertiesAssignmentBuilder.() -> Unit) {
property(
- BlueprintConstants.PROPERTY_CONNECTION_CONFIG,
- BlueprintTypes.kafkaScramSslAuthMessageProducerProperties(block)
+ BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
+ BluePrintTypes.kafkaScramSslAuthMessageProducerProperties(block)
)
}
}
-fun BlueprintTypes.kafkaBasicAuthMessageProducerProperties(block: KafkaBasicAuthMessageProducerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
+fun BluePrintTypes.kafkaBasicAuthMessageProducerProperties(block: KafkaBasicAuthMessageProducerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
val assignments = KafkaBasicAuthMessageProducerPropertiesAssignmentBuilder().apply(block).build()
assignments[KafkaBasicAuthMessageProducerProperties::type.name] =
MessageLibConstants.TYPE_KAFKA_BASIC_AUTH.asJsonPrimitive()
return assignments.asJsonType()
}
-fun BlueprintTypes.kafkaSslAuthMessageProducerProperties(block: KafkaSslAuthMessageProducerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
+fun BluePrintTypes.kafkaSslAuthMessageProducerProperties(block: KafkaSslAuthMessageProducerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
val assignments = KafkaSslAuthMessageProducerPropertiesAssignmentBuilder().apply(block).build()
assignments[KafkaSslAuthMessageProducerProperties::type.name] =
MessageLibConstants.TYPE_KAFKA_SSL_AUTH.asJsonPrimitive()
return assignments.asJsonType()
}
-fun BlueprintTypes.kafkaScramSslAuthMessageProducerProperties(block: KafkaScramSslAuthMessageProducerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
+fun BluePrintTypes.kafkaScramSslAuthMessageProducerProperties(block: KafkaScramSslAuthMessageProducerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
val assignments = KafkaScramSslAuthMessageProducerPropertiesAssignmentBuilder().apply(block).build()
assignments[KafkaScramSslAuthMessageProducerProperties::type.name] =
MessageLibConstants.TYPE_KAFKA_SCRAM_SSL_AUTH.asJsonPrimitive()
@@ -245,88 +245,88 @@ fun TopologyTemplateBuilder.relationshipTemplateMessageConsumer(
class MessageConsumerRelationshipTemplateBuilder(name: String, description: String) :
RelationshipTemplateBuilder(
name,
- BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_MESSAGE_CONSUMER, description
+ BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_MESSAGE_CONSUMER, description
) {
fun kafkaBasicAuth(block: KafkaBasicAuthMessageConsumerPropertiesAssignmentBuilder.() -> Unit) {
property(
- BlueprintConstants.PROPERTY_CONNECTION_CONFIG,
- BlueprintTypes.kafkaBasicAuthMessageConsumerProperties(block)
+ BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
+ BluePrintTypes.kafkaBasicAuthMessageConsumerProperties(block)
)
}
fun kafkaSslAuth(block: KafkaSslAuthMessageConsumerPropertiesAssignmentBuilder.() -> Unit) {
property(
- BlueprintConstants.PROPERTY_CONNECTION_CONFIG,
- BlueprintTypes.kafkaSslAuthMessageConsumerProperties(block)
+ BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
+ BluePrintTypes.kafkaSslAuthMessageConsumerProperties(block)
)
}
fun kafkaScramSslAuth(block: KafkaScramSslAuthMessageConsumerPropertiesAssignmentBuilder.() -> Unit) {
property(
- BlueprintConstants.PROPERTY_CONNECTION_CONFIG,
- BlueprintTypes.kafkaScramSslAuthMessageConsumerProperties(block)
+ BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
+ BluePrintTypes.kafkaScramSslAuthMessageConsumerProperties(block)
)
}
fun kafkaStreamsBasicAuth(block: KafkaStreamsBasicAuthConsumerPropertiesAssignmentBuilder.() -> Unit) {
property(
- BlueprintConstants.PROPERTY_CONNECTION_CONFIG,
- BlueprintTypes.kafkaStreamsBasicAuthConsumerProperties(block)
+ BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
+ BluePrintTypes.kafkaStreamsBasicAuthConsumerProperties(block)
)
}
fun kafkaStreamsSslAuth(block: KafkaStreamsSslAuthConsumerPropertiesAssignmentBuilder.() -> Unit) {
property(
- BlueprintConstants.PROPERTY_CONNECTION_CONFIG,
- BlueprintTypes.kafkaStreamsSslAuthConsumerProperties(block)
+ BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
+ BluePrintTypes.kafkaStreamsSslAuthConsumerProperties(block)
)
}
fun kafkaStreamsScramSslAuth(block: KafkaStreamsScramSslAuthConsumerPropertiesAssignmentBuilder.() -> Unit) {
property(
- BlueprintConstants.PROPERTY_CONNECTION_CONFIG,
- BlueprintTypes.kafkaStreamsScramSslAuthConsumerProperties(block)
+ BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
+ BluePrintTypes.kafkaStreamsScramSslAuthConsumerProperties(block)
)
}
}
-fun BlueprintTypes.kafkaBasicAuthMessageConsumerProperties(block: KafkaBasicAuthMessageConsumerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
+fun BluePrintTypes.kafkaBasicAuthMessageConsumerProperties(block: KafkaBasicAuthMessageConsumerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
val assignments = KafkaBasicAuthMessageConsumerPropertiesAssignmentBuilder().apply(block).build()
assignments[KafkaBasicAuthMessageConsumerProperties::type.name] =
MessageLibConstants.TYPE_KAFKA_BASIC_AUTH.asJsonPrimitive()
return assignments.asJsonType()
}
-fun BlueprintTypes.kafkaSslAuthMessageConsumerProperties(block: KafkaSslAuthMessageConsumerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
+fun BluePrintTypes.kafkaSslAuthMessageConsumerProperties(block: KafkaSslAuthMessageConsumerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
val assignments = KafkaSslAuthMessageConsumerPropertiesAssignmentBuilder().apply(block).build()
assignments[KafkaSslAuthMessageConsumerProperties::type.name] =
MessageLibConstants.TYPE_KAFKA_SSL_AUTH.asJsonPrimitive()
return assignments.asJsonType()
}
-fun BlueprintTypes.kafkaScramSslAuthMessageConsumerProperties(block: KafkaScramSslAuthMessageConsumerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
+fun BluePrintTypes.kafkaScramSslAuthMessageConsumerProperties(block: KafkaScramSslAuthMessageConsumerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
val assignments = KafkaScramSslAuthMessageConsumerPropertiesAssignmentBuilder().apply(block).build()
assignments[KafkaScramSslAuthMessageConsumerProperties::type.name] =
MessageLibConstants.TYPE_KAFKA_SCRAM_SSL_AUTH.asJsonPrimitive()
return assignments.asJsonType()
}
-fun BlueprintTypes.kafkaStreamsBasicAuthConsumerProperties(block: KafkaStreamsBasicAuthConsumerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
+fun BluePrintTypes.kafkaStreamsBasicAuthConsumerProperties(block: KafkaStreamsBasicAuthConsumerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
val assignments = KafkaStreamsBasicAuthConsumerPropertiesAssignmentBuilder().apply(block).build()
assignments[KafkaStreamsBasicAuthConsumerProperties::type.name] =
MessageLibConstants.TYPE_KAFKA_STREAMS_BASIC_AUTH.asJsonPrimitive()
return assignments.asJsonType()
}
-fun BlueprintTypes.kafkaStreamsSslAuthConsumerProperties(block: KafkaStreamsSslAuthConsumerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
+fun BluePrintTypes.kafkaStreamsSslAuthConsumerProperties(block: KafkaStreamsSslAuthConsumerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
val assignments = KafkaStreamsSslAuthConsumerPropertiesAssignmentBuilder().apply(block).build()
assignments[KafkaStreamsSslAuthConsumerProperties::type.name] =
MessageLibConstants.TYPE_KAFKA_STREAMS_SSL_AUTH.asJsonPrimitive()
return assignments.asJsonType()
}
-fun BlueprintTypes.kafkaStreamsScramSslAuthConsumerProperties(block: KafkaStreamsScramSslAuthConsumerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
+fun BluePrintTypes.kafkaStreamsScramSslAuthConsumerProperties(block: KafkaStreamsScramSslAuthConsumerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
val assignments = KafkaStreamsScramSslAuthConsumerPropertiesAssignmentBuilder().apply(block).build()
assignments[KafkaStreamsScramSslAuthConsumerProperties::type.name] =
MessageLibConstants.TYPE_KAFKA_STREAMS_SCRAM_SSL_AUTH.asJsonPrimitive()
diff --git a/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/kafka/AbstractKafkaTopologyComponents.kt b/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/kafka/AbstractKafkaTopologyComponents.kt
index 23eca18a3..72a70893a 100644
--- a/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/kafka/AbstractKafkaTopologyComponents.kt
+++ b/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/kafka/AbstractKafkaTopologyComponents.kt
@@ -24,9 +24,9 @@ import org.apache.kafka.streams.processor.Punctuator
import org.onap.ccsdk.cds.controllerblueprints.core.logger
/** CDS Kafka Stream Processor abstract class to implement */
-abstract class AbstractBlueprintMessageProcessor<K, V> : Processor<K, V> {
+abstract class AbstractBluePrintMessageProcessor<K, V> : Processor<K, V> {
- private val log = logger(AbstractBlueprintMessageProcessor::class)
+ private val log = logger(AbstractBluePrintMessageProcessor::class)
lateinit var processorContext: ProcessorContext
@@ -51,7 +51,7 @@ abstract class AbstractBlueprintMessageProcessor<K, V> : Processor<K, V> {
}
/** CDS Kafka Stream Punctuator abstract class to implement */
-abstract class AbstractBlueprintMessagePunctuator : Punctuator {
+abstract class AbstractBluePrintMessagePunctuator : Punctuator {
lateinit var processorContext: ProcessorContext
diff --git a/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/kafka/KafkaJDBCStores.kt b/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/kafka/KafkaJDBCStores.kt
index ecf5870ab..86ccd74a2 100644
--- a/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/kafka/KafkaJDBCStores.kt
+++ b/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/kafka/KafkaJDBCStores.kt
@@ -21,10 +21,10 @@ import org.apache.kafka.streams.processor.ProcessorContext
import org.apache.kafka.streams.processor.StateStore
import org.apache.kafka.streams.state.StoreBuilder
import org.apache.kafka.streams.state.StoreSupplier
-import org.onap.ccsdk.cds.blueprintsprocessor.db.BlueprintDBLibGenericService
+import org.onap.ccsdk.cds.blueprintsprocessor.db.BluePrintDBLibGenericService
import org.onap.ccsdk.cds.blueprintsprocessor.db.primaryDBLibGenericService
import org.onap.ccsdk.cds.controllerblueprints.core.logger
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
import java.util.*
@@ -32,7 +32,7 @@ class KafkaJDBCKeyStoreSupplier(private val name: String) : StoreSupplier<KafkaJ
override fun get(): KafkaJDBCStore {
// Get the DBLibGenericService Instance
- val bluePrintDBLibGenericService = BlueprintDependencyService.primaryDBLibGenericService()
+ val bluePrintDBLibGenericService = BluePrintDependencyService.primaryDBLibGenericService()
return KafkaJDBCStoreImpl(name, bluePrintDBLibGenericService)
}
@@ -98,7 +98,7 @@ interface KafkaJDBCStore : StateStore {
class KafkaJDBCStoreImpl(private val name: String,
- private val bluePrintDBLibGenericService: BlueprintDBLibGenericService)
+ private val bluePrintDBLibGenericService: BluePrintDBLibGenericService)
: KafkaJDBCStore {
private val log = logger(KafkaJDBCStoreImpl::class)
diff --git a/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BlueprintMessageLibPropertyService.kt b/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BluePrintMessageLibPropertyService.kt
index cb0bc3225..c0cf51b93 100644
--- a/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BlueprintMessageLibPropertyService.kt
+++ b/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BluePrintMessageLibPropertyService.kt
@@ -19,7 +19,7 @@ package org.onap.ccsdk.cds.blueprintsprocessor.message.service
import com.fasterxml.jackson.databind.JsonNode
import io.micrometer.core.instrument.MeterRegistry
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
import org.onap.ccsdk.cds.blueprintsprocessor.message.KafkaBasicAuthMessageConsumerProperties
import org.onap.ccsdk.cds.blueprintsprocessor.message.KafkaBasicAuthMessageProducerProperties
import org.onap.ccsdk.cds.blueprintsprocessor.message.KafkaScramSslAuthMessageConsumerProperties
@@ -32,13 +32,13 @@ import org.onap.ccsdk.cds.blueprintsprocessor.message.KafkaStreamsSslAuthConsume
import org.onap.ccsdk.cds.blueprintsprocessor.message.MessageConsumerProperties
import org.onap.ccsdk.cds.blueprintsprocessor.message.MessageLibConstants
import org.onap.ccsdk.cds.blueprintsprocessor.message.MessageProducerProperties
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.stereotype.Service
@Service(MessageLibConstants.SERVICE_BLUEPRINT_MESSAGE_LIB_PROPERTY)
-open class BlueprintMessageLibPropertyService(
- private var bluePrintPropertiesService: BlueprintPropertiesService,
+open class BluePrintMessageLibPropertyService(
+ private var bluePrintPropertiesService: BluePrintPropertiesService,
private val meterRegistry: MeterRegistry
) {
@@ -72,7 +72,7 @@ open class BlueprintMessageLibPropertyService(
)
}
else -> {
- throw BlueprintProcessorException("Message adaptor($type) is not supported")
+ throw BluePrintProcessorException("Message adaptor($type) is not supported")
}
}
}
@@ -90,7 +90,7 @@ open class BlueprintMessageLibPropertyService(
JacksonUtils.readValue(jsonNode, KafkaScramSslAuthMessageProducerProperties::class.java)!!
}
else -> {
- throw BlueprintProcessorException("Message adaptor($type) is not supported")
+ throw BluePrintProcessorException("Message adaptor($type) is not supported")
}
}
}
@@ -147,7 +147,7 @@ open class BlueprintMessageLibPropertyService(
)
}
else -> {
- throw BlueprintProcessorException("Message adaptor($type) is not supported")
+ throw BluePrintProcessorException("Message adaptor($type) is not supported")
}
}
}
@@ -176,7 +176,7 @@ open class BlueprintMessageLibPropertyService(
JacksonUtils.readValue(jsonNode, KafkaStreamsScramSslAuthConsumerProperties::class.java)!!
}
else -> {
- throw BlueprintProcessorException("Message adaptor($type) is not supported")
+ throw BluePrintProcessorException("Message adaptor($type) is not supported")
}
}
}
@@ -221,7 +221,7 @@ open class BlueprintMessageLibPropertyService(
)
}
else -> {
- throw BlueprintProcessorException("couldn't get message client service for ${messageConsumerProperties.type}")
+ throw BluePrintProcessorException("couldn't get message client service for ${messageConsumerProperties.type}")
}
}
}
diff --git a/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BlueprintMessageConsumerService.kt b/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BlueprintMessageConsumerService.kt
index 887a7a7b8..b39d89bfd 100644
--- a/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BlueprintMessageConsumerService.kt
+++ b/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BlueprintMessageConsumerService.kt
@@ -23,7 +23,7 @@ import org.apache.kafka.clients.consumer.ConsumerRecord
import org.apache.kafka.clients.consumer.ConsumerRecords
import org.apache.kafka.streams.Topology
import org.onap.ccsdk.cds.blueprintsprocessor.message.MessageConsumerProperties
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
/** Consumer Function Interfaces */
interface ConsumerFunction
@@ -47,7 +47,7 @@ interface BlueprintMessageConsumerService {
/** Consume with [additionalConfig], so that we can execute dynamic function [consumerFunction] */
suspend fun consume(additionalConfig: Map<String, Any>?, consumerFunction: ConsumerFunction) {
- throw BlueprintProcessorException("Not Implemented")
+ throw BluePrintProcessorException("Not Implemented")
}
/** Consume the [topics] with [additionalConfig], so that we can execute dynamic function [consumerFunction] */
@@ -56,7 +56,7 @@ interface BlueprintMessageConsumerService {
additionalConfig: Map<String, Any>?,
consumerFunction: ConsumerFunction
) {
- throw BlueprintProcessorException("Not Implemented")
+ throw BluePrintProcessorException("Not Implemented")
}
/** close the channel, consumer and other resources */
diff --git a/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/KafkaStreamsConsumerService.kt b/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/KafkaStreamsConsumerService.kt
index beaa995df..4340e4815 100644
--- a/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/KafkaStreamsConsumerService.kt
+++ b/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/KafkaStreamsConsumerService.kt
@@ -20,7 +20,7 @@ import kotlinx.coroutines.channels.Channel
import org.apache.kafka.clients.consumer.ConsumerRecord
import org.apache.kafka.streams.KafkaStreams
import org.onap.ccsdk.cds.blueprintsprocessor.message.MessageConsumerProperties
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.logger
import java.util.Properties
@@ -41,11 +41,11 @@ open class KafkaStreamsConsumerService(private val messageConsumerProperties: Me
}
override suspend fun subscribe(additionalConfig: Map<String, Any>?): Channel<ConsumerRecord<String, ByteArray>> {
- throw BlueprintProcessorException("not implemented")
+ throw BluePrintProcessorException("not implemented")
}
override suspend fun subscribe(topics: List<String>, additionalConfig: Map<String, Any>?): Channel<ConsumerRecord<String, ByteArray>> {
- throw BlueprintProcessorException("not implemented")
+ throw BluePrintProcessorException("not implemented")
}
override suspend fun consume(additionalConfig: Map<String, Any>?, consumerFunction: ConsumerFunction) {
diff --git a/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/MessageLoggerService.kt b/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/MessageLoggerService.kt
index 7e5f35d15..90b850017 100644
--- a/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/MessageLoggerService.kt
+++ b/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/MessageLoggerService.kt
@@ -21,7 +21,7 @@ import org.apache.kafka.common.header.Headers
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.CommonHeader
import org.onap.ccsdk.cds.blueprintsprocessor.message.addHeader
import org.onap.ccsdk.cds.blueprintsprocessor.message.toMap
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.defaultToEmpty
import org.onap.ccsdk.cds.controllerblueprints.core.defaultToUUID
import org.onap.ccsdk.cds.controllerblueprints.core.logger
@@ -46,9 +46,9 @@ class MessageLoggerService {
fun messageConsuming(consumerRecord: ConsumerRecord<*, *>) {
val headers = consumerRecord.headers().toMap()
- val requestID = headers[BlueprintConstants.ONAP_REQUEST_ID].defaultToUUID()
- val invocationID = headers[BlueprintConstants.ONAP_INVOCATION_ID].defaultToUUID()
- val partnerName = headers[BlueprintConstants.ONAP_PARTNER_NAME] ?: "UNKNOWN"
+ val requestID = headers[BluePrintConstants.ONAP_REQUEST_ID].defaultToUUID()
+ val invocationID = headers[BluePrintConstants.ONAP_INVOCATION_ID].defaultToUUID()
+ val partnerName = headers[BluePrintConstants.ONAP_PARTNER_NAME] ?: "UNKNOWN"
messageConsuming(requestID, invocationID, partnerName, consumerRecord)
}
@@ -83,9 +83,9 @@ class MessageLoggerService {
*/
fun messageProducing(requestHeader: Headers) {
val localhost = InetAddress.getLocalHost()
- requestHeader.addHeader(BlueprintConstants.ONAP_REQUEST_ID, MDC.get("InvocationID").defaultToUUID())
- requestHeader.addHeader(BlueprintConstants.ONAP_INVOCATION_ID, UUID.randomUUID().toString())
- requestHeader.addHeader(BlueprintConstants.ONAP_PARTNER_NAME, BlueprintConstants.APP_NAME)
+ requestHeader.addHeader(BluePrintConstants.ONAP_REQUEST_ID, MDC.get("InvocationID").defaultToUUID())
+ requestHeader.addHeader(BluePrintConstants.ONAP_INVOCATION_ID, UUID.randomUUID().toString())
+ requestHeader.addHeader(BluePrintConstants.ONAP_PARTNER_NAME, BluePrintConstants.APP_NAME)
requestHeader.addHeader("ClientIPAddress", localhost.hostAddress)
}
diff --git a/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/utils/BlueprintMessageUtils.kt b/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/utils/BlueprintMessageUtils.kt
index 644bd7ba1..0d4310c79 100644
--- a/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/utils/BlueprintMessageUtils.kt
+++ b/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/utils/BlueprintMessageUtils.kt
@@ -18,7 +18,7 @@ package org.onap.ccsdk.cds.blueprintsprocessor.message.utils
import io.micrometer.core.instrument.Tag
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.CommonExecutionServiceData
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.defaultToUUID
import kotlin.math.max
@@ -26,7 +26,7 @@ class BlueprintMessageUtils {
companion object {
fun kafkaMetricTag(topic: String): MutableList<Tag> =
mutableListOf(
- Tag.of(BlueprintConstants.METRIC_TAG_TOPIC, topic)
+ Tag.of(BluePrintConstants.METRIC_TAG_TOPIC, topic)
)
/**
diff --git a/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/MessagePropertiesDSLTest.kt b/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/MessagePropertiesDSLTest.kt
index 8130016a8..b68678baf 100644
--- a/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/MessagePropertiesDSLTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/MessagePropertiesDSLTest.kt
@@ -18,7 +18,7 @@ package org.onap.ccsdk.cds.blueprintsprocessor.message
import org.apache.kafka.streams.StreamsConfig
import org.junit.Test
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.relationshipTypeConnectsTo
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.serviceTemplate
import kotlin.test.assertEquals
@@ -67,12 +67,12 @@ class MessagePropertiesDSLTest {
assertNotNull(relationshipTypes, "failed to get relationship types")
assertEquals(2, relationshipTypes.size, "relationshipTypes doesn't match")
assertNotNull(
- relationshipTypes[BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO],
- "failed to get ${BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO}"
+ relationshipTypes[BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO],
+ "failed to get ${BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO}"
)
assertNotNull(
- relationshipTypes[BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_MESSAGE_PRODUCER],
- "failed to get ${BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_MESSAGE_PRODUCER}"
+ relationshipTypes[BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_MESSAGE_PRODUCER],
+ "failed to get ${BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_MESSAGE_PRODUCER}"
)
}
@@ -138,12 +138,12 @@ class MessagePropertiesDSLTest {
assertNotNull(relationshipTypes, "failed to get relationship types")
assertEquals(2, relationshipTypes.size, "relationshipTypes doesn't match")
assertNotNull(
- relationshipTypes[BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO],
- "failed to get ${BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO}"
+ relationshipTypes[BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO],
+ "failed to get ${BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO}"
)
assertNotNull(
- relationshipTypes[BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_MESSAGE_CONSUMER],
- "failed to get ${BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_MESSAGE_CONSUMER}"
+ relationshipTypes[BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_MESSAGE_CONSUMER],
+ "failed to get ${BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_MESSAGE_CONSUMER}"
)
}
}
diff --git a/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BlueprintMessageConsumerServiceTest.kt b/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BlueprintMessageConsumerServiceTest.kt
index 15b73539e..9c37b9d13 100644
--- a/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BlueprintMessageConsumerServiceTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BlueprintMessageConsumerServiceTest.kt
@@ -41,9 +41,9 @@ import org.apache.kafka.common.serialization.ByteArrayDeserializer
import org.apache.kafka.common.serialization.StringDeserializer
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
-import org.onap.ccsdk.cds.blueprintsprocessor.message.BlueprintMessageLibConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.message.BluePrintMessageLibConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.message.MessageConsumerProperties
import org.onap.ccsdk.cds.blueprintsprocessor.message.MessageLibConstants
import org.onap.ccsdk.cds.controllerblueprints.core.logger
@@ -62,8 +62,8 @@ import kotlin.test.assertTrue
@DirtiesContext
@ContextConfiguration(
classes = [
- BlueprintMessageLibConfiguration::class,
- BlueprintPropertyConfiguration::class, BlueprintPropertiesService::class
+ BluePrintMessageLibConfiguration::class,
+ BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class
]
)
@TestPropertySource(
@@ -100,7 +100,7 @@ open class BlueprintMessageConsumerServiceTest {
val log = logger(BlueprintMessageConsumerServiceTest::class)
@Autowired
- lateinit var bluePrintMessageLibPropertyService: BlueprintMessageLibPropertyService
+ lateinit var bluePrintMessageLibPropertyService: BluePrintMessageLibPropertyService
@MockBean
lateinit var meterRegistry: MeterRegistry
diff --git a/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BlueprintMessageProducerServiceTest.kt b/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BlueprintMessageProducerServiceTest.kt
index 30021a6de..87819f677 100644
--- a/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BlueprintMessageProducerServiceTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BlueprintMessageProducerServiceTest.kt
@@ -34,9 +34,9 @@ import org.apache.kafka.common.security.scram.ScramLoginModule
import org.apache.kafka.common.serialization.ByteArraySerializer
import org.apache.kafka.common.serialization.StringSerializer
import org.junit.runner.RunWith
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
-import org.onap.ccsdk.cds.blueprintsprocessor.message.BlueprintMessageLibConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.message.BluePrintMessageLibConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.message.MessageLibConstants
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.mock.mockito.MockBean
@@ -53,8 +53,8 @@ import kotlin.test.assertTrue
@DirtiesContext
@ContextConfiguration(
classes = [
- BlueprintMessageLibConfiguration::class,
- BlueprintPropertyConfiguration::class, BlueprintPropertiesService::class
+ BluePrintMessageLibConfiguration::class,
+ BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class
]
)
@TestPropertySource(
@@ -75,7 +75,7 @@ import kotlin.test.assertTrue
open class BlueprintMessageProducerServiceTest {
@Autowired
- lateinit var bluePrintMessageLibPropertyService: BlueprintMessageLibPropertyService
+ lateinit var bluePrintMessageLibPropertyService: BluePrintMessageLibPropertyService
@MockBean
lateinit var meterRegistry: MeterRegistry
@@ -93,11 +93,11 @@ open class BlueprintMessageProducerServiceTest {
every { mockKafkaTemplate.send(any(), any()) } returns responseMock
- val spyBlueprintMessageProducerService = spyk(blueprintMessageProducerService, recordPrivateCalls = true)
+ val spyBluePrintMessageProducerService = spyk(blueprintMessageProducerService, recordPrivateCalls = true)
- every { spyBlueprintMessageProducerService.messageTemplate(any()) } returns mockKafkaTemplate
+ every { spyBluePrintMessageProducerService.messageTemplate(any()) } returns mockKafkaTemplate
- val response = spyBlueprintMessageProducerService.sendMessage("mykey", "Testing message")
+ val response = spyBluePrintMessageProducerService.sendMessage("mykey", "Testing message")
assertTrue(response, "failed to get command response")
}
}
diff --git a/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/KafkaStreamsConsumerServiceTest.kt b/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/KafkaStreamsConsumerServiceTest.kt
index b93cd42d4..657cf64ff 100644
--- a/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/KafkaStreamsConsumerServiceTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/KafkaStreamsConsumerServiceTest.kt
@@ -28,9 +28,9 @@ import org.apache.kafka.streams.processor.ProcessorSupplier
import org.apache.kafka.streams.state.Stores
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
-import org.onap.ccsdk.cds.blueprintsprocessor.message.BlueprintMessageLibConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.message.BluePrintMessageLibConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.message.KafkaStreamsBasicAuthConsumerProperties
import org.onap.ccsdk.cds.blueprintsprocessor.message.MessageConsumerProperties
import org.springframework.beans.factory.annotation.Autowired
@@ -45,8 +45,8 @@ import kotlin.test.assertNotNull
@DirtiesContext
@ContextConfiguration(
classes = [
- BlueprintMessageLibConfiguration::class,
- BlueprintPropertyConfiguration::class, BlueprintPropertiesService::class
+ BluePrintMessageLibConfiguration::class,
+ BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class
]
)
@TestPropertySource(
@@ -75,7 +75,7 @@ import kotlin.test.assertNotNull
class KafkaStreamsConsumerServiceTest {
@Autowired
- lateinit var bluePrintMessageLibPropertyService: BlueprintMessageLibPropertyService
+ lateinit var bluePrintMessageLibPropertyService: BluePrintMessageLibPropertyService
@MockBean
lateinit var meterRegistry: MeterRegistry
diff --git a/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/MessageLoggerServiceTest.kt b/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/MessageLoggerServiceTest.kt
index dc36ac675..3dce3344f 100644
--- a/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/MessageLoggerServiceTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/MessageLoggerServiceTest.kt
@@ -23,7 +23,7 @@ import org.apache.kafka.common.header.internals.RecordHeaders
import org.junit.Test
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.CommonHeader
import org.onap.ccsdk.cds.blueprintsprocessor.message.toMap
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.slf4j.MDC
import kotlin.test.assertEquals
@@ -51,7 +51,7 @@ class MessageLoggerServiceTest {
val mockHeaders = RecordHeaders()
messageLoggerService.messageProducing(mockHeaders)
val map = mockHeaders.toMap()
- assertEquals("1234-12", map[BlueprintConstants.ONAP_REQUEST_ID])
+ assertEquals("1234-12", map[BluePrintConstants.ONAP_REQUEST_ID])
messageLoggerService.messageConsumingExisting()
}
diff --git a/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/MockKafkaTopologyComponents.kt b/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/MockKafkaTopologyComponents.kt
index 97a81f1cd..aa38b6e5c 100644
--- a/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/MockKafkaTopologyComponents.kt
+++ b/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/MockKafkaTopologyComponents.kt
@@ -22,7 +22,7 @@ import org.apache.kafka.common.serialization.Serializer
import org.apache.kafka.streams.processor.Processor
import org.apache.kafka.streams.processor.ProcessorContext
import org.apache.kafka.streams.state.KeyValueStore
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonString
import org.onap.ccsdk.cds.controllerblueprints.core.logger
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
@@ -48,7 +48,7 @@ open class PriorityMessageSerde : Serde<PriorityMessage> {
return object : Deserializer<PriorityMessage> {
override fun deserialize(topic: String, data: ByteArray): PriorityMessage {
return JacksonUtils.readValue(String(data), PriorityMessage::class.java)
- ?: throw BlueprintProcessorException("failed to convert")
+ ?: throw BluePrintProcessorException("failed to convert")
}
override fun configure(configs: MutableMap<String, *>?, isKey: Boolean) {
diff --git a/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/utils/BlueprintMessageUtilsTest.kt b/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/utils/BlueprintMessageUtilsTest.kt
index 9b5ca62f6..5d0c89415 100644
--- a/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/utils/BlueprintMessageUtilsTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/utils/BlueprintMessageUtilsTest.kt
@@ -23,7 +23,7 @@ import org.junit.Test
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ActionIdentifiers
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.CommonHeader
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import kotlin.test.assertEquals
@@ -32,7 +32,7 @@ class BlueprintMessageUtilsTest {
@Test
fun testKafkaMetricTag() {
val expected = mutableListOf<Tag>(
- Tag.of(BlueprintConstants.METRIC_TAG_TOPIC, "my-topic")
+ Tag.of(BluePrintConstants.METRIC_TAG_TOPIC, "my-topic")
)
val tags = BlueprintMessageUtils.kafkaMetricTag("my-topic")
diff --git a/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/BlueprintNatsExtensions.kt b/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/BluePrintNatsExtensions.kt
index a585c972b..a585c972b 100644
--- a/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/BlueprintNatsExtensions.kt
+++ b/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/BluePrintNatsExtensions.kt
diff --git a/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/BlueprintNatsLibConfiguration.kt b/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/BluePrintNatsLibConfiguration.kt
index c83906c3f..a47dd8918 100644
--- a/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/BlueprintNatsLibConfiguration.kt
+++ b/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/BluePrintNatsLibConfiguration.kt
@@ -16,23 +16,23 @@
package org.onap.ccsdk.cds.blueprintsprocessor.nats
-import org.onap.ccsdk.cds.blueprintsprocessor.nats.service.BlueprintNatsLibPropertyService
-import org.onap.ccsdk.cds.blueprintsprocessor.nats.service.BlueprintNatsService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
+import org.onap.ccsdk.cds.blueprintsprocessor.nats.service.BluePrintNatsLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.nats.service.BluePrintNatsService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
import org.springframework.context.annotation.ComponentScan
import org.springframework.context.annotation.Configuration
@Configuration
@ComponentScan
-open class BlueprintNatsLibConfiguration
+open class BluePrintNatsLibConfiguration
/**
* Exposed Dependency Service by this NATS Lib Module
*/
-fun BlueprintDependencyService.natsLibPropertyService(): BlueprintNatsLibPropertyService =
+fun BluePrintDependencyService.natsLibPropertyService(): BluePrintNatsLibPropertyService =
instance(NatsLibConstants.SERVICE_BLUEPRINT_NATS_LIB_PROPERTY)
-fun BlueprintDependencyService.controllerNatsService(): BlueprintNatsService {
+fun BluePrintDependencyService.controllerNatsService(): BluePrintNatsService {
return natsLibPropertyService().bluePrintNatsService(NatsLibConstants.DEFULT_NATS_SELECTOR)
}
diff --git a/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/BlueprintNatsLibData.kt b/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/BluePrintNatsLibData.kt
index a989dcf1e..a989dcf1e 100644
--- a/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/BlueprintNatsLibData.kt
+++ b/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/BluePrintNatsLibData.kt
diff --git a/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/NatsPropertiesDSL.kt b/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/NatsPropertiesDSL.kt
index 9e771a6e5..4c5471796 100644
--- a/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/NatsPropertiesDSL.kt
+++ b/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/NatsPropertiesDSL.kt
@@ -17,8 +17,8 @@
package org.onap.ccsdk.cds.blueprintsprocessor.nats
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonNode
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.data.RelationshipType
@@ -30,25 +30,25 @@ import org.onap.ccsdk.cds.controllerblueprints.core.dsl.relationshipType
/** Relationships Types DSL for NATS Producer */
fun ServiceTemplateBuilder.relationshipTypeConnectsToNats() {
- val relationshipType = BlueprintTypes.relationshipTypeConnectsToNats()
+ val relationshipType = BluePrintTypes.relationshipTypeConnectsToNats()
if (this.relationshipTypes == null) this.relationshipTypes = hashMapOf()
this.relationshipTypes!![relationshipType.id!!] = relationshipType
}
-fun BlueprintTypes.relationshipTypeConnectsToNats(): RelationshipType {
+fun BluePrintTypes.relationshipTypeConnectsToNats(): RelationshipType {
return relationshipType(
- id = BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_NATS,
- version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO,
+ id = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_NATS,
+ version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO,
description = "Relationship connects to through NATS Client."
) {
property(
- BlueprintConstants.PROPERTY_CONNECTION_CONFIG,
- BlueprintConstants.DATA_TYPE_MAP,
+ BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
+ BluePrintConstants.DATA_TYPE_MAP,
true,
"Connection Config details."
)
- validTargetTypes(arrayListOf(BlueprintConstants.MODEL_TYPE_CAPABILITY_TYPE_ENDPOINT))
+ validTargetTypes(arrayListOf(BluePrintConstants.MODEL_TYPE_CAPABILITY_TYPE_ENDPOINT))
}
}
@@ -66,25 +66,25 @@ fun TopologyTemplateBuilder.relationshipTemplateNats(
class NatsRelationshipTemplateBuilder(name: String, description: String) :
RelationshipTemplateBuilder(
name,
- BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_NATS, description
+ BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_NATS, description
) {
fun tokenAuth(block: NatsTokenAuthPropertiesAssignmentBuilder.() -> Unit) {
- property(BlueprintConstants.PROPERTY_CONNECTION_CONFIG, BlueprintTypes.tokenAuthNatsProperties(block))
+ property(BluePrintConstants.PROPERTY_CONNECTION_CONFIG, BluePrintTypes.tokenAuthNatsProperties(block))
}
fun tlsAuth(block: NatsTLSAuthPropertiesAssignmentBuilder.() -> Unit) {
- property(BlueprintConstants.PROPERTY_CONNECTION_CONFIG, BlueprintTypes.tlsAuthNatsProperties(block))
+ property(BluePrintConstants.PROPERTY_CONNECTION_CONFIG, BluePrintTypes.tlsAuthNatsProperties(block))
}
}
-fun BlueprintTypes.tokenAuthNatsProperties(block: NatsTokenAuthPropertiesAssignmentBuilder.() -> Unit): JsonNode {
+fun BluePrintTypes.tokenAuthNatsProperties(block: NatsTokenAuthPropertiesAssignmentBuilder.() -> Unit): JsonNode {
val assignments = NatsTokenAuthPropertiesAssignmentBuilder().apply(block).build()
assignments[NatsConnectionProperties::type.name] = NatsLibConstants.TYPE_TOKEN_AUTH.asJsonPrimitive()
return assignments.asJsonNode()
}
-fun BlueprintTypes.tlsAuthNatsProperties(block: NatsTLSAuthPropertiesAssignmentBuilder.() -> Unit): JsonNode {
+fun BluePrintTypes.tlsAuthNatsProperties(block: NatsTLSAuthPropertiesAssignmentBuilder.() -> Unit): JsonNode {
val assignments = NatsTLSAuthPropertiesAssignmentBuilder().apply(block).build()
assignments[NatsConnectionProperties::type.name] = NatsLibConstants.TYPE_TLS_AUTH.asJsonPrimitive()
return assignments.asJsonNode()
diff --git a/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BlueprintNatsLibPropertyService.kt b/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BluePrintNatsLibPropertyService.kt
index 457bf8703..1ac44bc94 100644
--- a/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BlueprintNatsLibPropertyService.kt
+++ b/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BluePrintNatsLibPropertyService.kt
@@ -17,24 +17,24 @@
package org.onap.ccsdk.cds.blueprintsprocessor.nats.service
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
import org.onap.ccsdk.cds.blueprintsprocessor.nats.NatsConnectionProperties
import org.onap.ccsdk.cds.blueprintsprocessor.nats.NatsLibConstants
import org.onap.ccsdk.cds.blueprintsprocessor.nats.TLSAuthNatsConnectionProperties
import org.onap.ccsdk.cds.blueprintsprocessor.nats.TokenAuthNatsConnectionProperties
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.stereotype.Service
@Service(NatsLibConstants.SERVICE_BLUEPRINT_NATS_LIB_PROPERTY)
-open class BlueprintNatsLibPropertyService(private var bluePrintPropertiesService: BlueprintPropertiesService) {
+open class BluePrintNatsLibPropertyService(private var bluePrintPropertiesService: BluePrintPropertiesService) {
- fun bluePrintNatsService(jsonNode: JsonNode): BlueprintNatsService {
+ fun bluePrintNatsService(jsonNode: JsonNode): BluePrintNatsService {
val natsConnectionProperties = natsConnectionProperties(jsonNode)
return bluePrintNatsService(natsConnectionProperties)
}
- fun bluePrintNatsService(selector: String): BlueprintNatsService {
+ fun bluePrintNatsService(selector: String): BluePrintNatsService {
val prefix = "${NatsLibConstants.PROPERTY_NATS_PREFIX}$selector"
val natsConnectionProperties = natsConnectionProperties(prefix)
return bluePrintNatsService(natsConnectionProperties)
@@ -50,7 +50,7 @@ open class BlueprintNatsLibPropertyService(private var bluePrintPropertiesServic
JacksonUtils.readValue(jsonNode, TLSAuthNatsConnectionProperties::class.java)!!
}
else -> {
- throw BlueprintProcessorException("NATS type($type) not supported")
+ throw BluePrintProcessorException("NATS type($type) not supported")
}
}
}
@@ -65,7 +65,7 @@ open class BlueprintNatsLibPropertyService(private var bluePrintPropertiesServic
tlsAuthNatsConnectionProperties(prefix)
}
else -> {
- throw BlueprintProcessorException("NATS type($type) not supported")
+ throw BluePrintProcessorException("NATS type($type) not supported")
}
}
}
@@ -79,7 +79,7 @@ open class BlueprintNatsLibPropertyService(private var bluePrintPropertiesServic
}
fun bluePrintNatsService(natsConnectionProperties: NatsConnectionProperties):
- BlueprintNatsService {
+ BluePrintNatsService {
return when (natsConnectionProperties) {
is TokenAuthNatsConnectionProperties -> {
TokenAuthNatsService(natsConnectionProperties)
@@ -88,7 +88,7 @@ open class BlueprintNatsLibPropertyService(private var bluePrintPropertiesServic
TLSAuthNatsService(natsConnectionProperties)
}
else -> {
- throw BlueprintProcessorException("couldn't get NATS service for properties $natsConnectionProperties")
+ throw BluePrintProcessorException("couldn't get NATS service for properties $natsConnectionProperties")
}
}
}
diff --git a/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BlueprintNatsService.kt b/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BluePrintNatsService.kt
index 67de95133..9548fe78d 100644
--- a/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BlueprintNatsService.kt
+++ b/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BluePrintNatsService.kt
@@ -25,7 +25,7 @@ import io.nats.streaming.Subscription
import io.nats.streaming.SubscriptionOptions
import java.time.Duration
-interface BlueprintNatsService {
+interface BluePrintNatsService {
/** Create and Return the NATS streaming connection */
suspend fun connection(): StreamingConnection
diff --git a/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/TLSAuthNatsService.kt b/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/TLSAuthNatsService.kt
index 1bde8e534..00a972eff 100644
--- a/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/TLSAuthNatsService.kt
+++ b/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/TLSAuthNatsService.kt
@@ -25,7 +25,7 @@ import org.onap.ccsdk.cds.controllerblueprints.core.splitCommaAsList
import javax.net.ssl.SSLContext
open class TLSAuthNatsService(private val natsConnectionProperties: TLSAuthNatsConnectionProperties) :
- BlueprintNatsService {
+ BluePrintNatsService {
lateinit var streamingConnection: StreamingConnection
diff --git a/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/TokenAuthNatsService.kt b/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/TokenAuthNatsService.kt
index 9d4aacfbd..7c24b70d0 100644
--- a/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/TokenAuthNatsService.kt
+++ b/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/TokenAuthNatsService.kt
@@ -25,7 +25,7 @@ import org.onap.ccsdk.cds.controllerblueprints.core.logger
import org.onap.ccsdk.cds.controllerblueprints.core.splitCommaAsList
open class TokenAuthNatsService(private val natsConnectionProperties: TokenAuthNatsConnectionProperties) :
- BlueprintNatsService {
+ BluePrintNatsService {
private val log = logger(TokenAuthNatsService::class)
diff --git a/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/utils/NatsClusterUtils.kt b/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/utils/NatsClusterUtils.kt
index a155a076d..a7726a14b 100644
--- a/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/utils/NatsClusterUtils.kt
+++ b/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/utils/NatsClusterUtils.kt
@@ -17,7 +17,7 @@
package org.onap.ccsdk.cds.blueprintsprocessor.nats.utils
import org.onap.ccsdk.cds.blueprintsprocessor.nats.NatsLibConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.utils.ClusterUtils
object NatsClusterUtils {
@@ -32,7 +32,7 @@ object NatsClusterUtils {
}
fun currentApplicationSubject(subject: String): String {
- return "${BlueprintConstants.APP_NAME}.$subject"
+ return "${BluePrintConstants.APP_NAME}.$subject"
}
fun currentNodeDurable(subject: String): String {
@@ -40,6 +40,6 @@ object NatsClusterUtils {
}
fun applicationLoadBalanceGroup(): String {
- return "${BlueprintConstants.APP_NAME}"
+ return "${BluePrintConstants.APP_NAME}"
}
}
diff --git a/ms/blueprintsprocessor/modules/commons/nats-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/NatsPropertiesDSLTest.kt b/ms/blueprintsprocessor/modules/commons/nats-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/NatsPropertiesDSLTest.kt
index fa70f0738..a95b900fe 100644
--- a/ms/blueprintsprocessor/modules/commons/nats-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/NatsPropertiesDSLTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/nats-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/NatsPropertiesDSLTest.kt
@@ -17,7 +17,7 @@
package org.onap.ccsdk.cds.blueprintsprocessor.nats
import org.junit.Test
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.getInput
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.relationshipTypeConnectsTo
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.serviceTemplate
@@ -59,12 +59,12 @@ class NatsPropertiesDSLTest {
assertNotNull(relationshipTypes, "failed to get relationship types")
assertEquals(2, relationshipTypes.size, "relationshipTypes doesn't match")
assertNotNull(
- relationshipTypes[BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO],
- "failed to get ${BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO}"
+ relationshipTypes[BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO],
+ "failed to get ${BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO}"
)
assertNotNull(
- relationshipTypes[BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_NATS],
- "failed to get ${BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_NATS}"
+ relationshipTypes[BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_NATS],
+ "failed to get ${BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_NATS}"
)
}
}
diff --git a/ms/blueprintsprocessor/modules/commons/nats-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BlueprintNatsExtensionsTest.kt b/ms/blueprintsprocessor/modules/commons/nats-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BluePrintNatsExtensionsTest.kt
index 816b6c809..ec120dc18 100644
--- a/ms/blueprintsprocessor/modules/commons/nats-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BlueprintNatsExtensionsTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/nats-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BluePrintNatsExtensionsTest.kt
@@ -27,7 +27,7 @@ import org.onap.ccsdk.cds.controllerblueprints.core.jsonAsJsonType
import java.nio.charset.Charset
import kotlin.test.assertEquals
-class BlueprintNatsExtensionsTest {
+class BluePrintNatsExtensionsTest {
@Test
fun testMessageStrConversion() {
diff --git a/ms/blueprintsprocessor/modules/commons/nats-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BlueprintNatsLibPropertyServiceTest.kt b/ms/blueprintsprocessor/modules/commons/nats-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BluePrintNatsLibPropertyServiceTest.kt
index 5ef4a72c6..9a332d589 100644
--- a/ms/blueprintsprocessor/modules/commons/nats-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BlueprintNatsLibPropertyServiceTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/nats-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BluePrintNatsLibPropertyServiceTest.kt
@@ -18,9 +18,9 @@ package org.onap.ccsdk.cds.blueprintsprocessor.nats.service
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
-import org.onap.ccsdk.cds.blueprintsprocessor.nats.BlueprintNatsLibConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.nats.BluePrintNatsLibConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.nats.NatsLibConstants
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.test.context.ContextConfiguration
@@ -31,8 +31,8 @@ import kotlin.test.assertTrue
@RunWith(SpringRunner::class)
@ContextConfiguration(
classes = [
- BlueprintNatsLibConfiguration::class,
- BlueprintPropertyConfiguration::class, BlueprintPropertiesService::class
+ BluePrintNatsLibConfiguration::class,
+ BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class
]
)
@TestPropertySource(
@@ -43,10 +43,10 @@ import kotlin.test.assertTrue
"blueprintsprocessor.nats.cds-controller.token=tokenAuth"
]
)
-class BlueprintNatsLibPropertyServiceTest {
+class BluePrintNatsLibPropertyServiceTest {
@Autowired
- lateinit var bluePrintNatsLibPropertyService: BlueprintNatsLibPropertyService
+ lateinit var bluePrintNatsLibPropertyService: BluePrintNatsLibPropertyService
@Test
fun testNatsProperties() {
diff --git a/ms/blueprintsprocessor/modules/commons/nats-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BlueprintNatsServiceTest.kt b/ms/blueprintsprocessor/modules/commons/nats-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BluePrintNatsServiceTest.kt
index 8e7ee63f1..721828ac9 100644
--- a/ms/blueprintsprocessor/modules/commons/nats-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BlueprintNatsServiceTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/nats-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BluePrintNatsServiceTest.kt
@@ -31,7 +31,7 @@ import org.onap.ccsdk.cds.blueprintsprocessor.nats.utils.SubscriptionOptionsUtil
import org.onap.ccsdk.cds.controllerblueprints.core.jsonAsJsonType
import kotlin.test.assertNotNull
-class BlueprintNatsServiceTest {
+class BluePrintNatsServiceTest {
@Test
fun testTokenAuthNatService() {
@@ -42,18 +42,18 @@ class BlueprintNatsServiceTest {
}
""".trimIndent()
- val bluePrintNatsLibPropertyService = BlueprintNatsLibPropertyService(mockk())
+ val bluePrintNatsLibPropertyService = BluePrintNatsLibPropertyService(mockk())
- val spkBlueprintNatsLibPropertyService = spyk(bluePrintNatsLibPropertyService)
+ val spkBluePrintNatsLibPropertyService = spyk(bluePrintNatsLibPropertyService)
every {
- spkBlueprintNatsLibPropertyService
+ spkBluePrintNatsLibPropertyService
.bluePrintNatsService(any<NatsConnectionProperties>())
} returns TokenAuthNatsService(
mockk()
)
val bluePrintNatsService =
- spkBlueprintNatsLibPropertyService.bluePrintNatsService(configuration.jsonAsJsonType())
+ spkBluePrintNatsLibPropertyService.bluePrintNatsService(configuration.jsonAsJsonType())
assertNotNull(bluePrintNatsService, "failed to get NATS Service")
}
@@ -65,18 +65,18 @@ class BlueprintNatsServiceTest {
}
""".trimIndent()
- val bluePrintNatsLibPropertyService = BlueprintNatsLibPropertyService(mockk())
+ val bluePrintNatsLibPropertyService = BluePrintNatsLibPropertyService(mockk())
- val spkBlueprintNatsLibPropertyService = spyk(bluePrintNatsLibPropertyService)
+ val spkBluePrintNatsLibPropertyService = spyk(bluePrintNatsLibPropertyService)
every {
- spkBlueprintNatsLibPropertyService
+ spkBluePrintNatsLibPropertyService
.bluePrintNatsService(any<NatsConnectionProperties>())
} returns TLSAuthNatsService(
mockk()
)
val bluePrintNatsService =
- spkBlueprintNatsLibPropertyService.bluePrintNatsService(configuration.jsonAsJsonType())
+ spkBluePrintNatsLibPropertyService.bluePrintNatsService(configuration.jsonAsJsonType())
assertNotNull(bluePrintNatsService, "failed to get NATS Service")
}
@@ -114,7 +114,7 @@ class BlueprintNatsServiceTest {
}
}
- private fun testMultiPublish(natsService: BlueprintNatsService) {
+ private fun testMultiPublish(natsService: BluePrintNatsService) {
runBlocking {
/** Multiple Publish Message Test **/
val messageHandler1 =
@@ -131,7 +131,7 @@ class BlueprintNatsServiceTest {
}
}
- private fun testLoadBalance(natsService: BlueprintNatsService) {
+ private fun testLoadBalance(natsService: BluePrintNatsService) {
runBlocking {
/** Load balance Publish Message Test **/
val lbMessageHandler1 =
@@ -150,7 +150,7 @@ class BlueprintNatsServiceTest {
}
}
- private fun testLimitSubscription(natsService: BlueprintNatsService) {
+ private fun testLimitSubscription(natsService: BluePrintNatsService) {
runBlocking {
/** Load balance Publish Message Test **/
val lbMessageHandler1 =
@@ -185,7 +185,7 @@ class BlueprintNatsServiceTest {
}
}
- private fun testRequestReply(natsService: BlueprintNatsService) {
+ private fun testRequestReply(natsService: BluePrintNatsService) {
runBlocking {
val lbMessageHandler1 = io.nats.client.MessageHandler { message ->
println("LB RR Request Handler 1: ${String(message.data)} will reply to(${message.replyTo})")
@@ -217,7 +217,7 @@ class BlueprintNatsServiceTest {
}
}
- private fun testMultiRequestReply(natsService: BlueprintNatsService) {
+ private fun testMultiRequestReply(natsService: BluePrintNatsService) {
runBlocking {
/** Request Reply **/
val lbMessageHandler1 = io.nats.client.MessageHandler { message ->
diff --git a/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/BlueprintCoreConfiguration.kt b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/BluePrintCoreConfiguration.kt
index 782a7b033..2a4d05dcb 100644
--- a/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/BlueprintCoreConfiguration.kt
+++ b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/BluePrintCoreConfiguration.kt
@@ -17,10 +17,10 @@
package org.onap.ccsdk.cds.blueprintsprocessor.core
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
-import org.onap.ccsdk.cds.controllerblueprints.core.config.BlueprintLoadConfiguration
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.config.BluePrintLoadConfiguration
import org.onap.ccsdk.cds.controllerblueprints.core.logger
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.context.properties.bind.Bindable
@@ -33,7 +33,7 @@ import org.springframework.core.env.Environment
import org.springframework.stereotype.Service
@Configuration
-open class BlueprintCoreConfiguration(private val bluePrintPropertiesService: BlueprintPropertiesService) {
+open class BluePrintCoreConfiguration(private val bluePrintPropertiesService: BluePrintPropertiesService) {
companion object {
@@ -41,14 +41,14 @@ open class BlueprintCoreConfiguration(private val bluePrintPropertiesService: Bl
}
@Bean
- open fun bluePrintLoadConfiguration(): BlueprintLoadConfiguration {
+ open fun bluePrintLoadConfiguration(): BluePrintLoadConfiguration {
return bluePrintPropertiesService
- .propertyBeanType(PREFIX_BLUEPRINT_PROCESSOR, BlueprintLoadConfiguration::class.java)
+ .propertyBeanType(PREFIX_BLUEPRINT_PROCESSOR, BluePrintLoadConfiguration::class.java)
}
}
@Configuration
-open class BlueprintPropertyConfiguration {
+open class BluePrintPropertyConfiguration {
@Autowired
lateinit var environment: Environment
@@ -60,9 +60,9 @@ open class BlueprintPropertyConfiguration {
}
@Service
-open class BlueprintPropertiesService(private var bluePrintPropertyConfig: BlueprintPropertyConfiguration) {
+open class BluePrintPropertiesService(private var bluePrintPropertyConfig: BluePrintPropertyConfiguration) {
- private val log = logger(BlueprintPropertiesService::class)
+ private val log = logger(BluePrintPropertiesService::class)
fun <T> propertyBeanType(prefix: String, type: Class<T>): T {
return try {
@@ -70,7 +70,7 @@ open class BlueprintPropertiesService(private var bluePrintPropertyConfig: Bluep
} catch (e: NoSuchElementException) {
val errMsg = "Error: missing property \"$prefix\"... Check the application.properties file."
log.error(errMsg)
- throw BlueprintProcessorException(e, errMsg)
+ throw BluePrintProcessorException(e, errMsg)
}
}
}
@@ -82,7 +82,7 @@ open class BlueprintDependencyConfiguration : ApplicationContextAware {
private val log = LoggerFactory.getLogger(BlueprintDependencyConfiguration::class.java)!!
override fun setApplicationContext(applicationContext: ApplicationContext) {
- BlueprintDependencyService.inject(applicationContext)
+ BluePrintDependencyService.inject(applicationContext)
log.info("Dependency Management module created...")
}
}
diff --git a/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/api/data/BlueprintProcessorData.kt b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/api/data/BlueprintProcessorData.kt
index 8009bbb8a..cac2f768a 100644
--- a/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/api/data/BlueprintProcessorData.kt
+++ b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/api/data/BlueprintProcessorData.kt
@@ -23,7 +23,7 @@ import com.fasterxml.jackson.databind.JsonNode
import com.fasterxml.jackson.databind.node.ObjectNode
import io.swagger.annotations.ApiModelProperty
import org.onap.ccsdk.cds.controllerblueprints.common.api.EventType
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import java.util.Date
import java.util.UUID
@@ -150,7 +150,7 @@ open class Status {
var errorMessage: String? = null
@get:ApiModelProperty(required = true, value = "Message providing request status")
- var message: String = BlueprintConstants.STATUS_SUCCESS
+ var message: String = BluePrintConstants.STATUS_SUCCESS
}
open class StepData {
diff --git a/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/cluster/BlueprintClusterExtensions.kt b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/cluster/BluePrintClusterExtensions.kt
index f0504555f..edb5bbfe6 100644
--- a/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/cluster/BlueprintClusterExtensions.kt
+++ b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/cluster/BluePrintClusterExtensions.kt
@@ -20,30 +20,30 @@ import com.hazelcast.cluster.Member
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.newSingleThreadContext
import kotlinx.coroutines.withContext
-import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BlueprintClusterService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BluePrintClusterService
import org.onap.ccsdk.cds.blueprintsprocessor.core.service.ClusterLock
import org.onap.ccsdk.cds.blueprintsprocessor.core.service.ClusterMember
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
import org.onap.ccsdk.cds.controllerblueprints.core.MDCContext
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
/**
* Exposed Dependency Service by this Hazelcast Lib Module
*/
-fun BlueprintDependencyService.clusterService(): BlueprintClusterService =
+fun BluePrintDependencyService.clusterService(): BluePrintClusterService =
instance(HazelcastClusterService::class)
/** Optional Cluster Service, returns only if Cluster is enabled */
-fun BlueprintDependencyService.optionalClusterService(): BlueprintClusterService? {
- return if (BlueprintConstants.CLUSTER_ENABLED) {
- BlueprintDependencyService.clusterService()
+fun BluePrintDependencyService.optionalClusterService(): BluePrintClusterService? {
+ return if (BluePrintConstants.CLUSTER_ENABLED) {
+ BluePrintDependencyService.clusterService()
} else null
}
/** Extension to convert Hazelcast Member to Blueprints Cluster Member */
fun Member.toClusterMember(): ClusterMember {
- val memberName: String = this.getAttribute(BlueprintConstants.PROPERTY_CLUSTER_NODE_ID) ?: this.uuid.toString()
+ val memberName: String = this.getAttribute(BluePrintConstants.PROPERTY_CLUSTER_NODE_ID) ?: this.uuid.toString()
return ClusterMember(
id = this.uuid.toString(),
name = memberName,
@@ -53,7 +53,7 @@ fun Member.toClusterMember(): ClusterMember {
/**
* This function will try to acquire the lock and then execute the provided block.
- * If the lock cannot be acquired within timeout, a BlueprintException will be thrown.
+ * If the lock cannot be acquired within timeout, a BluePrintException will be thrown.
*
* Since a lock can only be unlocked by the the thread which acquired the lock,
* this function will confine coroutines within the block to a dedicated thread.
@@ -69,7 +69,7 @@ suspend fun <R> ClusterLock.executeWithLock(acquireLockTimeout: Long, block: sus
lock.unLock()
}
} else
- throw BlueprintException("Failed to acquire lock within timeout")
+ throw BluePrintException("Failed to acquire lock within timeout")
}
}
}
diff --git a/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/cluster/HazelcastClusterService.kt b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/cluster/HazelcastClusterService.kt
index 613fc4a58..fb9056776 100644
--- a/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/cluster/HazelcastClusterService.kt
+++ b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/cluster/HazelcastClusterService.kt
@@ -33,15 +33,15 @@ import com.hazelcast.scheduledexecutor.IScheduledExecutorService
import com.hazelcast.topic.Message
import com.hazelcast.topic.MessageListener
import kotlinx.coroutines.delay
-import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BlueprintClusterMessage
-import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BlueprintClusterService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BluePrintClusterMessage
+import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BluePrintClusterService
import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BlueprintClusterMessageListener
import org.onap.ccsdk.cds.blueprintsprocessor.core.service.ClusterInfo
import org.onap.ccsdk.cds.blueprintsprocessor.core.service.ClusterJoinedEvent
import org.onap.ccsdk.cds.blueprintsprocessor.core.service.ClusterLock
import org.onap.ccsdk.cds.blueprintsprocessor.core.service.ClusterMember
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.logger
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedFile
import org.onap.ccsdk.cds.controllerblueprints.core.utils.ClusterUtils
@@ -53,7 +53,7 @@ import java.util.UUID
import java.util.concurrent.TimeUnit
@Service
-open class HazelcastClusterService(private val applicationEventPublisher: ApplicationEventPublisher) : BlueprintClusterService {
+open class HazelcastClusterService(private val applicationEventPublisher: ApplicationEventPublisher) : BluePrintClusterService {
private val log = logger(HazelcastClusterService::class)
lateinit var hazelcast: HazelcastInstance
@@ -78,12 +78,12 @@ open class HazelcastClusterService(private val applicationEventPublisher: Applic
}
is ClusterInfo -> {
- System.setProperty(BlueprintConstants.PROPERTY_CLUSTER_ID, configuration.id)
- System.setProperty(BlueprintConstants.PROPERTY_CLUSTER_NODE_ID, configuration.nodeId)
+ System.setProperty(BluePrintConstants.PROPERTY_CLUSTER_ID, configuration.id)
+ System.setProperty(BluePrintConstants.PROPERTY_CLUSTER_NODE_ID, configuration.nodeId)
val memberAttributeConfig = MemberAttributeConfig()
memberAttributeConfig.setAttribute(
- BlueprintConstants.PROPERTY_CLUSTER_NODE_ID,
+ BluePrintConstants.PROPERTY_CLUSTER_NODE_ID,
configuration.nodeId
)
@@ -122,7 +122,7 @@ open class HazelcastClusterService(private val applicationEventPublisher: Applic
}
}
else -> {
- throw BlueprintProcessorException("couldn't understand the cluster configuration")
+ throw BluePrintProcessorException("couldn't understand the cluster configuration")
}
}
@@ -179,7 +179,7 @@ open class HazelcastClusterService(private val applicationEventPublisher: Applic
return ClusterLockImpl(hazelcast, name)
}
- /** Return interface may change and it will be included in BlueprintClusterService */
+ /** Return interface may change and it will be included in BluePrintClusterService */
@UseExperimental
suspend fun clusterScheduler(name: String): IScheduledExecutorService {
check(::hazelcast.isInitialized) { "failed to start and join cluster" }
@@ -225,7 +225,7 @@ open class HazelcastClusterService(private val applicationEventPublisher: Applic
check(::hazelcast.isInitialized) { "failed to start and join cluster" }
val applicationMembers: MutableMap<String, Member> = hashMapOf()
hazelcast.cluster.members.map { member ->
- val memberName: String = member.getAttribute(BlueprintConstants.PROPERTY_CLUSTER_NODE_ID)
+ val memberName: String = member.getAttribute(BluePrintConstants.PROPERTY_CLUSTER_NODE_ID)
if (memberName.startsWith(appName, true)) {
applicationMembers[memberName] = member
}
@@ -300,7 +300,7 @@ open class ClusterLockImpl(private val hazelcast: HazelcastInstance, private val
class HazelcastMessageListenerAdapter<E>(val listener: BlueprintClusterMessageListener<E>) : MessageListener<E> {
override fun onMessage(message: Message<E>?) = message?.let {
- BlueprintClusterMessage<E>(
+ BluePrintClusterMessage<E>(
BlueprintClusterTopic.valueOf(it.source as String),
it.messageObject,
it.publishTime,
diff --git a/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/factory/ComponentNodeFactory.kt b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/factory/ComponentNodeFactory.kt
index 46ab25e23..2f925dc5b 100644
--- a/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/factory/ComponentNodeFactory.kt
+++ b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/factory/ComponentNodeFactory.kt
@@ -17,7 +17,7 @@
package org.onap.ccsdk.cds.blueprintsprocessor.core.factory
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.slf4j.LoggerFactory
import org.springframework.context.ApplicationContext
import org.springframework.context.ApplicationContextAware
@@ -29,16 +29,16 @@ import org.springframework.context.ApplicationContextAware
*/
interface ComponentNode {
- @Throws(BlueprintProcessorException::class)
+ @Throws(BluePrintProcessorException::class)
fun validate(context: MutableMap<String, Any>, componentContext: MutableMap<String, Any?>)
- @Throws(BlueprintProcessorException::class)
+ @Throws(BluePrintProcessorException::class)
fun process(context: MutableMap<String, Any>, componentContext: MutableMap<String, Any?>)
- @Throws(BlueprintProcessorException::class)
+ @Throws(BluePrintProcessorException::class)
fun errorHandle(context: MutableMap<String, Any>, componentContext: MutableMap<String, Any?>)
- @Throws(BlueprintProcessorException::class)
+ @Throws(BluePrintProcessorException::class)
fun reTrigger(context: MutableMap<String, Any>, componentContext: MutableMap<String, Any?>)
}
diff --git a/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/listeners/BlueprintCompilerCacheMessageListener.kt b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/listeners/BlueprintCompilerCacheMessageListener.kt
index 64b4f0ac5..3833379c9 100644
--- a/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/listeners/BlueprintCompilerCacheMessageListener.kt
+++ b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/listeners/BlueprintCompilerCacheMessageListener.kt
@@ -17,19 +17,19 @@
package org.onap.ccsdk.cds.blueprintsprocessor.core.listeners
import org.onap.ccsdk.cds.blueprintsprocessor.core.cluster.BlueprintClusterTopic
-import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BlueprintClusterMessage
-import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BlueprintClusterService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BluePrintClusterMessage
+import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BluePrintClusterService
import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BlueprintClusterMessageListener
import org.onap.ccsdk.cds.blueprintsprocessor.core.service.ClusterJoinedEvent
import org.onap.ccsdk.cds.controllerblueprints.core.logger
-import org.onap.ccsdk.cds.controllerblueprints.core.scripts.BlueprintCompileCache
+import org.onap.ccsdk.cds.controllerblueprints.core.scripts.BluePrintCompileCache
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
import org.springframework.context.event.EventListener
import org.springframework.stereotype.Component
@Component
@ConditionalOnProperty("CLUSTER_ENABLED", havingValue = "true")
-open class BlueprintCompilerCacheMessageListener(private val clusterService: BlueprintClusterService) : BlueprintClusterMessageListener<String> {
+open class BlueprintCompilerCacheMessageListener(private val clusterService: BluePrintClusterService) : BlueprintClusterMessageListener<String> {
private val log = logger(BlueprintCompilerCacheMessageListener::class)
@EventListener(ClusterJoinedEvent::class)
@@ -38,10 +38,10 @@ open class BlueprintCompilerCacheMessageListener(private val clusterService: Blu
clusterService.addBlueprintClusterMessageListener(BlueprintClusterTopic.BLUEPRINT_CLEAN_COMPILER_CACHE, this)
}
- override fun onMessage(message: BlueprintClusterMessage<String>?) {
+ override fun onMessage(message: BluePrintClusterMessage<String>?) {
message?.let {
log.info("Received ClusterMessage - Cleaning compile cache for blueprint (${it.payload})")
- BlueprintCompileCache.cleanClassLoader(it.payload)
+ BluePrintCompileCache.cleanClassLoader(it.payload)
}
}
}
diff --git a/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/service/BlueprintClusterService.kt b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/service/BluePrintClusterService.kt
index 900ae927b..f7ba6f25f 100644
--- a/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/service/BlueprintClusterService.kt
+++ b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/service/BluePrintClusterService.kt
@@ -22,7 +22,7 @@ import java.time.Duration
import java.util.Properties
import java.util.UUID
-interface BlueprintClusterService {
+interface BluePrintClusterService {
/** Start the cluster with [clusterInfo], By default clustering service is disabled.
* Application module has to start cluster */
@@ -95,10 +95,10 @@ interface ClusterLock {
fun close()
}
-class BlueprintClusterMessage<E>(val topic: BlueprintClusterTopic, val payload: E, publishTime: Long, clusterMember: ClusterMember)
+class BluePrintClusterMessage<E>(val topic: BlueprintClusterTopic, val payload: E, publishTime: Long, clusterMember: ClusterMember)
interface BlueprintClusterMessageListener<E> {
- fun onMessage(message: BlueprintClusterMessage<E>?)
+ fun onMessage(message: BluePrintClusterMessage<E>?)
}
class ClusterJoinedEvent(source: Any) : ApplicationEvent(source)
diff --git a/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/utils/PayloadUtils.kt b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/utils/PayloadUtils.kt
index 4ac59802b..72e5654d4 100644
--- a/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/utils/PayloadUtils.kt
+++ b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/utils/PayloadUtils.kt
@@ -17,11 +17,11 @@
package org.onap.ccsdk.cds.blueprintsprocessor.core.utils
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonString
import org.onap.ccsdk.cds.controllerblueprints.core.returnNullIfMissing
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
object PayloadUtils {
@@ -38,11 +38,11 @@ object PayloadUtils {
fun getResponseDataFromPayload(workflowName: String, responsePayload: JsonNode): JsonNode {
return responsePayload.get("$workflowName-response").returnNullIfMissing()
- ?: throw BlueprintProcessorException("failed to get property($workflowName-response)")
+ ?: throw BluePrintProcessorException("failed to get property($workflowName-response)")
}
fun prepareInputsFromWorkflowPayload(
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
payload: JsonNode,
workflowName: String
) {
@@ -51,7 +51,7 @@ object PayloadUtils {
}
fun prepareDynamicInputsFromWorkflowPayload(
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
payload: JsonNode,
workflowName: String
) {
@@ -61,12 +61,12 @@ object PayloadUtils {
}
fun prepareDynamicInputsFromComponentPayload(
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
payload: JsonNode
) {
payload.fields().forEach { property ->
- val path = StringBuilder(BlueprintConstants.PATH_INPUTS)
- .append(BlueprintConstants.PATH_DIVIDER).append(property.key).toString()
+ val path = StringBuilder(BluePrintConstants.PATH_INPUTS)
+ .append(BluePrintConstants.PATH_DIVIDER).append(property.key).toString()
bluePrintRuntimeService.put(path, property.value)
}
}
diff --git a/ms/blueprintsprocessor/modules/commons/processor-core/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/BlueprintPropertiesTest.kt b/ms/blueprintsprocessor/modules/commons/processor-core/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/BluePrintPropertiesTest.kt
index fa2e4d41a..c27285020 100644
--- a/ms/blueprintsprocessor/modules/commons/processor-core/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/BlueprintPropertiesTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/processor-core/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/BluePrintPropertiesTest.kt
@@ -17,4 +17,4 @@
package org.onap.ccsdk.cds.blueprintsprocessor.core
// TODO
-open class BlueprintPropertiesTest
+open class BluePrintPropertiesTest
diff --git a/ms/blueprintsprocessor/modules/commons/processor-core/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/cluster/BlueprintClusterExtensionsTest.kt b/ms/blueprintsprocessor/modules/commons/processor-core/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/cluster/BluePrintClusterExtensionsTest.kt
index ead24b58d..95394e7a9 100644
--- a/ms/blueprintsprocessor/modules/commons/processor-core/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/cluster/BlueprintClusterExtensionsTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/processor-core/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/cluster/BluePrintClusterExtensionsTest.kt
@@ -23,10 +23,10 @@ import kotlinx.coroutines.runBlocking
import org.junit.Before
import org.junit.Test
import org.onap.ccsdk.cds.blueprintsprocessor.core.service.ClusterLock
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
import kotlin.test.assertEquals
-class BlueprintClusterExtensionsTest {
+class BluePrintClusterExtensionsTest {
private lateinit var clusterLockMock: ClusterLock
@@ -64,7 +64,7 @@ class BlueprintClusterExtensionsTest {
}
}
- @Test(expected = BlueprintException::class)
+ @Test(expected = BluePrintException::class)
fun `executeWithLock - should throw exception when lock was not acquired within timeout`() {
runBlocking {
every { runBlocking { clusterLockMock.tryLock(eq(0L)) } } returns false
diff --git a/ms/blueprintsprocessor/modules/commons/processor-core/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/cluster/HazelcastClusterServiceTest.kt b/ms/blueprintsprocessor/modules/commons/processor-core/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/cluster/HazelcastClusterServiceTest.kt
index 91ad657a2..ded017940 100644
--- a/ms/blueprintsprocessor/modules/commons/processor-core/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/cluster/HazelcastClusterServiceTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/processor-core/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/cluster/HazelcastClusterServiceTest.kt
@@ -33,11 +33,11 @@ import kotlinx.coroutines.withContext
import org.junit.After
import org.junit.Before
import org.junit.Test
-import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BlueprintClusterMessage
-import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BlueprintClusterService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BluePrintClusterMessage
+import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BluePrintClusterService
import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BlueprintClusterMessageListener
import org.onap.ccsdk.cds.blueprintsprocessor.core.service.ClusterInfo
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.logger
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedFile
@@ -61,8 +61,8 @@ class HazelcastClusterServiceTest {
@Test
fun testClientFileSystemYamlConfig() {
- System.setProperty(BlueprintConstants.PROPERTY_CLUSTER_ID, "test-cluster")
- System.setProperty(BlueprintConstants.PROPERTY_CLUSTER_NODE_ID, "node-1234")
+ System.setProperty(BluePrintConstants.PROPERTY_CLUSTER_ID, "test-cluster")
+ System.setProperty(BluePrintConstants.PROPERTY_CLUSTER_NODE_ID, "node-1234")
System.setProperty(
"hazelcast.client.config",
normalizedFile("./src/test/resources/hazelcast/hazelcast-client.yaml").absolutePath
@@ -75,8 +75,8 @@ class HazelcastClusterServiceTest {
@Test
fun testServerFileSystemYamlConfig() {
- System.setProperty(BlueprintConstants.PROPERTY_CLUSTER_ID, "test-cluster")
- System.setProperty(BlueprintConstants.PROPERTY_CLUSTER_NODE_ID, "node-1234")
+ System.setProperty(BluePrintConstants.PROPERTY_CLUSTER_ID, "test-cluster")
+ System.setProperty(BluePrintConstants.PROPERTY_CLUSTER_NODE_ID, "node-1234")
val configFile = normalizedFile("./src/test/resources/hazelcast/hazelcast.yaml")
val config = FileSystemYamlConfig(configFile)
assertNotNull(config)
@@ -105,7 +105,7 @@ class HazelcastClusterServiceTest {
}
}
- private suspend fun testMessageReceived(bluePrintClusterServices: List<BlueprintClusterService>) {
+ private suspend fun testMessageReceived(bluePrintClusterServices: List<BluePrintClusterService>) {
val sender = bluePrintClusterServices[0] as HazelcastClusterService
val receiver = bluePrintClusterServices[1] as HazelcastClusterService
val messageSent = "hello world"
@@ -113,7 +113,7 @@ class HazelcastClusterServiceTest {
val uuid = receiver.addBlueprintClusterMessageListener(
BlueprintClusterTopic.BLUEPRINT_CLEAN_COMPILER_CACHE,
object : BlueprintClusterMessageListener<String> {
- override fun onMessage(message: BlueprintClusterMessage<String>?) {
+ override fun onMessage(message: BluePrintClusterMessage<String>?) {
log.info("Message received - ${message?.payload}")
isMessageReceived = messageSent == message?.payload
}
@@ -132,7 +132,7 @@ class HazelcastClusterServiceTest {
private suspend fun createCluster(
ids: List<Int>,
joinAsClient: Boolean? = false
- ): List<BlueprintClusterService> {
+ ): List<BluePrintClusterService> {
return withContext(Dispatchers.Default) {
val deferred = ids.map { id ->
@@ -164,7 +164,7 @@ class HazelcastClusterServiceTest {
}
}
- private suspend fun testDistributedStore(bluePrintClusterServices: List<BlueprintClusterService>) {
+ private suspend fun testDistributedStore(bluePrintClusterServices: List<BluePrintClusterService>) {
/** Test Distributed store creation */
repeat(2) { storeId ->
val store = bluePrintClusterServices[0].clusterMapStore<JsonNode>(
@@ -187,7 +187,7 @@ class HazelcastClusterServiceTest {
}
}
- private suspend fun testDistributedLock(bluePrintClusterServices: List<BlueprintClusterService>) {
+ private suspend fun testDistributedLock(bluePrintClusterServices: List<BluePrintClusterService>) {
val lockName = "sample-lock"
withContext(Dispatchers.IO) {
val deferred = async {
@@ -218,7 +218,7 @@ class HazelcastClusterServiceTest {
}
private suspend fun executeLock(
- bluePrintClusterService: BlueprintClusterService,
+ bluePrintClusterService: BluePrintClusterService,
lockId: String,
lockName: String
) {
@@ -237,7 +237,7 @@ class HazelcastClusterServiceTest {
distributedLock.close()
}
- private suspend fun executeScheduler(bluePrintClusterService: BlueprintClusterService) {
+ private suspend fun executeScheduler(bluePrintClusterService: BluePrintClusterService) {
log.info("initialising ...")
val hazelcastClusterService = bluePrintClusterService as HazelcastClusterService
@@ -251,7 +251,7 @@ class HazelcastClusterServiceTest {
// scheduler.scheduleOnAllMembersAtFixedRate(SampleSchedulerTask(), 0, 5, TimeUnit.SECONDS)
}
- private suspend fun printReachableMembers(bluePrintClusterServices: List<BlueprintClusterService>) {
+ private suspend fun printReachableMembers(bluePrintClusterServices: List<BluePrintClusterService>) {
bluePrintClusterServices.forEach { bluePrintClusterService ->
val hazelcastClusterService = bluePrintClusterService as HazelcastClusterService
val hazelcast = hazelcastClusterService.hazelcast
diff --git a/ms/blueprintsprocessor/modules/commons/processor-core/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/utils/BlueprintMappingsTest.kt b/ms/blueprintsprocessor/modules/commons/processor-core/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/utils/BluePrintMappingsTest.kt
index 1549c9cdf..e8bdbf9ef 100644
--- a/ms/blueprintsprocessor/modules/commons/processor-core/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/utils/BlueprintMappingsTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/processor-core/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/utils/BluePrintMappingsTest.kt
@@ -13,7 +13,7 @@ import org.springframework.test.context.junit4.SpringRunner
import java.text.SimpleDateFormat
@RunWith(SpringRunner::class)
-class BlueprintMappingsTest {
+class BluePrintMappingsTest {
val formatter = SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
val dateString = "2019-01-16T18:25:43.511Z"
diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/BlueprintRestLibConfiguration.kt b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/BluePrintRestLibConfiguration.kt
index 701fd172f..6e9e4b554 100644
--- a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/BlueprintRestLibConfiguration.kt
+++ b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/BluePrintRestLibConfiguration.kt
@@ -19,9 +19,9 @@
package org.onap.ccsdk.cds.blueprintsprocessor.rest
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintRestLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BluePrintRestLibPropertyService
import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintWebClientService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
import org.springframework.boot.context.properties.EnableConfigurationProperties
import org.springframework.context.annotation.ComponentScan
import org.springframework.context.annotation.Configuration
@@ -29,19 +29,19 @@ import org.springframework.context.annotation.Configuration
@Configuration
@ComponentScan
@EnableConfigurationProperties
-open class BlueprintRestLibConfiguration
+open class BluePrintRestLibConfiguration
/**
* Exposed Dependency Service by this Rest Lib Module
*/
-fun BlueprintDependencyService.restLibPropertyService(): BlueprintRestLibPropertyService =
+fun BluePrintDependencyService.restLibPropertyService(): BluePrintRestLibPropertyService =
instance(RestLibConstants.SERVICE_BLUEPRINT_REST_LIB_PROPERTY)
-fun BlueprintDependencyService.restClientService(selector: String): BlueprintWebClientService {
+fun BluePrintDependencyService.restClientService(selector: String): BlueprintWebClientService {
return restLibPropertyService().blueprintWebClientService(selector)
}
-fun BlueprintDependencyService.restClientService(jsonNode: JsonNode): BlueprintWebClientService {
+fun BluePrintDependencyService.restClientService(jsonNode: JsonNode): BlueprintWebClientService {
return restLibPropertyService().blueprintWebClientService(jsonNode)
}
diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/BlueprintRestLibData.kt b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/BluePrintRestLibData.kt
index 01011cc83..01011cc83 100644
--- a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/BlueprintRestLibData.kt
+++ b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/BluePrintRestLibData.kt
diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/RestClientPropertiesDSL.kt b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/RestClientPropertiesDSL.kt
index b1692d93a..25107edea 100644
--- a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/RestClientPropertiesDSL.kt
+++ b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/RestClientPropertiesDSL.kt
@@ -17,8 +17,8 @@
package org.onap.ccsdk.cds.blueprintsprocessor.rest
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
import org.onap.ccsdk.cds.controllerblueprints.core.data.RelationshipType
@@ -30,25 +30,25 @@ import org.onap.ccsdk.cds.controllerblueprints.core.dsl.relationshipType
/** Relationships Type DSL for Rest */
fun ServiceTemplateBuilder.relationshipTypeConnectsToRestClient() {
- val relationshipType = BlueprintTypes.relationshipTypeConnectsToRestClient()
+ val relationshipType = BluePrintTypes.relationshipTypeConnectsToRestClient()
if (this.relationshipTypes == null) this.relationshipTypes = hashMapOf()
this.relationshipTypes!![relationshipType.id!!] = relationshipType
}
-fun BlueprintTypes.relationshipTypeConnectsToRestClient(): RelationshipType {
+fun BluePrintTypes.relationshipTypeConnectsToRestClient(): RelationshipType {
return relationshipType(
- id = BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_REST_CLIENT,
- version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO,
+ id = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_REST_CLIENT,
+ version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO,
description = "Relationship connects to through"
) {
property(
- BlueprintConstants.PROPERTY_CONNECTION_CONFIG,
- BlueprintConstants.DATA_TYPE_MAP,
+ BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
+ BluePrintConstants.DATA_TYPE_MAP,
true,
"Connection Config details."
)
- validTargetTypes(arrayListOf(BlueprintConstants.MODEL_TYPE_CAPABILITY_TYPE_ENDPOINT))
+ validTargetTypes(arrayListOf(BluePrintConstants.MODEL_TYPE_CAPABILITY_TYPE_ENDPOINT))
}
}
@@ -66,45 +66,45 @@ fun TopologyTemplateBuilder.relationshipTemplateRestClient(
open class RestClientRelationshipTemplateBuilder(name: String, description: String) :
RelationshipTemplateBuilder(
name,
- BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_REST_CLIENT, description
+ BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_REST_CLIENT, description
) {
fun basicAuth(block: BasicAuthRestClientPropertiesAssignmentBuilder.() -> Unit) {
- property(BlueprintConstants.PROPERTY_CONNECTION_CONFIG, BlueprintTypes.basicAuthRestClientProperties(block))
+ property(BluePrintConstants.PROPERTY_CONNECTION_CONFIG, BluePrintTypes.basicAuthRestClientProperties(block))
}
fun tokenAuth(block: TokenAuthRestClientPropertiesAssignmentBuilder.() -> Unit) {
- property(BlueprintConstants.PROPERTY_CONNECTION_CONFIG, BlueprintTypes.tokenAuthRestClientProperties(block))
+ property(BluePrintConstants.PROPERTY_CONNECTION_CONFIG, BluePrintTypes.tokenAuthRestClientProperties(block))
}
fun sslBasicAuth(block: SSLBasicAuthRestClientPropertiesBuilder.() -> Unit) {
- property(BlueprintConstants.PROPERTY_CONNECTION_CONFIG, BlueprintTypes.sslBasicAuthRestClientProperties(block))
+ property(BluePrintConstants.PROPERTY_CONNECTION_CONFIG, BluePrintTypes.sslBasicAuthRestClientProperties(block))
}
fun sslAuth(block: SslAuthRestClientPropertiesAssignmentBuilder.() -> Unit) {
- property(BlueprintConstants.PROPERTY_CONNECTION_CONFIG, BlueprintTypes.sslRestClientProperties(block))
+ property(BluePrintConstants.PROPERTY_CONNECTION_CONFIG, BluePrintTypes.sslRestClientProperties(block))
}
}
-fun BlueprintTypes.basicAuthRestClientProperties(block: BasicAuthRestClientPropertiesAssignmentBuilder.() -> Unit): JsonNode {
+fun BluePrintTypes.basicAuthRestClientProperties(block: BasicAuthRestClientPropertiesAssignmentBuilder.() -> Unit): JsonNode {
val assignments = BasicAuthRestClientPropertiesAssignmentBuilder().apply(block).build()
assignments[RestClientProperties::type.name] = RestLibConstants.TYPE_BASIC_AUTH.asJsonPrimitive()
return assignments.asJsonType()
}
-fun BlueprintTypes.tokenAuthRestClientProperties(block: TokenAuthRestClientPropertiesAssignmentBuilder.() -> Unit): JsonNode {
+fun BluePrintTypes.tokenAuthRestClientProperties(block: TokenAuthRestClientPropertiesAssignmentBuilder.() -> Unit): JsonNode {
val assignments = TokenAuthRestClientPropertiesAssignmentBuilder().apply(block).build()
assignments[RestClientProperties::type.name] = RestLibConstants.TYPE_TOKEN_AUTH.asJsonPrimitive()
return assignments.asJsonType()
}
-fun BlueprintTypes.sslBasicAuthRestClientProperties(block: SSLBasicAuthRestClientPropertiesBuilder.() -> Unit): JsonNode {
+fun BluePrintTypes.sslBasicAuthRestClientProperties(block: SSLBasicAuthRestClientPropertiesBuilder.() -> Unit): JsonNode {
val assignments = SSLBasicAuthRestClientPropertiesBuilder().apply(block).build()
assignments[RestClientProperties::type.name] = RestLibConstants.TYPE_SSL_BASIC_AUTH.asJsonPrimitive()
return assignments.asJsonType()
}
-fun BlueprintTypes.sslRestClientProperties(block: SslAuthRestClientPropertiesAssignmentBuilder.() -> Unit): JsonNode {
+fun BluePrintTypes.sslRestClientProperties(block: SslAuthRestClientPropertiesAssignmentBuilder.() -> Unit): JsonNode {
val assignments = SslAuthRestClientPropertiesAssignmentBuilder().apply(block).build()
assignments[RestClientProperties::type.name] = RestLibConstants.TYPE_SSL_NO_AUTH.asJsonPrimitive()
return assignments.asJsonType()
diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintRestLibPropertyService.kt b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BluePrintRestLibPropertyService.kt
index c6d2ed905..4f91e547b 100644
--- a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintRestLibPropertyService.kt
+++ b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BluePrintRestLibPropertyService.kt
@@ -19,7 +19,7 @@
package org.onap.ccsdk.cds.blueprintsprocessor.rest.service
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
import org.onap.ccsdk.cds.blueprintsprocessor.rest.BasicAuthRestClientProperties
import org.onap.ccsdk.cds.blueprintsprocessor.rest.PolicyManagerRestClientProperties
import org.onap.ccsdk.cds.blueprintsprocessor.rest.RestClientProperties
@@ -28,12 +28,12 @@ import org.onap.ccsdk.cds.blueprintsprocessor.rest.SSLBasicAuthRestClientPropert
import org.onap.ccsdk.cds.blueprintsprocessor.rest.SSLRestClientProperties
import org.onap.ccsdk.cds.blueprintsprocessor.rest.SSLTokenAuthRestClientProperties
import org.onap.ccsdk.cds.blueprintsprocessor.rest.TokenAuthRestClientProperties
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.stereotype.Service
@Service(RestLibConstants.SERVICE_BLUEPRINT_REST_LIB_PROPERTY)
-open class BlueprintRestLibPropertyService(private var bluePrintPropertiesService: BlueprintPropertiesService) {
+open class BluePrintRestLibPropertyService(private var bluePrintPropertiesService: BluePrintPropertiesService) {
private var preInterceptor: PreInterceptor? = null
private var postInterceptor: PostInterceptor? = null
@@ -88,7 +88,7 @@ open class BlueprintRestLibPropertyService(private var bluePrintPropertiesServic
policyManagerRestClientProperties(prefix)
}
else -> {
- throw BlueprintProcessorException(
+ throw BluePrintProcessorException(
"Rest adaptor($type) is" +
" not supported"
)
@@ -120,7 +120,7 @@ open class BlueprintRestLibPropertyService(private var bluePrintPropertiesServic
JacksonUtils.readValue(jsonNode, SSLRestClientProperties::class.java)!!
}
else -> {
- throw BlueprintProcessorException(
+ throw BluePrintProcessorException(
"Rest adaptor($type) is not supported"
)
}
@@ -141,7 +141,7 @@ open class BlueprintRestLibPropertyService(private var bluePrintPropertiesServic
return BasicAuthRestClientService(restClientProperties)
}
else -> {
- throw BlueprintProcessorException("couldn't get rest service for type:${restClientProperties.type} uri: ${restClientProperties.url}")
+ throw BluePrintProcessorException("couldn't get rest service for type:${restClientProperties.type} uri: ${restClientProperties.url}")
}
}
}
diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintWebClientService.kt b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintWebClientService.kt
index 43dbcbeb2..945d29850 100644
--- a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintWebClientService.kt
+++ b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintWebClientService.kt
@@ -36,9 +36,9 @@ import org.apache.http.message.BasicHeader
import org.onap.ccsdk.cds.blueprintsprocessor.rest.RestClientProperties
import org.onap.ccsdk.cds.blueprintsprocessor.rest.RestLibConstants
import org.onap.ccsdk.cds.blueprintsprocessor.rest.utils.WebClientUtils
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintRetryException
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintIOUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintRetryException
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintIOUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.http.HttpHeaders
import org.springframework.http.HttpMethod
@@ -59,7 +59,7 @@ interface BlueprintWebClientService {
.build()
}
- /** High performance non blocking Retry function, If execution block [block] throws BlueprintRetryException
+ /** High performance non blocking Retry function, If execution block [block] throws BluePrintRetryException
* exception then this will perform wait and retrigger accoring to times [times] with delay [delay]
*/
suspend fun <T> retry(
@@ -69,11 +69,11 @@ interface BlueprintWebClientService {
block: suspend (Int) -> T
): T {
val exceptionBlock = { e: Exception ->
- if (e !is BlueprintRetryException) {
+ if (e !is BluePrintRetryException) {
throw e
}
}
- return BlueprintIOUtils.retry(times, initialDelay, delay, block, exceptionBlock)
+ return BluePrintIOUtils.retry(times, initialDelay, delay, block, exceptionBlock)
}
fun exchangeResource(methodType: String, path: String, request: String): WebClientResponse<String> {
@@ -98,7 +98,7 @@ interface BlueprintWebClientService {
HttpMethod.POST -> post(path, request, convertedHeaders, String::class.java)
HttpMethod.PUT -> put(path, request, convertedHeaders, String::class.java)
HttpMethod.PATCH -> patch(path, request, convertedHeaders, String::class.java)
- else -> throw BlueprintProcessorException(
+ else -> throw BluePrintProcessorException(
"Unsupported methodType($methodType) attempted on path($path)"
)
}
@@ -270,7 +270,7 @@ interface BlueprintWebClientService {
HttpMethod.DELETE -> deleteNB(path, convertedHeaders, responseType)
HttpMethod.PUT -> putNB(path, request, convertedHeaders, responseType)
HttpMethod.PATCH -> patchNB(path, request, convertedHeaders, responseType)
- else -> throw BlueprintProcessorException("Unsupported methodType($methodType)")
+ else -> throw BluePrintProcessorException("Unsupported methodType($methodType)")
}
}
@@ -323,7 +323,7 @@ interface BlueprintWebClientService {
" User-supplied \"additionalHeaders\" cannot contain AUTHORIZATION header with" +
" auth-type \"${RestLibConstants.TYPE_BASIC_AUTH}\""
WebClientUtils.log.error(errMsg)
- throw BlueprintProcessorException(errMsg)
+ throw BluePrintProcessorException(errMsg)
} else {
customHeaders.putAll(it)
}
diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestLoggerService.kt b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestLoggerService.kt
index 8c7ba6573..611c0855d 100644
--- a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestLoggerService.kt
+++ b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestLoggerService.kt
@@ -29,12 +29,12 @@ import kotlinx.coroutines.reactor.ReactorContext
import kotlinx.coroutines.reactor.asCoroutineContext
import kotlinx.coroutines.withContext
import org.apache.http.message.BasicHeader
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants.ONAP_INVOCATION_ID
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants.ONAP_ORIGINATOR_ID
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants.ONAP_PARTNER_NAME
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants.ONAP_REQUEST_ID
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants.ONAP_SUBREQUEST_ID
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants.ONAP_INVOCATION_ID
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants.ONAP_ORIGINATOR_ID
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants.ONAP_PARTNER_NAME
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants.ONAP_REQUEST_ID
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants.ONAP_SUBREQUEST_ID
import org.onap.ccsdk.cds.controllerblueprints.core.MDCContext
import org.onap.ccsdk.cds.controllerblueprints.core.defaultToEmpty
import org.onap.ccsdk.cds.controllerblueprints.core.defaultToUUID
@@ -65,7 +65,7 @@ class RestLoggerService {
fun httpInvoking(headers: Array<BasicHeader>) {
headers.plusElement(BasicHeader(ONAP_REQUEST_ID, MDC.get("InvocationID").defaultToUUID()))
headers.plusElement(BasicHeader(ONAP_INVOCATION_ID, UUID.randomUUID().toString()))
- headers.plusElement(BasicHeader(ONAP_PARTNER_NAME, BlueprintConstants.APP_NAME))
+ headers.plusElement(BasicHeader(ONAP_PARTNER_NAME, BluePrintConstants.APP_NAME))
}
}
@@ -98,7 +98,7 @@ class RestLoggerService {
resHeaders[ONAP_SUBREQUEST_ID] = MDC.get("SubRequestID")
resHeaders[ONAP_ORIGINATOR_ID] = MDC.get("OriginatorID")
resHeaders[ONAP_INVOCATION_ID] = MDC.get("InvocationID")
- resHeaders[ONAP_PARTNER_NAME] = BlueprintConstants.APP_NAME
+ resHeaders[ONAP_PARTNER_NAME] = BluePrintConstants.APP_NAME
} catch (e: Exception) {
log.warn("couldn't set response headers", e)
} finally {
diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintRestLibPropertyServiceTest.kt b/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BluePrintRestLibPropertyServiceTest.kt
index 8843ff71d..0d187fbc2 100644
--- a/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintRestLibPropertyServiceTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BluePrintRestLibPropertyServiceTest.kt
@@ -23,13 +23,13 @@ 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.BlueprintPropertiesService
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
-import org.onap.ccsdk.cds.blueprintsprocessor.rest.BlueprintRestLibConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.BluePrintRestLibConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.rest.SSLBasicAuthRestClientProperties
import org.onap.ccsdk.cds.blueprintsprocessor.rest.SSLRestClientProperties
import org.onap.ccsdk.cds.blueprintsprocessor.rest.SSLTokenAuthRestClientProperties
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.http.HttpHeaders
import org.springframework.http.MediaType
@@ -43,8 +43,8 @@ import kotlin.test.assertNotNull
@RunWith(SpringRunner::class)
@ContextConfiguration(
classes = [
- BlueprintRestLibConfiguration::class, BlueprintPropertyConfiguration::class,
- BlueprintPropertiesService::class
+ BluePrintRestLibConfiguration::class, BluePrintPropertyConfiguration::class,
+ BluePrintPropertiesService::class
]
)
@TestPropertySource(
@@ -75,10 +75,10 @@ import kotlin.test.assertNotNull
"blueprintsprocessor.restclient.ssl.sslKeyPassword=changeit"
]
)
-class BlueprintRestLibPropertyServiceTest {
+class BluePrintRestLibPropertyServiceTest {
@Autowired
- lateinit var bluePrintRestLibPropertyService: BlueprintRestLibPropertyService
+ lateinit var bluePrintRestLibPropertyService: BluePrintRestLibPropertyService
@Test
fun testRestClientProperties() {
@@ -287,7 +287,7 @@ class BlueprintRestLibPropertyServiceTest {
additionalHeadersChangedContentTypeToAPPLICATION_XML(endPointWithHeadersJson)
}
- // called from within "assertFailsWith(exceptionClass = BlueprintProcessorException::class) {"
+ // called from within "assertFailsWith(exceptionClass = BluePrintProcessorException::class) {"
private fun attemptToPutAuthorizationHeaderIntoAdditionalHeaders(endPointWithHeadersJson: String) {
val parsedObj: JsonNode = defaultMapper.readTree(endPointWithHeadersJson)
val bpWebClientService =
@@ -296,13 +296,13 @@ class BlueprintRestLibPropertyServiceTest {
}
@Test
- fun `BasicAuth WebClientService throws BlueprintProcessorException if additionalHeaders contain Authorization`() {
- assertFailsWith(exceptionClass = BlueprintProcessorException::class) {
+ fun `BasicAuth WebClientService throws BluePrintProcessorException if additionalHeaders contain Authorization`() {
+ assertFailsWith(exceptionClass = BluePrintProcessorException::class) {
val endPointWithHeadersJson = basicAuthEndpointWithHeadersField(additionalHeadersWithAuth)
attemptToPutAuthorizationHeaderIntoAdditionalHeaders(endPointWithHeadersJson)
}
// spec says headers are case insensitive...
- assertFailsWith(exceptionClass = BlueprintProcessorException::class) {
+ assertFailsWith(exceptionClass = BluePrintProcessorException::class) {
val endPointWithHeadersJson = basicAuthEndpointWithHeadersField(additionalHeadersWithAuthLowercased)
attemptToPutAuthorizationHeaderIntoAdditionalHeaders(endPointWithHeadersJson)
}
@@ -335,13 +335,13 @@ class BlueprintRestLibPropertyServiceTest {
}
@Test
- fun `TokenAuth WebClientService throws BlueprintProcessorException if additionalHeaders contain Authorization`() {
- assertFailsWith(exceptionClass = BlueprintProcessorException::class) {
+ fun `TokenAuth WebClientService throws BluePrintProcessorException if additionalHeaders contain Authorization`() {
+ assertFailsWith(exceptionClass = BluePrintProcessorException::class) {
val endPointWithHeadersJson = sslTokenAuthEndpointWithHeadersField(additionalHeadersWithAuth)
attemptToPutAuthorizationHeaderIntoAdditionalHeaders(endPointWithHeadersJson)
}
// spec says headers are case insensitive...
- assertFailsWith(exceptionClass = BlueprintProcessorException::class) {
+ assertFailsWith(exceptionClass = BluePrintProcessorException::class) {
val endPointWithHeadersJson = sslTokenAuthEndpointWithHeadersField(additionalHeadersWithAuthLowercased)
attemptToPutAuthorizationHeaderIntoAdditionalHeaders(endPointWithHeadersJson)
}
@@ -375,13 +375,13 @@ class BlueprintRestLibPropertyServiceTest {
}
@Test
- fun `SSLBasicAuth WebClientService throws BlueprintProcessorException if additionalHeaders contain Authorization`() {
- assertFailsWith(exceptionClass = BlueprintProcessorException::class) {
+ fun `SSLBasicAuth WebClientService throws BluePrintProcessorException if additionalHeaders contain Authorization`() {
+ assertFailsWith(exceptionClass = BluePrintProcessorException::class) {
val endPointWithHeadersJson = sslBasicAuthEndpointWithHeadersField(additionalHeadersWithAuth)
attemptToPutAuthorizationHeaderIntoAdditionalHeaders(endPointWithHeadersJson)
}
// spec says headers are case insensitive...
- assertFailsWith(exceptionClass = BlueprintProcessorException::class) {
+ assertFailsWith(exceptionClass = BluePrintProcessorException::class) {
val endPointWithHeadersJson = sslBasicAuthEndpointWithHeadersField(additionalHeadersWithAuthLowercased)
attemptToPutAuthorizationHeaderIntoAdditionalHeaders(endPointWithHeadersJson)
}
@@ -415,19 +415,19 @@ class BlueprintRestLibPropertyServiceTest {
}
@Test
- fun `SSLNoAuth WebClientService throws BlueprintProcessorException if additionalHeaders contain Authorization`() {
- assertFailsWith(exceptionClass = BlueprintProcessorException::class) {
+ fun `SSLNoAuth WebClientService throws BluePrintProcessorException if additionalHeaders contain Authorization`() {
+ assertFailsWith(exceptionClass = BluePrintProcessorException::class) {
val endPointWithHeadersJson = sslNoAuthEndpointWithHeadersField(additionalHeadersWithAuth)
attemptToPutAuthorizationHeaderIntoAdditionalHeaders(endPointWithHeadersJson)
}
// spec says headers are case insensitive...
- assertFailsWith(exceptionClass = BlueprintProcessorException::class) {
+ assertFailsWith(exceptionClass = BluePrintProcessorException::class) {
val endPointWithHeadersJson = sslNoAuthEndpointWithHeadersField(additionalHeadersWithAuthLowercased)
attemptToPutAuthorizationHeaderIntoAdditionalHeaders(endPointWithHeadersJson)
}
}
- companion object BlueprintRestLibPropertyServiceTest {
+ companion object BluePrintRestLibPropertyServiceTest {
val defaultMapper = ObjectMapper()
val expectedTokenAuthDefaultHeaders = mapOf<String, String>(
diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientPropertiesDSLTest.kt b/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientPropertiesDSLTest.kt
index 6b083aaad..f06f827ad 100644
--- a/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientPropertiesDSLTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientPropertiesDSLTest.kt
@@ -19,7 +19,7 @@ package org.onap.ccsdk.cds.blueprintsprocessor.rest.service
import org.junit.Test
import org.onap.ccsdk.cds.blueprintsprocessor.rest.relationshipTemplateRestClient
import org.onap.ccsdk.cds.blueprintsprocessor.rest.relationshipTypeConnectsToRestClient
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.relationshipTypeConnectsTo
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.serviceTemplate
import kotlin.test.assertEquals
@@ -73,12 +73,12 @@ class RestClientPropertiesDSLTest {
assertNotNull(relationshipTypes, "failed to get relationship types")
assertEquals(2, relationshipTypes.size, "relationshipTypes doesn't match")
assertNotNull(
- relationshipTypes[BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO],
- "failed to get ${BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO}"
+ relationshipTypes[BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO],
+ "failed to get ${BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO}"
)
assertNotNull(
- relationshipTypes[BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_REST_CLIENT],
- "failed to get ${BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_REST_CLIENT}"
+ relationshipTypes[BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_REST_CLIENT],
+ "failed to get ${BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_REST_CLIENT}"
)
}
}
diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientServiceTest.kt b/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientServiceTest.kt
index e14e035a9..030996685 100644
--- a/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientServiceTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientServiceTest.kt
@@ -27,9 +27,9 @@ import org.junit.After
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
-import org.onap.ccsdk.cds.blueprintsprocessor.rest.BlueprintRestLibConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.BluePrintRestLibConfiguration
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.autoconfigure.EnableAutoConfiguration
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
@@ -66,9 +66,9 @@ import kotlin.test.assertNotNull
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
@ContextConfiguration(
classes = [
- BlueprintRestLibConfiguration::class, SampleController::class,
+ BluePrintRestLibConfiguration::class, SampleController::class,
SecurityConfiguration::class,
- BlueprintPropertyConfiguration::class, BlueprintPropertiesService::class
+ BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class
]
)
@TestPropertySource(
@@ -96,7 +96,7 @@ import kotlin.test.assertNotNull
class RestClientServiceTest {
@Autowired
- lateinit var bluePrintRestLibPropertyService: BlueprintRestLibPropertyService
+ lateinit var bluePrintRestLibPropertyService: BluePrintRestLibPropertyService
@Autowired
lateinit var httpHandler: HttpHandler
diff --git a/ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/BlueprintSshLibConfiguration.kt b/ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/BluePrintSshLibConfiguration.kt
index 7b471870b..dc10722cc 100644
--- a/ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/BlueprintSshLibConfiguration.kt
+++ b/ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/BluePrintSshLibConfiguration.kt
@@ -17,9 +17,9 @@
package org.onap.ccsdk.cds.blueprintsprocessor.ssh
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.blueprintsprocessor.ssh.service.BlueprintSshLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.ssh.service.BluePrintSshLibPropertyService
import org.onap.ccsdk.cds.blueprintsprocessor.ssh.service.BlueprintSshClientService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
import org.springframework.boot.context.properties.EnableConfigurationProperties
import org.springframework.context.annotation.ComponentScan
import org.springframework.context.annotation.Configuration
@@ -27,18 +27,18 @@ import org.springframework.context.annotation.Configuration
@Configuration
@ComponentScan
@EnableConfigurationProperties
-open class BlueprintSshLibConfiguration
+open class BluePrintSshLibConfiguration
/**
* Exposed Dependency Service by this SSH Lib Module
*/
-fun BlueprintDependencyService.sshLibPropertyService(): BlueprintSshLibPropertyService =
+fun BluePrintDependencyService.sshLibPropertyService(): BluePrintSshLibPropertyService =
instance(SshLibConstants.SERVICE_BLUEPRINT_SSH_LIB_PROPERTY)
-fun BlueprintDependencyService.sshClientService(selector: String): BlueprintSshClientService =
+fun BluePrintDependencyService.sshClientService(selector: String): BlueprintSshClientService =
sshLibPropertyService().blueprintSshClientService(selector)
-fun BlueprintDependencyService.sshClientService(jsonNode: JsonNode): BlueprintSshClientService =
+fun BluePrintDependencyService.sshClientService(jsonNode: JsonNode): BlueprintSshClientService =
sshLibPropertyService().blueprintSshClientService(jsonNode)
class SshLibConstants {
diff --git a/ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/BlueprintSshLibData.kt b/ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/BluePrintSshLibData.kt
index 295021f21..295021f21 100644
--- a/ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/BlueprintSshLibData.kt
+++ b/ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/BluePrintSshLibData.kt
diff --git a/ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/SshPropertiesDSL.kt b/ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/SshPropertiesDSL.kt
index 256924c5f..a7702d4fb 100644
--- a/ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/SshPropertiesDSL.kt
+++ b/ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/SshPropertiesDSL.kt
@@ -19,8 +19,8 @@
package org.onap.ccsdk.cds.blueprintsprocessor.ssh
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
import org.onap.ccsdk.cds.controllerblueprints.core.data.RelationshipType
@@ -32,25 +32,25 @@ import org.onap.ccsdk.cds.controllerblueprints.core.dsl.relationshipType
/** Relationships Types DSL for Message Producer */
fun ServiceTemplateBuilder.relationshipTypeConnectsToSshClient() {
- val relationshipType = BlueprintTypes.relationshipTypeConnectsToSshClient()
+ val relationshipType = BluePrintTypes.relationshipTypeConnectsToSshClient()
if (this.relationshipTypes == null) this.relationshipTypes = hashMapOf()
this.relationshipTypes!![relationshipType.id!!] = relationshipType
}
-fun BlueprintTypes.relationshipTypeConnectsToSshClient(): RelationshipType {
+fun BluePrintTypes.relationshipTypeConnectsToSshClient(): RelationshipType {
return relationshipType(
- id = BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_SSH_CLIENT,
- version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO,
+ id = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_SSH_CLIENT,
+ version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO,
description = "Relationship connects to through SSH Client."
) {
property(
- BlueprintConstants.PROPERTY_CONNECTION_CONFIG,
- BlueprintConstants.DATA_TYPE_MAP,
+ BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
+ BluePrintConstants.DATA_TYPE_MAP,
true,
"Connection Config details."
)
- validTargetTypes(arrayListOf(BlueprintConstants.MODEL_TYPE_CAPABILITY_TYPE_ENDPOINT))
+ validTargetTypes(arrayListOf(BluePrintConstants.MODEL_TYPE_CAPABILITY_TYPE_ENDPOINT))
}
}
@@ -68,15 +68,15 @@ fun TopologyTemplateBuilder.relationshipTemplateSshClient(
open class SshRelationshipTemplateBuilder(name: String, description: String) :
RelationshipTemplateBuilder(
name,
- BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_SSH_CLIENT, description
+ BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_SSH_CLIENT, description
) {
fun basicAuth(block: BasicAuthSshClientPropertiesAssignmentBuilder.() -> Unit) {
- property(BlueprintConstants.PROPERTY_CONNECTION_CONFIG, BlueprintTypes.basicAuthSshProperties(block))
+ property(BluePrintConstants.PROPERTY_CONNECTION_CONFIG, BluePrintTypes.basicAuthSshProperties(block))
}
}
-fun BlueprintTypes.basicAuthSshProperties(block: BasicAuthSshClientPropertiesAssignmentBuilder.() -> Unit): JsonNode {
+fun BluePrintTypes.basicAuthSshProperties(block: BasicAuthSshClientPropertiesAssignmentBuilder.() -> Unit): JsonNode {
val sshProperties = BasicAuthSshClientPropertiesAssignmentBuilder().apply(block).build()
sshProperties[SshClientProperties::type.name] = SshLibConstants.TYPE_BASIC_AUTH.asJsonPrimitive()
return sshProperties.asJsonType()
diff --git a/ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BasicAuthSshClientService.kt b/ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BasicAuthSshClientService.kt
index 46756e63a..6ee73c238 100644
--- a/ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BasicAuthSshClientService.kt
+++ b/ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BasicAuthSshClientService.kt
@@ -25,7 +25,7 @@ import org.apache.sshd.client.channel.ClientChannelEvent
import org.apache.sshd.client.keyverifier.AcceptAllServerKeyVerifier
import org.apache.sshd.client.session.ClientSession
import org.onap.ccsdk.cds.blueprintsprocessor.ssh.BasicAuthSshClientProperties
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.slf4j.LoggerFactory
import java.io.ByteArrayOutputStream
import java.io.IOException
@@ -76,7 +76,7 @@ open class BasicAuthSshClientService(private val basicAuthSshClientProperties: B
channel!!.err = ByteArrayOutputStream()
channel!!.open()
} catch (e: Exception) {
- throw BlueprintProcessorException("Failed to start Shell channel: ${e.message}")
+ throw BluePrintProcessorException("Failed to start Shell channel: ${e.message}")
}
}
@@ -97,7 +97,7 @@ open class BasicAuthSshClientService(private val basicAuthSshClientProperties: B
}
}
} catch (e: Exception) {
- throw BlueprintProcessorException("Failed to execute commands, below the error message : ${e.message}")
+ throw BluePrintProcessorException("Failed to execute commands, below the error message : ${e.message}")
}
return response
}
@@ -111,7 +111,7 @@ open class BasicAuthSshClientService(private val basicAuthSshClientProperties: B
teeOutput!!.flush()
deviceOutput = waitForPrompt(timeOut)
} catch (e: IOException) {
- throw BlueprintProcessorException("Exception during command execution: ${e.message}", e)
+ throw BluePrintProcessorException("Exception during command execution: ${e.message}", e)
}
if (detectFailure(deviceOutput)) {
@@ -130,7 +130,7 @@ open class BasicAuthSshClientService(private val basicAuthSshClientProperties: B
Collections.unmodifiableSet(EnumSet.of(ClientChannelEvent.CLOSED)), timeOut
)
if (channel!!.out.toString().indexOfAny(arrayListOf("$", ">", "#")) <= 0 && waitMask.contains(ClientChannelEvent.TIMEOUT)) {
- throw BlueprintProcessorException("Timeout: Failed to retrieve commands result in $timeOut ms")
+ throw BluePrintProcessorException("Timeout: Failed to retrieve commands result in $timeOut ms")
}
val outputResult = channel!!.out.toString()
channel!!.out.flush()
diff --git a/ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BlueprintSshLibPropertyService.kt b/ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BluePrintSshLibPropertyService.kt
index 4803d5f52..90a1746e8 100644
--- a/ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BlueprintSshLibPropertyService.kt
+++ b/ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BluePrintSshLibPropertyService.kt
@@ -17,16 +17,16 @@
package org.onap.ccsdk.cds.blueprintsprocessor.ssh.service
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
import org.onap.ccsdk.cds.blueprintsprocessor.ssh.BasicAuthSshClientProperties
import org.onap.ccsdk.cds.blueprintsprocessor.ssh.SshClientProperties
import org.onap.ccsdk.cds.blueprintsprocessor.ssh.SshLibConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.stereotype.Service
@Service(SshLibConstants.SERVICE_BLUEPRINT_SSH_LIB_PROPERTY)
-open class BlueprintSshLibPropertyService(private var bluePrintProperties: BlueprintPropertiesService) {
+open class BluePrintSshLibPropertyService(private var bluePrintProperties: BluePrintPropertiesService) {
fun blueprintSshClientService(jsonNode: JsonNode): BlueprintSshClientService {
val restClientProperties = sshClientProperties(jsonNode)
@@ -46,14 +46,14 @@ open class BlueprintSshLibPropertyService(private var bluePrintProperties: Bluep
basicAuthSshClientProperties(prefix)
}
else -> {
- throw BlueprintProcessorException("SSH adaptor($type) is not supported")
+ throw BluePrintProcessorException("SSH adaptor($type) is not supported")
}
}
}
fun sshClientProperties(jsonNode: JsonNode): SshClientProperties {
val type = jsonNode.get("type")?.textValue()
- ?: throw BlueprintProcessorException("missing type field in ssh client properties")
+ ?: throw BluePrintProcessorException("missing type field in ssh client properties")
return when (type) {
SshLibConstants.TYPE_BASIC_AUTH -> {
JacksonUtils.readValue(
@@ -62,7 +62,7 @@ open class BlueprintSshLibPropertyService(private var bluePrintProperties: Bluep
)!!
}
else -> {
- throw BlueprintProcessorException("SSH adaptor($type) is not supported")
+ throw BluePrintProcessorException("SSH adaptor($type) is not supported")
}
}
}
@@ -74,7 +74,7 @@ open class BlueprintSshLibPropertyService(private var bluePrintProperties: Bluep
return BasicAuthSshClientService(sshClientProperties)
}
else -> {
- throw BlueprintProcessorException("couldn't get SSH client service for")
+ throw BluePrintProcessorException("couldn't get SSH client service for")
}
}
}
diff --git a/ms/blueprintsprocessor/modules/commons/ssh-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/SshPropertiesDSLTest.kt b/ms/blueprintsprocessor/modules/commons/ssh-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/SshPropertiesDSLTest.kt
index 510dc7de8..85891b1b5 100644
--- a/ms/blueprintsprocessor/modules/commons/ssh-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/SshPropertiesDSLTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/ssh-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/SshPropertiesDSLTest.kt
@@ -17,7 +17,7 @@
package org.onap.ccsdk.cds.blueprintsprocessor.ssh
import org.junit.Test
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.relationshipTypeConnectsTo
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.serviceTemplate
import kotlin.test.assertEquals
@@ -53,12 +53,12 @@ class SshPropertiesDSLTest {
assertNotNull(relationshipTypes, "failed to get relationship types")
assertEquals(2, relationshipTypes.size, "relationshipTypes doesn't match")
assertNotNull(
- relationshipTypes[BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO],
- "failed to get ${BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO}"
+ relationshipTypes[BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO],
+ "failed to get ${BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO}"
)
assertNotNull(
- relationshipTypes[BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_SSH_CLIENT],
- "failed to get ${BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_SSH_CLIENT}"
+ relationshipTypes[BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_SSH_CLIENT],
+ "failed to get ${BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_SSH_CLIENT}"
)
}
}
diff --git a/ms/blueprintsprocessor/modules/commons/ssh-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BlueprintSshLibPropertyServiceTest.kt b/ms/blueprintsprocessor/modules/commons/ssh-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BluePrintSshLibPropertyServiceTest.kt
index 88c734aa4..43a997ae9 100644
--- a/ms/blueprintsprocessor/modules/commons/ssh-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BlueprintSshLibPropertyServiceTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/ssh-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BluePrintSshLibPropertyServiceTest.kt
@@ -18,10 +18,10 @@ package org.onap.ccsdk.cds.blueprintsprocessor.ssh.service
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
-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.ssh.BasicAuthSshClientProperties
-import org.onap.ccsdk.cds.blueprintsprocessor.ssh.BlueprintSshLibConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.ssh.BluePrintSshLibConfiguration
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.test.context.ContextConfiguration
import org.springframework.test.context.TestPropertySource
@@ -32,8 +32,8 @@ import kotlin.test.assertNotNull
@RunWith(SpringRunner::class)
@ContextConfiguration(
classes = [
- BlueprintSshLibConfiguration::class,
- BlueprintPropertyConfiguration::class, BlueprintPropertiesService::class
+ BluePrintSshLibConfiguration::class,
+ BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class
]
)
@TestPropertySource(
@@ -46,10 +46,10 @@ import kotlin.test.assertNotNull
"blueprintsprocessor.sshclient.sample.username=dummy"
]
)
-class BlueprintSshLibPropertyServiceTest {
+class BluePrintSshLibPropertyServiceTest {
@Autowired
- lateinit var bluePrintSshLibPropertyService: BlueprintSshLibPropertyService
+ lateinit var bluePrintSshLibPropertyService: BluePrintSshLibPropertyService
@Test
fun testRestClientProperties() {
diff --git a/ms/blueprintsprocessor/modules/commons/ssh-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BlueprintSshClientServiceTest.kt b/ms/blueprintsprocessor/modules/commons/ssh-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BlueprintSshClientServiceTest.kt
index 1c9d8d14b..1cf0de52b 100644
--- a/ms/blueprintsprocessor/modules/commons/ssh-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BlueprintSshClientServiceTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/ssh-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BlueprintSshClientServiceTest.kt
@@ -28,9 +28,9 @@ import org.apache.sshd.server.keyprovider.SimpleGeneratorHostKeyProvider
import org.apache.sshd.server.session.ServerSession
import org.apache.sshd.server.shell.ProcessShellCommandFactory
import org.junit.runner.RunWith
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
-import org.onap.ccsdk.cds.blueprintsprocessor.ssh.BlueprintSshLibConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.ssh.BluePrintSshLibConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.ssh.service.echoShell.EchoShellFactory
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.test.context.ContextConfiguration
@@ -47,8 +47,8 @@ import kotlin.test.assertTrue
@RunWith(SpringRunner::class)
@ContextConfiguration(
classes = [
- BlueprintSshLibConfiguration::class,
- BlueprintPropertyConfiguration::class, BlueprintPropertiesService::class
+ BluePrintSshLibConfiguration::class,
+ BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class
]
)
@TestPropertySource(
@@ -64,9 +64,9 @@ import kotlin.test.assertTrue
class BlueprintSshClientServiceTest {
@Autowired
- lateinit var bluePrintSshLibPropertyService: BlueprintSshLibPropertyService
+ lateinit var bluePrintSshLibPropertyService: BluePrintSshLibPropertyService
- lateinit var bluePrintSshLibPropertyServiceMock: BlueprintSshLibPropertyService
+ lateinit var bluePrintSshLibPropertyServiceMock: BluePrintSshLibPropertyService
private lateinit var sshServer: SshServer