'Soft delete the specified instance.'

def soft_delete(self, instance):

    try:
        vm_ref = self._get_vm_opaque_ref(instance)
    except exception.NotFound:
        LOG.warning('VM    is    not    present,    skipping    soft    delete...', instance=instance)
    else:
        vm_utils.hard_shutdown_vm(self._session, instance, vm_ref)
        self._acquire_bootlock(vm_ref)
