Fix reserve volume enforcing the wrong policy action
This PS fixes `reserve_volume` enforcing the wrong policy action: retype policy. It has been corrected to reserve volume policy. This is consistent with the policy in code documentation as well for both policies: retype is only enforced by os-retype and reserve is only enforced by os-reserve [0][1] [0]94460b64fb/cinder/policies/volume_actions.py (L91)
[1]94460b64fb/cinder/policies/volume_actions.py (L197)
Change-Id: I14b8288cdb066f30b66068dcaaf66e1277aa122f
This commit is contained in:
parent
94460b64fb
commit
678b9de0f4
@ -670,7 +670,7 @@ class API(base.Base):
|
||||
return snapshots
|
||||
|
||||
def reserve_volume(self, context, volume):
|
||||
context.authorize(vol_action_policy.RETYPE_POLICY, target_obj=volume)
|
||||
context.authorize(vol_action_policy.RESERVE_POLICY, target_obj=volume)
|
||||
expected = {'multiattach': volume.multiattach,
|
||||
'status': (('available', 'in-use') if volume.multiattach
|
||||
else 'available')}
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
The reserve volume API was incorrectly enforcing "volume:retype" policy
|
||||
action. It has been corrected to "volume_extension:volume_actions:reserve".
|
Loading…
Reference in New Issue
Block a user