| Mark McClain | b05c876 | 2013-07-06 23:29:39 -0400 | [diff] [blame] | 1 | # Brocade Neutron Plugin | 
 | 2 | # ---------------------- | 
 | 3 |  | 
 | 4 | # Save trace setting | 
 | 5 | BRCD_XTRACE=$(set +o | grep xtrace) | 
 | 6 | set +o xtrace | 
 | 7 |  | 
 | 8 | function is_neutron_ovs_base_plugin() { | 
 | 9 |     return 1 | 
 | 10 | } | 
 | 11 |  | 
 | 12 | function neutron_plugin_create_nova_conf() { | 
 | 13 |     NOVA_VIF_DRIVER=${NOVA_VIF_DRIVER:-"nova.virt.libvirt.vif.LibvirtGenericVIFDriver"} | 
 | 14 | } | 
 | 15 |  | 
 | 16 | function neutron_plugin_install_agent_packages() { | 
 | 17 |     install_package bridge-utils | 
 | 18 | } | 
 | 19 |  | 
 | 20 | function neutron_plugin_configure_common() { | 
 | 21 |     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 |  | 
 | 27 | function neutron_plugin_configure_debug_command() { | 
 | 28 |     iniset $NEUTRON_TEST_CONFIG_FILE DEFAULT external_network_bridge | 
 | 29 | } | 
 | 30 |  | 
 | 31 | function neutron_plugin_configure_dhcp_agent() { | 
 | 32 |     iniset $Q_DHCP_CONF_FILE DEFAULT dhcp_agent_manager neutron.agent.dhcp_agent.DhcpAgentWithStateReport | 
 | 33 | } | 
 | 34 |  | 
 | 35 | function neutron_plugin_configure_l3_agent() { | 
 | 36 |     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 |  | 
 | 40 | function neutron_plugin_configure_plugin_agent() { | 
| Shiv Haris | 55d9b9a | 2014-01-14 11:33:28 -0800 | [diff] [blame] | 41 |     AGENT_BINARY="$NEUTRON_BIN_DIR/neutron-linuxbridge-agent" | 
| Mark McClain | b05c876 | 2013-07-06 23:29:39 -0400 | [diff] [blame] | 42 | } | 
 | 43 |  | 
 | 44 | function neutron_plugin_setup_interface_driver() { | 
 | 45 |     local conf_file=$1 | 
 | 46 |     iniset $conf_file DEFAULT interface_driver neutron.agent.linux.interface.BridgeInterfaceDriver | 
 | 47 | } | 
 | 48 |  | 
 | 49 | function has_neutron_plugin_security_group() { | 
 | 50 |     # 0 means True here | 
 | 51 |     return 0 | 
 | 52 | } | 
 | 53 |  | 
 | 54 | function neutron_plugin_check_adv_test_requirements() { | 
 | 55 |     is_service_enabled q-agt && is_service_enabled q-dhcp && return 0 | 
 | 56 | } | 
 | 57 |  | 
 | 58 | # Restore xtrace | 
 | 59 | $BRCD_XTRACE |