moving openflow drivers to their own bundle

Change-Id: Ie38dc932fdf23112cafc0fa5d0d7693a5023e16c
diff --git a/features/features.xml b/features/features.xml
index 5ede89c..2a5e9cb 100644
--- a/features/features.xml
+++ b/features/features.xml
@@ -134,6 +134,7 @@
         <feature>onos-api</feature>
         <bundle>mvn:io.netty/netty/3.9.2.Final</bundle>
         <bundle>mvn:org.onlab.onos/onos-of-api/1.0.0-SNAPSHOT</bundle>
+        <bundle>mvn:org.onlab.onos/onos-of-drivers/1.0.0-SNAPSHOT</bundle>
         <bundle>mvn:org.onlab.onos/onos-of-ctl/1.0.0-SNAPSHOT</bundle>
 
         <bundle>mvn:org.onlab.onos/onos-lldp-provider/1.0.0-SNAPSHOT</bundle>
diff --git a/openflow/ctl/pom.xml b/openflow/ctl/pom.xml
index 07572e4..b459ca8 100644
--- a/openflow/ctl/pom.xml
+++ b/openflow/ctl/pom.xml
@@ -36,6 +36,11 @@
             <artifactId>onos-of-api</artifactId>
         </dependency>
         <dependency>
+            <groupId>org.onlab.onos</groupId>
+            <artifactId>onos-of-drivers</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
             <groupId>io.netty</groupId>
             <artifactId>netty</artifactId>
         </dependency>
diff --git a/openflow/ctl/src/main/java/org/onlab/onos/openflow/controller/impl/Controller.java b/openflow/ctl/src/main/java/org/onlab/onos/openflow/controller/impl/Controller.java
index 1d0e4cb..bf97d0a 100644
--- a/openflow/ctl/src/main/java/org/onlab/onos/openflow/controller/impl/Controller.java
+++ b/openflow/ctl/src/main/java/org/onlab/onos/openflow/controller/impl/Controller.java
@@ -31,7 +31,7 @@
 import org.onlab.onos.openflow.controller.Dpid;
 import org.onlab.onos.openflow.controller.driver.OpenFlowAgent;
 import org.onlab.onos.openflow.controller.driver.OpenFlowSwitchDriver;
-import org.onlab.onos.openflow.drivers.impl.DriverManager;
+import org.onlab.onos.openflow.drivers.DriverManager;
 import org.projectfloodlight.openflow.protocol.OFDescStatsReply;
 import org.projectfloodlight.openflow.protocol.OFFactories;
 import org.projectfloodlight.openflow.protocol.OFFactory;
@@ -201,7 +201,7 @@
     protected OpenFlowSwitchDriver getOFSwitchInstance(long dpid,
             OFDescStatsReply desc, OFVersion ofv) {
         OpenFlowSwitchDriver sw = DriverManager.getSwitch(new Dpid(dpid),
-                desc, ofv);
+                                                          desc, ofv);
         sw.setAgent(agent);
         sw.setRoleHandler(new RoleManager(sw));
         return sw;
diff --git a/openflow/drivers/pom.xml b/openflow/drivers/pom.xml
index d68142c..c2ce963 100644
--- a/openflow/drivers/pom.xml
+++ b/openflow/drivers/pom.xml
@@ -36,16 +36,4 @@
             <artifactId>onos-of-api</artifactId>
         </dependency>
     </dependencies>
-
-    <build>
-<!--
-        <plugins>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-scr-plugin</artifactId>
-            </plugin>
-        </plugins>
--->
-    </build>
-
 </project>
diff --git a/openflow/ctl/src/main/java/org/onlab/onos/openflow/drivers/impl/DriverManager.java b/openflow/drivers/src/main/java/org/onlab/onos/openflow/drivers/DriverManager.java
similarity index 98%
rename from openflow/ctl/src/main/java/org/onlab/onos/openflow/drivers/impl/DriverManager.java
rename to openflow/drivers/src/main/java/org/onlab/onos/openflow/drivers/DriverManager.java
index 5af0a64..ce5751c 100644
--- a/openflow/ctl/src/main/java/org/onlab/onos/openflow/drivers/impl/DriverManager.java
+++ b/openflow/drivers/src/main/java/org/onlab/onos/openflow/drivers/DriverManager.java
@@ -13,18 +13,15 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onlab.onos.openflow.drivers.impl;
+package org.onlab.onos.openflow.drivers;
 
 
-
-import java.util.Collections;
-import java.util.List;
-
 import org.onlab.onos.openflow.controller.Dpid;
 import org.onlab.onos.openflow.controller.RoleState;
 import org.onlab.onos.openflow.controller.driver.AbstractOpenFlowSwitch;
 import org.onlab.onos.openflow.controller.driver.OpenFlowSwitchDriver;
 import org.onlab.onos.openflow.controller.driver.OpenFlowSwitchDriverFactory;
