'Deletes a volume.'

@cinder_utils.trace
def delete_volume(self, volume):

    client = self._login()
    if self._volume_of_replicated_type(volume):
        self._do_volume_replication_destroy(volume, client)
        return
    try:
        volume_info = client.getVolumeByName(volume['name'])
        client.deleteVolume(volume_info['id'])
    except hpeexceptions.HTTPNotFound:
        LOG.error('Volume    did    not    exist.    It    will    not    be    deleted')
    except Exception as ex:
        raise exception.VolumeBackendAPIException(ex)
    finally:
        self._logout(client)
