From 354f9d70b272275cd95655650750622472ddb43d Mon Sep 17 00:00:00 2001 From: Felipe Monteiro Date: Sun, 18 Mar 2018 22:59:22 +0000 Subject: [PATCH] Fix policy in code docs for extended_snapshot_attributes This is to fix policy in code docs for the policy 'volume_extension:extended_snapshot_attributes' which currently incorrectly says that the policy is enforced for GET /snapshots which is wrong [0]. According to the code, the policy is enforced for show and details (GET /snapshots/{snapshot_id} and GET /snapshots/details) [1]. This was also confirmed using Patrole test [2]. [0] https://github.com/openstack/cinder/blob/831665f59a0d87f2dbf7fa4f7496305977a98b0f/cinder/policies/snapshots.py#L48 [1] https://github.com/openstack/cinder/blob/831665f59a0d87f2dbf7fa4f7496305977a98b0f/cinder/api/contrib/extended_snapshot_attributes.py#L30 [2] I7770148584e10a08b3e133b1793a1533f1728fc1 Change-Id: I7b5a870bf74574f45fc46fdccb9551a2e911f360 --- cinder/policies/snapshots.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cinder/policies/snapshots.py b/cinder/policies/snapshots.py index 064c2d1b58c..e573a14354a 100644 --- a/cinder/policies/snapshots.py +++ b/cinder/policies/snapshots.py @@ -45,11 +45,11 @@ snapshots_policies = [ policy.DocumentedRuleDefault( name=EXTEND_ATTRIBUTE, check_str=base.RULE_ADMIN_OR_OWNER, - description="List snapshots with extended attributes.", + description="List or show snapshots with extended attributes.", operations=[ { 'method': 'GET', - 'path': '/snapshots' + 'path': '/snapshots/{snapshot_id}' }, { 'method': 'GET',