blob: 1f666f2f81bd368dbb2a6249084dc4442e16c265 [file] [log] [blame]
Felipe Monteiroa44dddf2017-05-26 18:39:37 +01001#!/usr/bin/env bash
2# Plugin file for Patrole Tempest plugin
3# --------------------------------------
4
5# Dependencies:
6# ``functions`` file
7# ``DEST`` must be defined
8
9# Save trace setting
10XTRACE=$(set +o | grep xtrace)
11set -o xtrace
12
13function install_patrole_tempest_plugin() {
14 if is_service_enabled tempest; then
15 setup_package $PATROLE_DIR -e
16
17 if [[ "$RBAC_TEST_ROLE" == "member" ]]; then
18 RBAC_TEST_ROLE="Member"
19 fi
20
21 iniset $TEMPEST_CONFIG rbac enable_rbac True
22 iniset $TEMPEST_CONFIG rbac rbac_test_role $RBAC_TEST_ROLE
Felipe Monteiroa44dddf2017-05-26 18:39:37 +010023 fi
24}
25
26if is_service_enabled tempest; then
27 if [[ "$1" == "stack" && "$2" == "test-config" ]]; then
28 echo_summary "Installing Patrole Tempest plugin"
29 install_patrole_tempest_plugin
30 fi
31fi
32
33# Restore xtrace
34$XTRACE