コード例 #1
0
ファイル: policy.py プロジェクト: ychen2u/stx-neutron
def _prepare_check(context, action, target, pluralized):
    """Prepare rule, target, and credentials for the policy engine."""
    # Compare with None to distinguish case in which target is {}
    if target is None:
        target = {}
    match_rule = _build_match_rule(action, target, pluralized)
    credentials = context.to_policy_values()
    return match_rule, target, credentials
コード例 #2
0
ファイル: policy.py プロジェクト: openstack/neutron
def _prepare_check(context, action, target, pluralized):
    """Prepare rule, target, and credentials for the policy engine."""
    # Compare with None to distinguish case in which target is {}
    if target is None:
        target = {}
    match_rule = _build_match_rule(action, target, pluralized)
    credentials = context.to_policy_values()
    return match_rule, target, credentials