Hemanth Ravi | d78c405 | 2014-01-26 17:30:11 -0800 | [diff] [blame] | 1 | # Neutron One Convergence plugin |
Dean Troyer | 3324f19 | 2014-09-18 09:26:39 -0500 | [diff] [blame^] | 2 | # ------------------------------ |
| 3 | |
Hemanth Ravi | d78c405 | 2014-01-26 17:30:11 -0800 | [diff] [blame] | 4 | # Save trace setting |
Dean Troyer | e3a9160 | 2014-03-28 12:40:56 -0500 | [diff] [blame] | 5 | OC_XTRACE=$(set +o | grep xtrace) |
Hemanth Ravi | d78c405 | 2014-01-26 17:30:11 -0800 | [diff] [blame] | 6 | set +o xtrace |
| 7 | |
| 8 | source $TOP_DIR/lib/neutron_plugins/ovs_base |
| 9 | |
| 10 | Q_L3_ENABLED=true |
| 11 | Q_L3_ROUTER_PER_TENANT=true |
| 12 | Q_USE_NAMESPACE=true |
| 13 | |
| 14 | function neutron_plugin_install_agent_packages { |
| 15 | _neutron_ovs_base_install_agent_packages |
| 16 | } |
| 17 | # Configure common parameters |
| 18 | function neutron_plugin_configure_common { |
| 19 | |
| 20 | Q_PLUGIN_CONF_PATH=etc/neutron/plugins/oneconvergence |
| 21 | Q_PLUGIN_CONF_FILENAME=nvsdplugin.ini |
| 22 | Q_PLUGIN_CLASS="neutron.plugins.oneconvergence.plugin.OneConvergencePluginV2" |
Hemanth Ravi | d78c405 | 2014-01-26 17:30:11 -0800 | [diff] [blame] | 23 | } |
| 24 | |
| 25 | # Configure plugin specific information |
| 26 | function neutron_plugin_configure_service { |
| 27 | iniset /$Q_PLUGIN_CONF_FILE nvsd nvsd_ip $NVSD_IP |
| 28 | iniset /$Q_PLUGIN_CONF_FILE nvsd nvsd_port $NVSD_PORT |
| 29 | iniset /$Q_PLUGIN_CONF_FILE nvsd nvsd_user $NVSD_USER |
| 30 | iniset /$Q_PLUGIN_CONF_FILE nvsd nvsd_passwd $NVSD_PASSWD |
| 31 | } |
| 32 | |
| 33 | function neutron_plugin_configure_debug_command { |
| 34 | _neutron_ovs_base_configure_debug_command |
| 35 | } |
| 36 | |
| 37 | function neutron_plugin_setup_interface_driver { |
| 38 | local conf_file=$1 |
| 39 | iniset $conf_file DEFAULT interface_driver neutron.agent.linux.interface.OVSInterfaceDriver |
| 40 | } |
| 41 | |
| 42 | function has_neutron_plugin_security_group { |
| 43 | # 1 means False here |
| 44 | return 0 |
| 45 | } |
| 46 | |
| 47 | function setup_integration_bridge { |
| 48 | _neutron_ovs_base_setup_bridge $OVS_BRIDGE |
| 49 | } |
| 50 | |
| 51 | function neutron_plugin_configure_dhcp_agent { |
| 52 | setup_integration_bridge |
| 53 | iniset $Q_DHCP_CONF_FILE DEFAULT dhcp_agent_manager neutron.agent.dhcp_agent.DhcpAgentWithStateReport |
| 54 | } |
| 55 | |
| 56 | function neutron_plugin_configure_l3_agent { |
| 57 | _neutron_ovs_base_configure_l3_agent |
| 58 | iniset $Q_L3_CONF_FILE DEFAULT l3_agent_manager neutron.agent.l3_agent.L3NATAgentWithStateReport |
| 59 | } |
| 60 | |
| 61 | function neutron_plugin_configure_plugin_agent { |
| 62 | |
| 63 | AGENT_BINARY="$NEUTRON_BIN_DIR/neutron-nvsd-agent" |
| 64 | |
| 65 | _neutron_ovs_base_configure_firewall_driver |
| 66 | } |
| 67 | |
| 68 | function neutron_plugin_create_nova_conf { |
| 69 | NOVA_VIF_DRIVER=${NOVA_VIF_DRIVER:-"nova.virt.libvirt.vif.LibvirtGenericVIFDriver"} |
| 70 | if ( is_service_enabled n-cpu && ! ( is_service_enabled q-dhcp )) ; then |
| 71 | setup_integration_bridge |
| 72 | fi |
| 73 | } |
| 74 | |
| 75 | # Restore xtrace |
Dean Troyer | e3a9160 | 2014-03-28 12:40:56 -0500 | [diff] [blame] | 76 | $OC_XTRACE |