Fixes creating nondefault type volumes from volume
Horizon ignores volume type of source volume and tries to set default type to newly created volume. Proposed patch makes Horizon inherit volume type from the source Closes-bug: #1830759 Closes-bug: #1599225 Change-Id: Ice18259a59d1b7e347ffab89ca931985d49e6895
This commit is contained in:
parent
6c6b5249cf
commit
c60a82dfaa
|
@ -402,6 +402,7 @@ class CreateForm(forms.SelfHandlingForm):
|
|||
# Create from volume
|
||||
volume = self.get_volume(request, data["volume_source"])
|
||||
volume_id = volume.id
|
||||
volume_type = None
|
||||
|
||||
if data['size'] < volume.size:
|
||||
error_message = (_('The volume size cannot be less than '
|
||||
|
|
|
@ -537,7 +537,7 @@ class VolumeViewTests(test.ResetImageAPIVersionMixin, test.TestCase):
|
|||
filters={'visibility': 'shared', 'status': 'active'})
|
||||
self.mock_volume_create.assert_called_once_with(
|
||||
test.IsHttpRequest(), formData['size'], formData['name'],
|
||||
formData['description'], '', metadata={}, snapshot_id=None,
|
||||
formData['description'], None, metadata={}, snapshot_id=None,
|
||||
group_id=None, image_id=None, availability_zone=None,
|
||||
source_volid=volume.id)
|
||||
self.mock_group_list.assert_called_once_with(test.IsHttpRequest())
|
||||
|
|
Loading…
Reference in New Issue