Fix feature issues 02/103702/1
authorGilles Thouenon <gilles.thouenon@orange.com>
Wed, 7 Dec 2022 17:49:35 +0000 (18:49 +0100)
committerGilles Thouenon <gilles.thouenon@orange.com>
Mon, 19 Dec 2022 10:03:40 +0000 (11:03 +0100)
Activating SingleFeatureTest for odl-transportpce-tapi feature reveals
an issue to install the feature.

- declare in tpce features the upstream feature dependencies
- use transportpce-models-artifacts
- activate features tests
- fix issue in transportpce-olm blueprint.xml
- fix olm issue in lighty
- move config files from features to bundles to have them installed
before testing the feature

Signed-off-by: Gilles Thouenon <gilles.thouenon@orange.com>
Change-Id: I9a5e6d862ea29acc5e2b78a38c0c307b4d207770

24 files changed:
dmaap-client/pom.xml
dmaap-client/src/main/resources/org.opendaylight.transportpce.dmaap.cfg [moved from features/odl-transportpce-dmaap-client/src/main/resources/org.opendaylight.transportpce.dmaap.cfg with 100% similarity]
features/odl-transportpce-dmaap-client/pom.xml
features/odl-transportpce-dmaap-client/src/main/feature/feature.xml
features/odl-transportpce-inventory/pom.xml
features/odl-transportpce-inventory/src/main/feature/feature.xml
features/odl-transportpce-nbinotifications/pom.xml
features/odl-transportpce-nbinotifications/src/main/feature/feature.xml
features/odl-transportpce-swagger/pom.xml
features/odl-transportpce-tapi/pom.xml
features/odl-transportpce/pom.xml
features/odl-transportpce/src/main/feature/feature.xml
inventory/pom.xml
inventory/src/main/resources/org.opendaylight.transportpce.job.cfg [moved from features/odl-transportpce-inventory/src/main/resources/org.opendaylight.transportpce.job.cfg with 100% similarity]
inventory/src/main/resources/org.ops4j.datasource-transporpce.cfg [moved from features/odl-transportpce-inventory/src/main/resources/org.ops4j.datasource-transporpce.cfg with 100% similarity]
lighty/src/main/java/io/lighty/controllers/tpce/module/TransportPCEImpl.java
nbinotifications/pom.xml
nbinotifications/src/main/resources/org.opendaylight.transportpce.nbinotifications.cfg [moved from features/odl-transportpce-nbinotifications/src/main/resources/org.opendaylight.transportpce.nbinotifications.cfg with 100% similarity]
olm/pom.xml
olm/src/main/java/org/opendaylight/transportpce/olm/OlmProvider.java
olm/src/main/resources/OSGI-INF/blueprint/olm-blueprint.xml
olm/src/main/resources/org.opendaylight.transportpce.cfg [moved from features/odl-transportpce/src/main/resources/org.opendaylight.transportpce.cfg with 100% similarity]
renderer/src/main/resources/OSGI-INF/blueprint/renderer-blueprint.xml
servicehandler/src/main/resources/OSGI-INF/blueprint/servicehandler-blueprint.xml

index c060234fb965d51855c465711a72a80bf8ccc22b..2b582a566a8444d25db52ecc130c1be11e706713 100644 (file)
       <scope>test</scope>
     </dependency>
   </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>build-helper-maven-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>attach-dmaap-artifact</id>
+            <goals>
+              <goal>attach-artifact</goal>
+            </goals>
+            <configuration>
+              <artifacts>
+                <artifact>
+                  <file>${basedir}/src/main/resources/org.opendaylight.transportpce.dmaap.cfg</file>
+                  <type>cfg</type>
+                  <classifier>config</classifier>
+                </artifact>
+              </artifacts>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
 </project>
index f88a8342953d8cb91b8e55d3d941a1a0e450cb8e..f80fba3b953c5a5855f595bc655aadd29359b5ac 100644 (file)
@@ -22,8 +22,7 @@
   <name>OpenDaylight :: transportpce :: dmaap-client</name>
 
   <properties>
