From d48714f1d962aef6a3e9db055d937a5d80a71223 Mon Sep 17 00:00:00 2001 From: Anusha Unnam Date: Fri, 24 Mar 2017 19:09:23 +0000 Subject: [PATCH] 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 --- nova/policies/services.py | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/nova/policies/services.py b/nova/policies/services.py index c2ee8af550dc..bd94cbc94386 100644 --- a/nova/policies/services.py +++ b/nova/policies/services.py @@ -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),