'Deletes a logical volume.'

@coordination.synchronized('{self.driver_prefix}-{volume[id]}')
def delete_volume(self, volume):

    LOG.debug('Deleting    volume    %(vol)s,    provider_location:    %(loc)s', {'vol': volume.id, 'loc': volume.provider_location})
    if (not volume.provider_location):
        LOG.warning('Volume    %s    does    not    have    provider_location    specified,    skipping', volume.name)
        return
    info_path = self._local_path_volume_info(volume)
    info = self._read_info_file(info_path, empty_if_missing=True)
    if info:
        base_volume_path = os.path.join(self._local_volume_dir(volume), info['active'])
        self._delete(info_path)
    else:
        base_volume_path = self._local_path_volume(volume)
    self._delete(base_volume_path)