-    <!-- skipped because we are using config file as artifact and it is not installed before running test -->
-    <skip.karaf.featureTest>true</skip.karaf.featureTest>
+    <skip.karaf.featureTest>false</skip.karaf.featureTest>
   </properties>
 
   <dependencies>
       </exclusions>
     </dependency>
   </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>build-helper-maven-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>attach-dmaap-artifact</id>
-            <phase>test</phase>
-            <goals>
-              <goal>attach-artifact</goal>
-            </goals>
-            <configuration>
-              <artifacts>
-                <artifact>
-                  <file>${basedir}/src/main/resources/org.opendaylight.transportpce.dmaap.cfg</file>
-                  <type>cfg</type>
-                  <classifier>config</classifier>
-                </artifact>
-              </artifacts>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
-  </build>
 </project>
index 0031ef8c322d885eb2d76257fa6c638716ac64a8..7fd90d6faf8905ff4197adddf5df07c80c85b5bc 100644 (file)
@@ -6,7 +6,7 @@
 <features xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" name="odl-transportpce-dmaap-client">
     <feature name="odl-transportpce-dmaap-client">
         <configfile finalname="etc/org.opendaylight.transportpce.dmaap.cfg" override="false">
-            mvn:${project.groupId}/${project.artifactId}/${project.version}/cfg/config
+            mvn:${project.groupId}/transportpce-dmaap-client/${project.version}/cfg/config
         </configfile>
     </feature>
 </features>
\ No newline at end of file
index 9d9a52a1996b1de0a0d1eb862067ff232b6d6a54..ec69e46a8a89fd607b6f247312d9363cbe21992f 100644 (file)
@@ -20,6 +20,9 @@
   <name>OpenDaylight :: transportpce :: Inventory</name>
 
   <properties>
+    <mdsal.version>10.0.5</mdsal.version>
+    <netconf.version>4.0.4</netconf.version>
+    <transportpce.models.version>17.1.0-SNAPSHOT</transportpce.models.version>
     <transportpce.db.host>localhost:3306</transportpce.db.host>
     <transportpce.db.database>transportpce</transportpce.db.database>
     <transportpce.db.username>root</transportpce.db.username>
     <transporpce.device.backup.prefix></transporpce.device.backup.prefix>
     <transporpce.device.backup.period>600</transporpce.device.backup.period>
     <!-- skipping single feature test because DataSource is not available in Pax4j (H2 possible workaround) -->
-    <skip.karaf.featureTest>true</skip.karaf.featureTest>
+    <skip.karaf.featureTest>false</skip.karaf.featureTest>
   </properties>
 
+  <dependencyManagement>
+    <dependencies>
+      <dependency>
+        <groupId>org.opendaylight.transportpce.models</groupId>
+        <artifactId>transportpce-models-artifacts</artifactId>
+        <version>${transportpce.models.version}</version>
+        <type>pom</type>
+        <scope>import</scope>
+      </dependency>
+      <dependency>
+        <groupId>org.opendaylight.mdsal</groupId>
+        <artifactId>mdsal-artifacts</artifactId>
+        <version>${mdsal.version}</version>
+        <scope>import</scope>
+        <type>pom</type>
+      </dependency>
+      <dependency>
+        <groupId>org.opendaylight.netconf</groupId>
+        <artifactId>netconf-artifacts</artifactId>
+        <version>${netconf.version}</version>
+        <type>pom</type>
+        <scope>import</scope>
+      </dependency>
+    </dependencies>
+  </dependencyManagement>
+
   <dependencies>
     <dependency>
       <groupId>org.opendaylight.transportpce</groupId>
       <classifier>features</classifier>
       <type>xml</type>
     </dependency>
+    <dependency>
+      <groupId>org.opendaylight.mdsal</groupId>
+      <artifactId>odl-mdsal-binding-base</artifactId>
+      <classifier>features</classifier>
+      <type>xml</type>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.netconf</groupId>
+      <artifactId>odl-netconf-util</artifactId>
+      <classifier>features</classifier>
+      <type>xml</type>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.netconf</groupId>
+      <artifactId>odl-netconf-mapping-api</artifactId>
+      <classifier>features</classifier>
+      <type>xml</type>
+    </dependency>
     <dependency>
       <groupId>org.opendaylight.transportpce</groupId>
       <artifactId>transportpce-inventory</artifactId>
       <version>${project.version}</version>
     </dependency>
   </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <artifactId>maven-resources-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>copy-resources</id>
