Skip to content

Commit cfc9ebb

Browse files
author
Simon Pasquier
committed
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
1 parent 87c0c26 commit cfc9ebb

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

extras.d/80-opendaylight.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ if is_service_enabled odl-server; then
1414
configure_opendaylight
1515
init_opendaylight
1616
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
17+
configure_ml2_odl
1718
# This has to start before Neutron
1819
start_opendaylight
1920
elif [[ "$1" == "stack" && "$2" == "post-extra" ]]; then

lib/opendaylight

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,15 @@ source $TOP_DIR/lib/neutron_plugins/ovs_base
3535
# ODL_MGR_IP=
3636
ODL_MGR_IP=${ODL_MGR_IP:-$SERVICE_HOST}
3737

38+
# The ODL endpoint URL
39+
ODL_ENDPOINT=${ODL_ENDPOINT:-http://${ODL_MGR_IP}:8080/controller/nb/v2/neutron}
40+
41+
# The ODL username
42+
ODL_USERNAME=${ODL_USERNAME:-admin}
43+
44+
# The ODL password
45+
ODL_PASSWORD=${ODL_PASSWORD:-admin}
46+
3847
# <define global variables here that belong to this project>
3948
ODL_DIR=$DEST/opendaylight
4049

@@ -80,6 +89,12 @@ function configure_opendaylight {
8089
echo "ovsdb.of.version=1.3" >> $ODL_DIR/opendaylight/configuration/config.ini
8190
}
8291

92+
function configure_ml2_odl {
93+
populate_ml2_config /$Q_PLUGIN_CONF_FILE ml2_odl url=$ODL_ENDPOINT
94+
populate_ml2_config /$Q_PLUGIN_CONF_FILE ml2_odl username=$ODL_USERNAME
95+
populate_ml2_config /$Q_PLUGIN_CONF_FILE ml2_odl password=$ODL_PASSWORD
96+
}
97+
8398
# init_opendaylight() - Initialize databases, etc.
8499
function init_opendaylight {
85100
# clean up from previous (possibly aborted) runs

0 commit comments

Comments
 (0)