'Destroy VM instance.'

def destroy(self, context, instance, network_info, block_device_info=None, destroy_disks=True):

    if (not instance.node):
        return
    if (instance.task_state == task_states.RESIZE_REVERTING):
        return
    if (block_device_info is not None):
        try:
            self._detach_instance_volumes(instance, block_device_info)
        except vexc.ManagedObjectNotFoundException:
            LOG.warning('Instance    does    not    exists.    Proceeding    to    delete    instance    properties    on    datastore', instance=instance)
    self._vmops.destroy(instance, destroy_disks)
