Skip to content

Commit 952fd90

Browse files
committed
Refactor lib/neutron rootwrap conf for reuse
This change separates out the creation and permision setting for the /etc/neutron so that it can be reused by functional test setup in rootwrap deployment. Change-Id: Ib2ad5b21630ac82a3d7ffc7b088600b2168f1ecd
1 parent b9a7d3b commit 952fd90

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

lib/neutron

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -791,15 +791,20 @@ function cleanup_neutron {
791791
done
792792
}
793793

794-
# _configure_neutron_common()
795-
# Set common config for all neutron server and agents.
796-
# This MUST be called before other ``_configure_neutron_*`` functions.
797-
function _configure_neutron_common {
794+
795+
function _create_neutron_conf_dir {
798796
# Put config files in ``NEUTRON_CONF_DIR`` for everyone to find
799797
if [[ ! -d $NEUTRON_CONF_DIR ]]; then
800798
sudo mkdir -p $NEUTRON_CONF_DIR
801799
fi
802800
sudo chown $STACK_USER $NEUTRON_CONF_DIR
801+
}
802+
803+
# _configure_neutron_common()
804+
# Set common config for all neutron server and agents.
805+
# This MUST be called before other ``_configure_neutron_*`` functions.
806+
function _configure_neutron_common {
807+
_create_neutron_conf_dir
803808

804809
cp $NEUTRON_DIR/etc/neutron.conf $NEUTRON_CONF
805810

0 commit comments

Comments
 (0)