From 54426584a02e6fbfec5f7685c92e1a3fde62309f Mon Sep 17 00:00:00 2001 From: Oleg Mitsura Date: Thu, 15 Aug 2019 16:41:17 -0400 Subject: Make source-db consistent across samples Issue-Id: CCSDK-1623 Signed-off-by: Oleg Mitsura Change-Id: Iec7c6909c39c34894be11bfdac45f6394010d9cf --- .../db/BluePrintDBLibConfiguration.kt | 8 ++++---- .../cds/blueprintsprocessor/db/BluePrintDBLibData.kt | 1 - .../src/test/resources/application-test.properties | 16 ++++++++-------- 3 files changed, 12 insertions(+), 13 deletions(-) (limited to 'ms/blueprintsprocessor/modules/commons') 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 fd889bfbf..11abf7b2e 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 @@ -32,7 +32,7 @@ open class BluePrintDBLibConfiguration(private var bluePrintProperties: BluePrin @Bean("primary-database-properties") open fun getPrimaryProperties(): PrimaryDataSourceProperties { - return bluePrintProperties.propertyBeanType(DBLibConstants.PREFIX_DB_PRIMARY, + return bluePrintProperties.propertyBeanType(DBLibConstants.PREFIX_DB, PrimaryDataSourceProperties::class.java) } } @@ -49,11 +49,11 @@ fun BluePrintDependencyService.primaryDBLibGenericService(): BluePrintDBLibGener class DBLibConstants { companion object { - const val PREFIX_DB_PRIMARY: String = "blueprintsprocessor.db.primary" + const val PREFIX_DB: String = "blueprintsprocessor.db" //list of database const val MARIA_DB: String = "maria-db" - const val PRIMARY_DB: String = "primary-db" + const val PRIMARY_DB: String = "processor-db" const val MYSQL_DB: String = "mysql-db" const val ORACLE_DB: String = "oracle-db" const val POSTGRES_DB: String = "postgres-db" @@ -64,4 +64,4 @@ class DBLibConstants { const val DRIVER_ORACLE_DB = "oracle.jdbc.driver.OracleDriver" const val DRIVER_POSTGRES_DB = "org.postgresql.Driver" } -} \ No newline at end of file +} 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 b71287d6e..b1ac5cee4 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 @@ -49,4 +49,3 @@ open class MySqlDataSourceProperties: DBDataSourceProperties() { lateinit var hibernateDialect: String override var driverClassName = DBLibConstants.DRIVER_MYSQL_DB } - diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/src/test/resources/application-test.properties b/ms/blueprintsprocessor/modules/commons/db-lib/src/test/resources/application-test.properties index 9dda71eb2..90cf03517 100644 --- a/ms/blueprintsprocessor/modules/commons/db-lib/src/test/resources/application-test.properties +++ b/ms/blueprintsprocessor/modules/commons/db-lib/src/test/resources/application-test.properties @@ -14,14 +14,14 @@ # See the License for the specific language governing permissions and # limitations under the License. # -blueprintsprocessor.db.primary.url=jdbc:h2:mem:testdb;DB_CLOSE_DELAY=-1 -blueprintsprocessor.db.primary.username=sa -blueprintsprocessor.db.primary.password= -blueprintsprocessor.db.primary.driverClassName=org.h2.Driver -blueprintsprocessor.db.primary.hibernateHbm2ddlAuto=create-drop -blueprintsprocessor.db.primary.hibernateDDLAuto=update -blueprintsprocessor.db.primary.hibernateNamingStrategy=org.hibernate.cfg.ImprovedNamingStrategy -blueprintsprocessor.db.primary.hibernateDialect=org.hibernate.dialect.H2Dialect +blueprintsprocessor.db.url=jdbc:h2:mem:testdb;DB_CLOSE_DELAY=-1 +blueprintsprocessor.db.username=sa +blueprintsprocessor.db.password= +blueprintsprocessor.db.driverClassName=org.h2.Driver +blueprintsprocessor.db.hibernateHbm2ddlAuto=create-drop +blueprintsprocessor.db.hibernateDDLAuto=update +blueprintsprocessor.db.hibernateNamingStrategy=org.hibernate.cfg.ImprovedNamingStrategy +blueprintsprocessor.db.hibernateDialect=org.hibernate.dialect.H2Dialect # Controller Blueprints Core Configuration blueprintsprocessor.blueprintDeployPath=./target/blueprints/deploy blueprintsprocessor.blueprintArchivePath=./target/blueprints/archive -- cgit 1.2.3-korg