Add support for the Quantum Ryu plugin.
This patch allows using the Quantum Ryu plugin.
Ryu plugin lets Quantum link Open vSwitch and Ryu OpenFlow controller[1].
Ryu OpenFlow controller is not Openstack component, but I added some
processing that is related with Ryu to stack.sh for the convenience of
the person who intend to try the plugin.
Instructions for using Ryu plugin:
1. Enable services: "q-svc", "q-agt", "q-dhcp", "q-l3", "quantum", "ryu"
2. Set Q_PLUGIN to "ryu"
3. Set an internal network interface name to connect br-int on plural
hosts to RYU_INTERNAL_INTERFACE (optional)
Example localrc:
disable_service n-net
enable_service q-svc q-agt q-dhcp q-l3 quantum ryu
Q_PLUGIN=ryu
RYU_INTERNAL_INTERFACE=eth1
[1] http://osrg.github.com/ryu/
Change-Id: Ic1da132fa421f1c70c10a319ee3239831b0f956f
diff --git a/lib/quantum b/lib/quantum
index 1025d2b..0b26622 100644
--- a/lib/quantum
+++ b/lib/quantum
@@ -33,5 +33,29 @@
sudo ovs-vsctl --no-wait br-set-external-id $bridge bridge-id $bridge
}
+function quantum_setup_external_bridge() {
+ local bridge=$1
+ # Create it if it does not exist
+ sudo ovs-vsctl --no-wait -- --may-exist add-br $bridge
+ # remove internal ports
+ for PORT in `sudo ovs-vsctl --no-wait list-ports $bridge`; do
+ TYPE=$(sudo ovs-vsctl get interface $PORT type)
+ if [[ "$TYPE" == "internal" ]]; then
+ echo `sudo ip link delete $PORT` > /dev/null
+ sudo ovs-vsctl --no-wait del-port $bridge $PORT
+ fi
+ done
+ # ensure no IP is configured on the public bridge
+ sudo ip addr flush dev $bridge
+}
+
+function is_quantum_ovs_base_plugin() {
+ local plguin=$1
+ if [[ ",openvswitch,ryu," =~ ,${plugin}, ]]; then
+ return 0
+ fi
+ return 1
+}
+
# Restore xtrace
$XTRACE