Don't assume that $i variable won't be overriden in extras.d plugins

This causes an incorrect warning about ironic jobs putting an unexpected
file in extras.d.

Change-Id: I57acf91fba3fe13b3cc8dd739034e146a0b237c4
This commit is contained in:
Dmitry Tantsur 2015-10-12 13:10:24 +02:00
parent 0914d04343
commit 64be3210e6

View File

@ -1712,13 +1712,14 @@ function run_phase {
local mode=$1
local phase=$2
if [[ -d $TOP_DIR/extras.d ]]; then
for i in $TOP_DIR/extras.d/*.sh; do
[[ -r $i ]] && source $i $mode $phase
local extra_plugin_file_name
for extra_plugin_file_name in $TOP_DIR/extras.d/*.sh; do
[[ -r $extra_plugin_file_name ]] && source $extra_plugin_file_name $mode $phase
# NOTE(sdague): generate a big warning about using
# extras.d in an unsupported way which will let us track
# unsupported usage in the gate.
local exceptions="50-ironic.sh 60-ceph.sh 80-tempest.sh"
local extra=$(basename $i)
local extra=$(basename $extra_plugin_file_name)
if [[ ! ( $exceptions =~ "$extra" ) ]]; then
deprecated "extras.d support is being removed in Mitaka-1"
deprecated "jobs for project $extra will break after that point"