blob: 4fd8c7c48f1b2d7991ad6785fe7d91cc0dfbee65 [file] [log] [blame]
Hemanth Ravid78c4052014-01-26 17:30:11 -08001# Neutron One Convergence plugin
Dean Troyer3324f192014-09-18 09:26:39 -05002# ------------------------------
3
Hemanth Ravid78c4052014-01-26 17:30:11 -08004# Save trace setting
Dean Troyere3a91602014-03-28 12:40:56 -05005OC_XTRACE=$(set +o | grep xtrace)
Hemanth Ravid78c4052014-01-26 17:30:11 -08006set +o xtrace
7
8source $TOP_DIR/lib/neutron_plugins/ovs_base
9
10Q_L3_ENABLED=true
11Q_L3_ROUTER_PER_TENANT=true
12Q_USE_NAMESPACE=true
13
14function neutron_plugin_install_agent_packages {
15 _neutron_ovs_base_install_agent_packages
16}
17# Configure common parameters
18function 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 Ravid78c4052014-01-26 17:30:11 -080023}
24
25# Configure plugin specific information
26function 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
33function neutron_plugin_configure_debug_command {
34 _neutron_ovs_base_configure_debug_command
35}
36
37function neutron_plugin_setup_interface_driver {
38 local conf_file=$1
39 iniset $conf_file DEFAULT interface_driver neutron.agent.linux.interface.OVSInterfaceDriver
40}
41
42function has_neutron_plugin_security_group {
43 # 1 means False here
44 return 0
45}
46
47function setup_integration_bridge {
48 _neutron_ovs_base_setup_bridge $OVS_BRIDGE
49}
50
51function 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
56function 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
61function 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
68function 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 Troyere3a91602014-03-28 12:40:56 -050076$OC_XTRACE