karbor/karbor/policies
chenying 83f97e4c41 Add default policy in code for the plan resource
This adds the basic framework for registering and using default policy
rules. Rules should be defined and returned from a module in
karbor/policies/, and then added to the list in
karbor/policies/__init__.py.

The sample file about default policy will be generated as yaml using
cmd 'tox -e genpolicy' in this patch.

A new context.can() method has been added for policy enforcement of
registered rules. It has the same parameters as the enforce() method
currently being used.

The patch add default policy in code for  plan resource in karbor.

Partial-Implements: blueprint policy-in-code
Change-Id: I88ce31ee7cff9263055cfb51f6b5da5c333c50f2
2017-09-26 19:18:31 +08:00
..
__init__.py Add default policy in code for the plan resource 2017-09-26 19:18:31 +08:00
base.py Add default policy in code for the plan resource 2017-09-26 19:18:31 +08:00
plans.py Add default policy in code for the plan resource 2017-09-26 19:18:31 +08:00