Extract create_nova_conf() from init_nova()

Allows creating a new nova.conf without wiping the database,
say, during an upgrade.

Change-Id: I7703b54bc3a32485b3cdab8d6185f93a6675040d
This commit is contained in:
Dean Troyer 2012-10-08 18:12:14 -05:00
parent 855c5875c7
commit da7b8091b9
2 changed files with 8 additions and 2 deletions

@ -12,6 +12,7 @@
#
# install_nova
# configure_nova
# create_nova_conf
# init_nova
# start_nova
# stop_nova
@ -274,8 +275,8 @@ EOF'
fi
}
# init_nova() - Initialize databases, etc.
function init_nova() {
# create_nova_conf() - Create a new nova.conf file
function create_nova_conf() {
# Remove legacy ``nova.conf``
rm -f $NOVA_DIR/bin/nova.conf
@ -352,7 +353,10 @@ function init_nova() {
# Attempt to convert flags to options
add_nova_opt ${I//--}
done
}
# init_nova() - Initialize databases, etc.
function init_nova() {
# Nova Database
# -------------

@ -1728,6 +1728,8 @@ fi
if is_service_enabled nova; then
echo_summary "Configuring Nova"
# Rebuild the config file from scratch
create_nova_conf
init_nova
fi