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
This commit is contained in:
parent
b9a7d3b5e4
commit
952fd90ff1
13
lib/neutron
13
lib/neutron
@ -791,15 +791,20 @@ function cleanup_neutron {
|
||||
done
|
||||
}
|
||||
|
||||
# _configure_neutron_common()
|
||||
# Set common config for all neutron server and agents.
|
||||
# This MUST be called before other ``_configure_neutron_*`` functions.
|
||||
function _configure_neutron_common {
|
||||
|
||||
function _create_neutron_conf_dir {
|
||||
# Put config files in ``NEUTRON_CONF_DIR`` for everyone to find
|
||||
if [[ ! -d $NEUTRON_CONF_DIR ]]; then
|
||||
sudo mkdir -p $NEUTRON_CONF_DIR
|
||||
fi
|
||||
sudo chown $STACK_USER $NEUTRON_CONF_DIR
|
||||
}
|
||||
|
||||
# _configure_neutron_common()
|
||||
# Set common config for all neutron server and agents.
|
||||
# This MUST be called before other ``_configure_neutron_*`` functions.
|
||||
function _configure_neutron_common {
|
||||
_create_neutron_conf_dir
|
||||
|
||||
cp $NEUTRON_DIR/etc/neutron.conf $NEUTRON_CONF
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user