'Return the QoS information from the volume metadata.'

def _get_qos_from_volume_metadata(self, volume_metadata):

    qos = {}
    for i in volume_metadata:
        k = i.get('key', None)
        value = i.get('value', None)
        key_split = k.split(':')
        if (len(key_split) == 1):
            scope = None
            key = key_split[0]
        else:
            scope = key_split[0]
            key = key_split[1]
        if (scope and (scope == 'qos')):
            if (key in self.svc_qos_keys.keys()):
                try:
                    type_fn = self.svc_qos_keys[key]['type']
                    value = type_fn(value)
                    qos[key] = value
                except ValueError:
                    continue
    return qos
