blob: 1066136ccc8f9de91a6ab5d006fbf68fbf12de7f [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
23 iniset $TEMPEST_CONFIG rbac strict_policy_check False
24 fi
25}
26
27if is_service_enabled tempest; then
28 if [[ "$1" == "stack" && "$2" == "test-config" ]]; then
29 echo_summary "Installing Patrole Tempest plugin"
30 install_patrole_tempest_plugin
31 fi
32fi
33
34# Restore xtrace
35$XTRACE