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/openvswitch_agent b/lib/neutron_plugins/openvswitch_agent
index 46c2a5c..3a2bdc3 100644
--- a/lib/neutron_plugins/openvswitch_agent
+++ b/lib/neutron_plugins/openvswitch_agent
@@ -7,7 +7,7 @@
source $TOP_DIR/lib/neutron_plugins/ovs_base
-function neutron_plugin_create_nova_conf() {
+function neutron_plugin_create_nova_conf {
_neutron_ovs_base_configure_nova_vif_driver
if [ "$VIRT_DRIVER" = 'xenserver' ]; then
iniset $NOVA_CONF DEFAULT xenapi_vif_driver nova.virt.xenapi.vif.XenAPIOpenVswitchDriver
@@ -17,24 +17,24 @@
fi
}
-function neutron_plugin_install_agent_packages() {
+function neutron_plugin_install_agent_packages {
_neutron_ovs_base_install_agent_packages
}
-function neutron_plugin_configure_debug_command() {
+function neutron_plugin_configure_debug_command {
_neutron_ovs_base_configure_debug_command
}
-function neutron_plugin_configure_dhcp_agent() {
+function neutron_plugin_configure_dhcp_agent {
iniset $Q_DHCP_CONF_FILE DEFAULT dhcp_agent_manager neutron.agent.dhcp_agent.DhcpAgentWithStateReport
}
-function neutron_plugin_configure_l3_agent() {
+function neutron_plugin_configure_l3_agent {
_neutron_ovs_base_configure_l3_agent
iniset $Q_L3_CONF_FILE DEFAULT l3_agent_manager neutron.agent.l3_agent.L3NATAgentWithStateReport
}
-function neutron_plugin_configure_plugin_agent() {
+function neutron_plugin_configure_plugin_agent {
# Setup integration bridge
_neutron_ovs_base_setup_bridge $OVS_BRIDGE
_neutron_ovs_base_configure_firewall_driver
@@ -118,12 +118,12 @@
done
}
-function neutron_plugin_setup_interface_driver() {
+function neutron_plugin_setup_interface_driver {
local conf_file=$1
iniset $conf_file DEFAULT interface_driver neutron.agent.linux.interface.OVSInterfaceDriver
}
-function neutron_plugin_check_adv_test_requirements() {
+function neutron_plugin_check_adv_test_requirements {
is_service_enabled q-agt && is_service_enabled q-dhcp && return 0
}