Implement devstack external plugins
This is an initial pass at plugin infrastructure for devstack which
allows specifying an external repository via:
enable_plugin <name> <giturl> [branch]
It implements the devstack specification for this at
I173dee3d57967b1d2ffd30e4868a2832aeac97ce
Change-Id: I8e4175313b3cf0b12e981122358b1288a7eb0746
diff --git a/stack.sh b/stack.sh
index 605d3cc..d4f2afc 100755
--- a/stack.sh
+++ b/stack.sh
@@ -564,15 +564,14 @@
source $TOP_DIR/lib/ldap
source $TOP_DIR/lib/dstat
+# Clone all external plugins
+fetch_plugins
+
# Extras Source
# --------------
# Phase: source
-if [[ -d $TOP_DIR/extras.d ]]; then
- for i in $TOP_DIR/extras.d/*.sh; do
- [[ -r $i ]] && source $i source
- done
-fi
+run_phase source
# Interactive Configuration
# -------------------------
@@ -714,12 +713,7 @@
# ------------------
# Phase: pre-install
-if [[ -d $TOP_DIR/extras.d ]]; then
- for i in $TOP_DIR/extras.d/*.sh; do
- [[ -r $i ]] && source $i stack pre-install
- done
-fi
-
+run_phase stack pre-install
install_rpc_backend
@@ -865,11 +859,7 @@
# --------------
# Phase: install
-if [[ -d $TOP_DIR/extras.d ]]; then
- for i in $TOP_DIR/extras.d/*.sh; do
- [[ -r $i ]] && source $i stack install
- done
-fi
+run_phase stack install
if [[ $TRACK_DEPENDS = True ]]; then
$DEST/.venv/bin/pip freeze > $DEST/requires-post-pip
@@ -1142,11 +1132,7 @@
# ====================
# Phase: post-config
-if [[ -d $TOP_DIR/extras.d ]]; then
- for i in $TOP_DIR/extras.d/*.sh; do
- [[ -r $i ]] && source $i stack post-config
- done
-fi
+run_phase stack post-config
# Local Configuration
@@ -1328,11 +1314,7 @@
# ==========
# Phase: extra
-if [[ -d $TOP_DIR/extras.d ]]; then
- for i in $TOP_DIR/extras.d/*.sh; do
- [[ -r $i ]] && source $i stack extra
- done
-fi
+run_phase stack extra
# Local Configuration
# ===================