+
 import org.projectfloodlight.openflow.protocol.OFDescStatsReply;
 import org.projectfloodlight.openflow.protocol.OFMessage;
 import org.projectfloodlight.openflow.protocol.OFPortDesc;
@@ -32,6 +29,9 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.util.Collections;
+import java.util.List;
+
 /**
  * A simple implementation of a driver manager that differentiates between
  * connected switches using the OF Description Statistics Reply message.
diff --git a/openflow/ctl/src/main/java/org/onlab/onos/openflow/drivers/impl/OFOpticalSwitchImplLINC13.java b/openflow/drivers/src/main/java/org/onlab/onos/openflow/drivers/OFOpticalSwitchImplLINC13.java
similarity index 98%
rename from openflow/ctl/src/main/java/org/onlab/onos/openflow/drivers/impl/OFOpticalSwitchImplLINC13.java
rename to openflow/drivers/src/main/java/org/onlab/onos/openflow/drivers/OFOpticalSwitchImplLINC13.java
index 66c017b..b4fddd9 100644
--- a/openflow/ctl/src/main/java/org/onlab/onos/openflow/drivers/impl/OFOpticalSwitchImplLINC13.java
+++ b/openflow/drivers/src/main/java/org/onlab/onos/openflow/drivers/OFOpticalSwitchImplLINC13.java
@@ -13,13 +13,13 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onlab.onos.openflow.drivers.impl;
+package org.onlab.onos.openflow.drivers;
 
+import org.onlab.onos.openflow.controller.Dpid;
+import org.onlab.onos.openflow.controller.driver.AbstractOpenFlowSwitch;
 import org.onlab.onos.openflow.controller.driver.SwitchDriverSubHandshakeAlreadyStarted;
 import org.onlab.onos.openflow.controller.driver.SwitchDriverSubHandshakeCompleted;
 import org.onlab.onos.openflow.controller.driver.SwitchDriverSubHandshakeNotStarted;
-import org.onlab.onos.openflow.controller.Dpid;
-import org.onlab.onos.openflow.controller.driver.AbstractOpenFlowSwitch;
 import org.projectfloodlight.openflow.protocol.OFCircuitPortStatus;
 import org.projectfloodlight.openflow.protocol.OFCircuitPortsReply;
 import org.projectfloodlight.openflow.protocol.OFCircuitPortsRequest;
@@ -30,6 +30,7 @@
 import org.projectfloodlight.openflow.protocol.OFPortOptical;
 import org.projectfloodlight.openflow.protocol.OFStatsReply;
 import org.projectfloodlight.openflow.protocol.OFStatsType;
+
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Collection;
diff --git a/openflow/ctl/src/main/java/org/onlab/onos/openflow/drivers/impl/OFSwitchImplCPqD13.java b/openflow/drivers/src/main/java/org/onlab/onos/openflow/drivers/OFSwitchImplCPqD13.java
similarity index 99%
rename from openflow/ctl/src/main/java/org/onlab/onos/openflow/drivers/impl/OFSwitchImplCPqD13.java
rename to openflow/drivers/src/main/java/org/onlab/onos/openflow/drivers/OFSwitchImplCPqD13.java
index 0905f43..4884b76 100644
--- a/openflow/ctl/src/main/java/org/onlab/onos/openflow/drivers/impl/OFSwitchImplCPqD13.java
+++ b/openflow/drivers/src/main/java/org/onlab/onos/openflow/drivers/OFSwitchImplCPqD13.java
@@ -13,15 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onlab.onos.openflow.drivers.impl;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.atomic.AtomicBoolean;
+package org.onlab.onos.openflow.drivers;
 
 import org.onlab.onos.openflow.controller.Dpid;
 import org.onlab.onos.openflow.controller.RoleState;
@@ -65,6 +57,14 @@
 import org.projectfloodlight.openflow.types.U64;
 import org.projectfloodlight.openflow.util.HexString;
 
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.atomic.AtomicBoolean;
+
 /**
  * OFDescriptionStatistics Vendor (Manufacturer Desc.): Stanford University,
  * Ericsson Research and CPqD Research. Make (Hardware Desc.) : OpenFlow 1.3
@@ -1138,7 +1138,7 @@
      * @param toControllerWrite as a WRITE_ACITION instruction
      * @param toTable as a GOTO_TABLE instruction
      * @param tableToSend
-     * @throws IOException
+     * @throws java.io.IOException
      */
     @SuppressWarnings("unchecked")
     private void populateTableMissEntry(int tableToAdd, boolean toControllerNow,
diff --git a/openflow/ctl/src/main/java/org/onlab/onos/openflow/drivers/impl/OFSwitchImplOVS10.java b/openflow/drivers/src/main/java/org/onlab/onos/openflow/drivers/OFSwitchImplOVS10.java
similarity index 97%
rename from openflow/ctl/src/main/java/org/onlab/onos/openflow/drivers/impl/OFSwitchImplOVS10.java
rename to openflow/drivers/src/main/java/org/onlab/onos/openflow/drivers/OFSwitchImplOVS10.java
index a1ae8a9..6021bd8 100644
--- a/openflow/ctl/src/main/java/org/onlab/onos/openflow/drivers/impl/OFSwitchImplOVS10.java
+++ b/openflow/drivers/src/main/java/org/onlab/onos/openflow/drivers/OFSwitchImplOVS10.java
@@ -13,10 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onlab.onos.openflow.drivers.impl;
-
-import java.util.Collections;
-import java.util.List;
+package org.onlab.onos.openflow.drivers;
 
 import org.onlab.onos.openflow.controller.Dpid;
 import org.onlab.onos.openflow.controller.driver.AbstractOpenFlowSwitch;
@@ -24,6 +21,9 @@
 import org.projectfloodlight.openflow.protocol.OFMessage;
 import org.projectfloodlight.openflow.protocol.OFPortDesc;
 
+import java.util.Collections;
+import java.util.List;
+
 /**
  * OFDescriptionStatistics Vendor (Manufacturer Desc.): Nicira, Inc. Make
  * (Hardware Desc.) : Open vSwitch Model (Datapath Desc.) : None Software :
diff --git a/openflow/ctl/src/main/java/org/onlab/onos/openflow/drivers/impl/OFSwitchImplOVS13.java b/openflow/drivers/src/main/java/org/onlab/onos/openflow/drivers/OFSwitchImplOVS13.java
similarity index 98%
rename from openflow/ctl/src/main/java/org/onlab/onos/openflow/drivers/impl/OFSwitchImplOVS13.java
rename to openflow/drivers/src/main/java/org/onlab/onos/openflow/drivers/OFSwitchImplOVS13.java
index c32d889..f4a7b9d 100644
--- a/openflow/ctl/src/main/java/org/onlab/onos/openflow/drivers/impl/OFSwitchImplOVS13.java
+++ b/openflow/drivers/src/main/java/org/onlab/onos/openflow/drivers/OFSwitchImplOVS13.java
@@ -13,12 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onlab.onos.openflow.drivers.impl;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.concurrent.atomic.AtomicBoolean;
+package org.onlab.onos.openflow.drivers;
 
 import org.onlab.onos.openflow.controller.Dpid;
 import org.onlab.onos.openflow.controller.driver.AbstractOpenFlowSwitch;
@@ -37,6 +32,11 @@
 import org.projectfloodlight.openflow.types.OFPort;
 import org.projectfloodlight.openflow.types.TableId;
 
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.concurrent.atomic.AtomicBoolean;
+
 /**
  * OFDescriptionStatistics Vendor (Manufacturer Desc.): Nicira, Inc. Make
  * (Hardware Desc.) : Open vSwitch Model (Datapath Desc.) : None Software :
diff --git a/openflow/drivers/src/main/java/org/onlab/onos/openflow/drivers/impl/DeleteMe.java b/openflow/drivers/src/main/java/org/onlab/onos/openflow/drivers/impl/DeleteMe.java
deleted file mode 100644
index f8f1a5d..0000000
--- a/openflow/drivers/src/main/java/org/onlab/onos/openflow/drivers/impl/DeleteMe.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright 2014 Open Networking Laboratory
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.onlab.onos.openflow.drivers.impl;
-
-/**
- * Created by tom on 9/2/14.
- */
-public class DeleteMe {
-}
diff --git a/openflow/ctl/src/main/java/org/onlab/onos/openflow/drivers/impl/package-info.java b/openflow/drivers/src/main/java/org/onlab/onos/openflow/drivers/package-info.java
similarity index 93%
rename from openflow/ctl/src/main/java/org/onlab/onos/openflow/drivers/impl/package-info.java
rename to openflow/drivers/src/main/java/org/onlab/onos/openflow/drivers/package-info.java
index a8581b4..efee71f 100644
--- a/openflow/ctl/src/main/java/org/onlab/onos/openflow/drivers/impl/package-info.java
+++ b/openflow/drivers/src/main/java/org/onlab/onos/openflow/drivers/package-info.java
@@ -17,4 +17,4 @@
 /**
  * OpenFlow base switch drivers implementations.
  */
-package org.onlab.onos.openflow.drivers.impl;
+package org.onlab.onos.openflow.drivers;