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 | |
| 11 | function neutron_plugin_create_nova_conf() { |
| 12 | NOVA_VIF_DRIVER=${NOVA_VIF_DRIVER:-"nova.virt.libvirt.vif.LibvirtGenericVIFDriver"} |
| 13 | } |
| 14 | |
| 15 | function neutron_plugin_install_agent_packages() { |
| 16 | _neutron_ovs_base_install_agent_packages |
| 17 | } |
| 18 | |
| 19 | function neutron_plugin_configure_common() { |
| 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 | |
| 28 | function neutron_plugin_configure_debug_command() { |
| 29 | _neutron_ovs_base_configure_debug_command |
| 30 | } |
| 31 | |
| 32 | function neutron_plugin_configure_dhcp_agent() { |
| 33 | : |
| 34 | } |
| 35 | |
| 36 | function neutron_plugin_configure_l3_agent() { |
| 37 | _neutron_ovs_base_configure_l3_agent |
| 38 | } |
| 39 | |
| 40 | function neutron_plugin_configure_plugin_agent() { |
| 41 | : |
| 42 | } |
| 43 | |
| 44 | function neutron_plugin_configure_service() { |
| 45 | iniset /$Q_PLUGIN_CONF_FILE restproxy servers $BS_FL_CONTROLLERS_PORT |
| 46 | iniset /$Q_PLUGIN_CONF_FILE restproxy servertimeout $BS_FL_CONTROLLER_TIMEOUT |
| 47 | if [ "$BS_FL_VIF_DRIVER" = "ivs" ] |
| 48 | then |
| 49 | iniset /$Q_PLUGIN_CONF_FILE nova vif_type ivs |
| 50 | fi |
| 51 | } |
| 52 | |
| 53 | function neutron_plugin_setup_interface_driver() { |
| 54 | local conf_file=$1 |
| 55 | if [ "$BS_FL_VIF_DRIVER" = "ivs" ] |
| 56 | then |
| 57 | iniset $conf_file DEFAULT interface_driver neutron.agent.linux.interface.IVSInterfaceDriver |
| 58 | else |
| 59 | iniset $conf_file DEFAULT interface_driver neutron.agent.linux.interface.OVSInterfaceDriver |
| 60 | fi |
| 61 | } |
| 62 | |
| 63 | |
| 64 | function has_neutron_plugin_security_group() { |
| 65 | # 1 means False here |
| 66 | return 1 |
| 67 | } |
| 68 | |
| 69 | function neutron_plugin_check_adv_test_requirements() { |
| 70 | is_service_enabled q-agt && is_service_enabled q-dhcp && return 0 |
| 71 | } |
| 72 | |
| 73 | # Restore xtrace |
| 74 | $MY_XTRACE |