Updated dependencies, added skeleton for MD-SAL services 29/1229/4
authorTony Tkacik <ttkacik@cisco.com>
Tue, 17 Sep 2013 15:45:54 +0000 (17:45 +0200)
committerMichal Rehak <mirehak@cisco.com>
Wed, 18 Sep 2013 12:21:48 +0000 (14:21 +0200)
Change-Id: I84df2bbe2811513366f5e5c7b32c2e1e360670f2
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Signed-off-by: Michal Rehak <mirehak@cisco.com>
openflowplugin/pom.xml
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/internal/FlowProgrammerService.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/LinkDiscoveryService.java [new file with mode: 0644]
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/ModelDrivenSwitch.java [new file with mode: 0644]
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/SwitchInventory.java [new file with mode: 0644]

index b213c8d35889a8c24a7d4db91b792842e6bc21a9..14975cf69ffb73b16381d73aadb654b0f5ceed1c 100644 (file)
@@ -1,85 +1,93 @@
 <?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.openflowplugin</groupId>
-    <artifactId>commons.openflowplugin</artifactId>
-    <version>0.0.1-SNAPSHOT</version>
-    <relativePath>../commons</relativePath>
-  </parent>
+<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.openflowplugin</groupId>
+        <artifactId>commons.openflowplugin</artifactId>
+        <version>0.0.1-SNAPSHOT</version>
+        <relativePath>../commons</relativePath>
+    </parent>
 
-  <artifactId>openflowplugin</artifactId>
-  <version>0.0.1-SNAPSHOT</version>
-  <packaging>bundle</packaging>
+    <artifactId>openflowplugin</artifactId>
+    <version>0.0.1-SNAPSHOT</version>
+    <packaging>bundle</packaging>
 
-  <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.opendaylight.controller.sal.packet,
-              org.opendaylight.controller.sal.action,
-              org.opendaylight.controller.sal.discovery,
-              org.opendaylight.controller.sal.topology,
-              org.opendaylight.controller.sal.core,
-              org.opendaylight.controller.sal.flowprogrammer,
-              org.opendaylight.controller.sal.reader,
-              org.opendaylight.controller.sal.inventory,
-              org.opendaylight.controller.sal.match,
-              org.opendaylight.controller.sal.utils,
-              org.opendaylight.controller.sal.connection,
-              org.apache.commons.lang3.builder,
-              org.apache.commons.lang3.tuple,
-              org.apache.felix.dm,
-              org.slf4j,
-              org.eclipse.osgi.framework.console,
-              org.osgi.framework,
-              javax.net.ssl
-            </Import-Package>
-            <Export-Package>
-              org.opendaylight.openflowplugin.openflow.internal
-            </Export-Package>
-            <Embed-Dependency>
-              org.openflow.openflowj
-            </Embed-Dependency>
-            <Embed-Transitive>
-              false
-            </Embed-Transitive>
-            <Bundle-Activator>
-              org.opendaylight.openflowplugin.openflow.internal.Activator
-            </Bundle-Activator>
-          </instructions>
-          <manifestLocation>${project.basedir}/META-INF</manifestLocation>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-  <dependencies>
-    <dependency>
-      <groupId>org.opendaylight.controller</groupId>
-      <artifactId>sal</artifactId>
-      <version>0.5.0-SNAPSHOT</version>
-    </dependency>
-    <dependency>
-      <groupId>org.opendaylight.controller</groupId>
-      <artifactId>sal.connection</artifactId>
-      <version>0.1.0-SNAPSHOT</version>
-    </dependency>
-    <dependency>
-      <groupId>org.opendaylight.controller.thirdparty</groupId>
-      <artifactId>org.openflow.openflowj</artifactId>
-      <version>1.0.2-SNAPSHOT</version>
-    </dependency>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>4.8.1</version>
-      <scope>test</scope>
-    </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>
+                        <Export-Package>
+                            org.opendaylight.openflowplugin.openflow.internal
+                        </Export-Package>
+                        <Embed-Transitive>
+                            false
+                        </Embed-Transitive>
+                        <Bundle-Activator>
+                            org.opendaylight.openflowplugin.openflow.internal.Activator
+                        </Bundle-Activator>
+                    </instructions>
+                    <manifestLocation>${project.basedir}/META-INF</manifestLocation>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+    <dependencies>
+        <dependency>
+            <groupId>org.opendaylight.controller</groupId>
+            <artifactId>sal</artifactId>
+            <version>0.5.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.controller</groupId>
+            <artifactId>sal.connection</artifactId>
+            <version>0.1.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.controller.thirdparty</groupId>
+            <artifactId>org.openflow.openflowj</artifactId>
+            <version>1.0.2-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <artifactId>model-flow-base</artifactId>
+            <groupId>org.opendaylight.controller.model</groupId>
+            <version>1.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <artifactId>model-flow-service</artifactId>
+            <groupId>org.opendaylight.controller.model</groupId>
+            <version>1.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <artifactId>model-flow-statistics</artifactId>
+            <groupId>org.opendaylight.controller.model</groupId>
+            <version>1.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <artifactId>model-inventory</artifactId>
+            <groupId>org.opendaylight.controller.model</groupId>
+            <version>1.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.controller</groupId>
+            <artifactId>sal-binding-api</artifactId>
+            <version>1.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.openflowjava</groupId>
+            <artifactId>openflow-protocol-api</artifactId>
+            <version>0.1-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.8.1</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
 </project>
