blob: 9e84f2e75aa02c165218fbfb18c323a454900270 [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
Mark McClainb05c8762013-07-06 23:29:39 -040022 Q_PLUGIN_CLASS="neutron.plugins.bigswitch.plugin.NeutronRestProxyV2"
23 BS_FL_CONTROLLERS_PORT=${BS_FL_CONTROLLERS_PORT:-localhost:80}
24 BS_FL_CONTROLLER_TIMEOUT=${BS_FL_CONTROLLER_TIMEOUT:-10}
25}
26
Ian Wienandaee18c72014-02-21 15:35:08 +110027function neutron_plugin_configure_debug_command {
Mark McClainb05c8762013-07-06 23:29:39 -040028 _neutron_ovs_base_configure_debug_command
29}
30
Ian Wienandaee18c72014-02-21 15:35:08 +110031function neutron_plugin_configure_dhcp_agent {
Mark McClainb05c8762013-07-06 23:29:39 -040032 :
33}
34
Ian Wienandaee18c72014-02-21 15:35:08 +110035function neutron_plugin_configure_l3_agent {
Mark McClainb05c8762013-07-06 23:29:39 -040036 _neutron_ovs_base_configure_l3_agent
37}
38
Ian Wienandaee18c72014-02-21 15:35:08 +110039function neutron_plugin_configure_plugin_agent {
Kevin Benton753afeb2014-02-13 17:17:30 -080040 # Set up integration bridge
41 _neutron_ovs_base_setup_bridge $OVS_BRIDGE
42 iniset /$Q_PLUGIN_CONF_FILE restproxyagent integration_bridge $OVS_BRIDGE
43 AGENT_BINARY="$NEUTRON_DIR/neutron/plugins/bigswitch/agent/restproxy_agent.py"
44
45 _neutron_ovs_base_configure_firewall_driver
Mark McClainb05c8762013-07-06 23:29:39 -040046}
47
Ian Wienandaee18c72014-02-21 15:35:08 +110048function neutron_plugin_configure_service {
Mark McClainb05c8762013-07-06 23:29:39 -040049 iniset /$Q_PLUGIN_CONF_FILE restproxy servers $BS_FL_CONTROLLERS_PORT
50 iniset /$Q_PLUGIN_CONF_FILE restproxy servertimeout $BS_FL_CONTROLLER_TIMEOUT
Sean Dague16dd8b32014-02-03 09:10:54 +090051 if [ "$BS_FL_VIF_DRIVER" = "ivs" ]; then
Mark McClainb05c8762013-07-06 23:29:39 -040052 iniset /$Q_PLUGIN_CONF_FILE nova vif_type ivs
53 fi
54}
55
Ian Wienandaee18c72014-02-21 15:35:08 +110056function neutron_plugin_setup_interface_driver {
Mark McClainb05c8762013-07-06 23:29:39 -040057 local conf_file=$1
Sean Dague16dd8b32014-02-03 09:10:54 +090058 if [ "$BS_FL_VIF_DRIVER" = "ivs" ]; then
Mark McClainb05c8762013-07-06 23:29:39 -040059 iniset $conf_file DEFAULT interface_driver neutron.agent.linux.interface.IVSInterfaceDriver
60 else
61 iniset $conf_file DEFAULT interface_driver neutron.agent.linux.interface.OVSInterfaceDriver
62 fi
63}
64
65
Ian Wienandaee18c72014-02-21 15:35:08 +110066function has_neutron_plugin_security_group {
Mark McClainb05c8762013-07-06 23:29:39 -040067 # 1 means False here
Kevin Benton753afeb2014-02-13 17:17:30 -080068 return 0
Mark McClainb05c8762013-07-06 23:29:39 -040069}
70
Ian Wienandaee18c72014-02-21 15:35:08 +110071function neutron_plugin_check_adv_test_requirements {
Mark McClainb05c8762013-07-06 23:29:39 -040072 is_service_enabled q-agt && is_service_enabled q-dhcp && return 0
73}
74
75# Restore xtrace
Dean Troyere3a91602014-03-28 12:40:56 -050076$BS_XTRACE