Clean up variables in plugin.sh

These are defined in lib/ironic, so use them there instead of plugin.sh
to make the plugin a bit cleaner.

Change-Id: I0d536ad7ba9b4ff4473a973ea13100e924ee9ce5
This commit is contained in:
Jim Rollenhagen 2015-12-10 15:19:29 +00:00
parent a0dcef410e
commit 778fcdafa4
2 changed files with 9 additions and 7 deletions

View File

@ -817,6 +817,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
@ -830,6 +834,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