Deprecate [rbac] configuration group.
The [rbac] configuration group has been deprecated
and will be removed in the next release. It has been
renamed to the [patrole] group which contains
the exact same options.
This commit makes necessary deprecation changes,
along with renaming changes to documentation, unit
tests and framework.
Change-Id: I71198506b97b98ac18a969b7e6b13b664579c081
diff --git a/patrole_tempest_plugin/rbac_rule_validation.py b/patrole_tempest_plugin/rbac_rule_validation.py
index c7bd38b..9705367 100644
--- a/patrole_tempest_plugin/rbac_rule_validation.py
+++ b/patrole_tempest_plugin/rbac_rule_validation.py
@@ -72,7 +72,7 @@
extra_target_data = {}
def decorator(func):
- role = CONF.rbac.rbac_test_role
+ role = CONF.patrole.rbac_test_role
def wrapper(*args, **kwargs):
if args and isinstance(args[0], test.BaseTestCase):
@@ -149,9 +149,9 @@
:raises RbacResourceSetupFailed: if project_id or user_id are missing from
the Tempest test object's `auth_provider`
- :raises RbacParsingException: if ``CONF.rbac.strict_policy_check`` is
+ :raises RbacParsingException: if ``CONF.patrole.strict_policy_check`` is
enabled and the ``rule_name`` does not exist in the system
- :raises skipException: if ``CONF.rbac.strict_policy_check`` is
+ :raises skipException: if ``CONF.patrole.strict_policy_check`` is
disabled and the ``rule_name`` does not exist in the system
"""
try:
@@ -164,11 +164,11 @@
raise rbac_exceptions.RbacResourceSetupFailed(msg)
try:
- role = CONF.rbac.rbac_test_role
+ role = CONF.patrole.rbac_test_role
# Test RBAC against custom requirements. Otherwise use oslo.policy
- if CONF.rbac.test_custom_requirements:
+ if CONF.patrole.test_custom_requirements:
authority = requirements_authority.RequirementsAuthority(
- CONF.rbac.custom_requirements_file, service)
+ CONF.patrole.custom_requirements_file, service)
else:
formatted_target_data = _format_extra_target_data(
test_obj, extra_target_data)
@@ -185,7 +185,7 @@
rule_name, role)
return is_allowed
except rbac_exceptions.RbacParsingException as e:
- if CONF.rbac.strict_policy_check:
+ if CONF.patrole.strict_policy_check:
raise e
else:
raise testtools.TestCase.skipException(str(e))