fix bash8 indent problems in lib/neutron and friends
Change-Id: Ia83ce84b792494800fbfe7baa6423c8de9260014
This commit is contained in:
parent
537d4025c5
commit
3bdb922c40
26
lib/neutron
26
lib/neutron
@ -79,8 +79,8 @@ NEUTRON_AUTH_CACHE_DIR=${NEUTRON_AUTH_CACHE_DIR:-/var/cache/neutron}
|
|||||||
# Support entry points installation of console scripts
|
# Support entry points installation of console scripts
|
||||||
if [[ -d $NEUTRON_DIR/bin/neutron-server ]]; then
|
if [[ -d $NEUTRON_DIR/bin/neutron-server ]]; then
|
||||||
NEUTRON_BIN_DIR=$NEUTRON_DIR/bin
|
NEUTRON_BIN_DIR=$NEUTRON_DIR/bin
|
||||||
else
|
else
|
||||||
NEUTRON_BIN_DIR=$(get_python_exec_prefix)
|
NEUTRON_BIN_DIR=$(get_python_exec_prefix)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
NEUTRON_CONF_DIR=/etc/neutron
|
NEUTRON_CONF_DIR=/etc/neutron
|
||||||
@ -373,7 +373,7 @@ function create_neutron_initial_network() {
|
|||||||
iniset $Q_L3_CONF_FILE DEFAULT router_id $ROUTER_ID
|
iniset $Q_L3_CONF_FILE DEFAULT router_id $ROUTER_ID
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# init_neutron() - Initialize databases, etc.
|
# init_neutron() - Initialize databases, etc.
|
||||||
@ -404,7 +404,7 @@ function install_neutron_agent_packages() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if is_service_enabled q-lbaas; then
|
if is_service_enabled q-lbaas; then
|
||||||
neutron_agent_lbaas_install_agent_packages
|
neutron_agent_lbaas_install_agent_packages
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -414,13 +414,13 @@ function start_neutron_service_and_check() {
|
|||||||
local cfg_file
|
local cfg_file
|
||||||
local CFG_FILE_OPTIONS="--config-file $NEUTRON_CONF --config-file /$Q_PLUGIN_CONF_FILE"
|
local CFG_FILE_OPTIONS="--config-file $NEUTRON_CONF --config-file /$Q_PLUGIN_CONF_FILE"
|
||||||
for cfg_file in ${Q_PLUGIN_EXTRA_CONF_FILES[@]}; do
|
for cfg_file in ${Q_PLUGIN_EXTRA_CONF_FILES[@]}; do
|
||||||
CFG_FILE_OPTIONS+=" --config-file /$cfg_file"
|
CFG_FILE_OPTIONS+=" --config-file /$cfg_file"
|
||||||
done
|
done
|
||||||
# Start the Neutron service
|
# Start the Neutron service
|
||||||
screen_it q-svc "cd $NEUTRON_DIR && python $NEUTRON_BIN_DIR/neutron-server $CFG_FILE_OPTIONS"
|
screen_it q-svc "cd $NEUTRON_DIR && python $NEUTRON_BIN_DIR/neutron-server $CFG_FILE_OPTIONS"
|
||||||
echo "Waiting for Neutron to start..."
|
echo "Waiting for Neutron to start..."
|
||||||
if ! timeout $SERVICE_TIMEOUT sh -c "while ! wget --no-proxy -q -O- http://$Q_HOST:$Q_PORT; do sleep 1; done"; then
|
if ! timeout $SERVICE_TIMEOUT sh -c "while ! wget --no-proxy -q -O- http://$Q_HOST:$Q_PORT; do sleep 1; done"; then
|
||||||
die $LINENO "Neutron did not start"
|
die $LINENO "Neutron did not start"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -712,9 +712,9 @@ function _neutron_setup_rootwrap() {
|
|||||||
# Set up ``rootwrap.conf``, pointing to ``$NEUTRON_CONF_DIR/rootwrap.d``
|
# Set up ``rootwrap.conf``, pointing to ``$NEUTRON_CONF_DIR/rootwrap.d``
|
||||||
# location moved in newer versions, prefer new location
|
# location moved in newer versions, prefer new location
|
||||||
if test -r $NEUTRON_DIR/etc/neutron/rootwrap.conf; then
|
if test -r $NEUTRON_DIR/etc/neutron/rootwrap.conf; then
|
||||||
sudo cp -p $NEUTRON_DIR/etc/neutron/rootwrap.conf $Q_RR_CONF_FILE
|
sudo cp -p $NEUTRON_DIR/etc/neutron/rootwrap.conf $Q_RR_CONF_FILE
|
||||||
else
|
else
|
||||||
sudo cp -p $NEUTRON_DIR/etc/rootwrap.conf $Q_RR_CONF_FILE
|
sudo cp -p $NEUTRON_DIR/etc/rootwrap.conf $Q_RR_CONF_FILE
|
||||||
fi
|
fi
|
||||||
sudo sed -e "s:^filters_path=.*$:filters_path=$Q_CONF_ROOTWRAP_D:" -i $Q_RR_CONF_FILE
|
sudo sed -e "s:^filters_path=.*$:filters_path=$Q_CONF_ROOTWRAP_D:" -i $Q_RR_CONF_FILE
|
||||||
sudo chown root:root $Q_RR_CONF_FILE
|
sudo chown root:root $Q_RR_CONF_FILE
|
||||||
@ -848,11 +848,11 @@ function _ssh_check_neutron() {
|
|||||||
# please refer to ``lib/neutron_thirdparty/README.md`` for details
|
# please refer to ``lib/neutron_thirdparty/README.md`` for details
|
||||||
NEUTRON_THIRD_PARTIES=""
|
NEUTRON_THIRD_PARTIES=""
|
||||||
for f in $TOP_DIR/lib/neutron_thirdparty/*; do
|
for f in $TOP_DIR/lib/neutron_thirdparty/*; do
|
||||||
third_party=$(basename $f)
|
third_party=$(basename $f)
|
||||||
if is_service_enabled $third_party; then
|
if is_service_enabled $third_party; then
|
||||||
source $TOP_DIR/lib/neutron_thirdparty/$third_party
|
source $TOP_DIR/lib/neutron_thirdparty/$third_party
|
||||||
NEUTRON_THIRD_PARTIES="$NEUTRON_THIRD_PARTIES,$third_party"
|
NEUTRON_THIRD_PARTIES="$NEUTRON_THIRD_PARTIES,$third_party"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
function _neutron_third_party_do() {
|
function _neutron_third_party_do() {
|
||||||
|
@ -52,11 +52,11 @@ function neutron_plugin_configure_dhcp_agent() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function neutron_plugin_configure_l3_agent() {
|
function neutron_plugin_configure_l3_agent() {
|
||||||
die $LINENO "q-l3 must not be executed with MidoNet plugin!"
|
die $LINENO "q-l3 must not be executed with MidoNet plugin!"
|
||||||
}
|
}
|
||||||
|
|
||||||
function neutron_plugin_configure_plugin_agent() {
|
function neutron_plugin_configure_plugin_agent() {
|
||||||
die $LINENO "q-agt must not be executed with MidoNet plugin!"
|
die $LINENO "q-agt must not be executed with MidoNet plugin!"
|
||||||
}
|
}
|
||||||
|
|
||||||
function neutron_plugin_configure_service() {
|
function neutron_plugin_configure_service() {
|
||||||
|
@ -101,15 +101,15 @@ function _neutron_setup_ovs_tunnels() {
|
|||||||
local id=0
|
local id=0
|
||||||
GRE_LOCAL_IP=${GRE_LOCAL_IP:-$HOST_IP}
|
GRE_LOCAL_IP=${GRE_LOCAL_IP:-$HOST_IP}
|
||||||
if [ -n "$GRE_REMOTE_IPS" ]; then
|
if [ -n "$GRE_REMOTE_IPS" ]; then
|
||||||
for ip in ${GRE_REMOTE_IPS//:/ }
|
for ip in ${GRE_REMOTE_IPS//:/ }
|
||||||
do
|
do
|
||||||
if [[ "$ip" == "$GRE_LOCAL_IP" ]]; then
|
if [[ "$ip" == "$GRE_LOCAL_IP" ]]; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
sudo ovs-vsctl --no-wait add-port $bridge gre$id -- \
|
sudo ovs-vsctl --no-wait add-port $bridge gre$id -- \
|
||||||
set Interface gre$id type=gre options:remote_ip=$ip
|
set Interface gre$id type=gre options:remote_ip=$ip
|
||||||
id=`expr $id + 1`
|
id=`expr $id + 1`
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,13 +58,13 @@ function neutron_plugin_configure_dhcp_agent() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function neutron_plugin_configure_l3_agent() {
|
function neutron_plugin_configure_l3_agent() {
|
||||||
# Nicira plugin does not run L3 agent
|
# Nicira plugin does not run L3 agent
|
||||||
die $LINENO "q-l3 should must not be executed with Nicira plugin!"
|
die $LINENO "q-l3 should must not be executed with Nicira plugin!"
|
||||||
}
|
}
|
||||||
|
|
||||||
function neutron_plugin_configure_plugin_agent() {
|
function neutron_plugin_configure_plugin_agent() {
|
||||||
# Nicira plugin does not run L2 agent
|
# Nicira plugin does not run L2 agent
|
||||||
die $LINENO "q-agt must not be executed with Nicira plugin!"
|
die $LINENO "q-agt must not be executed with Nicira plugin!"
|
||||||
}
|
}
|
||||||
|
|
||||||
function neutron_plugin_configure_service() {
|
function neutron_plugin_configure_service() {
|
||||||
|
Loading…
Reference in New Issue
Block a user