Skip to content

Commit f1e448d

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Use oslo policy flag to disable default change warning instead of all"
2 parents 9d88f82 + a2d25f4 commit f1e448d

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

lower-constraints.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ oslo.i18n==3.15.3
8181
oslo.log==3.36.0
8282
oslo.messaging==10.3.0
8383
oslo.middleware==3.31.0
84-
oslo.policy==2.3.0
84+
oslo.policy==3.1.0
8585
oslo.privsep==1.33.2
8686
oslo.reports==1.18.0
8787
oslo.rootwrap==5.8.0

nova/policy.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,8 @@ def reset():
4949
_ENFORCER = None
5050

5151

52-
# TODO(gmann): Make suppress_deprecation_warnings default to False, once
53-
# we find the way to disable warning for default change on oslo side.
5452
def init(policy_file=None, rules=None, default_rule=None, use_conf=True,
55-
suppress_deprecation_warnings=True):
53+
suppress_deprecation_warnings=False):
5654
"""Init an Enforcer class.
5755
5856
: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,
7573
rules=rules,
7674
default_rule=default_rule,
7775
use_conf=use_conf)
76+
# NOTE(gmann): Explictly disable the warnings for policies
77+
# changing their default check_str. During policy-defaults-refresh
78+
# work, all the policy defaults have been changed and warning for
79+
# each policy started filling the logs limit for various tool.
80+
# Once we move to new defaults only world then we can enable these
81+
# warning again.
82+
_ENFORCER.suppress_default_change_warnings = True
7883
if suppress_deprecation_warnings:
7984
_ENFORCER.suppress_deprecation_warnings = True
8085
register_rules(_ENFORCER)

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ oslo.utils>=4.1.0 # Apache-2.0
4545
oslo.db>=4.44.0 # Apache-2.0
4646
oslo.rootwrap>=5.8.0 # Apache-2.0
4747
oslo.messaging>=10.3.0 # Apache-2.0
48-
oslo.policy>=2.3.0 # Apache-2.0
48+
oslo.policy>=3.1.0 # Apache-2.0
4949
oslo.privsep>=1.33.2 # Apache-2.0
5050
oslo.i18n>=3.15.3 # Apache-2.0
5151
oslo.service>=1.40.1 # Apache-2.0

0 commit comments

Comments
 (0)