Merge " Update Mininet VagrantBox (part 2)"
authorMadhu Venugopal <mavenugo@gmail.com>
Tue, 19 Aug 2014 00:21:07 +0000 (00:21 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Tue, 19 Aug 2014 00:21:07 +0000 (00:21 +0000)
commons/parent/pom.xml
features/src/main/resources/features.xml
of-extension/nx-ofjava/pom.xml
plugin-shell/pom.xml [new file with mode: 0644]
plugin-shell/src/main/java/org/opendaylight/ovsdb/plugin/shell/PrintCache.java [new file with mode: 0644]
plugin-shell/src/main/resources/OSGI-INF/blueprint/blueprint.xml [new file with mode: 0644]
plugin/pom.xml
plugin/src/main/java/org/opendaylight/ovsdb/plugin/api/OvsVswitchdSchemaConstants.java
pom.xml
utils/mdsal-openflow/pom.xml

index 0354977130a6b7e767079ec350bc9390a006bae3..0ee3cd6486f00d2f39d67f8d379f739715f60b75 100755 (executable)
@@ -26,6 +26,7 @@
     <!-- OVSB Component Versions -->
     <ovsdb.library.version>1.0.0-SNAPSHOT</ovsdb.library.version>
     <ovsdb.plugin.version>1.0.0-SNAPSHOT</ovsdb.plugin.version>
+    <plugin.shell.version>1.0.0-SNAPSHOT</plugin.shell.version>
     <openstack.netvirt.version>1.0.0-SNAPSHOT</openstack.netvirt.version>
     <openstack.netvirt.providers.version>1.0.0-SNAPSHOT</openstack.netvirt.providers.version>
     <ovsdb.northbound.version>0.6.0-SNAPSHOT</ovsdb.northbound.version>
@@ -69,6 +70,7 @@
     <portlet.version>2.0</portlet.version>
     <powermock.version>1.5.2</powermock.version>
     <httpcomponents.version>4.2.1</httpcomponents.version>
+    <karaf.shell.version>3.0.0</karaf.shell.version>
   </properties>
 
   <dependencyManagement>
index 27defdbfd164dc57daee68283d7b84fbbdcbbaba..7458cac9e8829aef0ff4e4262e3a9e24e057e58d 100644 (file)
@@ -31,6 +31,7 @@
         <feature version="${schema.openvswitch.version}">odl-ovsdb-schema-openvswitch</feature>
         <feature version="${schema.hardwarevtep.version}">odl-ovsdb-schema-hardwarevtep</feature>
         <bundle>mvn:org.opendaylight.ovsdb/plugin/${ovsdb.plugin.version}</bundle>
+        <bundle>mvn:org.opendaylight.ovsdb/plugin-shell/${plugin.shell.version}</bundle>
     </feature>
 
     <feature name="odl-ovsdb-northbound" description="OpenDaylight :: OVSDB :: Northbound" version='${ovsdb.northbound.version}'>
index f8cacbb2008227005b6355efd036ee2d1f93b7d4..7d73616ba1cea15ac9edc6aa733b64bf864723b9 100644 (file)
@@ -13,7 +13,7 @@
     <artifactId>of-extension.nx-ofjava</artifactId>
     <version>${ovsdb.ofextension.version}</version>
     <packaging>bundle</packaging>
-    <name>Opendaylight OVS NX Extensions for OpenflowJava Flow Models</name>
+    <name>Opendaylight OVS NX for OpenflowJava Models</name>
 
     <dependencies>
         <dependency>
diff --git a/plugin-shell/pom.xml b/plugin-shell/pom.xml
new file mode 100644 (file)
index 0000000..bee4488
--- /dev/null
@@ -0,0 +1,55 @@
+<?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.ovsdb</groupId>
+    <artifactId>commons</artifactId>
+    <version>1.2.0-SNAPSHOT</version>
+    <relativePath>../commons/parent</relativePath>
+  </parent>
+
+  <artifactId>plugin-shell</artifactId>
+  <version>1.0.0-SNAPSHOT</version>
+  <name>OpenDaylight OVSDB Plugin Shell</name>
+  <packaging>bundle</packaging>
+
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.karaf.shell</groupId>
+      <artifactId>org.apache.karaf.shell.console</artifactId>
+      <version>${karaf.shell.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.ovsdb</groupId>
+      <artifactId>plugin</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.controller</groupId>
+      <artifactId>sal</artifactId>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+        <version>2.3.6</version>
+        <extensions>true</extensions>
+        <configuration>
+          <instructions>
+            <Import-Package>org.apache.felix.service.command,
+              org.apache.karaf.shell.commands,
+              org.apache.karaf.shell.console,
+              *</Import-Package>
+          </instructions>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>
diff --git a/plugin-shell/src/main/java/org/opendaylight/ovsdb/plugin/shell/PrintCache.java b/plugin-shell/src/main/java/org/opendaylight/ovsdb/plugin/shell/PrintCache.java
new file mode 100644 (file)
index 0000000..4140d82
--- /dev/null
@@ -0,0 +1,40 @@
+/**
+ * Copyright (C) 2013 Red Hat, Inc.
+ *
+ * This program and the accompanying materials 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
+ *
+ * Authors : Madhu Venugopal
+ */
+package org.opendaylight.ovsdb.plugin.shell;
+
+import java.util.Collection;
+import java.util.concurrent.ConcurrentMap;
+
+import org.apache.felix.gogo.commands.Argument;
+import org.apache.felix.gogo.commands.Command;
+import org.apache.karaf.shell.console.OsgiCommandSupport;
+import org.opendaylight.controller.sal.core.Node;
+import org.opendaylight.ovsdb.lib.notation.Column;
+import org.opendaylight.ovsdb.lib.notation.Row;
+import org.opendaylight.ovsdb.plugin.api.OvsdbInventoryService;
+
+@Command(scope = "ovs", name = "printCache", description="Prints OVSDB Cache")
+public class PrintCache extends OsgiCommandSupport{
+    private OvsdbInventoryService ovsdbInventory;
+
+    @Argument(index=0, name="nodeName", description="Node Name", required=true, multiValued=false)
+    String nodeName = null;
+
+    @Override
+    protected Object doExecute() throws Exception {
+        Node node = Node.fromString(nodeName);
+        ovsdbInventory.printCache(node);
+        return null;
+    }
+
+    public void setOvsdbInventory(OvsdbInventoryService inventoryService){
+        this.ovsdbInventory = inventoryService;
+    }
+}
diff --git a/plugin-shell/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/plugin-shell/src/main/resources/OSGI-INF/blueprint/blueprint.xml
new file mode 100644 (file)
index 0000000..4a213c6
--- /dev/null
@@ -0,0 +1,10 @@
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
+    <reference id="ovsdbInventoryRef" interface="org.opendaylight.ovsdb.plugin.api.OvsdbInventoryService"/>
+    <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
+        <command>
+          <action class="org.opendaylight.ovsdb.plugin.shell.PrintCache">
+            <property name="ovsdbInventory" ref="ovsdbInventoryRef"/>
+          </action>
+        </command>
+    </command-bundle>
+</blueprint>
index 52a65a9a8db4f57a9c08bf3e9ff126cd8a641765..5cd001a8bcc5421138656801fec928a4b1391c7a 100755 (executable)
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
     </dependency>
-    <dependency>
-      <groupId>org.apache.httpcomponents</groupId>
-      <artifactId>httpcore-nio</artifactId>
-      <optional>true</optional>
-    </dependency>
     <dependency>
       <groupId>org.opendaylight.controller</groupId>
       <artifactId>clustering.services</artifactId>
               javax.net.ssl,
               *
             </Import-Package>
-            <Embed-Dependency>httpclient,commons-codec,httpcore-nio,javax.servlet-api,portlet-api,commons-collections;type=!pom;inline=false</Embed-Dependency>
+            <Embed-Dependency>commons-codec,javax.servlet-api,portlet-api,commons-collections;type=!pom;inline=false</Embed-Dependency>
             <Embed-Transitive>true</Embed-Transitive>
             <Bundle-Activator>org.opendaylight.ovsdb.plugin.internal.Activator</Bundle-Activator>
             <Private-Package>
index 3155ce614f336d5a68997e06af46e63e183e586b..65efc8334c772ef3959222268c033f8586d4eb66 100644 (file)
@@ -48,6 +48,10 @@ public final class OvsVswitchdSchemaConstants {
             autoConfigureController = Boolean.getBoolean(OVSDB_AUTOCONFIGURECONTROLLER);
     }
 
+    public static void setAutoConfigureController(boolean autoConfigure) {
+        autoConfigureController = autoConfigure;
+    }
+
     public static boolean shouldConfigureController (String databaseName, String tableName) {
         if (autoConfigureController && databaseName.equals(DATABASE_NAME) && tableName.equals("Bridge")) return true;
         return false;
diff --git a/pom.xml b/pom.xml
index 3cd3353a277f8cd685b8b823394b6074defbc292..46039dd9b806e5bf28a1c64e3b9c9e5025108edb 100755 (executable)
--- a/pom.xml
+++ b/pom.xml
@@ -26,6 +26,7 @@
     <module>schemas/openvswitch</module>
     <module>schemas/hardwarevtep</module>
     <module>plugin</module>
+    <module>plugin-shell</module>
     <module>plugin-mdsal-adapter</module>
     <module>northbound</module>
     <module>utils/mdsal-openflow</module>
index 861f47fdf0863c547b260142f22079cae84ac4a7..b630240eeb0dda0064bd29bd6f8826d24990c0f6 100644 (file)
@@ -11,7 +11,7 @@
   <modelVersion>4.0.0</modelVersion>
 
   <artifactId>utils.mdsal-openflow</artifactId>
-  <name>OpenDaylight OVSDB utility to program Openflow rules using MD_SAL</name>
+  <name>OpenDaylight OVS utility for md-sal based OpenFlow</name>
   <version>1.0.0-SNAPSHOT</version>
   <packaging>jar</packaging>