'Get QoS specs from volume type.'

def _get_qos_specs(self, ctxt, type_id):

    specs = {}
    specs['minIOPS'] = ''
    specs['maxIOPS'] = ''
    specs['burstIOPS'] = ''
    if (type_id is not None):
        volume_type = volume_types.get_volume_type(ctxt, type_id)
        qos_specs_id = volume_type.get('qos_specs_id')
        if (qos_specs_id is not None):
            kvs = qos_specs.get_qos_specs(ctxt, qos_specs_id)['specs']
        else:
            kvs = volume_type.get('extra_specs')
        for (key, value) in kvs.items():
            if (':' in key):
                fields = key.split(':')
                key = fields[1]
            if (key.upper() == 'minIOPS'.upper()):
                specs['minIOPS'] = value
            elif (key.upper() == 'maxIOPS'.upper()):
                specs['maxIOPS'] = value
            elif (key.upper() == 'burstIOPS'.upper()):
                specs['burstIOPS'] = value
    return specs
