From c0277e35e6aedce9c41861054b69c26b09e02d22 Mon Sep 17 00:00:00 2001 From: Sujitha Date: Tue, 21 Mar 2017 20:03:16 +0000 Subject: [PATCH] Add description to policies in cells_scheduler.py The 'discoverable' policy is not documented as it will be removed in a future change. blueprint policy-docs Change-Id: Ie9d760924d83cd2b784fb42e7d309c2f7ca88b8d --- nova/policies/cells_scheduler.py | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/nova/policies/cells_scheduler.py b/nova/policies/cells_scheduler.py index e3ad2e701b..bc0020c558 100644 --- a/nova/policies/cells_scheduler.py +++ b/nova/policies/cells_scheduler.py @@ -13,19 +13,29 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_policy import policy +from nova.policies import base POLICY_ROOT = 'cells_scheduler_filter:%s' cells_scheduler_policies = [ - policy.RuleDefault( - name=POLICY_ROOT % 'DifferentCellFilter', - check_str='is_admin:True'), - policy.RuleDefault( - name=POLICY_ROOT % 'TargetCellFilter', - check_str='is_admin:True'), + base.create_rule_default( + POLICY_ROOT % 'DifferentCellFilter', + 'is_admin:True', + """Different cell filter to route a build away from a particular cell + +This policy is read by nova-scheduler process. +""", + []), + base.create_rule_default( + POLICY_ROOT % 'TargetCellFilter', + 'is_admin:True', + """Target cell filter to route a build to a particular cell + +This policy is read by nova-scheduler process. +""", + []) ]