Skip to content

Commit 46571ef

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "Make sure gnocchi is enabled before ceilometer"
2 parents c970b74 + 34731ee commit 46571ef

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

devstack/settings

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,24 @@ GITBRANCH["python-ceilometerclient"]=${CEILOMETERCLIENT_BRANCH:-master}
5050
GITDIR["python-ceilometerclient"]=$DEST/python-ceilometerclient
5151
GITDIR["ceilometermiddleware"]=$DEST/ceilometermiddleware
5252

53+
# Make sure gnocchi is enabled before ceilometer
54+
function _ceilometer_check_for_gnocchi {
55+
if [ "$CEILOMETER_BACKEND" == 'gnocchi' ]; then
56+
local plugins="${DEVSTACK_PLUGINS}"
57+
local plugin
58+
local seen_gnocchi=False
59+
60+
for plugin in ${plugins//,/ }; do
61+
if [ "$plugin" == 'gnocchi' ]; then
62+
seen_gnocchi=True
63+
elif [ "$plugin" == 'ceilometer' ]; then
64+
[[ "$seen_gnocchi" == 'False' ]] && die $LINENO "gnocchi must be enabled before ceilometer!"
65+
fi
66+
done
67+
fi
68+
}
69+
70+
_ceilometer_check_for_gnocchi
5371
# Get rid of this before done.
5472
# Tell emacs to use shell-script-mode
5573
## Local variables:

0 commit comments

Comments
 (0)