From e12968c331a38570b4a62a596d867516989214cf Mon Sep 17 00:00:00 2001 From: Matt Riedemann Date: Fri, 25 May 2018 11:29:47 -0400 Subject: [PATCH] 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 --- nova/api/openstack/placement/context.py | 4 ++-- nova/api/openstack/placement/policy.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/nova/api/openstack/placement/context.py b/nova/api/openstack/placement/context.py index 51b1340269..ee0786f494 100644 --- a/nova/api/openstack/placement/context.py +++ b/nova/api/openstack/placement/context.py @@ -36,8 +36,8 @@ class RequestContext(context.RequestContext): {'project_id': self.project_id, 'user_id': self.user_id} :param fatal: if False, will return False when an exception.PolicyNotAuthorized occurs. - :raises nova.exception.PolicyNotAuthorized: if verification fails and - fatal is True. + :raises nova.api.openstack.placement.exception.PolicyNotAuthorized: + if verification fails and fatal is True. :return: returns a non-False value (not necessarily "True") if authorized and False if not authorized and fatal is False. """ diff --git a/nova/api/openstack/placement/policy.py b/nova/api/openstack/placement/policy.py index a280b484c4..cad6fdf838 100644 --- a/nova/api/openstack/placement/policy.py +++ b/nova/api/openstack/placement/policy.py @@ -52,6 +52,8 @@ def get_enforcer(): # 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 # 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') init() return _ENFORCER_PLACEMENT