ironic/devstack/plugin.sh
Jim Rollenhagen a0dcef410e Add devstack plugin
This adds the actual devstack plugin, with a signal to devstack that the
plugin is in use, and devstack should not run the ironic code in the
devstack tree.

Note that this is not yet configured to run in the gate.

Change-Id: I147ea059f75720132dd82ff9e7cd3bfdff7fa584
2015-12-10 15:33:33 +00:00

45 lines
1.1 KiB
Bash

#!/bin/bash
# plugin.sh - devstack plugin for ironic
echo_summary "ironic's plugin.sh was called..."
source $DEST/ironic/devstack/lib/ironic
if is_service_enabled ir-api ir-cond; then
if [[ "$1" == "stack" && "$2" == "install" ]]; then
echo_summary "Installing Ironic"
install_ironic
install_ironicclient
cleanup_ironic
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
echo_summary "Configuring Ironic"
configure_ironic
if is_service_enabled key; then
create_ironic_accounts
fi
elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
# Initialize ironic
init_ironic
# 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
fi
if [[ "$1" == "unstack" ]]; then
stop_ironic
if [[ "$IRONIC_BAREMETAL_BASIC_OPS" = "True" ]]; then
cleanup_baremetal_basic_ops
fi
fi
if [[ "$1" == "clean" ]]; then
cleanup_ironic
fi
fi