From: guillaume.lambert Date: Thu, 31 Oct 2019 13:01:58 +0000 (+0100) Subject: switch inventory to Mariadb X-Git-Tag: 1.0.0~66 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=transportpce.git;a=commitdiff_plain;h=907402b1787c0e944be4df59411ebb7d100d3eca switch inventory to Mariadb and comment out devices v2.2.1 support JIRA: TRNSPRTPCE-81 TRNSPRTPCE-82 Signed-off-by: Narayan Padi Change-Id: Ifa2150a91ee58b8c77cdfbae6721c78bed5f171e --- diff --git a/features/odl-transportpce-inventory/src/main/feature/feature.xml b/features/odl-transportpce-inventory/src/main/feature/feature.xml index f95a75539..0c9de2a06 100644 --- a/features/odl-transportpce-inventory/src/main/feature/feature.xml +++ b/features/odl-transportpce-inventory/src/main/feature/feature.xml @@ -2,7 +2,7 @@ scheduler - pax-jdbc-mysql + pax-jdbc-mariadb pax-jdbc-pool-dbcp2 mvn:${project.groupId}/${project.artifactId}/${project.version}/cfg/datasource diff --git a/features/odl-transportpce-inventory/src/main/resources/org.ops4j.datasource-transporpce.cfg b/features/odl-transportpce-inventory/src/main/resources/org.ops4j.datasource-transporpce.cfg index c10ae34fb..e48d39336 100644 --- a/features/odl-transportpce-inventory/src/main/resources/org.ops4j.datasource-transporpce.cfg +++ b/features/odl-transportpce-inventory/src/main/resources/org.ops4j.datasource-transporpce.cfg @@ -1,6 +1,7 @@ -osgi.jdbc.driver.name=mysql -url=jdbc:mysql://${transportpce.db.host}/${transportpce.db.database}?useUnicode=true&characterEncoding=utf8 +osgi.jdbc.driver.name=mariadb +url=jdbc:mariadb://${transportpce.db.host}/${transportpce.db.database}?useUnicode=true&characterEncoding=utf8 pool=dbcp2 user=${transportpce.db.username} password=${transportpce.db.password} -dataSourceName=transportpce +databaseName=${transportpce.db.database} +dataSourceName=transportpce \ No newline at end of file diff --git a/inventory/pom.xml b/inventory/pom.xml index 62996eb44..fd890251c 100644 --- a/inventory/pom.xml +++ b/inventory/pom.xml @@ -71,12 +71,12 @@ com.fasterxml.jackson.core jackson-databind - + diff --git a/inventory/src/main/java/org/opendaylight/transportpce/inventory/INode.java b/inventory/src/main/java/org/opendaylight/transportpce/inventory/INode.java index f31f89da7..5279f1af3 100644 --- a/inventory/src/main/java/org/opendaylight/transportpce/inventory/INode.java +++ b/inventory/src/main/java/org/opendaylight/transportpce/inventory/INode.java @@ -23,15 +23,17 @@ public class INode { private final DataSource dataSource; private final DeviceTransactionManager deviceTransactionManager; - private final INode221 inode221; + //private final INode221 inode221; private final INode121 inode121; - public INode(DataSource dataSource, DeviceTransactionManager deviceTransactionManager, INode121 inode121, - INode221 inode221) { + public INode(DataSource dataSource, DeviceTransactionManager deviceTransactionManager, + INode121 inode121 + //, INode221 inode221 + ) { this.dataSource = dataSource; this.deviceTransactionManager = deviceTransactionManager; this.inode121 = inode121; - this.inode221 = inode221; + //this.inode221 = inode221; } public boolean addNode(String deviceId, String openROADMversion) { diff --git a/inventory/src/main/resources/OSGI-INF/blueprint/inventory-blueprint.xml b/inventory/src/main/resources/OSGI-INF/blueprint/inventory-blueprint.xml index 12100208e..6f9d85789 100644 --- a/inventory/src/main/resources/OSGI-INF/blueprint/inventory-blueprint.xml +++ b/inventory/src/main/resources/OSGI-INF/blueprint/inventory-blueprint.xml @@ -4,7 +4,7 @@ are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html --> + odl:use-default-for-reference-types="true" xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"> @@ -18,11 +18,6 @@ - - - - - @@ -32,7 +27,7 @@ - +