diff --git a/extras.d/80-opendaylight.sh b/extras.d/80-opendaylight.sh index 57b43288e0..c3c85fc963 100644 --- a/extras.d/80-opendaylight.sh +++ b/extras.d/80-opendaylight.sh @@ -14,6 +14,7 @@ if is_service_enabled odl-server; then configure_opendaylight init_opendaylight elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then + configure_ml2_odl # This has to start before Neutron start_opendaylight elif [[ "$1" == "stack" && "$2" == "post-extra" ]]; then diff --git a/lib/opendaylight b/lib/opendaylight index 1022e2c061..e7f594bb78 100644 --- a/lib/opendaylight +++ b/lib/opendaylight @@ -35,6 +35,15 @@ source $TOP_DIR/lib/neutron_plugins/ovs_base # ODL_MGR_IP= ODL_MGR_IP=${ODL_MGR_IP:-$SERVICE_HOST} +# The ODL endpoint URL +ODL_ENDPOINT=${ODL_ENDPOINT:-http://${ODL_MGR_IP}:8080/controller/nb/v2/neutron} + +# The ODL username +ODL_USERNAME=${ODL_USERNAME:-admin} + +# The ODL password +ODL_PASSWORD=${ODL_PASSWORD:-admin} + # ODL_DIR=$DEST/opendaylight @@ -80,6 +89,12 @@ function configure_opendaylight { echo "ovsdb.of.version=1.3" >> $ODL_DIR/opendaylight/configuration/config.ini } +function configure_ml2_odl { + populate_ml2_config /$Q_PLUGIN_CONF_FILE ml2_odl url=$ODL_ENDPOINT + populate_ml2_config /$Q_PLUGIN_CONF_FILE ml2_odl username=$ODL_USERNAME + populate_ml2_config /$Q_PLUGIN_CONF_FILE ml2_odl password=$ODL_PASSWORD +} + # init_opendaylight() - Initialize databases, etc. function init_opendaylight { # clean up from previous (possibly aborted) runs