Fix docstring for policy.enforce method

This patch corrects the name of the 'target' parameter and
adds the 'do_raise' parameter in the doc string for the
policy.enforce method.

TrivialFix

Change-Id: Ib6000ae868bc91a1aa8504b377408a829f1c9951
This commit is contained in:
Liyankun 2015-08-01 17:40:24 +08:00 committed by Tom Barron
parent e0bd245203
commit aac93592a9

View File

@ -51,12 +51,17 @@ def enforce(context, action, target, do_raise=True):
i.e. ``compute:create_instance``,
``compute:attach_volume``,
``volume:attach_volume``
:param object: dictionary representing the object of the action
:param target: dictionary representing the object of the action
for object creation this should be a dictionary representing the
location of the object e.g. ``{'project_id': context.project_id}``
:param do_raise: Whether to raise an exception if check fils.
:raises manila.exception.PolicyNotAuthorized: if verification fails.
:returns: When ``do_raise`` is ``False``, returns a value that
evaluates as ``True`` or ``False`` depending on whether
the policy allows action on the target.
:raises: manila.exception.PolicyNotAuthorized if verification fails
and ``do_raise`` is ``True``.
"""
init()