Merge "Clean up variables in plugin.sh"

This commit is contained in:
Jenkins 2015-12-19 13:24:26 +00:00 committed by Gerrit Code Review
commit af95d0edf3
2 changed files with 9 additions and 7 deletions

View File

@ -848,6 +848,10 @@ function upload_baremetal_ironic_deploy {
}
function prepare_baremetal_basic_ops {
if [[ "$IRONIC_BAREMETAL_BASIC_OPS" != "True" ]]; then
return 0
fi
if ! is_ironic_hardware; then
configure_ironic_auxiliary
fi
@ -861,6 +865,9 @@ function prepare_baremetal_basic_ops {
}
function cleanup_baremetal_basic_ops {
if [[ "$IRONIC_BAREMETAL_BASIC_OPS" != "True" ]]; then
return 0
fi
rm -f $IRONIC_VM_MACS_CSV_FILE
if [ -f $IRONIC_KEY_FILE ]; then
local key

View File

@ -25,17 +25,12 @@ if is_service_enabled ir-api ir-cond; then
# Start the ironic API and ironic taskmgr components
echo_summary "Starting Ironic"
start_ironic
if [[ "$IRONIC_BAREMETAL_BASIC_OPS" = "True" ]]; then
prepare_baremetal_basic_ops
fi
prepare_baremetal_basic_ops
fi
if [[ "$1" == "unstack" ]]; then
stop_ironic
if [[ "$IRONIC_BAREMETAL_BASIC_OPS" = "True" ]]; then
cleanup_baremetal_basic_ops
fi
cleanup_baremetal_basic_ops
fi
if [[ "$1" == "clean" ]]; then