blob: 10d13f664102e4bf462736dc325f29ec2c901c4f [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
Felipe Monteirob58c1192017-11-20 01:50:24 +000021 iniset $TEMPEST_CONFIG patrole enable_rbac True
22 iniset $TEMPEST_CONFIG patrole 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