blob: efdd9ef79451747c31e6a8bac0534c34a5c1123a [file] [log] [blame]
Mark McClainb05c8762013-07-06 23:29:39 -04001# Neuton Big Switch/FloodLight plugin
2# ------------------------------------
3
4# Save trace setting
Dean Troyere3a91602014-03-28 12:40:56 -05005BS_XTRACE=$(set +o | grep xtrace)
Mark McClainb05c8762013-07-06 23:29:39 -04006set +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 {
Kevin Benton753afeb2014-02-13 17:17:30 -080041 # Set up integration bridge
42 _neutron_ovs_base_setup_bridge $OVS_BRIDGE
43 iniset /$Q_PLUGIN_CONF_FILE restproxyagent integration_bridge $OVS_BRIDGE
44 AGENT_BINARY="$NEUTRON_DIR/neutron/plugins/bigswitch/agent/restproxy_agent.py"
45
46 _neutron_ovs_base_configure_firewall_driver
Mark McClainb05c8762013-07-06 23:29:39 -040047}
48
Ian Wienandaee18c72014-02-21 15:35:08 +110049function neutron_plugin_configure_service {
Mark McClainb05c8762013-07-06 23:29:39 -040050 iniset /$Q_PLUGIN_CONF_FILE restproxy servers $BS_FL_CONTROLLERS_PORT
51 iniset /$Q_PLUGIN_CONF_FILE restproxy servertimeout $BS_FL_CONTROLLER_TIMEOUT
Sean Dague16dd8b32014-02-03 09:10:54 +090052 if [ "$BS_FL_VIF_DRIVER" = "ivs" ]; then
Mark McClainb05c8762013-07-06 23:29:39 -040053 iniset /$Q_PLUGIN_CONF_FILE nova vif_type ivs
54 fi
55}
56
Ian Wienandaee18c72014-02-21 15:35:08 +110057function neutron_plugin_setup_interface_driver {
Mark McClainb05c8762013-07-06 23:29:39 -040058 local conf_file=$1
Sean Dague16dd8b32014-02-03 09:10:54 +090059 if [ "$BS_FL_VIF_DRIVER" = "ivs" ]; then
Mark McClainb05c8762013-07-06 23:29:39 -040060 iniset $conf_file DEFAULT interface_driver neutron.agent.linux.interface.IVSInterfaceDriver
61 else
62 iniset $conf_file DEFAULT interface_driver neutron.agent.linux.interface.OVSInterfaceDriver
63 fi
64}
65
66
Ian Wienandaee18c72014-02-21 15:35:08 +110067function has_neutron_plugin_security_group {
Mark McClainb05c8762013-07-06 23:29:39 -040068 # 1 means False here
Kevin Benton753afeb2014-02-13 17:17:30 -080069 return 0
Mark McClainb05c8762013-07-06 23:29:39 -040070}
71
Ian Wienandaee18c72014-02-21 15:35:08 +110072function neutron_plugin_check_adv_test_requirements {
Mark McClainb05c8762013-07-06 23:29:39 -040073 is_service_enabled q-agt && is_service_enabled q-dhcp && return 0
74}
75
76# Restore xtrace
Dean Troyere3a91602014-03-28 12:40:56 -050077$BS_XTRACE