Implemented simple config mechanism to allow different pipelines for the
CPqD software switch.

Default pipeline is 1.0 mode (send-to-controller table miss entry in first
table).
A more complex 1.3 pipeline can be enabled by setting the following in your
onos.properties file:
 net.floodlightcontroller.core.FloodlightProvider.cpqdUsePipeline13=true

Change-Id: I0a15bf04ac9c92e1e6241896d12052dd56449d3c
diff --git a/src/main/java/net/onrc/onos/core/drivermanager/DriverManager.java b/src/main/java/net/onrc/onos/core/drivermanager/DriverManager.java
index fe86077..e212655 100644
--- a/src/main/java/net/onrc/onos/core/drivermanager/DriverManager.java
+++ b/src/main/java/net/onrc/onos/core/drivermanager/DriverManager.java
@@ -16,6 +16,10 @@
 
     private static final Logger log = LoggerFactory.getLogger(DriverManager.class);
 
+    // Whether to use an OF 1.3 configured TTP, or to use an OF 1.0-style
+    // single table with packet-ins.
+    private static boolean cpqdUsePipeline13 = false;
+
     /**
      * Return an IOFSwitch object based on switch's manufacturer description
      * from OFDescStatsReply.
@@ -30,7 +34,7 @@
         if (vendor.startsWith("Stanford University, Ericsson Research and CPqD Research")
                 &&
                 hw.startsWith("OpenFlow 1.3 Reference Userspace Switch")) {
-            return new OFSwitchImplCPqD13(desc);
+            return new OFSwitchImplCPqD13(desc, cpqdUsePipeline13);
         }
 
         if (vendor.startsWith("Nicira") &&
@@ -55,4 +59,16 @@
      */
     private DriverManager() {
     }
+
+    /**
+     * Sets the configuration parameter which determines how the CPqD switch
+     * is set up. If usePipeline13 is true, a 1.3 pipeline will be set up on
+     * the switch. Otherwise, the switch will be set up in a 1.0 style with
+     * a single table where missed packets are sent to the controller.
+     *
+     * @param usePipeline13 whether to use a 1.3 pipeline or not
+     */
+    public static void setConfigForCpqd(boolean usePipeline13) {
+        cpqdUsePipeline13 = usePipeline13;
+    }
 }