Support extending in-use volumes
This support was introduced in Cinder microversion 3.42 which has been around for a while. Change-Id: Ie7051cb2095023ef6f0d273488a40d520752c6b5
This commit is contained in:
parent
b6b1d70d67
commit
87f1de7f69
@ -407,7 +407,9 @@ def volume_create(request, size, name, description, volume_type,
|
||||
|
||||
@profiler.trace
|
||||
def volume_extend(request, volume_id, new_size):
|
||||
return cinderclient(request).volumes.extend(volume_id, new_size)
|
||||
client = _cinderclient_with_features(request,
|
||||
'extend_in_use_volume')
|
||||
return client.volumes.extend(volume_id, new_size)
|
||||
|
||||
|
||||
@profiler.trace
|
||||
|
@ -42,6 +42,7 @@ MICROVERSION_FEATURES = {
|
||||
"groups": ["3.27", "3.43", "3.48", "3.58"],
|
||||
"message_list": ["3.5", "3.29"],
|
||||
"limits_project_id_query": ["3.43", "3.50", "3.55"],
|
||||
"extend_in_use_volume": ["3.42", "3.60"],
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -176,7 +176,7 @@ class ExtendVolume(VolumePolicyTargetMixin, tables.LinkAction):
|
||||
policy_rules = (("volume", "volume:extend"),)
|
||||
|
||||
def allowed(self, request, volume=None):
|
||||
return volume.status == "available"
|
||||
return volume.status in ['available', 'in-use']
|
||||
|
||||
|
||||
class EditAttachments(tables.LinkAction):
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Support for extending in-use volumes is added. The extend volume action
|
||||
will be shown on in-use volumes.
|
Loading…
Reference in New Issue
Block a user