From a7022af2b5a3e67c46786ea0ffc74185f55dc566 Mon Sep 17 00:00:00 2001 From: jichenjc Date: Mon, 22 May 2017 13:41:06 +0800 Subject: [PATCH] Deprecate unused policy from policy doc As TODO indicatd deprecate unused policy from policy doc as them are not used at all and will remove in next cycle os_compute_api:os-server-groups os_compute_api:flavors Partial implement blueprint policy-docs Change-Id: Iee7145be584461b3b427ecd16027df3fe39c506f --- nova/policies/flavors.py | 3 ++- nova/policies/server_groups.py | 3 ++- .../notes/deprecate_unused_policy-d3bf8589aee63eb6.yaml | 9 +++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/deprecate_unused_policy-d3bf8589aee63eb6.yaml diff --git a/nova/policies/flavors.py b/nova/policies/flavors.py index d9d544df10..11fd4b7a1d 100644 --- a/nova/policies/flavors.py +++ b/nova/policies/flavors.py @@ -26,7 +26,8 @@ flavors_policies = [ # as such should be removed. policy.RuleDefault( name=BASE_POLICY_NAME, - check_str=base.RULE_ADMIN_OR_OWNER), + check_str=base.RULE_ADMIN_OR_OWNER, + description='Deprecated in Pike and will be removed in next release'), ] diff --git a/nova/policies/server_groups.py b/nova/policies/server_groups.py index afa774a8c2..e0d74bec71 100644 --- a/nova/policies/server_groups.py +++ b/nova/policies/server_groups.py @@ -27,7 +27,8 @@ server_groups_policies = [ # TODO(Kevin_Zheng): remove this rule as this not used by any API policy.RuleDefault( name=BASE_POLICY_NAME, - check_str=base.RULE_ADMIN_OR_OWNER), + check_str=base.RULE_ADMIN_OR_OWNER, + description='Deprecated in Pike and will be removed in next release'), base.create_rule_default( POLICY_ROOT % 'create', BASE_POLICY_RULE, diff --git a/releasenotes/notes/deprecate_unused_policy-d3bf8589aee63eb6.yaml b/releasenotes/notes/deprecate_unused_policy-d3bf8589aee63eb6.yaml new file mode 100644 index 0000000000..f5e429813c --- /dev/null +++ b/releasenotes/notes/deprecate_unused_policy-d3bf8589aee63eb6.yaml @@ -0,0 +1,9 @@ +--- +deprecations: + - | + Some unused policies have been deprecated. These are: + + * ``os_compute_api:os-server-groups`` + * ``os_compute_api:flavors`` + + Please note you should remove these from your policy file(s).