@staticmethod
  def _MigrateToFailover(op):
    if not isinstance(op, opcodes.OpInstanceMigrate):
      return op
    else:
      return opcodes.OpInstanceFailover(
        instance_name=op.instance_name,
        instance_uuid=getattr(op, "instance_uuid", None),
        target_node=getattr(op, "target_node", None),
        target_node_uuid=getattr(op, "target_node_uuid", None),
        ignore_ipolicy=op.ignore_ipolicy,
        cleanup=op.cleanup)
Return an equivalent failover opcode for a migrate one.
dataset/ETHPy150Open ganeti/ganeti/lib/cmdlib/group.py/LUGroupEvacuate._MigrateToFailover