-            <phase>validate</phase>
-            <goals>
-              <goal>copy-resources</goal>
-            </goals>
-            <configuration>
-              <outputDirectory>${basedir}/target/resources</outputDirectory>
-              <resources>
-                <resource>
-                  <directory>src/main/resources</directory>
-                  <filtering>true</filtering>
-                </resource>
-              </resources>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>build-helper-maven-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>attach-db-artifact</id>
-            <phase>package</phase>
-            <goals>
-              <goal>attach-artifact</goal>
-            </goals>
-            <configuration>
-              <artifacts>
-                <artifact>
-                  <file>target/resources/org.ops4j.datasource-transporpce.cfg</file>
-                  <type>cfg</type>
-                  <classifier>datasource</classifier>
-                </artifact>
-                <artifact>
-                  <file>target/resources/org.opendaylight.transportpce.job.cfg</file>
-                  <type>cfg</type>
-                  <classifier>config</classifier>
-                </artifact>
-              </artifacts>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
-  </build>
 </project>
index 0c9de2a06acb96b530aba9367e0665bde9f1be59..fe40883a2be3bead391af4eca4625487bc1fa03b 100644 (file)
@@ -5,10 +5,10 @@
         <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
+            mvn:${project.groupId}/transportpce-inventory/${project.version}/cfg/datasource
         </configfile>
         <configfile finalname="etc/org.opendaylight.transportpce.job.cfg" override="false">
-            mvn:${project.groupId}/${project.artifactId}/${project.version}/cfg/config
+            mvn:${project.groupId}/transportpce-inventory/${project.version}/cfg/config
         </configfile>
     </feature>
 </features>
\ No newline at end of file
index 5d96b2bd21e00ec81c343d5605b1f0454f73ae12..f0d99a1596c30e97f0e3ce4fdc320784447aeb4b 100644 (file)
@@ -22,8 +22,7 @@
   <name>OpenDaylight :: transportpce :: nbinotifications</name>
 
   <properties>
-    <!-- skipped because we are using config file as artifact and it is not installed before running test -->
-    <skip.karaf.featureTest>true</skip.karaf.featureTest>
+    <skip.karaf.featureTest>false</skip.karaf.featureTest>
   </properties>
 
   <dependencies>
       <version>${project.version}</version>
     </dependency>
   </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>build-helper-maven-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>attach-dmaap-artifact</id>
-            <phase>package</phase>
-            <goals>
-              <goal>attach-artifact</goal>
-            </goals>
-            <configuration>
-              <artifacts>
-                <artifact>
-                  <file>${basedir}/src/main/resources/org.opendaylight.transportpce.nbinotifications.cfg</file>
-                  <type>cfg</type>
-                  <classifier>config</classifier>
-                </artifact>
-              </artifacts>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
-  </build>
 </project>
index 5e99a524176d3dd9708f84a217b000c1f0094f66..e2cca34aadeddf4b2b820027848aeebc1f14cd32 100644 (file)
@@ -6,7 +6,7 @@
 <features xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" name="odl-transportpce-nbinotifications">
     <feature name="odl-transportpce-nbinotifications">
         <configfile finalname="etc/org.opendaylight.transportpce.nbinotififications.cfg" override="false">
-            mvn:${project.groupId}/${project.artifactId}/${project.version}/cfg/config
+            mvn:${project.groupId}/transportpce-nbinotifications/${project.version}/cfg/config
         </configfile>
     </feature>
 </features>
\ No newline at end of file
index 43d0ce2d0fb5691fafdc4b3eca0925cebf080317..afc0393ebfeba222c9d3e988da47d980ba2dea66 100644 (file)
@@ -25,6 +25,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
   <properties>
     <netconf.version>4.0.4</netconf.version>
     <configfile.directory>etc/opendaylight/karaf</configfile.directory>
