Enforce function declaration format in bash8
Check that function calls look like ^function foo {$ in bash8, and fix
all existing failures of that check. Add a note to HACKING.rst
Change-Id: Ic19eecb39e0b20273d1bcd551a42fe400d54e938
diff --git a/lib/neutron_thirdparty/ryu b/lib/neutron_thirdparty/ryu
index 5edf273..424a900 100644
--- a/lib/neutron_thirdparty/ryu
+++ b/lib/neutron_thirdparty/ryu
@@ -21,14 +21,14 @@
# configure_ryu can be called multiple times as neutron_pluing/ryu may call
# this function for neutron-ryu-agent
_RYU_CONFIGURED=${_RYU_CONFIGURED:-False}
-function configure_ryu() {
+function configure_ryu {
if [[ "$_RYU_CONFIGURED" == "False" ]]; then
setup_develop $RYU_DIR
_RYU_CONFIGURED=True
fi
}
-function init_ryu() {
+function init_ryu {
RYU_CONF_DIR=/etc/ryu
if [[ ! -d $RYU_CONF_DIR ]]; then
sudo mkdir -p $RYU_CONF_DIR
@@ -60,22 +60,22 @@
# Make this function idempotent and avoid cloning same repo many times
# with RECLONE=yes
_RYU_INSTALLED=${_RYU_INSTALLED:-False}
-function install_ryu() {
+function install_ryu {
if [[ "$_RYU_INSTALLED" == "False" ]]; then
git_clone $RYU_REPO $RYU_DIR $RYU_BRANCH
_RYU_INSTALLED=True
fi
}
-function start_ryu() {
+function start_ryu {
screen_it ryu "cd $RYU_DIR && $RYU_DIR/bin/ryu-manager --config-file $RYU_CONF"
}
-function stop_ryu() {
+function stop_ryu {
:
}
-function check_ryu() {
+function check_ryu {
:
}