av-mido | 2c3428b | 2013-07-11 14:59:00 +0900 | [diff] [blame] | 1 | # Neutron MidoNet plugin |
| 2 | # ---------------------- |
| 3 | |
| 4 | # Save trace setting |
| 5 | MY_XTRACE=$(set +o | grep xtrace) |
| 6 | set +o xtrace |
| 7 | |
| 8 | function is_neutron_ovs_base_plugin() { |
| 9 | # MidoNet does not use l3-agent |
| 10 | # 0 means True here |
| 11 | return 1 |
| 12 | } |
| 13 | |
| 14 | function neutron_plugin_create_nova_conf() { |
| 15 | NOVA_VIF_DRIVER=${NOVA_VIF_DRIVER:-"midonet.nova.virt.libvirt.vif.MidonetVifDriver"} |
| 16 | } |
| 17 | |
| 18 | function neutron_plugin_install_agent_packages() { |
| 19 | : |
| 20 | } |
| 21 | |
| 22 | function neutron_plugin_configure_common() { |
| 23 | Q_PLUGIN_CONF_PATH=etc/neutron/plugins/midonet |
| 24 | Q_PLUGIN_CONF_FILENAME=midonet.ini |
| 25 | Q_DB_NAME="neutron_midonet" |
| 26 | Q_PLUGIN_CLASS="neutron.plugins.midonet.plugin.MidonetPluginV2" |
| 27 | } |
| 28 | |
| 29 | function neutron_plugin_configure_debug_command() { |
| 30 | : |
| 31 | } |
| 32 | |
| 33 | function neutron_plugin_configure_dhcp_agent() { |
| 34 | die $LINENO "q-dhcp must not be executed with MidoNet plugin!" |
| 35 | } |
| 36 | |
| 37 | function neutron_plugin_configure_l3_agent() { |
| 38 | die $LINENO "q-l3 must not be executed with MidoNet plugin!" |
| 39 | } |
| 40 | |
| 41 | function neutron_plugin_configure_plugin_agent() { |
| 42 | die $LINENO "q-agt must not be executed with MidoNet plugin!" |
| 43 | } |
| 44 | |
| 45 | function neutron_plugin_configure_service() { |
| 46 | if [[ "$MIDONET_API_URI" != "" ]]; then |
| 47 | iniset /$Q_PLUGIN_CONF_FILE MIDONET midonet_uri $MIDONET_API_URI |
| 48 | fi |
| 49 | if [[ "$MIDONET_USERNAME" != "" ]]; then |
| 50 | iniset /$Q_PLUGIN_CONF_FILE MIDONET username $MIDONET_USERNAME |
| 51 | fi |
| 52 | if [[ "$MIDONET_PASSWORD" != "" ]]; then |
| 53 | iniset /$Q_PLUGIN_CONF_FILE MIDONET password $MIDONET_PASSWORD |
| 54 | fi |
| 55 | if [[ "$MIDONET_PROJECT_ID" != "" ]]; then |
| 56 | iniset /$Q_PLUGIN_CONF_FILE MIDONET project_id $MIDONET_PROJECT_ID |
| 57 | fi |
| 58 | if [[ "$MIDONET_PROVIDER_ROUTER_ID" != "" ]]; then |
| 59 | iniset /$Q_PLUGIN_CONF_FILE MIDONET provider_router_id $MIDONET_PROVIDER_ROUTER_ID |
| 60 | fi |
| 61 | if [[ "$MIDONET_METADATA_ROUTER_ID" != "" ]]; then |
| 62 | iniset /$Q_PLUGIN_CONF_FILE MIDONET metadata_router_id $MIDONET_METADATA_ROUTER_ID |
| 63 | fi |
| 64 | } |
| 65 | |
| 66 | function neutron_plugin_setup_interface_driver() { |
| 67 | # May change in the future |
| 68 | : |
| 69 | } |
| 70 | |
| 71 | function has_neutron_plugin_security_group() { |
| 72 | # 0 means True here |
| 73 | return 0 |
| 74 | } |
| 75 | |
| 76 | function neutron_plugin_check_adv_test_requirements() { |
| 77 | # 0 means True here |
| 78 | return 1 |
| 79 | } |
| 80 | |
| 81 | # Restore xtrace |
| 82 | $MY_XTRACE |