From 1df17c94f512f0d1a084ba70cc0d4feb05feb8fb Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Mon, 1 May 2017 17:00:42 +0900 Subject: [PATCH] lib/neutron: Don't assume plugin config is provided by neutron repo It isn't the case for plugins provided by subprojects. Change-Id: Ic28a9da9f11355e5e1eae5db9b2d4ee6ed081b55 --- lib/neutron | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/neutron b/lib/neutron index 492a0ee8fb..fd08a125be 100644 --- a/lib/neutron +++ b/lib/neutron @@ -135,7 +135,11 @@ function configure_neutron_new { mkdir -p $NEUTRON_CORE_PLUGIN_CONF_PATH - cp $NEUTRON_DIR/etc/neutron/plugins/$NEUTRON_CORE_PLUGIN/$NEUTRON_CORE_PLUGIN_CONF_FILENAME.sample $NEUTRON_CORE_PLUGIN_CONF + # NOTE(yamamoto): A decomposed plugin should prepare the config file in + # its devstack plugin. + if [ -f $NEUTRON_DIR/etc/neutron/plugins/$NEUTRON_CORE_PLUGIN/$NEUTRON_CORE_PLUGIN_CONF_FILENAME.sample ]; then + cp $NEUTRON_DIR/etc/neutron/plugins/$NEUTRON_CORE_PLUGIN/$NEUTRON_CORE_PLUGIN_CONF_FILENAME.sample $NEUTRON_CORE_PLUGIN_CONF + fi iniset $NEUTRON_CONF database connection `database_connection_url neutron` iniset $NEUTRON_CONF DEFAULT state_path $NEUTRON_STATE_PATH