Follow up changes to granular placement policy reviews
This is just a consolidated patch for minor issues found during the granular placement policy series. Part of blueprint granular-placement-policy Change-Id: I8f5d3ed143aa88bacf9e9f39df224b314688b412
This commit is contained in:
@@ -36,8 +36,8 @@ class RequestContext(context.RequestContext):
|
|||||||
{'project_id': self.project_id, 'user_id': self.user_id}
|
{'project_id': self.project_id, 'user_id': self.user_id}
|
||||||
:param fatal: if False, will return False when an
|
:param fatal: if False, will return False when an
|
||||||
exception.PolicyNotAuthorized occurs.
|
exception.PolicyNotAuthorized occurs.
|
||||||
:raises nova.exception.PolicyNotAuthorized: if verification fails and
|
:raises nova.api.openstack.placement.exception.PolicyNotAuthorized:
|
||||||
fatal is True.
|
if verification fails and fatal is True.
|
||||||
:return: returns a non-False value (not necessarily "True") if
|
:return: returns a non-False value (not necessarily "True") if
|
||||||
authorized and False if not authorized and fatal is False.
|
authorized and False if not authorized and fatal is False.
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -52,6 +52,8 @@ def get_enforcer():
|
|||||||
# This method is used by oslopolicy CLI scripts in order to generate policy
|
# This method is used by oslopolicy CLI scripts in order to generate policy
|
||||||
# files from overrides on disk and defaults in code. We can just pass an
|
# files from overrides on disk and defaults in code. We can just pass an
|
||||||
# empty list and let oslo do the config lifting for us.
|
# empty list and let oslo do the config lifting for us.
|
||||||
|
# TODO(mriedem): Change the project kwarg value to "placement" once
|
||||||
|
# this code is extracted from nova.
|
||||||
cfg.CONF([], project='nova')
|
cfg.CONF([], project='nova')
|
||||||
init()
|
init()
|
||||||
return _ENFORCER_PLACEMENT
|
return _ENFORCER_PLACEMENT
|
||||||
|
|||||||
Reference in New Issue
Block a user