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:
parent
a0dcef410e
commit
778fcdafa4
@ -817,6 +817,10 @@ function upload_baremetal_ironic_deploy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function prepare_baremetal_basic_ops {
|
function prepare_baremetal_basic_ops {
|
||||||
|
if [[ "$IRONIC_BAREMETAL_BASIC_OPS" != "True" ]]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
if ! is_ironic_hardware; then
|
if ! is_ironic_hardware; then
|
||||||
configure_ironic_auxiliary
|
configure_ironic_auxiliary
|
||||||
fi
|
fi
|
||||||
@ -830,6 +834,9 @@ function prepare_baremetal_basic_ops {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function cleanup_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
|
rm -f $IRONIC_VM_MACS_CSV_FILE
|
||||||
if [ -f $IRONIC_KEY_FILE ]; then
|
if [ -f $IRONIC_KEY_FILE ]; then
|
||||||
local key
|
local key
|
||||||
|
@ -25,18 +25,13 @@ if is_service_enabled ir-api ir-cond; then
|
|||||||
# Start the ironic API and ironic taskmgr components
|
# Start the ironic API and ironic taskmgr components
|
||||||
echo_summary "Starting Ironic"
|
echo_summary "Starting Ironic"
|
||||||
start_ironic
|
start_ironic
|
||||||
|
|
||||||
if [[ "$IRONIC_BAREMETAL_BASIC_OPS" = "True" ]]; then
|
|
||||||
prepare_baremetal_basic_ops
|
prepare_baremetal_basic_ops
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "$1" == "unstack" ]]; then
|
if [[ "$1" == "unstack" ]]; then
|
||||||
stop_ironic
|
stop_ironic
|
||||||
if [[ "$IRONIC_BAREMETAL_BASIC_OPS" = "True" ]]; then
|
|
||||||
cleanup_baremetal_basic_ops
|
cleanup_baremetal_basic_ops
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "$1" == "clean" ]]; then
|
if [[ "$1" == "clean" ]]; then
|
||||||
cleanup_ironic
|
cleanup_ironic
|
||||||
|
Loading…
Reference in New Issue
Block a user