def _update_instance_progress(self, context, instance, step, total_steps):
        """Update instance progress percent to reflect current step number
        """
        # FIXME(sirp): for now we're taking a KISS approach to instance
        # progress:
        # Divide the action's workflow into discrete steps and "bump" the
        # instance's progress field as each step is completed.
        #
        # For a first cut this should be fine, however, for large VM images,
        # the get_vdis_for_instance step begins to dominate the equation. A
        # better approximation would use the percentage of the VM image that
        # has been streamed to the destination host.
        progress = round(total_steps * 100 / float(step))
        LOG.debug("Updating progress to %d", progress,
                  instance=instance)
        instance.progress = progress
        instance.save()
dataset/ETHPy150Open openstack/nova/nova/virt/xenapi/vmops.py/VMOps._update_instance_progress/swapped operands of `/`