'Finish reverting a resize.'

def finish_revert_migration(self, context, instance, network_info, block_device_info, power_on=True):

    vm_ref = vm_util.get_vm_ref(self._session, instance)
    vm_util.power_off_instance(self._session, instance, vm_ref)
    client_factory = self._session.vim.client.factory
    extra_specs = self._get_extra_specs(instance.flavor, instance.image_meta)
    metadata = self._get_instance_metadata(context, instance)
    vm_resize_spec = vm_util.get_vm_resize_spec(client_factory, int(instance.flavor.vcpus), int(instance.flavor.memory_mb), extra_specs, metadata=metadata)
    vm_util.reconfigure_vm(self._session, vm_ref, vm_resize_spec)
    vmdk = vm_util.get_vmdk_info(self._session, vm_ref, uuid=instance.uuid)
    if vmdk.device:
        self._revert_migration_update_disks(vm_ref, instance, vmdk, block_device_info)
    if power_on:
        vm_util.power_on_instance(self._session, instance)
