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
... | ... |
@@ -14,6 +14,7 @@ if is_service_enabled odl-server; then |
14 | 14 |
configure_opendaylight |
15 | 15 |
init_opendaylight |
16 | 16 |
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then |
17 |
+ configure_ml2_odl |
|
17 | 18 |
# This has to start before Neutron |
18 | 19 |
start_opendaylight |
19 | 20 |
elif [[ "$1" == "stack" && "$2" == "post-extra" ]]; then |
... | ... |
@@ -35,6 +35,15 @@ source $TOP_DIR/lib/neutron_plugins/ovs_base |
35 | 35 |
# ODL_MGR_IP= |
36 | 36 |
ODL_MGR_IP=${ODL_MGR_IP:-$SERVICE_HOST} |
37 | 37 |
|
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 |
+ |
|
38 | 47 |
# <define global variables here that belong to this project> |
39 | 48 |
ODL_DIR=$DEST/opendaylight |
40 | 49 |
|
... | ... |
@@ -80,6 +89,12 @@ function configure_opendaylight { |
80 | 80 |
echo "ovsdb.of.version=1.3" >> $ODL_DIR/opendaylight/configuration/config.ini |
81 | 81 |
} |
82 | 82 |
|
83 |
+function configure_ml2_odl { |
|
84 |
+ populate_ml2_config /$Q_PLUGIN_CONF_FILE ml2_odl url=$ODL_ENDPOINT |
|
85 |
+ populate_ml2_config /$Q_PLUGIN_CONF_FILE ml2_odl username=$ODL_USERNAME |
|
86 |
+ populate_ml2_config /$Q_PLUGIN_CONF_FILE ml2_odl password=$ODL_PASSWORD |
|
87 |
+} |
|
88 |
+ |
|
83 | 89 |
# init_opendaylight() - Initialize databases, etc. |
84 | 90 |
function init_opendaylight { |
85 | 91 |
# clean up from previous (possibly aborted) runs |