Shiv Haris | f29bb32 | 2013-01-23 03:00:16 +0000 | [diff] [blame] | 1 | # Brocade Quantum Plugin |
| 2 | # ---------------------- |
| 3 | |
| 4 | # Save trace setting |
| 5 | BRCD_XTRACE=$(set +o | grep xtrace) |
| 6 | set +o xtrace |
| 7 | |
| 8 | function is_quantum_ovs_base_plugin() { |
| 9 | return 1 |
| 10 | } |
| 11 | |
| 12 | function quantum_plugin_create_nova_conf() { |
Gary Kotton | 4d8c5b0 | 2013-03-07 12:54:34 +0000 | [diff] [blame] | 13 | NOVA_VIF_DRIVER=${NOVA_VIF_DRIVER:-"nova.virt.libvirt.vif.LibvirtGenericVIFDriver"} |
Shiv Haris | f29bb32 | 2013-01-23 03:00:16 +0000 | [diff] [blame] | 14 | } |
| 15 | |
| 16 | function quantum_plugin_install_agent_packages() { |
| 17 | install_package bridge-utils |
| 18 | } |
| 19 | |
| 20 | function quantum_plugin_configure_common() { |
| 21 | Q_PLUGIN_CONF_PATH=etc/quantum/plugins/brocade |
| 22 | Q_PLUGIN_CONF_FILENAME=brocade.ini |
| 23 | Q_DB_NAME="brcd_quantum" |
| 24 | Q_PLUGIN_CLASS="quantum.plugins.brocade.QuantumPlugin.BrocadePluginV2" |
| 25 | } |
| 26 | |
| 27 | function quantum_plugin_configure_debug_command() { |
Shiv Haris | f05f11e | 2013-05-31 19:04:32 -0700 | [diff] [blame] | 28 | iniset $QUANTUM_TEST_CONFIG_FILE DEFAULT external_network_bridge |
Shiv Haris | f29bb32 | 2013-01-23 03:00:16 +0000 | [diff] [blame] | 29 | } |
| 30 | |
| 31 | function quantum_plugin_configure_dhcp_agent() { |
Shiv Haris | f05f11e | 2013-05-31 19:04:32 -0700 | [diff] [blame] | 32 | iniset $Q_DHCP_CONF_FILE DEFAULT dhcp_agent_manager quantum.agent.dhcp_agent.DhcpAgentWithStateReport |
Shiv Haris | f29bb32 | 2013-01-23 03:00:16 +0000 | [diff] [blame] | 33 | } |
| 34 | |
| 35 | function quantum_plugin_configure_l3_agent() { |
Shiv Haris | f05f11e | 2013-05-31 19:04:32 -0700 | [diff] [blame] | 36 | iniset $Q_L3_CONF_FILE DEFAULT external_network_bridge |
| 37 | iniset $Q_L3_CONF_FILE DEFAULT l3_agent_manager quantum.agent.l3_agent.L3NATAgentWithStateReport |
Shiv Haris | f29bb32 | 2013-01-23 03:00:16 +0000 | [diff] [blame] | 38 | } |
| 39 | |
| 40 | function quantum_plugin_configure_plugin_agent() { |
| 41 | AGENT_BINARY="$QUANTUM_DIR/bin/quantum-linuxbridge-agent" |
| 42 | } |
| 43 | |
| 44 | function quantum_plugin_setup_interface_driver() { |
| 45 | local conf_file=$1 |
| 46 | iniset $conf_file DEFAULT interface_driver quantum.agent.linux.interface.BridgeInterfaceDriver |
| 47 | } |
| 48 | |
Akihiro MOTOKI | 3452f8e | 2013-03-21 14:11:27 +0900 | [diff] [blame] | 49 | function has_quantum_plugin_security_group() { |
| 50 | # 0 means True here |
| 51 | return 0 |
| 52 | } |
| 53 | |
armando-migliaccio | 7c025fe | 2013-05-08 11:33:07 -0700 | [diff] [blame] | 54 | function quantum_plugin_check_adv_test_requirements() { |
| 55 | is_service_enabled q-agt && is_service_enabled q-dhcp && return 0 |
| 56 | } |
| 57 | |
Shiv Haris | f29bb32 | 2013-01-23 03:00:16 +0000 | [diff] [blame] | 58 | # Restore xtrace |
| 59 | $BRCD_XTRACE |