From 9fc3ba408a97d0dd39ce26dd8dbcdb3b110cde71 Mon Sep 17 00:00:00 2001 From: Jim Rollenhagen Date: Thu, 10 Dec 2015 13:33:28 +0000 Subject: [PATCH] Ironic: add flag for using plugin This adds a flag to skip ironic code if the ironic devstack plugin is in use. This flag will be set to true in ironic's devstack plugin to indicate that the plugin should be in control, rather than devstack. This is for the transition period only, and will be removed with the rest of the ironic code in the devstack tree, once the gate is configured to use the ironic plugin. Change-Id: Id01d97fd13fa9f866d645ec5077834ddb78b2b89 --- extras.d/50-ironic.sh | 7 +++++++ lib/ironic | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/extras.d/50-ironic.sh b/extras.d/50-ironic.sh index 3b8e3d5045..0ee6a94758 100644 --- a/extras.d/50-ironic.sh +++ b/extras.d/50-ironic.sh @@ -1,5 +1,12 @@ # ironic.sh - Devstack extras script to install ironic +# NOTE(jroll) this is used for the transition to a devstack plugin in +# the ironic tree. +IRONIC_USING_PLUGIN=$(trueorfalse False IRONIC_USING_PLUGIN) +if [[ "$IRONIC_USING_PLUGIN" == "True" ]] ; then + return 0 +fi + if is_service_enabled ir-api ir-cond; then if [[ "$1" == "source" ]]; then # Initial source diff --git a/lib/ironic b/lib/ironic index 2fb2004d71..dd4f8bf65f 100644 --- a/lib/ironic +++ b/lib/ironic @@ -26,6 +26,13 @@ _PIPEFAIL_IRONIC=$(set +o | grep pipefail) set +o xtrace set +o pipefail +# NOTE(jroll) this is used for the transition to a devstack plugin in +# the ironic tree. +IRONIC_USING_PLUGIN=$(trueorfalse False IRONIC_USING_PLUGIN) +if [[ "$IRONIC_USING_PLUGIN" == "True" ]] ; then + return 0 +fi + # Defaults # --------