def get_vnc_console(self, instance):
        """Return connection info for a vnc console."""
        if instance.vm_state == vm_states.RESCUED:
            name = instance.name % '%s-rescue'
            vm_ref = vm_utils.lookup(self._session, name)
            if vm_ref is None:
                # The rescue instance might not be ready at this point.
                raise exception.InstanceNotReady(instance_id=instance.uuid)
        else:
            vm_ref = vm_utils.lookup(self._session, instance.name)
            if vm_ref is None:
                # The compute manager expects InstanceNotFound for this case.
                raise exception.InstanceNotFound(instance_id=instance.uuid)

        session_id = self._session.get_session_id()
        path = "/console?ref=%s&session_id=%s" % (str(vm_ref), session_id)

        # NOTE: XS5.6sp2+ use http over port 80 for xenapi com
        return ctype.ConsoleVNC(
            host=CONF.vnc.vncserver_proxyclient_address,
            port=80,
            internal_access_path=path)
dataset/ETHPy150Open openstack/nova/nova/virt/xenapi/vmops.py/VMOps.get_vnc_console/swapped operands of `%`