![chenying](/assets/img/avatar_default.png)
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
4 lines
66 B
Plaintext
4 lines
66 B
Plaintext
[DEFAULT]
|
|
output_file = etc/policy.yaml.sample
|
|
namespace = karbor
|