From ac9176397d4e4d640b159257cfa4c94e8da58528 Mon Sep 17 00:00:00 2001 From: Ed Warnicke Date: Mon, 18 Aug 2014 17:08:53 -0700 Subject: [PATCH] Adding Karaf features for L2switch Also added a local karaf distributions. cd distribution/karaf/target/assembly/bin ./karaf And it will come up running l2switch and restconf. Point mininet at it, pingall, and look at the host tracking in topology: GET http://localhost:8181/restconf/operational/network-topology:network-topology/ Had to force maven bundle plugin to 2.4.0 as 2.5.0 is incompatible with karaf Change-Id: I0ff09b6d330d3fc7e741cfdc8d652637fdea8ff3 Signed-off-by: Amit Mandke Signed-off-by: Ed Warnicke --- distribution/karaf/pom.xml | 260 ++++++++++++++++++ features/hosttracker/pom.xml | 104 ------- .../src/main/resources/features.xml | 10 - features/pom.xml | 175 ++++++++++-- features/src/main/resources/features.xml | 35 +++ parent/pom.xml | 7 + pom.xml | 3 +- 7 files changed, 462 insertions(+), 132 deletions(-) create mode 100644 distribution/karaf/pom.xml delete mode 100644 features/hosttracker/pom.xml delete mode 100644 features/hosttracker/src/main/resources/features.xml create mode 100644 features/src/main/resources/features.xml diff --git a/distribution/karaf/pom.xml b/distribution/karaf/pom.xml new file mode 100644 index 00000000..863b2213 --- /dev/null +++ b/distribution/karaf/pom.xml @@ -0,0 +1,260 @@ + + + 4.0.0 + + org.opendaylight.l2switch + l2switch-parent + 0.1.0-SNAPSHOT + ../../parent + + distribution-karaf + org.opendaylight.l2switch + pom + + 3.0 + + + 1.0.0-SNAPSHOT + 1.4.2-SNAPSHOT + 3.0.1 + + + + + + org.apache.karaf.features + framework + ${karaf.version} + kar + + + org.apache.karaf.features + standard + ${karaf.version} + features + xml + runtime + + + + + org.opendaylight.controller + karaf.branding + ${branding.version} + compile + + + + + org.opendaylight.controller + opendaylight-karaf-resources + ${karaf.resources.version} + + + + + org.opendaylight.controller + features-mdsal + ${mdsal.version} + features + xml + runtime + + + org.opendaylight.l2switch + features-l2switch + ${project.version} + features + xml + runtime + + + + + + + + org.eclipse.m2e + lifecycle-mapping + 1.0.0 + + + + + + org.apache.felix + maven-bundle-plugin + [0,) + + cleanVersions + + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + [0,) + + copy + unpack + + + + + + + + + org.apache.karaf.tooling + karaf-maven-plugin + [0,) + + commands-generate-help + + + + + + + + + org.fusesource.scalate + maven-scalate-plugin + [0,) + + sitegen + + + + + + + + + org.apache.servicemix.tooling + depends-maven-plugin + [0,) + + generate-depends-file + + + + + + + + + + + + + + + org.apache.karaf.tooling + karaf-maven-plugin + ${karaf.version} + true + + + standard + odl-l2switch-switch + odl-restconf + + + + + process-resources + + install-kars + + process-resources + + + package + + instance-create-archive + + + + + + org.apache.maven.plugins + maven-dependency-plugin + 2.6 + + + copy + + copy + + + generate-resources + + + + org.opendaylight.controller + karaf.branding + ${karaf.branding.version} + target/assembly/lib + karaf.branding-${branding.version}.jar + + + + + + unpack-karaf-resources + + unpack-dependencies + + prepare-package + + ${project.build.directory}/assembly + org.opendaylight.controller + opendaylight-karaf-resources + META-INF\/** + true + false + + + + + + org.apache.maven.plugins + maven-antrun-plugin + + + prepare-package + + run + + + + + + + + + + + + + + + + + + + + + + + scm:git:ssh://git.opendaylight.org:29418/l2switch.git + scm:git:ssh://git.opendaylight.org:29418/l2switch.git + HEAD + https://git.opendaylight.org/gerrit/gitweb?p=l2switch.git;a=summary + + diff --git a/features/hosttracker/pom.xml b/features/hosttracker/pom.xml deleted file mode 100644 index 0636f725..00000000 --- a/features/hosttracker/pom.xml +++ /dev/null @@ -1,104 +0,0 @@ - - - 4.0.0 - - org.opendaylight.l2switch - l2switch-parent - 0.1.0-SNAPSHOT - ../../parent - - features-hosttracker - - This karaf provides a (passive) host tracker feature. - pom - - - features.xml - - - - - true - src/main/resources - - - - - org.apache.karaf.tooling - karaf-maven-plugin - ${karaf.version} - true - - - features-create-kar - - features-create-kar - - - ${project.build.directory}/classes/${features.file} - - - - - - - org.apache.maven.plugins - maven-resources-plugin - - - filter - - resources - - generate-resources - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - attach-artifacts - - attach-artifact - - package - - - - ${project.build.directory}/classes/${features.file} - xml - features - - - ${project.build.directory}/${project.artifactId}-${project.version}.kar - kar - features - - - - - - - - - - scm:git:ssh://git.opendaylight.org:29418/l2switch.git - scm:git:ssh://git.opendaylight.org:29418/l2switch.git - HEAD - https://wiki.opendaylight.org/view/MdHostTracker - - - - org.opendaylight.controller - sal-core-api - ${mdsal.version} - - - org.opendaylight.controller - sal-core-spi - ${mdsal.version} - - - diff --git a/features/hosttracker/src/main/resources/features.xml b/features/hosttracker/src/main/resources/features.xml deleted file mode 100644 index 6c9edac2..00000000 --- a/features/hosttracker/src/main/resources/features.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - mvn:org.opendaylight.controller/features-mdsal/${mdsal.version}/xml/features - - odl-mdsal-all - mvn:org.opendaylight.l2switch.hosttracker/hosttracker-impl/${project.version} - mvn:org.opendaylight.l2switch.hosttracker/hosttracker-model/${project.version} - mvn:org.opendaylight.l2switch.addresstracker/addresstracker-model/${project.version} - - diff --git a/features/pom.xml b/features/pom.xml index aaa92f42..da893f6f 100644 --- a/features/pom.xml +++ b/features/pom.xml @@ -1,19 +1,160 @@ - - 4.0.0 - - org.opendaylight.l2switch - l2switch-parent - 0.1.0-SNAPSHOT - ../parent - - features-l2switch - ${project.artifactId} - pom - - 3.0 - - - hosttracker - + + + org.opendaylight.l2switch + l2switch-parent + 0.1.0-SNAPSHOT + ../parent + + 4.0.0 + + features-l2switch + jar + ${project.artifactId} + + + features.xml + + + + org.opendaylight.openflowplugin + features-openflowplugin + ${openflow.plugin.version} + features + xml + + + + + org.opendaylight.l2switch.packethandler + packethandler-model + ${project.version} + + + org.opendaylight.l2switch.packethandler + packethandler-impl + ${project.version} + + + org.opendaylight.l2switch.addresstracker + addresstracker-model + ${project.version} + + + org.opendaylight.l2switch.addresstracker + addresstracker-impl + ${project.version} + + + org.opendaylight.l2switch.addresstracker + addresstracker-model + ${project.version} + + + org.opendaylight.l2switch.addresstracker + addresstracker-impl + ${project.version} + + + org.opendaylight.l2switch.loopremover + loopremover-model + ${project.version} + + + org.opendaylight.l2switch.loopremover + loopremover-impl + ${project.version} + + + org.opendaylight.l2switch.hosttracker + hosttracker-model + ${project.version} + + + org.opendaylight.l2switch.hosttracker + hosttracker-impl + ${project.version} + + + org.opendaylight.l2switch.main + main-impl + ${project.version} + + + + + org.opendaylight.yangtools + features-test + 0.6.2-SNAPSHOT + + + + org.opendaylight.controller + opendaylight-karaf-empty + 1.4.2-SNAPSHOT + zip + + + + + + true + src/main/resources + + + + + org.apache.maven.plugins + maven-resources-plugin + + + filter + + resources + + generate-resources + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + attach-artifacts + + attach-artifact + + package + + + + ${project.build.directory}/classes/${features.file} + xml + features + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.16 + + + org.opendaylight.controller + opendaylight-karaf-empty + 1.4.2-SNAPSHOT + + + org.opendaylight.yangtools:features-test + + + + + \ No newline at end of file diff --git a/features/src/main/resources/features.xml b/features/src/main/resources/features.xml new file mode 100644 index 00000000..35c54799 --- /dev/null +++ b/features/src/main/resources/features.xml @@ -0,0 +1,35 @@ + + + mvn:org.opendaylight.openflowplugin/features-openflowplugin/${openflow.plugin.version}/xml/features + + odl-l2switch-switch + + + odl-l2switch-hosttracker + odl-l2switch-loopremover + mvn:org.opendaylight.l2switch.main/main-impl/${project.version} + + + odl-l2switch-addresstracker + mvn:org.opendaylight.l2switch.hosttracker/hosttracker-model/${project.version} + mvn:org.opendaylight.l2switch.hosttracker/hosttracker-impl/${project.version} + + + odl-openflowplugin-flow-services + mvn:org.opendaylight.l2switch.loopremover/loopremover-model/${project.version} + mvn:org.opendaylight.l2switch.loopremover/loopremover-impl/${project.version} + mvn:org.opendaylight.controller.thirdparty/net.sf.jung2/2.0.1 + + + odl-l2switch-packethandler + mvn:org.opendaylight.l2switch.addresstracker/addresstracker-model/${project.version} + mvn:org.opendaylight.l2switch.addresstracker/addresstracker-impl/${project.version} + + + odl-openflowplugin-southbound + mvn:org.opendaylight.l2switch.packethandler/packethandler-model/${project.version} + mvn:org.opendaylight.l2switch.packethandler/packethandler-impl/${project.version} + + \ No newline at end of file diff --git a/parent/pom.xml b/parent/pom.xml index f7c9a523..bf272446 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -23,6 +23,8 @@ 0.2.5-SNAPSHOT 0.0.3-SNAPSHOT 0.1.0-SNAPSHOT + 3.0.1 + 2.4.0 @@ -324,6 +326,11 @@ + + org.apache.felix + maven-bundle-plugin + ${bundle.plugin.version} + diff --git a/pom.xml b/pom.xml index 8972c94d..c4f2bf80 100644 --- a/pom.xml +++ b/pom.xml @@ -17,6 +17,7 @@ l2switch-main l2switch-controller-config distribution/base + distribution/karaf features @@ -41,4 +42,4 @@ ./ - + \ No newline at end of file -- 2.36.6