summaryrefslogtreecommitdiff
path: root/nova/policy.py
diff options
context:
space:
mode:
Diffstat (limited to 'nova/policy.py')
-rw-r--r--nova/policy.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/nova/policy.py b/nova/policy.py
index 20aeb1db6a..613df50463 100644
--- a/nova/policy.py
+++ b/nova/policy.py
@@ -49,10 +49,8 @@ def reset():
_ENFORCER = None
-# TODO(gmann): Make suppress_deprecation_warnings default to False, once
-# we find the way to disable warning for default change on oslo side.
def init(policy_file=None, rules=None, default_rule=None, use_conf=True,
- suppress_deprecation_warnings=True):
+ suppress_deprecation_warnings=False):
"""Init an Enforcer class.
:param policy_file: Custom policy file to use, if none is specified,
@@ -75,6 +73,13 @@ def init(policy_file=None, rules=None, default_rule=None, use_conf=True,
rules=rules,
default_rule=default_rule,
use_conf=use_conf)
+ # NOTE(gmann): Explictly disable the warnings for policies
+ # changing their default check_str. During policy-defaults-refresh
+ # work, all the policy defaults have been changed and warning for
+ # each policy started filling the logs limit for various tool.
+ # Once we move to new defaults only world then we can enable these
+ # warning again.
+ _ENFORCER.suppress_default_change_warnings = True
if suppress_deprecation_warnings:
_ENFORCER.suppress_deprecation_warnings = True
register_rules(_ENFORCER)