blob: 4cb0da84ea7a495fe75c17ffb02ef82077cc7514 [file] [log] [blame]
Mark McClainb05c8762013-07-06 23:29:39 -04001# Neuton Big Switch/FloodLight plugin
2# ------------------------------------
3
4# Save trace setting
5MY_XTRACE=$(set +o | grep xtrace)
6set +o xtrace
7
8source $TOP_DIR/lib/neutron_plugins/ovs_base
9source $TOP_DIR/lib/neutron_thirdparty/bigswitch_floodlight # for third party service specific configuration values
10
Ian Wienandaee18c72014-02-21 15:35:08 +110011function neutron_plugin_create_nova_conf {
Aaron Rosen4540d002013-10-24 13:59:33 -070012 :
Mark McClainb05c8762013-07-06 23:29:39 -040013}
14
Ian Wienandaee18c72014-02-21 15:35:08 +110015function neutron_plugin_install_agent_packages {
Mark McClainb05c8762013-07-06 23:29:39 -040016 _neutron_ovs_base_install_agent_packages
17}
18
Ian Wienandaee18c72014-02-21 15:35:08 +110019function neutron_plugin_configure_common {
Mark McClainb05c8762013-07-06 23:29:39 -040020 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 Wienandaee18c72014-02-21 15:35:08 +110028function neutron_plugin_configure_debug_command {
Mark McClainb05c8762013-07-06 23:29:39 -040029 _neutron_ovs_base_configure_debug_command
30}
31
Ian Wienandaee18c72014-02-21 15:35:08 +110032function neutron_plugin_configure_dhcp_agent {
Mark McClainb05c8762013-07-06 23:29:39 -040033 :
34}
35
Ian Wienandaee18c72014-02-21 15:35:08 +110036function neutron_plugin_configure_l3_agent {
Mark McClainb05c8762013-07-06 23:29:39 -040037 _neutron_ovs_base_configure_l3_agent
38}
39
Ian Wienandaee18c72014-02-21 15:35:08 +110040function neutron_plugin_configure_plugin_agent {
Mark McClainb05c8762013-07-06 23:29:39 -040041 :
42}
43
Ian Wienandaee18c72014-02-21 15:35:08 +110044function neutron_plugin_configure_service {
Mark McClainb05c8762013-07-06 23:29:39 -040045 iniset /$Q_PLUGIN_CONF_FILE restproxy servers $BS_FL_CONTROLLERS_PORT
46 iniset /$Q_PLUGIN_CONF_FILE restproxy servertimeout $BS_FL_CONTROLLER_TIMEOUT
Sean Dague16dd8b32014-02-03 09:10:54 +090047 if [ "$BS_FL_VIF_DRIVER" = "ivs" ]; then
Mark McClainb05c8762013-07-06 23:29:39 -040048 iniset /$Q_PLUGIN_CONF_FILE nova vif_type ivs
49 fi
50}
51
Ian Wienandaee18c72014-02-21 15:35:08 +110052function neutron_plugin_setup_interface_driver {
Mark McClainb05c8762013-07-06 23:29:39 -040053 local conf_file=$1
Sean Dague16dd8b32014-02-03 09:10:54 +090054 if [ "$BS_FL_VIF_DRIVER" = "ivs" ]; then
Mark McClainb05c8762013-07-06 23:29:39 -040055 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 Wienandaee18c72014-02-21 15:35:08 +110062function has_neutron_plugin_security_group {
Mark McClainb05c8762013-07-06 23:29:39 -040063 # 1 means False here
64 return 1
65}
66
Ian Wienandaee18c72014-02-21 15:35:08 +110067function neutron_plugin_check_adv_test_requirements {
Mark McClainb05c8762013-07-06 23:29:39 -040068 is_service_enabled q-agt && is_service_enabled q-dhcp && return 0
69}
70
71# Restore xtrace
72$MY_XTRACE