[TrivialFix] Use _override_role in rbac_rule_validation
This PS changes switch_role usage to _override_role usage in
rbac_rule_validation. This is a temporary change while switch_role
goes through a deprecation phase. This code change should have been
made earlier in:
I670fba358bf321eae0d22d18cea6d2f530f00716
Partially Implements: blueprint rbac-utils-contextmanager
Change-Id: I7154b7bf9440aaef69c8dae9b6643f956564369f
diff --git a/patrole_tempest_plugin/rbac_rule_validation.py b/patrole_tempest_plugin/rbac_rule_validation.py
index 82bc1a0..fc8b145 100644
--- a/patrole_tempest_plugin/rbac_rule_validation.py
+++ b/patrole_tempest_plugin/rbac_rule_validation.py
@@ -175,10 +175,10 @@
"OverPermission: Role %s was allowed to perform %s" %
(role, rule))
finally:
- # TODO(felipemonteiro): Remove the `switch_role` call below
- # once all the tests have migrated over to `override_role`.
- test_obj.rbac_utils.switch_role(test_obj,
- toggle_rbac_role=False)
+ # TODO(felipemonteiro): Remove the call below once all the
+ # tests have migrated over to `override_role` public method.
+ test_obj.rbac_utils._override_role(test_obj,
+ toggle_rbac_role=False)
if CONF.patrole_log.enable_reporting:
RBACLOG.info(
"[Service]: %s, [Test]: %s, [Rule]: %s, "