Add description to policies in services.py

The 'discoverable' policy is not documented as it will be removed in a
future change.

blueprint policy-docs

Change-Id: Iff6793d90c9977566a2b42c2ca4e1fd50591b737
This commit is contained in:
Anusha Unnam 2017-03-24 19:09:23 +00:00
parent bc31f5ad97
commit d48714f1d9

View File

@ -23,9 +23,39 @@ POLICY_ROOT = 'os_compute_api:os-services:%s'
services_policies = [
policy.RuleDefault(
name=BASE_POLICY_NAME,
check_str=base.RULE_ADMIN_API),
base.create_rule_default(
BASE_POLICY_NAME,
base.RULE_ADMIN_API,
"""Lists all running Compute services in a region, enables \
or disables scheduling for a Compute service, logs disabled Compute service \
information, set or unset forced_down flag for the compute service and \
deletes a Compute service.""",
[
{
'method': 'GET',
'path': '/os-services'
},
{
'method': 'PUT',
'path': '/os-services/enable'
},
{
'method': 'PUT',
'path': '/os-services/disable'
},
{
'method': 'PUT',
'path': '/os-services/disable-log-reason'
},
{
'method': 'PUT',
'path': '/os-services/force-down'
},
{
'method': 'DELETE',
'path': '/os-services/{service_id}'
}
]),
policy.RuleDefault(
name=POLICY_ROOT % 'discoverable',
check_str=base.RULE_ANY),