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_plugins/ml2 b/lib/neutron_plugins/ml2
index 4ceabe7..e985dcb 100644
--- a/lib/neutron_plugins/ml2
+++ b/lib/neutron_plugins/ml2
@@ -33,7 +33,7 @@
# L3 Plugin to load for ML2
ML2_L3_PLUGIN=${ML2_L3_PLUGIN:-neutron.services.l3_router.l3_router_plugin.L3RouterPlugin}
-function populate_ml2_config() {
+function populate_ml2_config {
CONF=$1
SECTION=$2
OPTS=$3
@@ -47,7 +47,7 @@
done
}
-function neutron_plugin_configure_common() {
+function neutron_plugin_configure_common {
Q_PLUGIN_CONF_PATH=etc/neutron/plugins/ml2
Q_PLUGIN_CONF_FILENAME=ml2_conf.ini
Q_DB_NAME="neutron_ml2"
@@ -57,7 +57,7 @@
_neutron_service_plugin_class_add $ML2_L3_PLUGIN
}
-function neutron_plugin_configure_service() {
+function neutron_plugin_configure_service {
if [[ "$Q_ML2_TENANT_NETWORK_TYPE" != "" ]]; then
Q_SRV_EXTRA_OPTS+=(tenant_network_types=$Q_ML2_TENANT_NETWORK_TYPE)
elif [[ "$ENABLE_TENANT_TUNNELS" = "True" ]]; then
@@ -114,7 +114,7 @@
populate_ml2_config /$Q_PLUGIN_CONF_FILE ml2_type_vlan $Q_ML2_PLUGIN_VLAN_TYPE_OPTIONS
}
-function has_neutron_plugin_security_group() {
+function has_neutron_plugin_security_group {
return 0
}