Mark McClain | b05c876 | 2013-07-06 23:29:39 -0400 | [diff] [blame] | 1 | # Neuton Big Switch/FloodLight plugin |
| 2 | # ------------------------------------ |
| 3 | |
| 4 | # Save trace setting |
| 5 | MY_XTRACE=$(set +o | grep xtrace) |
| 6 | set +o xtrace |
| 7 | |
| 8 | source $TOP_DIR/lib/neutron_plugins/ovs_base |
| 9 | source $TOP_DIR/lib/neutron_thirdparty/bigswitch_floodlight # for third party service specific configuration values |
| 10 | |
Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame^] | 11 | function neutron_plugin_create_nova_conf { |
Aaron Rosen | 4540d00 | 2013-10-24 13:59:33 -0700 | [diff] [blame] | 12 | : |
Mark McClain | b05c876 | 2013-07-06 23:29:39 -0400 | [diff] [blame] | 13 | } |
| 14 | |
Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame^] | 15 | function neutron_plugin_install_agent_packages { |
Mark McClain | b05c876 | 2013-07-06 23:29:39 -0400 | [diff] [blame] | 16 | _neutron_ovs_base_install_agent_packages |
| 17 | } |
| 18 | |
Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame^] | 19 | function neutron_plugin_configure_common { |
Mark McClain | b05c876 | 2013-07-06 23:29:39 -0400 | [diff] [blame] | 20 | Q_PLUGIN_CONF_PATH=etc/neutron/plugins/bigswitch |
| 21 | Q_PLUGIN_CONF_FILENAME=restproxy.ini |
| 22 | Q_DB_NAME="restproxy_neutron" |
| 23 | Q_PLUGIN_CLASS="neutron.plugins.bigswitch.plugin.NeutronRestProxyV2" |
| 24 | BS_FL_CONTROLLERS_PORT=${BS_FL_CONTROLLERS_PORT:-localhost:80} |
| 25 | BS_FL_CONTROLLER_TIMEOUT=${BS_FL_CONTROLLER_TIMEOUT:-10} |
| 26 | } |
| 27 | |
Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame^] | 28 | function neutron_plugin_configure_debug_command { |
Mark McClain | b05c876 | 2013-07-06 23:29:39 -0400 | [diff] [blame] | 29 | _neutron_ovs_base_configure_debug_command |
| 30 | } |
| 31 | |
Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame^] | 32 | function neutron_plugin_configure_dhcp_agent { |
Mark McClain | b05c876 | 2013-07-06 23:29:39 -0400 | [diff] [blame] | 33 | : |
| 34 | } |
| 35 | |
Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame^] | 36 | function neutron_plugin_configure_l3_agent { |
Mark McClain | b05c876 | 2013-07-06 23:29:39 -0400 | [diff] [blame] | 37 | _neutron_ovs_base_configure_l3_agent |
| 38 | } |
| 39 | |
Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame^] | 40 | function neutron_plugin_configure_plugin_agent { |
Mark McClain | b05c876 | 2013-07-06 23:29:39 -0400 | [diff] [blame] | 41 | : |
| 42 | } |
| 43 | |
Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame^] | 44 | function neutron_plugin_configure_service { |
Mark McClain | b05c876 | 2013-07-06 23:29:39 -0400 | [diff] [blame] | 45 | iniset /$Q_PLUGIN_CONF_FILE restproxy servers $BS_FL_CONTROLLERS_PORT |
| 46 | iniset /$Q_PLUGIN_CONF_FILE restproxy servertimeout $BS_FL_CONTROLLER_TIMEOUT |
Sean Dague | 16dd8b3 | 2014-02-03 09:10:54 +0900 | [diff] [blame] | 47 | if [ "$BS_FL_VIF_DRIVER" = "ivs" ]; then |
Mark McClain | b05c876 | 2013-07-06 23:29:39 -0400 | [diff] [blame] | 48 | iniset /$Q_PLUGIN_CONF_FILE nova vif_type ivs |
| 49 | fi |
| 50 | } |
| 51 | |
Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame^] | 52 | function neutron_plugin_setup_interface_driver { |
Mark McClain | b05c876 | 2013-07-06 23:29:39 -0400 | [diff] [blame] | 53 | local conf_file=$1 |
Sean Dague | 16dd8b3 | 2014-02-03 09:10:54 +0900 | [diff] [blame] | 54 | if [ "$BS_FL_VIF_DRIVER" = "ivs" ]; then |
Mark McClain | b05c876 | 2013-07-06 23:29:39 -0400 | [diff] [blame] | 55 | iniset $conf_file DEFAULT interface_driver neutron.agent.linux.interface.IVSInterfaceDriver |
| 56 | else |
| 57 | iniset $conf_file DEFAULT interface_driver neutron.agent.linux.interface.OVSInterfaceDriver |
| 58 | fi |
| 59 | } |
| 60 | |
| 61 | |
Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame^] | 62 | function has_neutron_plugin_security_group { |
Mark McClain | b05c876 | 2013-07-06 23:29:39 -0400 | [diff] [blame] | 63 | # 1 means False here |
| 64 | return 1 |
| 65 | } |
| 66 | |
Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame^] | 67 | function neutron_plugin_check_adv_test_requirements { |
Mark McClain | b05c876 | 2013-07-06 23:29:39 -0400 | [diff] [blame] | 68 | is_service_enabled q-agt && is_service_enabled q-dhcp && return 0 |
| 69 | } |
| 70 | |
| 71 | # Restore xtrace |
| 72 | $MY_XTRACE |