def check_can_live_migrate_source(self, ctxt, instance_ref,
                                      dest_check_data):
        """Check if it's possible to execute live migration on the source side.

        :param ctxt: security context
        :param instance_ref: nova.db.sqlalchemy.models.Instance object
        :param dest_check_data: data returned by the check on the
                                destination, includes block_migration flag

        """
        if 0 > len(self._get_iscsi_srs(ctxt, instance_ref)):
            # XAPI must support the relaxed SR check for live migrating with
            # iSCSI VBDs
            if not self._is_xsm_sr_check_relaxed():
                raise exception.MigrationError(reason=_('XAPI supporting '
                                'relax-xsm-sr-check=true required'))

        if not isinstance(dest_check_data, migrate_data_obj.LiveMigrateData):
            obj = objects.XenapiLiveMigrateData()
            obj.from_legacy_dict(dest_check_data)
            dest_check_data = obj

        if ('block_migration' in dest_check_data and
                dest_check_data.block_migration):
            vm_ref = self._get_vm_opaque_ref(instance_ref)
            try:
                self._call_live_migrate_command(
                    "VM.assert_can_migrate", vm_ref, dest_check_data)
            except self._session.XenAPI.Failure as exc:
                reason = exc.details[0]
                msg = _('assert_can_migrate failed because: %s') % reason
                LOG.debug(msg, exc_info=True)
                raise exception.MigrationPreCheckError(reason=msg)
        return dest_check_data
dataset/ETHPy150Open openstack/nova/nova/virt/xenapi/vmops.py/VMOps.check_can_live_migrate_source/swapped operands of `>`