index 594e6ce8e5ce56b3bf84fde58d3a2e7939319dd2..569823e3fe38619a41de370f15ee849f98a01c81 100644 (file)
@@ -15,6 +15,7 @@ import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
+import java.util.concurrent.Future;
 
 import org.eclipse.osgi.framework.console.CommandInterpreter;
 import org.eclipse.osgi.framework.console.CommandProvider;
@@ -40,6 +41,11 @@ import org.opendaylight.openflowplugin.openflow.IInventoryShimExternalListener;
 import org.opendaylight.openflowplugin.openflow.core.IController;
 import org.opendaylight.openflowplugin.openflow.core.IMessageListener;
 import org.opendaylight.openflowplugin.openflow.core.ISwitch;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.AddFlowInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.RemoveFlowInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SalFlowService;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.UpdateFlowInput;
+import org.opendaylight.yangtools.yang.common.RpcResult;
 import org.openflow.protocol.OFError;
 import org.openflow.protocol.OFFlowMod;
 import org.openflow.protocol.OFFlowRemoved;
@@ -56,7 +62,7 @@ import org.slf4j.LoggerFactory;
  * Represents the openflow plugin component in charge of programming the flows
  * the flow programming and relay them to functional modules above SAL.
  */
-public class FlowProgrammerService implements IPluginInFlowProgrammerService,
+public class FlowProgrammerService implements IPluginInFlowProgrammerService, SalFlowService,
         IMessageListener, IContainerListener, IInventoryShimExternalListener,
         CommandProvider {
     private static final Logger log = LoggerFactory
@@ -800,4 +806,22 @@ public class FlowProgrammerService implements IPluginInFlowProgrammerService,
         ci.println("Max num of async messages sent prior to the Barrier message is "
                 + barrierMessagePriorCount);
     }
+
+
+
+    @Override
+    public Future<RpcResult<Void>> addFlow(AddFlowInput input) {
+        throw new UnsupportedOperationException("Not implemented yet.");
+    }
+
+
+    @Override
+    public Future<RpcResult<Void>> removeFlow(RemoveFlowInput input) {
+        throw new UnsupportedOperationException("Not implemented yet.");
+    }
+
+    @Override
+    public Future<RpcResult<Void>> updateFlow(UpdateFlowInput input) {
+        throw new UnsupportedOperationException("Not implemented yet.");
+    }
 }
diff --git a/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/LinkDiscoveryService.java b/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/LinkDiscoveryService.java
new file mode 100644 (file)
index 0000000..160a74f
--- /dev/null
@@ -0,0 +1,13 @@
+package org.opendaylight.openflowplugin.openflow.md;
+
+import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.PacketProcessingListener;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.PacketReceived;
+
+public class LinkDiscoveryService implements PacketProcessingListener {
+
+    @Override
+    public void onPacketReceived(PacketReceived packetRec) {
+        // TODO Auto-generated method stub
+
+    }
+}
diff --git a/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/ModelDrivenSwitch.java b/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/ModelDrivenSwitch.java
new file mode 100644 (file)
index 0000000..9a23e11
--- /dev/null
@@ -0,0 +1,9 @@
+package org.opendaylight.openflowplugin.openflow.md;
+
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SalFlowService;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev130819.FlowStatistics;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.PacketProcessingService;
+
+public interface ModelDrivenSwitch extends SalFlowService, PacketProcessingService {
+
+}
diff --git a/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/SwitchInventory.java b/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/SwitchInventory.java
new file mode 100644 (file)
index 0000000..c7b7770
--- /dev/null
@@ -0,0 +1,9 @@
+package org.opendaylight.openflowplugin.openflow.md;
+
+import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
+
+public interface SwitchInventory {
+
+    ModelDrivenSwitch getSwitch(NodeRef node);
+}