summaryrefslogtreecommitdiff
path: root/devstack/plugin.sh
diff options
context:
space:
mode:
authorJohn L. Villalovos <john.l.villalovos@intel.com>2016-05-12 12:34:42 -0700
committerJohn L. Villalovos <john.l.villalovos@intel.com>2016-05-12 12:37:34 -0700
commit155b32dd1e5f5e9fa59ffb4678e11c2fb0c2bbfc (patch)
tree22423466c1df383c2d01f54f535298183e4da600 /devstack/plugin.sh
parentecae841dc6d7f018b9c7ab8a9459cc8d3c05d245 (diff)
downloadironic-155b32dd1e5f5e9fa59ffb4678e11c2fb0c2bbfc.tar.gz
Add some docs/comments to devstack/plugin.sh
Added some docs/comments to devstack/plugin.sh Restructured if block Change-Id: If57d15e1ded2a46e0ba320384f610d4f779d019c
Diffstat (limited to 'devstack/plugin.sh')
-rw-r--r--devstack/plugin.sh61
1 files changed, 41 insertions, 20 deletions
diff --git a/devstack/plugin.sh b/devstack/plugin.sh
index 06f83c8a4..5c6c9cb5a 100644
--- a/devstack/plugin.sh
+++ b/devstack/plugin.sh
@@ -1,42 +1,63 @@
#!/bin/bash
# plugin.sh - devstack plugin for ironic
+# devstack plugin contract defined at:
+# http://docs.openstack.org/developer/devstack/plugins.html
+
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 [[ "$1" == "stack" ]]; then
+ if [[ "$2" == "install" ]]; then
+ # stack/install - Called after the layer 1 and 2 projects source and
+ # their dependencies have been installed
- if is_service_enabled key; then
- create_ironic_accounts
- fi
+ echo_summary "Installing Ironic"
+ install_ironic
+ install_ironicclient
+ cleanup_ironic
+
+ elif [[ "$2" == "post-config" ]]; then
+ # stack/post-config - Called after the layer 1 and 2 services have been
+ # configured. All configuration files for enabled services should exist
+ # at this point.
+
+ echo_summary "Configuring Ironic"
+ configure_ironic
- elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
- # Initialize ironic
- init_ironic
+ if is_service_enabled key; then
+ create_ironic_accounts
+ fi
- # Start the ironic API and ironic taskmgr components
- echo_summary "Starting Ironic"
- start_ironic
- prepare_baremetal_basic_ops
- if is_service_enabled tempest; then
- ironic_configure_tempest
+ elif [[ "$2" == "extra" ]]; then
+ # stack/extra - Called near the end after layer 1 and 2 services have
+ # been started.
+
+ # Initialize ironic
+ init_ironic
+
+ # Start the ironic API and ironic taskmgr components
+ echo_summary "Starting Ironic"
+ start_ironic
+ prepare_baremetal_basic_ops
+ if is_service_enabled tempest; then
+ ironic_configure_tempest
+ fi
fi
fi
if [[ "$1" == "unstack" ]]; then
+ # unstack - Called by unstack.sh before other services are shut down.
+
stop_ironic
cleanup_baremetal_basic_ops
fi
if [[ "$1" == "clean" ]]; then
+ # clean - Called by clean.sh before other services are cleaned, but after
+ # unstack.sh has been called.
+
cleanup_ironic
fi
fi