From 430557f4e9e158bcedddc55f0cf9bd7335e440fc Mon Sep 17 00:00:00 2001 From: yuhui_inspur Date: Sun, 19 Feb 2017 22:42:04 -0800 Subject: [PATCH] Fix some typos Fix the word 'fils' -> 'fails', and others. Change-Id: I676ac0b0d348da46ba0244bae2a8970677d3a284 --- manila/policy.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/manila/policy.py b/manila/policy.py index 08add876de..641768c5f3 100644 --- a/manila/policy.py +++ b/manila/policy.py @@ -46,15 +46,15 @@ def enforce(context, action, target, do_raise=True): """Verifies that the action is valid on the target in this context. :param context: manila context - :param action: string representing the action to be checked + :param action: string representing the action to be checked, this should be colon separated for clarity. i.e. ``compute:create_instance``, ``compute:attach_volume``, ``volume:attach_volume`` :param target: dictionary representing the object of the action - for object creation this should be a dictionary representing the + 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. + :param do_raise: Whether to raise an exception if check fails. :returns: When ``do_raise`` is ``False``, returns a value that evaluates as ``True`` or ``False`` depending on whether @@ -77,7 +77,7 @@ def enforce(context, action, target, do_raise=True): def check_is_admin(roles): - """Whether or not roles contains 'admin' role according to policy setting. + """Whether or not roles contain 'admin' role according to policy setting. """ init()