aboutsummaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/modules/commons/db-lib/src
diff options
context:
space:
mode:
authorKAPIL SINGAL <ks220y@att.com>2021-01-22 11:49:51 -0500
committerSingal, Kapil (ks220y) <ks220y@att.com>2021-01-22 12:08:19 -0500
commitadcd4f2bc695840e9ecbc05003bc52c675f22fec (patch)
tree5db58ce9b6b3e86977ca3c697ce3e8998523eb61 /ms/blueprintsprocessor/modules/commons/db-lib/src
parentdc8252f3cfa1ddd0c1c8c70513c16c738d840822 (diff)
Renaming Files having BluePrint to have Blueprint
Replacing BluePrint with Blueprint throughout Issue-ID: CCSDK-3098 Signed-off-by: KAPIL SINGAL <ks220y@att.com> Change-Id: Ibee8bad07ae7d9287073db2d4f2f2cd730fa8b96
Diffstat (limited to 'ms/blueprintsprocessor/modules/commons/db-lib/src')
-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/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
13 files changed, 111 insertions, 111 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 d4b3f807b..f11832beb 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 7023106eb..7023106eb 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 aeb87fd66..6c382377d 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 34dd0a417..fd51da152 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 79f5c09bc..b272a9708 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,25 +17,25 @@
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
import org.onap.ccsdk.cds.blueprintsprocessor.db.DBLibConstants.Companion.PROCESSOR_DB
import org.onap.ccsdk.cds.blueprintsprocessor.db.MariaDataSourceProperties
import org.onap.ccsdk.cds.blueprintsprocessor.db.MySqlDataSourceProperties
-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 =
@@ -43,7 +43,7 @@ class BluePrintDBLibPropertyService(private var bluePrintPropertiesService: Blue
MYSQL_DB -> JacksonUtils.readValue(jsonNode, MySqlDataSourceProperties::class.java)
MARIA_DB -> JacksonUtils.readValue(jsonNode, MariaDataSourceProperties::class.java)
else -> {
- throw BluePrintProcessorException(
+ throw BlueprintProcessorException(
"DB type ($type) is not supported. Valid types: $MARIA_DB, $MYSQL_DB"
)
}
@@ -55,18 +55,18 @@ class BluePrintDBLibPropertyService(private var bluePrintPropertiesService: Blue
MARIA_DB, PROCESSOR_DB -> mariaDBConnectionProperties(prefix)
MYSQL_DB -> mySqlDBConnectionProperties(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)
- 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/MariaDatabaseConfiguration.kt b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/MariaDatabaseConfiguration.kt
index 82895257a..6132190c2 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 0761b72d2..ea13dfb83 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 9d1826395..fe6da176b 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 6637c62ec..10a526365 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,9 +179,9 @@ class BlueprintProcessorCatalogServiceImpl(
}
private suspend fun cleanClassLoader(cacheKey: String) {
- val clusterService = BluePrintDependencyService.optionalClusterService()
+ val clusterService = BlueprintDependencyService.optionalClusterService()
if (null == clusterService)
- BluePrintCompileCache.cleanClassLoader(cacheKey)
+ BlueprintCompileCache.cleanClassLoader(cacheKey)
else {
log.info("Sending ClusterMessage: Clean Classloader Cache")
clusterService.sendMessage(BlueprintClusterTopic.BLUEPRINT_CLEAN_COMPILER_CACHE, 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 b7b1f78cf..4084e156c 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 dd84e5b02..d182651af 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 d8192acfa..38a8ef427 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 248181f16..6135f5bbd 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
}
}