blob: 4443fa78234bc70de3620c3c10e6de0e15b24fe4 [file] [log] [blame]
Mark McClainb05c8762013-07-06 23:29:39 -04001# Brocade Neutron Plugin
2# ----------------------
3
4# Save trace setting
5BRCD_XTRACE=$(set +o | grep xtrace)
6set +o xtrace
7
Ian Wienandaee18c72014-02-21 15:35:08 +11008function is_neutron_ovs_base_plugin {
Mark McClainb05c8762013-07-06 23:29:39 -04009 return 1
10}
11
Ian Wienandaee18c72014-02-21 15:35:08 +110012function neutron_plugin_create_nova_conf {
Mark McClainb05c8762013-07-06 23:29:39 -040013 NOVA_VIF_DRIVER=${NOVA_VIF_DRIVER:-"nova.virt.libvirt.vif.LibvirtGenericVIFDriver"}
14}
15
Ian Wienandaee18c72014-02-21 15:35:08 +110016function neutron_plugin_install_agent_packages {
Mark McClainb05c8762013-07-06 23:29:39 -040017 install_package bridge-utils
18}
19
Ian Wienandaee18c72014-02-21 15:35:08 +110020function neutron_plugin_configure_common {
Mark McClainb05c8762013-07-06 23:29:39 -040021 Q_PLUGIN_CONF_PATH=etc/neutron/plugins/brocade
22 Q_PLUGIN_CONF_FILENAME=brocade.ini
23 Q_DB_NAME="brcd_neutron"
24 Q_PLUGIN_CLASS="neutron.plugins.brocade.NeutronPlugin.BrocadePluginV2"
25}
26
Ian Wienandaee18c72014-02-21 15:35:08 +110027function neutron_plugin_configure_debug_command {
Mark McClainb05c8762013-07-06 23:29:39 -040028 iniset $NEUTRON_TEST_CONFIG_FILE DEFAULT external_network_bridge
29}
30
Ian Wienandaee18c72014-02-21 15:35:08 +110031function neutron_plugin_configure_dhcp_agent {
Mark McClainb05c8762013-07-06 23:29:39 -040032 iniset $Q_DHCP_CONF_FILE DEFAULT dhcp_agent_manager neutron.agent.dhcp_agent.DhcpAgentWithStateReport
33}
34
Ian Wienandaee18c72014-02-21 15:35:08 +110035function neutron_plugin_configure_l3_agent {
Mark McClainb05c8762013-07-06 23:29:39 -040036 iniset $Q_L3_CONF_FILE DEFAULT external_network_bridge
37 iniset $Q_L3_CONF_FILE DEFAULT l3_agent_manager neutron.agent.l3_agent.L3NATAgentWithStateReport
38}
39
Ian Wienandaee18c72014-02-21 15:35:08 +110040function neutron_plugin_configure_plugin_agent {
Shiv Haris55d9b9a2014-01-14 11:33:28 -080041 AGENT_BINARY="$NEUTRON_BIN_DIR/neutron-linuxbridge-agent"
Mark McClainb05c8762013-07-06 23:29:39 -040042}
43
Ian Wienandaee18c72014-02-21 15:35:08 +110044function neutron_plugin_setup_interface_driver {
Mark McClainb05c8762013-07-06 23:29:39 -040045 local conf_file=$1
46 iniset $conf_file DEFAULT interface_driver neutron.agent.linux.interface.BridgeInterfaceDriver
47}
48
Ian Wienandaee18c72014-02-21 15:35:08 +110049function has_neutron_plugin_security_group {
Mark McClainb05c8762013-07-06 23:29:39 -040050 # 0 means True here
51 return 0
52}
53
Ian Wienandaee18c72014-02-21 15:35:08 +110054function neutron_plugin_check_adv_test_requirements {
Mark McClainb05c8762013-07-06 23:29:39 -040055 is_service_enabled q-agt && is_service_enabled q-dhcp && return 0
56}
57
58# Restore xtrace
59$BRCD_XTRACE