# Path: deckhand/policies/base.py
# POLICY_ROOT = 'deckhand:%s'
# RULE_ADMIN_API = 'rule:admin_api'
# def list_rules():


from oslo_policy import policy
from deckhand.policies import base

validation_policies = [
    policy.DocumentedRuleDefault(
        base.POLICY_ROOT % 'create_validation',
        base.RULE_ADMIN_API,
        "Add the results of a validation for a particular revision.",
        [
            {
                'method': 'POST',
                'path': '/api/v1.0/revisions/{revision_id}/validations'
            }
        ]),
    policy.DocumentedRuleDefault(
        base.POLICY_ROOT % 'list_validations',
        base.RULE_ADMIN_API,
        """"List all validations that have been reported for a revision. Also
lists the validation entries for a particular validation.""",
        [
            {
                'method': 'GET',
                'path': '/api/v1.0/revisions/{revision_id}/validations'
            },
            {
                'method': 'GET',
                'path': '/api/v1.0/revisions/{revision_id}/validations/'
                        '{validation_name}'
            }
        ]),
    policy.DocumentedRuleDefault(
        base.POLICY_ROOT % 'show_validation',

# Path: deckhand/policies/base.py
# POLICY_ROOT = 'deckhand:%s'
# RULE_ADMIN_API = 'rule:admin_api'
# def list_rules():


# Path: deckhand/policies/validation.py
from oslo_policy import policy
from deckhand.policies import base


validation_policies = [
    policy.DocumentedRuleDefault(
        base.POLICY_ROOT % 'create_validation',
        base.RULE_ADMIN_API,
        "Add the results of a validation for a particular revision.",
        [
            {
                'method': 'POST',
                'path': '/api/v1.0/revisions/{revision_id}/validations'
            }
        ]),
    policy.DocumentedRuleDefault(
        base.POLICY_ROOT % 'list_validations',
        base.RULE_ADMIN_API,
        """"List all validations that have been reported for a revision. Also
lists the validation entries for a particular validation.""",
        [
            {
                'method': 'GET',
                'path': '/api/v1.0/revisions/{revision_id}/validations'
            },
            {
                'method': 'GET',
                'path': '/api/v1.0/revisions/{revision_id}/validations/'
                        '{validation_name}'
            }
        ]),
    policy.DocumentedRuleDefault(
        base.POLICY_ROOT % 'show_validation',

        base.RULE_ADMIN_API,