def _ensure_not_resize_down_ephemeral(self, instance, flavor):
        old_gb = instance["ephemeral_gb"]
        new_gb = flavor.ephemeral_gb

        if old_gb > new_gb:
            reason = _("Can't resize down ephemeral disks.")
            raise exception.ResizeError(reason)
dataset/ETHPy150Open openstack/nova/nova/virt/xenapi/vmops.py/VMOps._ensure_not_resize_down_ephemeral/original