Merge "Add additional filter to volume_type check" into stable/liberty
This commit is contained in:
commit
c5d08197e9
@ -0,0 +1,4 @@
|
||||
---
|
||||
fixes:
|
||||
- Added additional filter to volume_type check,
|
||||
closed bug #1508017
|
@ -241,8 +241,8 @@ def check_volume_availability_zone_exist(az):
|
||||
|
||||
|
||||
def check_volume_type_exists(volume_type):
|
||||
volume_types = cinder.client().volume_types.list(search_opts={'name':
|
||||
volume_type})
|
||||
volume_types = cinder.client().volume_types.list()
|
||||
volume_types = list(filter(lambda x: x.name == volume_type, volume_types))
|
||||
if len(volume_types) == 1 and volume_types[0].name == volume_type:
|
||||
return
|
||||
raise ex.NotFoundException(volume_type, _("Volume type '%s' not found"))
|
||||
|
Loading…
Reference in New Issue
Block a user