Reduce duplicate imports of functions & stackrc

In devstack openrc -> stackrc -> functions

I think it's fair to say nobody is really thinking about idempotency
when they write these rc files; it's assumed they're sourced once
per-run.  I3ca4e576aa3fb8992c08ca44900a8c53dd4b4163 is an example of
this.

Reduce some of the duplicate imports here by just importing the
top-level (either openrc if that's wanted, or stackrc)

Change-Id: I6fbae12f950a03afab39f341132746d3db9f788c
This commit is contained in:
Ian Wienand 2015-08-07 10:10:29 +10:00
parent baaa0393a9
commit cc69365a5a
4 changed files with 2 additions and 7 deletions

View File

@ -29,7 +29,6 @@ set -o xtrace
if [[ -d $BASE_DEVSTACK_DIR ]]; then
bash -c "
cd $BASE_DEVSTACK_DIR; \
source functions; \
source stackrc; \
source lib/tls; \
source lib/cinder; \
@ -47,7 +46,6 @@ fi
if [[ -d $TARGET_DEVSTACK_DIR ]]; then
bash -x -c "
cd $TARGET_DEVSTACK_DIR; \
source functions; \
source stackrc; \
source lib/tls; \
source lib/cinder; \

View File

@ -53,7 +53,6 @@ function upgrade_service {
enabled="True"
else
enabled=$(
source $TARGET_DEVSTACK_DIR/functions;
source $TARGET_DEVSTACK_DIR/stackrc;
is_service_enabled $local_service || echo "False")
fi

View File

@ -29,8 +29,7 @@ if [[ -d $BASE_RELEASE_DIR/images ]]; then
rsync -a $BASE_RELEASE_DIR/images $TARGET_DEVSTACK_DIR/files
fi
# Get target config
source $TARGET_DEVSTACK_DIR/functions
# Get target config (stackrc grabs devstack "functions" too)
source $TARGET_DEVSTACK_DIR/stackrc
# Build a wheel cache

View File

@ -40,8 +40,7 @@ GetDistro
TOP_DIR=$TARGET_DEVSTACK_DIR
cd $TARGET_DEVSTACK_DIR
source $TARGET_DEVSTACK_DIR/functions
source $TARGET_DEVSTACK_DIR/stackrc
# note; openrc sources functions & stackrc
source $TARGET_DEVSTACK_DIR/openrc
FILES=$TARGET_DEVSTACK_DIR/files