From 97cc85b9b1661cb73f732b854a3f2ebd738539ed Mon Sep 17 00:00:00 2001 From: Hirofumi Ichihara Date: Tue, 8 Sep 2015 13:51:01 +0900 Subject: [PATCH] Provide hook for neutron plugin config This removes a restriction for neutron vendor plugin. Some neutron vendor plugins were already decomposed and there is no config file in Neutron tree. They should prepare the file in each plugin. Change-Id: I4997b8eae1f433b1c23f20c06ba254568ac4982b --- lib/neutron-legacy | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/neutron-legacy b/lib/neutron-legacy index d1865d8bcd..550eadb4b4 100755 --- a/lib/neutron-legacy +++ b/lib/neutron-legacy @@ -901,7 +901,11 @@ function _configure_neutron_common { # If needed, move config file from ``$NEUTRON_DIR/etc/neutron`` to ``NEUTRON_CONF_DIR`` mkdir -p /$Q_PLUGIN_CONF_PATH Q_PLUGIN_CONF_FILE=$Q_PLUGIN_CONF_PATH/$Q_PLUGIN_CONF_FILENAME - cp $NEUTRON_DIR/$Q_PLUGIN_CONF_FILE /$Q_PLUGIN_CONF_FILE + # NOTE(hichihara): Some neutron vendor plugins were already decomposed and + # there is no config file in Neutron tree. They should prepare the file in each plugin. + if [ -f $NEUTRON_DIR/$Q_PLUGIN_CONF_FILE ]; then + cp $NEUTRON_DIR/$Q_PLUGIN_CONF_FILE /$Q_PLUGIN_CONF_FILE + fi iniset $NEUTRON_CONF database connection `database_connection_url $Q_DB_NAME` iniset $NEUTRON_CONF DEFAULT state_path $DATA_DIR/neutron