+    <skip.karaf.featureTest>false</skip.karaf.featureTest>
   </properties>
 
   <dependencyManagement>
@@ -47,17 +48,4 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
       <type>xml</type>
     </dependency>
   </dependencies>
-
-  <!-- skipping test since this is an umbrella project / folder -->
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <configuration>
-          <skipTests>true</skipTests>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
 </project>
index 9e83100310e55ff379be48fe825eeb2018da6fad..e972c48e0939aa68772b3e2842e2914f715311b5 100644 (file)
@@ -23,14 +23,69 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
   <name>OpenDaylight :: transportpce :: tapi</name>
 
   <properties>
+    <mdsal.version>10.0.5</mdsal.version>
+    <netconf.version>4.0.4</netconf.version>
     <transportpce.models.version>17.1.0-SNAPSHOT</transportpce.models.version>
+    <skip.karaf.featureTest>false</skip.karaf.featureTest>
   </properties>
 
+  <dependencyManagement>
+    <dependencies>
+      <dependency>
+        <groupId>org.opendaylight.transportpce.models</groupId>
+        <artifactId>transportpce-models-artifacts</artifactId>
+        <version>${transportpce.models.version}</version>
+        <type>pom</type>
+        <scope>import</scope>
+      </dependency>
+      <dependency>
+        <groupId>org.opendaylight.mdsal</groupId>
+        <artifactId>mdsal-artifacts</artifactId>
+        <version>10.0.5</version>
+        <scope>import</scope>
+        <type>pom</type>
+      </dependency>
+      <dependency>
+        <groupId>org.opendaylight.netconf</groupId>
+        <artifactId>netconf-artifacts</artifactId>
+        <version>${netconf.version}</version>
+        <type>pom</type>
+        <scope>import</scope>
+      </dependency>
+    </dependencies>
+  </dependencyManagement>
+
   <dependencies>
     <dependency>
       <groupId>org.opendaylight.transportpce.models</groupId>
-      <artifactId>tapi-2.1.1</artifactId>
-      <version>${transportpce.models.version}</version>
+      <artifactId>odl-tapi-models</artifactId>
+      <classifier>features</classifier>
+      <type>xml</type>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.mdsal.model</groupId>
+      <artifactId>odl-mdsal-model-rfc8345</artifactId>
+      <classifier>features</classifier>
+      <type>xml</type>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.netconf</groupId>
+      <artifactId>odl-netconf-connector</artifactId>
+      <classifier>features</classifier>
+      <type>xml</type>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.netconf</groupId>
+      <artifactId>odl-netconf-all</artifactId>
+      <classifier>features</classifier>
+      <type>xml</type>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>odl-transportpce</artifactId>
+      <version>${project.version}</version>
+      <classifier>features</classifier>
+      <type>xml</type>
     </dependency>
     <dependency>
       <groupId>${project.groupId}</groupId>
@@ -38,17 +93,4 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
       <version>${project.version}</version>
     </dependency>
   </dependencies>
-
-  <!-- skipping test since this is an umbrella project / folder -->
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <configuration>
-          <skipTests>true</skipTests>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
 </project>
index b7a87d7e17602b6c96f6748ae9e940988fa98b65..0279d98a24f0e15495bf3c85a4c3efd7c17b6f67 100644 (file)
@@ -26,10 +26,18 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
     <netconf.version>4.0.4</netconf.version>
     <transportpce.models.version>17.1.0-SNAPSHOT</transportpce.models.version>
     <configfile.directory>etc/opendaylight/karaf</configfile.directory>
+    <skip.karaf.featureTest>false</skip.karaf.featureTest>
   </properties>
 
   <dependencyManagement>
     <dependencies>
+      <dependency>
+        <groupId>org.opendaylight.transportpce.models</groupId>
+        <artifactId>transportpce-models-artifacts</artifactId>
+        <version>${transportpce.models.version}</version>
+        <type>pom</type>
+        <scope>import</scope>
+      </dependency>
       <dependency>
         <groupId>org.opendaylight.netconf</groupId>
         <artifactId>netconf-artifacts</artifactId>
