'Returns qos_specs of volume.
checks if there is a type on the volume
if so, checks if it has been associated with a qos class
returns the name of that class'

def _qos_specs_from_volume(self, volume):

    type_id = volume.get('volume_type_id', None)
    if (not type_id):
        return None
    return self._get_qos_specs(type_id)
