Quantum FloodLight/BigSwitch Plugin Support
The patch introduces devstack support for the Quantum FloodLight/BigSwitch RESTProxy Plugin. Change-Id: I8c032fd16723ed6055821de0860fae508df371b7 Implements: blueprint quantum-floodlight-bigswitch-plugin-support
This commit is contained in:
parent
eae8f82678
commit
4b26d3191e
1
AUTHORS
1
AUTHORS
@ -35,6 +35,7 @@ Matt Joyce <matt.joyce@cloudscaling.com>
|
||||
Osamu Habuka <xiu.yushen@gmail.com>
|
||||
Russell Bryant <rbryant@redhat.com>
|
||||
Scott Moser <smoser@ubuntu.com>
|
||||
Sumit Naiksatam <sumitnaiksatam@gmail.com>
|
||||
Thierry Carrez <thierry@openstack.org>
|
||||
Todd Willey <xtoddx@gmail.com>
|
||||
Tres Henry <tres@treshenry.net>
|
||||
|
50
lib/bigswitch_floodlight
Normal file
50
lib/bigswitch_floodlight
Normal file
@ -0,0 +1,50 @@
|
||||
# Big Switch/FloodLight OpenFlow Controller
|
||||
# ------------------------------------------
|
||||
|
||||
# Save trace setting
|
||||
XTRACE=$(set +o | grep xtrace)
|
||||
set +o xtrace
|
||||
|
||||
BS_FL_CONTROLLERS_PORT=${BS_FL_CONTROLLERS_PORT:-localhost:80}
|
||||
BS_FL_OF_PORT=${BS_FL_OF_PORT:-6633}
|
||||
OVS_BRIDGE=${OVS_BRIDGE:-br-int}
|
||||
|
||||
function configure_bigswitch_floodlight() {
|
||||
:
|
||||
}
|
||||
|
||||
function init_bigswitch_floodlight() {
|
||||
install_quantum_agent_packages
|
||||
|
||||
echo -n "Installing OVS managed by the openflow controllers:"
|
||||
echo ${BS_FL_CONTROLLERS_PORT}
|
||||
|
||||
# Create local OVS bridge and configure it
|
||||
sudo ovs-vsctl --no-wait -- --if-exists del-br ${OVS_BRIDGE}
|
||||
sudo ovs-vsctl --no-wait add-br ${OVS_BRIDGE}
|
||||
sudo ovs-vsctl --no-wait br-set-external-id ${OVS_BRIDGE} bridge-id ${OVS_BRIDGE}
|
||||
|
||||
ctrls=
|
||||
for ctrl in `echo ${BS_FL_CONTROLLERS_PORT} | tr ',' ' '`
|
||||
do
|
||||
ctrl=${ctrl%:*}
|
||||
ctrls="${ctrls} tcp:${ctrl}:${BS_FL_OF_PORT}"
|
||||
done
|
||||
echo "Adding Network conttrollers: " ${ctrls}
|
||||
sudo ovs-vsctl --no-wait set-controller ${OVS_BRIDGE} ${ctrls}
|
||||
}
|
||||
|
||||
function install_bigswitch_floodlight() {
|
||||
:
|
||||
}
|
||||
|
||||
function start_bigswitch_floodlight() {
|
||||
:
|
||||
}
|
||||
|
||||
function stop_bigswitch_floodlight() {
|
||||
:
|
||||
}
|
||||
|
||||
# Restore xtrace
|
||||
$XTRACE
|
18
lib/quantum
18
lib/quantum
@ -217,6 +217,8 @@ function create_nova_conf_quantum() {
|
||||
iniset $NOVA_CONF DEFAULT libvirt_ovs_integration_bridge "$OVS_BRIDGE"
|
||||
iniset $NOVA_CONF DEFAULT linuxnet_ovs_ryu_api_host "$RYU_API_HOST:$RYU_API_PORT"
|
||||
iniset $NOVA_CONF DEFAULT libvirt_ovs_ryu_api_host "$RYU_API_HOST:$RYU_API_PORT"
|
||||
elif [[ "$Q_PLUGIN" = "bigswitch_floodlight" ]]; then
|
||||
NOVA_VIF_DRIVER=${NOVA_VIF_DRIVER:-"nova.virt.libvirt.vif.LibvirtHybridOVSBridgeDriver"}
|
||||
fi
|
||||
iniset $NOVA_CONF DEFAULT libvirt_vif_driver "$NOVA_VIF_DRIVER"
|
||||
iniset $NOVA_CONF DEFAULT linuxnet_interface_driver "$LINUXNET_VIF_DRIVER"
|
||||
@ -332,7 +334,7 @@ function install_quantum_agent_packages() {
|
||||
|
||||
function is_quantum_ovs_base_plugin() {
|
||||
local plugin=$1
|
||||
if [[ ",openvswitch,ryu," =~ ,${plugin}, ]]; then
|
||||
if [[ ",openvswitch,ryu,bigswitch_floodlight," =~ ,${plugin}, ]]; then
|
||||
return 0
|
||||
fi
|
||||
return 1
|
||||
@ -407,6 +409,13 @@ function _configure_quantum_common() {
|
||||
Q_PLUGIN_CONF_FILENAME=ryu.ini
|
||||
Q_DB_NAME="ovs_quantum"
|
||||
Q_PLUGIN_CLASS="quantum.plugins.ryu.ryu_quantum_plugin.RyuQuantumPluginV2"
|
||||
elif [[ "$Q_PLUGIN" = "bigswitch_floodlight" ]]; then
|
||||
Q_PLUGIN_CONF_PATH=etc/quantum/plugins/bigswitch
|
||||
Q_PLUGIN_CONF_FILENAME=restproxy.ini
|
||||
Q_DB_NAME="restproxy_quantum"
|
||||
Q_PLUGIN_CLASS="quantum.plugins.bigswitch.plugin.QuantumRestProxyV2"
|
||||
BS_FL_CONTROLLERS_PORT=${BS_FL_CONTROLLERS_PORT:-localhost:80}
|
||||
BS_FL_CONTROLLER_TIMEOUT=${BS_FL_CONTROLLER_TIMEOUT:-10}
|
||||
fi
|
||||
|
||||
if [[ $Q_PLUGIN_CONF_PATH == '' || $Q_PLUGIN_CONF_FILENAME == '' || $Q_PLUGIN_CLASS == '' ]]; then
|
||||
@ -674,6 +683,9 @@ function _configure_quantum_service() {
|
||||
elif [[ "$Q_PLUGIN" = "ryu" ]]; then
|
||||
iniset /$Q_PLUGIN_CONF_FILE OVS openflow_controller $RYU_OFP_HOST:$RYU_OFP_PORT
|
||||
iniset /$Q_PLUGIN_CONF_FILE OVS openflow_rest_api $RYU_API_HOST:$RYU_API_PORT
|
||||
elif [[ "$Q_PLUGIN" = "bigswitch_floodlight" ]]; then
|
||||
iniset /$Q_PLUGIN_CONF_FILE RESTPROXY servers $BS_FL_CONTROLLERS_PORT
|
||||
iniset /$Q_PLUGIN_CONF_FILE RESTPROXY servertimeout $BS_FL_CONTROLLER_TIMEOUT
|
||||
fi
|
||||
}
|
||||
|
||||
@ -749,6 +761,8 @@ function _quantum_setup_interface_driver() {
|
||||
iniset $conf_file DEFAULT interface_driver quantum.agent.linux.interface.BridgeInterfaceDriver
|
||||
elif [[ "$Q_PLUGIN" = "ryu" ]]; then
|
||||
iniset $conf_file DEFAULT interface_driver quantum.agent.linux.interface.RyuInterfaceDriver
|
||||
elif [[ "$Q_PLUGIN" = "bigswitch_floodlight" ]]; then
|
||||
iniset $conf_file DEFAULT interface_driver quantum.agent.linux.interface.OVSInterfaceDriver
|
||||
fi
|
||||
}
|
||||
|
||||
@ -835,7 +849,7 @@ function _ssh_check_quantum() {
|
||||
# Quantum 3rd party programs
|
||||
#---------------------------
|
||||
# A comma-separated list of 3rd party programs
|
||||
QUANTUM_THIRD_PARTIES="ryu"
|
||||
QUANTUM_THIRD_PARTIES="ryu,bigswitch_floodlight"
|
||||
for third_party in ${QUANTUM_THIRD_PARTIES//,/ }; do
|
||||
source lib/$third_party
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user