The patch introduces devstack support for the Quantum FloodLight/BigSwitch
RESTProxy Plugin.
Change-Id: I8c032fd16723ed6055821de0860fae508df371b7
Implements: blueprint quantum-floodlight-bigswitch-plugin-support
... | ... |
@@ -35,6 +35,7 @@ Matt Joyce <matt.joyce@cloudscaling.com> |
35 | 35 |
Osamu Habuka <xiu.yushen@gmail.com> |
36 | 36 |
Russell Bryant <rbryant@redhat.com> |
37 | 37 |
Scott Moser <smoser@ubuntu.com> |
38 |
+Sumit Naiksatam <sumitnaiksatam@gmail.com> |
|
38 | 39 |
Thierry Carrez <thierry@openstack.org> |
39 | 40 |
Todd Willey <xtoddx@gmail.com> |
40 | 41 |
Tres Henry <tres@treshenry.net> |
41 | 42 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,50 @@ |
0 |
+# Big Switch/FloodLight OpenFlow Controller |
|
1 |
+# ------------------------------------------ |
|
2 |
+ |
|
3 |
+# Save trace setting |
|
4 |
+XTRACE=$(set +o | grep xtrace) |
|
5 |
+set +o xtrace |
|
6 |
+ |
|
7 |
+BS_FL_CONTROLLERS_PORT=${BS_FL_CONTROLLERS_PORT:-localhost:80} |
|
8 |
+BS_FL_OF_PORT=${BS_FL_OF_PORT:-6633} |
|
9 |
+OVS_BRIDGE=${OVS_BRIDGE:-br-int} |
|
10 |
+ |
|
11 |
+function configure_bigswitch_floodlight() { |
|
12 |
+ : |
|
13 |
+} |
|
14 |
+ |
|
15 |
+function init_bigswitch_floodlight() { |
|
16 |
+ install_quantum_agent_packages |
|
17 |
+ |
|
18 |
+ echo -n "Installing OVS managed by the openflow controllers:" |
|
19 |
+ echo ${BS_FL_CONTROLLERS_PORT} |
|
20 |
+ |
|
21 |
+ # Create local OVS bridge and configure it |
|
22 |
+ sudo ovs-vsctl --no-wait -- --if-exists del-br ${OVS_BRIDGE} |
|
23 |
+ sudo ovs-vsctl --no-wait add-br ${OVS_BRIDGE} |
|
24 |
+ sudo ovs-vsctl --no-wait br-set-external-id ${OVS_BRIDGE} bridge-id ${OVS_BRIDGE} |
|
25 |
+ |
|
26 |
+ ctrls= |
|
27 |
+ for ctrl in `echo ${BS_FL_CONTROLLERS_PORT} | tr ',' ' '` |
|
28 |
+ do |
|
29 |
+ ctrl=${ctrl%:*} |
|
30 |
+ ctrls="${ctrls} tcp:${ctrl}:${BS_FL_OF_PORT}" |
|
31 |
+ done |
|
32 |
+ echo "Adding Network conttrollers: " ${ctrls} |
|
33 |
+ sudo ovs-vsctl --no-wait set-controller ${OVS_BRIDGE} ${ctrls} |
|
34 |
+} |
|
35 |
+ |
|
36 |
+function install_bigswitch_floodlight() { |
|
37 |
+ : |
|
38 |
+} |
|
39 |
+ |
|
40 |
+function start_bigswitch_floodlight() { |
|
41 |
+ : |
|
42 |
+} |
|
43 |
+ |
|
44 |
+function stop_bigswitch_floodlight() { |
|
45 |
+ : |
|
46 |
+} |
|
47 |
+ |
|
48 |
+# Restore xtrace |
|
49 |
+$XTRACE |
... | ... |
@@ -217,6 +217,8 @@ function create_nova_conf_quantum() { |
217 | 217 |
iniset $NOVA_CONF DEFAULT libvirt_ovs_integration_bridge "$OVS_BRIDGE" |
218 | 218 |
iniset $NOVA_CONF DEFAULT linuxnet_ovs_ryu_api_host "$RYU_API_HOST:$RYU_API_PORT" |
219 | 219 |
iniset $NOVA_CONF DEFAULT libvirt_ovs_ryu_api_host "$RYU_API_HOST:$RYU_API_PORT" |
220 |
+ elif [[ "$Q_PLUGIN" = "bigswitch_floodlight" ]]; then |
|
221 |
+ NOVA_VIF_DRIVER=${NOVA_VIF_DRIVER:-"nova.virt.libvirt.vif.LibvirtHybridOVSBridgeDriver"} |
|
220 | 222 |
fi |
221 | 223 |
iniset $NOVA_CONF DEFAULT libvirt_vif_driver "$NOVA_VIF_DRIVER" |
222 | 224 |
iniset $NOVA_CONF DEFAULT linuxnet_interface_driver "$LINUXNET_VIF_DRIVER" |
... | ... |
@@ -332,7 +334,7 @@ function install_quantum_agent_packages() { |
332 | 332 |
|
333 | 333 |
function is_quantum_ovs_base_plugin() { |
334 | 334 |
local plugin=$1 |
335 |
- if [[ ",openvswitch,ryu," =~ ,${plugin}, ]]; then |
|
335 |
+ if [[ ",openvswitch,ryu,bigswitch_floodlight," =~ ,${plugin}, ]]; then |
|
336 | 336 |
return 0 |
337 | 337 |
fi |
338 | 338 |
return 1 |
... | ... |
@@ -407,6 +409,13 @@ function _configure_quantum_common() { |
407 | 407 |
Q_PLUGIN_CONF_FILENAME=ryu.ini |
408 | 408 |
Q_DB_NAME="ovs_quantum" |
409 | 409 |
Q_PLUGIN_CLASS="quantum.plugins.ryu.ryu_quantum_plugin.RyuQuantumPluginV2" |
410 |
+ elif [[ "$Q_PLUGIN" = "bigswitch_floodlight" ]]; then |
|
411 |
+ Q_PLUGIN_CONF_PATH=etc/quantum/plugins/bigswitch |
|
412 |
+ Q_PLUGIN_CONF_FILENAME=restproxy.ini |
|
413 |
+ Q_DB_NAME="restproxy_quantum" |
|
414 |
+ Q_PLUGIN_CLASS="quantum.plugins.bigswitch.plugin.QuantumRestProxyV2" |
|
415 |
+ BS_FL_CONTROLLERS_PORT=${BS_FL_CONTROLLERS_PORT:-localhost:80} |
|
416 |
+ BS_FL_CONTROLLER_TIMEOUT=${BS_FL_CONTROLLER_TIMEOUT:-10} |
|
410 | 417 |
fi |
411 | 418 |
|
412 | 419 |
if [[ $Q_PLUGIN_CONF_PATH == '' || $Q_PLUGIN_CONF_FILENAME == '' || $Q_PLUGIN_CLASS == '' ]]; then |
... | ... |
@@ -674,6 +683,9 @@ function _configure_quantum_service() { |
674 | 674 |
elif [[ "$Q_PLUGIN" = "ryu" ]]; then |
675 | 675 |
iniset /$Q_PLUGIN_CONF_FILE OVS openflow_controller $RYU_OFP_HOST:$RYU_OFP_PORT |
676 | 676 |
iniset /$Q_PLUGIN_CONF_FILE OVS openflow_rest_api $RYU_API_HOST:$RYU_API_PORT |
677 |
+ elif [[ "$Q_PLUGIN" = "bigswitch_floodlight" ]]; then |
|
678 |
+ iniset /$Q_PLUGIN_CONF_FILE RESTPROXY servers $BS_FL_CONTROLLERS_PORT |
|
679 |
+ iniset /$Q_PLUGIN_CONF_FILE RESTPROXY servertimeout $BS_FL_CONTROLLER_TIMEOUT |
|
677 | 680 |
fi |
678 | 681 |
} |
679 | 682 |
|
... | ... |
@@ -749,6 +761,8 @@ function _quantum_setup_interface_driver() { |
749 | 749 |
iniset $conf_file DEFAULT interface_driver quantum.agent.linux.interface.BridgeInterfaceDriver |
750 | 750 |
elif [[ "$Q_PLUGIN" = "ryu" ]]; then |
751 | 751 |
iniset $conf_file DEFAULT interface_driver quantum.agent.linux.interface.RyuInterfaceDriver |
752 |
+ elif [[ "$Q_PLUGIN" = "bigswitch_floodlight" ]]; then |
|
753 |
+ iniset $conf_file DEFAULT interface_driver quantum.agent.linux.interface.OVSInterfaceDriver |
|
752 | 754 |
fi |
753 | 755 |
} |
754 | 756 |
|
... | ... |
@@ -835,7 +849,7 @@ function _ssh_check_quantum() { |
835 | 835 |
# Quantum 3rd party programs |
836 | 836 |
#--------------------------- |
837 | 837 |
# A comma-separated list of 3rd party programs |
838 |
-QUANTUM_THIRD_PARTIES="ryu" |
|
838 |
+QUANTUM_THIRD_PARTIES="ryu,bigswitch_floodlight" |
|
839 | 839 |
for third_party in ${QUANTUM_THIRD_PARTIES//,/ }; do |
840 | 840 |
source lib/$third_party |
841 | 841 |
done |