Skip to content

Instantly share code, notes, and snippets.

@leseb
Created December 11, 2013 15:27
Show Gist options
  • Save leseb/7912390 to your computer and use it in GitHub Desktop.
Save leseb/7912390 to your computer and use it in GitHub Desktop.
628c628,629
< specs = {}
---
> qos = {}
> specs = None
630,631c631,632
< res = volume_types.get_volume_type_qos_specs(typeid)
< specs = res['qos_specs']
---
> res = volume_types.get_volume_type_qos_specs(typeid)
> qos = res['qos_specs']
633,634c634,637
< # Don't pass qos_spec as empty dict
< qos_spec = dict(qos_spec=specs if specs else None)
---
> if qos and qos.get('consumer') == 'front-end':
> specs = qos.get('specs')
>
> qos_spec = dict(qos_specs=specs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment