From 8710f6338d0596ebc7c0d8a69675d9333631504b Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Mon, 9 Oct 2017 09:31:08 -0400 Subject: expand type documentation for Enforcer arguments As part of bug #1720354 we discovered that arguments being passed to the enforcer were not always dictionaries and did not always support the full API needed. Expand the documentation to make the requirements clearer. Change-Id: I6c940d825cf72777e2a7946ab7489a1ed5359235 Closes-Bug: #1720354 Signed-off-by: Doug Hellmann --- oslo_policy/policy.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/oslo_policy/policy.py b/oslo_policy/policy.py index 1736e98..b26f6cd 100644 --- a/oslo_policy/policy.py +++ b/oslo_policy/policy.py @@ -706,8 +706,12 @@ class Enforcer(object): :param rule: The rule to evaluate. :type rule: string or :class:`BaseCheck` - :param dict target: As much information about the object being operated - on as possible. + :param dict target: As much information about the object being + operated on as possible. The target + argument should be a dict instance or an + instance of a class that fully supports + the Mapping abstract base class and deep + copying. :param dict creds: As much information about the user performing the action as possible. :param do_raise: Whether to raise an exception or not if check -- cgit v1.2.1