Begin is_service_enabled() cleanup
This converts the special cases in the is_service_enabled() function to call
individual functions declared by the projects. This allows projects that
are not in the DevStack repo and called via the extras.d plugin to handle
an equivalent service alias.
* Ceilometer
* Cinder
* Glance
* Neutron
* Nova
* Swift
TODO: remove the tests from is_service_enabled() after a transition period
Patch Set 2: Rebased
Change-Id: Ic78be433f93a9dd5f46be548bdbd4c984e0da6e7
diff --git a/lib/template b/lib/template
index 629e110..b8e7c4d 100644
--- a/lib/template
+++ b/lib/template
@@ -10,6 +10,7 @@
# ``stack.sh`` calls the entry points in this order:
#
+# - is_XXXX_enabled
# - install_XXXX
# - configure_XXXX
# - init_XXXX
@@ -35,6 +36,13 @@
# Entry Points
# ------------
+# Test if any XXXX services are enabled
+# is_XXXX_enabled
+function is_XXXX_enabled {
+ [[ ,${ENABLED_SERVICES} =~ ,"XX-" ]] && return 0
+ return 1
+}
+
# cleanup_XXXX() - Remove residual data files, anything left over from previous
# runs that a clean run would need to clean up
function cleanup_XXXX() {