#!/bin/bash
#
# functions - Configure omnipath mechanism drivers

function install_omnipath {
    echo "Installing networking-omnipath driver for Omnipath"
    setup_develop $NETWORKING_OMNIPATH_DIR
    #neutron-db-manage --subproject=networking-omnipath upgrade head
}

function remove_omnipath {
   echo "Removing networking-omnipath this may take minutes."
   sudo pip uninstall networking-omnipath
}

function configure_neutron_omnipath {
    iniset $NEUTRON_CORE_PLUGIN_CONF ml2 mechanism_drivers "omnipath_mech",$Q_ML2_PLUGIN_MECHANISM_DRIVERS
    iniset $NEUTRON_CORE_PLUGIN_CONF ml2 tenant_network_types "vlan"
    iniset $NEUTRON_CORE_PLUGIN_CONF ml2_type_flat flat_networks "*"
    iniset $NEUTRON_CORE_PLUGIN_CONF ml2_type_vlan network_vlan_ranges "opa:2:2000"
}

function neutron_plugin_create_nova_conf {
    :
}
