Fixed to config,netconf,mdsal features files
authorSurekha Bejgam <sbejgam@cisco.com>
Thu, 10 Jul 2014 22:40:43 +0000 (17:40 -0500)
committerSurekha Bejgam <sbejgam@cisco.com>
Wed, 16 Jul 2014 23:17:12 +0000 (16:17 -0700)
This patch requires:
https://git.opendaylight.org/gerrit/#/c/8962/

Things done here (apologies for it all at once
but it was the result of a lot of experimenting):

1) Moved config/mdsal/netconf features projects under
controller/features
2) Created controller/features/pom.xml to make rebuilding
features easier
3) Created netconf features project
4) Created protocol-framework features project
5) Removed 02-clustering.xml as its no longer used.

Note: These features are intentionally done in a lean
manner... very little overinclusion involved.

State of things:
Hit a snag around karaf's new JMX RBAC.
If you do
feature:install odl-config-startup
and wait for a minute or so you will get an error like:

http://pastebin.com/8J886kK9

which looks pretty bad, but is really just telling us that
when the config subsytem went to push features to JMX,
karaf's JMX RBAC blocked us.

I've filed https://bugs.opendaylight.org/show_bug.cgi?id=1359
on this, which describes two possible solutions to the problem.

Further information for onces 1359 is resolved:

The four config files its looking to push are:
ls opendaylight-karaf/target/distribution.opendaylight-karaf-1.4.2-SNAPSHOT/configuration/initial
00-netty.xml 01-md-sal.xml 03-toaster-sample.xml

You can get the requisite capabilities for 00-netty.xml should be installed
by doing
feature:install odl-config-netty
(which depends on odl-config-startup).
For 01-md-sal.xml to be processed you will need to fix up the md-sal
features.  To get 03-toaster-sample.xml processed you will need a feature
for toaster.  I recommend deleting 01-md-sal.xml and 03-toaster-sample.xml
and just playing with 00-netty.xml till you can get past the stuck
places with JMX.

Once you *think* you are past 1359, verify by pointing
jconsole at karaf and looking at MBeans and drilling down under
org.opendaylight until you find the Modules.  You should see more
than 'shutdown' there.

Recommended Next steps:
1)  Fix bug 1359 -  picked option1 to proceed
2)  Fix up the md-sal feature at least enough to get 01-md-sal.xml
working - Done
3)  Get a controller/features/toaster going and get 03-toaster-sample.xml
working. - Toaster is working

********* Had to install in this order to get features installed correctly ********

feature:install yangtools-all

feature:install base-all

feature:install odl-mdsal-commons

feature:install odl-config-api

feature:install odl-config-netty-config-api

feature:install odl-protocol-framework

feature:install odl-netconf-api

feature:install odl-netconf-mapping-api

feature:install odl-netconf-util

feature:install odl-netconf-netty-util

feature:install odl-netconf-impl

feature:install odl-config-core

feature:install odl-config-manager

feature:install odl-config-persister

feature:install odl-config-api

feature:install odl-config-netty-api

feature:install odl-config-netty-config-api

feature:install odl-config-netty

feature:install odl-config-startup

feature:install odl-config-netconf-connector

feature:install odl-mdsal-all

feature:install odl-mdsal-toaster

feature:install yangtools-restconf

feature:install odl-adsal-all

feature:install odl-netconf-misc

feature:install odl-config-dispatcher

feature:install odl-mdsal-misc

********************************************************************

I apologize for the size and complexity of this patch.  But it seemed
important to get it out to folks.  Please feel free to break it down
into more managable pieces if you are so inclined.

Change-Id: I6384d57d4fe623221e9c81d8bfb547277ab0e051
Signed-off-by: Ed Warnicke <eaw@cisco.com>
Signed-off-by: Surekha Bejgam <sbejgam@cisco.com>
pom.xml [new file with mode: 0644]
src/main/resources/features.xml [new file with mode: 0644]

diff --git a/pom.xml b/pom.xml
new file mode 100644 (file)
index 0000000..f0208d6
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.opendaylight.controller</groupId>
+    <artifactId>commons.opendaylight</artifactId>
+    <version>1.4.2-SNAPSHOT</version>
+    <relativePath>../../opendaylight/commons/opendaylight</relativePath>
+  </parent>
+  <artifactId>features-odl-protocol-framework</artifactId>
+  <version>${protocol-framework.version}</version>
+  <packaging>pom</packaging>
+
+  <properties>
+    <features.file>features.xml</features.file>
+  </properties>
+
+  <dependencies></dependencies>
+
+  <build>
+    <resources>
+      <resource>
+        <filtering>true</filtering>
+        <directory>src/main/resources</directory>
+      </resource>
+    </resources>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-resources-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>filter</id>
+            <goals>
+              <goal>resources</goal>
+            </goals>
+            <phase>generate-resources</phase>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>build-helper-maven-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>attach-artifacts</id>
+            <goals>
+              <goal>attach-artifact</goal>
+            </goals>
+            <phase>package</phase>
+            <configuration>
+              <artifacts>
+                <artifact>
+                  <file>${project.build.directory}/classes/${features.file}</file>
+                  <type>xml</type>
+                  <classifier>features</classifier>
+                </artifact>
+              </artifacts>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+  <scm>
+    <connection>scm:git:ssh://git.opendaylight.org:29418/controller.git</connection>
+    <developerConnection>scm:git:ssh://git.opendaylight.org:29418/controller.git</developerConnection>
+    <tag>HEAD</tag>
+    <url>https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL</url>
+  </scm>
+</project>
diff --git a/src/main/resources/features.xml b/src/main/resources/features.xml
new file mode 100644 (file)
index 0000000..d2560f5
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<features name="odl-protocol-framework-${protocol-framework.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.2.0"
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+          xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.2.0 http://karaf.apache.org/xmlns/features/v1.2.0">
+  <repository>mvn:org.opendaylight.controller/config-features/${config.version}/xml/features</repository>
+  <feature name='odl-protocol-framework' version='${project.version}'>
+    <bundle>mvn:org.opendaylight.controller/protocol-framework/${protocol-framework.version}</bundle>
+    <feature version='${config.version}'>odl-config-api</feature> <!-- needed by netty-config-api -->
+    <feature version='${config.version}'>odl-config-netty-config-api</feature> <!-- needed by netty-config-api -->
+  </feature>
+</features>
\ No newline at end of file