def _clear_db(self, context, is_migrating_dest, volume_ref, status):
    if is_migrating_dest:
        volume_ref.destroy()
        LOG.error(_LE('Unable to delete the destination volume during volume migration, (NOTE: database record needs to be deleted).'), resource=volume_ref)
    else:
        volume_ref.status = status
        volume_ref.save()
def _clear_db(self, context, is_migrating_dest, volume_ref, status):
    if is_migrating_dest:
        volume_ref.destroy()
        LOG.error(_LE('Unable to delete the destination volume during volume migration, (NOTE: database record needs to be deleted).'), resource=volume_ref)
    else:
        volume_ref.status = status
        volume_ref.save()