| Hemanth Ravi | d78c405 | 2014-01-26 17:30:11 -0800 | [diff] [blame] | 1 | # Neutron One Convergence plugin | 
 | 2 | # --------------------------- | 
 | 3 | # Save trace setting | 
| Dean Troyer | e3a9160 | 2014-03-28 12:40:56 -0500 | [diff] [blame] | 4 | OC_XTRACE=$(set +o | grep xtrace) | 
| Hemanth Ravi | d78c405 | 2014-01-26 17:30:11 -0800 | [diff] [blame] | 5 | set +o xtrace | 
 | 6 |  | 
 | 7 | source $TOP_DIR/lib/neutron_plugins/ovs_base | 
 | 8 |  | 
 | 9 | Q_L3_ENABLED=true | 
 | 10 | Q_L3_ROUTER_PER_TENANT=true | 
 | 11 | Q_USE_NAMESPACE=true | 
 | 12 |  | 
 | 13 | function neutron_plugin_install_agent_packages { | 
 | 14 |     _neutron_ovs_base_install_agent_packages | 
 | 15 | } | 
 | 16 | # Configure common parameters | 
 | 17 | function neutron_plugin_configure_common { | 
 | 18 |  | 
 | 19 |     Q_PLUGIN_CONF_PATH=etc/neutron/plugins/oneconvergence | 
 | 20 |     Q_PLUGIN_CONF_FILENAME=nvsdplugin.ini | 
 | 21 |     Q_PLUGIN_CLASS="neutron.plugins.oneconvergence.plugin.OneConvergencePluginV2" | 
 | 22 |     Q_DB_NAME='oc_nvsd_neutron' | 
 | 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 |