@@ -44,7 +52,6 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
     <dependency>
       <groupId>org.opendaylight.transportpce.models</groupId>
       <artifactId>odl-openroadm-models</artifactId>
-      <version>${transportpce.models.version}</version>
       <classifier>features</classifier>
       <type>xml</type>
     </dependency>
@@ -102,39 +109,4 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
       <type>xml</type>
     </dependency>
   </dependencies>
-
-  <!-- skipping test since this is an umbrella project / folder -->
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <configuration>
-          <skipTests>true</skipTests>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>build-helper-maven-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>attach-artifact</id>
-            <phase>test</phase>
-            <goals>
-              <goal>attach-artifact</goal>
-            </goals>
-            <configuration>
-              <artifacts>
-                <artifact>
-                  <file>${basedir}/src/main/resources/org.opendaylight.transportpce.cfg</file>
-                  <type>cfg</type>
-                  <classifier>config</classifier>
-                </artifact>
-              </artifacts>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
-  </build>
 </project>
index 13c35983cec85de0cd208d0a9f775e90496eea16..e0df389c7824ac329d58970689af1057b8547d32 100644 (file)
@@ -6,7 +6,7 @@
 <features xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" name="odl-transportpce">
     <feature name="odl-transportpce">
         <configfile finalname="etc/org.opendaylight.transportpce.cfg" override="true">
-            mvn:${project.groupId}/${project.artifactId}/${project.version}/cfg/config
+            mvn:${project.groupId}/transportpce-olm/${project.version}/cfg/config
         </configfile>
     </feature>
 </features>
\ No newline at end of file
index 781ab9ca096940cddfa30fe7f1057228aef5204b..24e7c933d36650bee768fcc835596b70465d85d8 100644 (file)
       <artifactId>sal-netconf-connector</artifactId>
     </dependency>
   </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-resources-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>copy-resources</id>
+            <phase>validate</phase>
+            <goals>
+              <goal>copy-resources</goal>
+            </goals>
+            <configuration>
+              <outputDirectory>${basedir}/target/resources</outputDirectory>
+              <resources>
+                <resource>
+                  <directory>src/main/resources</directory>
+                  <filtering>true</filtering>
+                </resource>
+              </resources>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>build-helper-maven-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>attach-db-artifact</id>
+            <goals>
+              <goal>attach-artifact</goal>
+            </goals>
+            <configuration>
+              <artifacts>
+                <artifact>
+                  <file>target/resources/org.ops4j.datasource-transporpce.cfg</file>
+                  <type>cfg</type>
+                  <classifier>datasource</classifier>
+                </artifact>
+                <artifact>
+                  <file>target/resources/org.opendaylight.transportpce.job.cfg</file>
+                  <type>cfg</type>
+                  <classifier>config</classifier>
+                </artifact>
+              </artifacts>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
 </project>
index a10b7f04bf50505210c020828200930af5f49938..970874bf311c1f60600c85902562ecb270e1e87b 100644 (file)
@@ -174,8 +174,8 @@ public class TransportPCEImpl extends AbstractLightyModule implements TransportP
                 crossConnect, deviceTransactionManager, olmtimer1, olmtimer2);
         OlmPowerService olmPowerService = new OlmPowerServiceImpl(lightyServices.getBindingDataBroker(), powerMgmt,
                 deviceTransactionManager, portMapping, mappingUtils, openRoadmInterfaces);
-        olmProvider = new OlmProvider(lightyServices.getRpcProviderService(), olmPowerService);
         TransportpceOlmService olmPowerServiceRpc = new OlmPowerServiceRpcImpl(olmPowerService);
