switch inventory to Mariadb 16/85416/7
authorguillaume.lambert <guillaume.lambert@orange.com>
Thu, 31 Oct 2019 13:01:58 +0000 (14:01 +0100)
committerguillaume.lambert <guillaume.lambert@orange.com>
Mon, 25 Nov 2019 10:24:19 +0000 (11:24 +0100)
and comment out devices v2.2.1 support

JIRA: TRNSPRTPCE-81 TRNSPRTPCE-82
Signed-off-by: Narayan Padi <np2698@att.com>
Change-Id: Ifa2150a91ee58b8c77cdfbae6721c78bed5f171e

features/odl-transportpce-inventory/src/main/feature/feature.xml
features/odl-transportpce-inventory/src/main/resources/org.ops4j.datasource-transporpce.cfg
inventory/pom.xml
inventory/src/main/java/org/opendaylight/transportpce/inventory/INode.java
inventory/src/main/resources/OSGI-INF/blueprint/inventory-blueprint.xml

index f95a75539ada28c1ee2188af2b273f5f801cddb6..0c9de2a06acb96b530aba9367e0665bde9f1be59 100644 (file)
@@ -2,7 +2,7 @@
 <features xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" name="odl-transportpce-inventory">
     <feature name="odl-transportpce-inventory">
         <feature>scheduler</feature>
-        <feature>pax-jdbc-mysql</feature>
+        <feature>pax-jdbc-mariadb</feature>
         <feature>pax-jdbc-pool-dbcp2</feature>
         <configfile finalname="etc/org.ops4j.datasource-transportpce.cfg" override="false">
             mvn:${project.groupId}/${project.artifactId}/${project.version}/cfg/datasource
index c10ae34fbc2cce30d9b604c0c15e37d623e509e2..e48d393362b66770b89da301ae5f3b14f9314982 100644 (file)
@@ -1,6 +1,7 @@
-osgi.jdbc.driver.name=mysql
-url=jdbc:mysql://${transportpce.db.host}/${transportpce.db.database}?useUnicode=true&amp;characterEncoding=utf8
+osgi.jdbc.driver.name=mariadb
+url=jdbc:mariadb://${transportpce.db.host}/${transportpce.db.database}?useUnicode=true&amp;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
index 62996eb44929e918af4285abf431b67702df024e..fd890251c0e2bb2d96c75908fc5ca77fa04f44a6 100644 (file)
             <groupId>com.fasterxml.jackson.core</groupId>
             <artifactId>jackson-databind</artifactId>
         </dependency>
-        <!--<dependency>
+        <!--dependency>
             <groupId>org.apache.karaf.scheduler</groupId>
             <artifactId>org.apache.karaf.scheduler.core</artifactId>
             <version>4.0.9</version>
             <scope>provided</scope>
-        </dependency-->
+        </dependency-->
     </dependencies>
 
 </project>
index f31f89da7785887f63565d8437d354a527df43dd..5279f1af326e624c74c9f1443c1d194cd0752f02 100644 (file)
@@ -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) {
index 12100208e6693957775612d416e75c8ddc4e0148..6f9d85789444d155a5c14f4282069d94968fdf9a 100644 (file)
@@ -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 -->
 <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0"
-           odl:use-default-for-reference-types="true">
+           odl:use-default-for-reference-types="true"  xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0">
 
     <reference id="dataBroker" interface="org.opendaylight.mdsal.binding.api.DataBroker"
                odl:type="default"/>
         <argument ref="deviceTransactionManager"/>
     </bean>
 
-    <bean id="iNode22" class="org.opendaylight.transportpce.inventory.INode22">
-        <argument ref="dataSource"/>
-        <argument ref="deviceTransactionManager"/>
-    </bean>
-
     <bean id="iNode121" class="org.opendaylight.transportpce.inventory.INode121">
         <argument ref="dataSource"/>
         <argument ref="deviceTransactionManager"/>
@@ -32,7 +27,7 @@
         <argument ref="dataSource"/>
         <argument ref="deviceTransactionManager"/>
         <argument ref="iNode121"/>
-        <argument ref="iNode22"/>
+
     </bean>
 
     <bean id="overlayNetworkChangeListener"