Set parameters for OpenDaylight ML2 driver

Now that https://review.openstack.org/#/c/85589/ is merged, the
OpenDaylight ML2 driver requires that url, username and password
parameters are set.

Change-Id: Iecbdd3275387bea145a5d274d359a15eceaee6b7
Closes-Bug: #1304226
This commit is contained in:
Simon Pasquier 2014-04-08 09:34:44 +02:00
parent 87c0c263a0
commit cfc9ebba85
2 changed files with 16 additions and 0 deletions

View File

@ -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

View File

@ -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}
# <define global variables here that belong to this project>
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