+        olmProvider = new OlmProvider(lightyServices.getRpcProviderService(), olmPowerServiceRpc);
 
         LOG.info("Creating renderer beans ...");
         OpenRoadmInterfaceFactory openRoadmInterfaceFactory = initOpenRoadmFactory(mappingUtils, openRoadmInterfaces,
index f7071d930d98d8c3c6a5211565b7e0c1aa563f09..55d850b4f0691d54743b1479cb15ca1b610ee21b 100644 (file)
       <scope>test</scope>
     </dependency>
   </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>build-helper-maven-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>attach-dmaap-artifact</id>
+            <goals>
+              <goal>attach-artifact</goal>
+            </goals>
+            <configuration>
+              <artifacts>
+                <artifact>
+                  <file>${basedir}/src/main/resources/org.opendaylight.transportpce.nbinotifications.cfg</file>
+                  <type>cfg</type>
+                  <classifier>config</classifier>
+                </artifact>
+              </artifacts>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
 </project>
index a3d6c1840189b22c226b06108975734b76a1c6b5..bd3325eaa0074175c4b7d5583e2a5bb8247ba948 100644 (file)
@@ -139,4 +139,30 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
       <scope>test</scope>
     </dependency>
   </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>build-helper-maven-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>attach-artifact</id>
+            <goals>
+              <goal>attach-artifact</goal>
+            </goals>
+            <configuration>
+              <artifacts>
+                <artifact>
+                  <file>${basedir}/src/main/resources/org.opendaylight.transportpce.cfg</file>
+                  <type>cfg</type>
+                  <classifier>config</classifier>
+                </artifact>
+              </artifacts>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
 </project>
index db2865167ea053f03ff0185692c4b163ccfe77dc..7ab54ce159a3fdd03f23d9a0aee18beee09047d3 100644 (file)
@@ -9,7 +9,6 @@
 package org.opendaylight.transportpce.olm;
 
 import org.opendaylight.mdsal.binding.api.RpcProviderService;
-import org.opendaylight.transportpce.olm.service.OlmPowerService;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev210618.TransportpceOlmService;
 import org.opendaylight.yangtools.concepts.ObjectRegistration;
 import org.slf4j.Logger;
@@ -21,19 +20,19 @@ import org.slf4j.LoggerFactory;
 public class OlmProvider {
     private static final Logger LOG = LoggerFactory.getLogger(OlmProvider.class);
     private final RpcProviderService rpcProviderService;
-    private final OlmPowerService olmPowerService;
+    private final TransportpceOlmService olmPowerServiceRpc;
     private ObjectRegistration<TransportpceOlmService> olmRPCRegistration;
 
     /**
      * Instantiates a new olm provider.
-     * @param olmPowerService
-     *            implementation of OlmService
+     * @param olmPowerServiceRpc
+     *            implementation of TransportpceOlmService
      * @param rpcProviderService
      *            the rpc provider service
      */
-    public OlmProvider(final RpcProviderService rpcProviderService, final OlmPowerService olmPowerService) {
+    public OlmProvider(final RpcProviderService rpcProviderService, final TransportpceOlmService olmPowerServiceRpc) {
         this.rpcProviderService = rpcProviderService;
-        this.olmPowerService = olmPowerService;
+        this.olmPowerServiceRpc = olmPowerServiceRpc;
     }
 
     /**
@@ -43,7 +42,7 @@ public class OlmProvider {
         LOG.info("OlmProvider Session Initiated");
         // Initializing Notification module
         olmRPCRegistration = rpcProviderService.registerRpcImplementation(TransportpceOlmService.class,
-                new OlmPowerServiceRpcImpl(this.olmPowerService));
+                this.olmPowerServiceRpc);
     }
 
     /**
index dee2972ff9576364112e86fee5e8a8982fee0e24..2e00ba6c8b6206813fdc445fccd774d28bfadef0 100644 (file)
@@ -37,9 +37,16 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
         interface="org.opendaylight.transportpce.common.mapping.PortMapping" />
   <reference id="mappingUtils" interface="org.opendaylight.transportpce.common.mapping.MappingUtils" />
 
-  <bean id="olmPowerServiceImpl"
-        class="org.opendaylight.transportpce.olm.service.OlmPowerServiceImpl"
-        init-method="init" destroy-method="close">
+  <bean id="powerMgmt" class="org.opendaylight.transportpce.olm.power.PowerMgmtImpl" >
+    <argument ref="dataBroker" />
+    <argument ref="openRoadmInterfaces" />
+    <argument ref="crossConnect" />
+    <argument ref="deviceTransactionManager" />
+    <argument value="${timer1}"/>
+    <argument value="${timer2}"/>
+  </bean>
+
+  <bean id="olmPowerServiceImpl" class="org.opendaylight.transportpce.olm.service.OlmPowerServiceImpl">
     <argument ref="dataBroker" />
     <argument ref="powerMgmt" />
     <argument ref="deviceTransactionManager" />
@@ -48,22 +55,16 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
     <argument ref="openRoadmInterfaces" />
   </bean>
 
-  <bean id="powerMgmt" class="org.opendaylight.transportpce.olm.power.PowerMgmtImpl" >
-    <argument ref="dataBroker" />
-    <argument ref="openRoadmInterfaces" />
-    <argument ref="crossConnect" />
-    <argument ref="deviceTransactionManager" />
-    <argument value="${timer1}"/>
-    <argument value="${timer2}"/>
+  <bean id="olmPowerServiceRpcImpl" class="org.opendaylight.transportpce.olm.OlmPowerServiceRpcImpl">
+    <argument ref="olmPowerServiceImpl" />
   </bean>
 
-  <bean id="provider"
-        class="org.opendaylight.transportpce.olm.OlmProvider"
+  <bean id="provider" class="org.opendaylight.transportpce.olm.OlmProvider"
         init-method="init" destroy-method="close">
     <argument ref="rpcProviderService" />
-    <argument ref="olmPowerServiceImpl" />
+    <argument ref="olmPowerServiceRpcImpl" />
   </bean>
 
-  <service ref="olmPowerServiceImpl"
-        interface="org.opendaylight.transportpce.olm.service.OlmPowerService"/>
-</blueprint>
+  <service ref="olmPowerServiceRpcImpl"
+           interface="org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev210618.TransportpceOlmService"/>
+  </blueprint>
index 72333afe9639fed9512656e883ce89ad2fc67721..38c7147dc53affb1214a2729b44373a893bd4379 100644 (file)
@@ -11,7 +11,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0"
   odl:use-default-for-reference-types="true">
 
- <reference id="dataBroker" interface="org.opendaylight.mdsal.binding.api.DataBroker"/>
 <reference id="dataBroker" interface="org.opendaylight.mdsal.binding.api.DataBroker"/>
   <reference id="notificationPublishService"
         interface="org.opendaylight.mdsal.binding.api.NotificationPublishService"/>
   <reference id="rpcProviderService" interface="org.opendaylight.mdsal.binding.api.RpcProviderService" />
@@ -21,9 +21,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <reference id="crossConnect" interface="org.opendaylight.transportpce.common.crossconnect.CrossConnect" />
   <reference id="mappingUtils" interface="org.opendaylight.transportpce.common.mapping.MappingUtils"/>
   <reference id="networkModelService" interface="org.opendaylight.transportpce.networkmodel.service.NetworkModelService"/>
-
-  <odl:rpc-service id="olmService"
-      interface="org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev210618.TransportpceOlmService"/>
+  <reference id="olmService" interface="org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev210618.TransportpceOlmService"/>
 
   <bean id="openRoadmInterface121"
         class="org.opendaylight.transportpce.renderer.openroadminterface.OpenRoadmInterface121">
index affeddf0dd85cd0e7f949feb9c499fb93a02e69c..730c10227c5eb23f19ed1f4bd42c698a8d53067d 100644 (file)
@@ -87,8 +87,6 @@ Author: Martial Coulibaly <martial.coulibaly@gfi.com> on behalf of Orange
 
     <service ref="serviceHandlerImpl"
         interface="org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.OrgOpenroadmServiceService"/>
-
     <service ref="serviceDatastoreOperation"
-             interface="org.opendaylight.transportpce.servicehandler.service.ServiceDataStoreOperations"/>
-
+        interface="org.opendaylight.transportpce.servicehandler.service.ServiceDataStoreOperations"/>
 </blueprint>