karbor/karbor/tests/unit
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
..
api Add default policy in code for the plan resource 2017-09-26 19:18:31 +08:00
clients Add kubernetes client to Karbor 2017-08-31 19:24:59 +08:00
db Merge "Update the data module of operation_log" 2017-07-24 12:57:34 +00:00
fake_providers Add option to enable or disable providers 2017-07-19 21:52:03 +08:00
objects Update the data module of operation_log 2017-07-03 09:53:03 +08:00
operationengine Add extra_info when creating checkpoint in scheduled operation 2017-07-31 22:24:56 +08:00
plugins Add pod to the parent resource types of volume protectable plugins 2017-09-19 14:33:28 +08:00
protection Merge "Add the pod with cinder volumes protection plugin" 2017-09-20 13:25:19 +00:00
wsgi Use wsgi module from oslo.service 2017-04-11 16:16:16 +08:00
__init__.py Change Smaug to Karbor 2016-08-18 22:55:34 +08:00
conf_fixture.py client_factory, keystone plugin: lazy init 2017-03-09 04:26:09 +08:00
fake_bank.py Use HostAddressOpt for opts that accept IP and hostnames 2017-04-06 15:37:20 +08:00
fake_operation_log.py Update the data module of operation_log 2017-07-03 09:53:03 +08:00
fake_plan.py Change Smaug to Karbor 2016-08-18 22:55:34 +08:00
fake_restore.py keystone: move to v3 2017-02-07 14:00:45 +02:00
fake_service.py Change Smaug to Karbor 2016-08-18 22:55:34 +08:00
policy.json Change Smaug to Karbor 2016-08-18 22:55:34 +08:00
test_cmd.py Provide user friendly messages for db sync 2017-06-23 09:44:44 +08:00
test_context.py Use context.from_dict to determine available arguments 2017-05-04 21:48:42 +08:00
test_exception.py Extracted HTTP response codes to constants 2017-03-31 18:01:03 +08:00
test_policy.py Add default policy in code for the plan resource 2017-09-26 19:18:31 +08:00
test_service.py Use PortOpt for port options 2017-08-14 22:57:40 +08:00
test_utils.py Fix the error about the translation of KarborException message 2017-06-19 19:44:54 +08:00