Configure the OVS datapath type with devstack.

This feature provides the user with a means of easily configuring
the required Openvswitch datapath type. (Netdev, dpdk, etc)

Define the OVS_DATAPATH_TYPE variable in the devstack configuration file
local.conf.

This feature enables Intel(R) DPDK vSwitch and netdev DPDK vhost.

Implements blueprint config-ovs-datapath-type

Change-Id: I5698720960b1ac532c790d3e5735c5cef36d5e3d
diff --git a/lib/neutron_plugins/ovs_base b/lib/neutron_plugins/ovs_base
index 1e293a1..0fa9198 100644
--- a/lib/neutron_plugins/ovs_base
+++ b/lib/neutron_plugins/ovs_base
@@ -7,6 +7,7 @@
 
 OVS_BRIDGE=${OVS_BRIDGE:-br-int}
 PUBLIC_BRIDGE=${PUBLIC_BRIDGE:-br-ex}
+OVS_DATAPATH_TYPE=${OVS_DATAPATH_TYPE:-""}
 
 function is_neutron_ovs_base_plugin {
     # Yes, we use OVS.
@@ -17,6 +18,9 @@
     local bridge=$1
     neutron-ovs-cleanup
     sudo ovs-vsctl --no-wait -- --may-exist add-br $bridge
+    if [[ $OVS_DATAPATH_TYPE != "" ]]; then
+        sudo ovs-vsctl set Bridge $bridge datapath_type=${OVS_DATAPATH_TYPE}
+    fi
     sudo ovs-vsctl --no-wait br-set-external-id $bridge bridge-id $bridge
 }