This allows post-config phase to use neutron_service_plugin_class_add
so that devstack plugins can use it in the same way for both of
neutron-legacy and its "modern" counterpart, lib/neutron.
Closes-Bug: #1667037
Change-Id: I9068fd608e82e70db8d725f92269a26920efebcb
| ... | ... |
@@ -20,6 +20,7 @@ |
| 20 | 20 |
# - init_neutron_third_party |
| 21 | 21 |
# - start_neutron_third_party |
| 22 | 22 |
# - create_nova_conf_neutron |
| 23 |
+# - configure_neutron_after_post_config |
|
| 23 | 24 |
# - start_neutron_service_and_check |
| 24 | 25 |
# - check_neutron_third_party_integration |
| 25 | 26 |
# - start_neutron_agents |
| ... | ... |
@@ -331,7 +332,6 @@ function configure_mutnauq {
|
| 331 | 331 |
_configure_neutron_common |
| 332 | 332 |
iniset_rpc_backend neutron $NEUTRON_CONF |
| 333 | 333 |
|
| 334 |
- # goes before q-svc to init Q_SERVICE_PLUGIN_CLASSES |
|
| 335 | 334 |
if is_service_enabled q-metering; then |
| 336 | 335 |
_configure_neutron_metering |
| 337 | 336 |
fi |
| ... | ... |
@@ -464,6 +464,13 @@ function install_neutron_agent_packages_mutnauq {
|
| 464 | 464 |
fi |
| 465 | 465 |
} |
| 466 | 466 |
|
| 467 |
+# Finish neutron configuration |
|
| 468 |
+function configure_neutron_after_post_config {
|
|
| 469 |
+ if [[ $Q_SERVICE_PLUGIN_CLASSES != '' ]]; then |
|
| 470 |
+ iniset $NEUTRON_CONF DEFAULT service_plugins $Q_SERVICE_PLUGIN_CLASSES |
|
| 471 |
+ fi |
|
| 472 |
+} |
|
| 473 |
+ |
|
| 467 | 474 |
# Start running processes, including screen |
| 468 | 475 |
function start_neutron_service_and_check {
|
| 469 | 476 |
local service_port=$Q_PORT |
| ... | ... |
@@ -836,10 +843,6 @@ function _configure_neutron_service {
|
| 836 | 836 |
# Update either configuration file with plugin |
| 837 | 837 |
iniset $NEUTRON_CONF DEFAULT core_plugin $Q_PLUGIN_CLASS |
| 838 | 838 |
|
| 839 |
- if [[ $Q_SERVICE_PLUGIN_CLASSES != '' ]]; then |
|
| 840 |
- iniset $NEUTRON_CONF DEFAULT service_plugins $Q_SERVICE_PLUGIN_CLASSES |
|
| 841 |
- fi |
|
| 842 |
- |
|
| 843 | 839 |
iniset $NEUTRON_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL |
| 844 | 840 |
iniset $NEUTRON_CONF oslo_policy policy_file $Q_POLICY_FILE |
| 845 | 841 |
iniset $NEUTRON_CONF DEFAULT allow_overlapping_ips $Q_ALLOW_OVERLAPPING_IP |
| ... | ... |
@@ -1241,6 +1241,7 @@ if is_service_enabled neutron-api; then |
| 1241 | 1241 |
start_neutron_api |
| 1242 | 1242 |
elif is_service_enabled q-svc; then |
| 1243 | 1243 |
echo_summary "Starting Neutron" |
| 1244 |
+ configure_neutron_after_post_config |
|
| 1244 | 1245 |
start_neutron_service_and_check |
| 1245 | 1246 |
elif is_service_enabled $DATABASE_BACKENDS && is_service_enabled n-net; then |
| 1246 | 1247 |
NM_CONF=${NOVA_CONF}
|