16dd8b3ed9
we mostly have a consistent style on if/then & for/do in devstack, except when we don't. This attempts to build a set of rules to enforce this. Because there are times when lines are legitimately long, and there is a continuation, this starts off ignoring if and for loops with continuations. But for short versions, we should enforce this. Changes to make devstack pass are included. The fact that the cleanup patch was so small is pretty solid reason that this is actually the style we've all agreed to. Part of a git stash from hong kong that I finally cleaned up. Change-Id: I6376d7afd59cc5ebba9ed69e5ee784a3d5934a10
53 lines
1.2 KiB
Plaintext
53 lines
1.2 KiB
Plaintext
# Big Switch/FloodLight OpenFlow Controller
|
|
# ------------------------------------------
|
|
|
|
# Save trace setting
|
|
MY_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}
|
|
|
|
function configure_bigswitch_floodlight() {
|
|
:
|
|
}
|
|
|
|
function init_bigswitch_floodlight() {
|
|
install_neutron_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() {
|
|
:
|
|
}
|
|
|
|
function check_bigswitch_floodlight() {
|
|
:
|
|
}
|
|
|
|
# Restore xtrace
|
|
$MY_XTRACE
|