Revision 6a1434d7 lib/rpc.py

b/lib/rpc.py
703 703
                                [self._InstDict(instance), info, target])
704 704

  
705 705
  @_RpcTimeout(_TMO_NORMAL)
706
  def call_finalize_migration(self, node, instance, info, success):
706
  def call_instance_finalize_migration_dst(self, node, instance, info, success):
707 707
    """Finalize any target-node migration specific operation.
708 708

  
709 709
    This is called both in case of a successful migration and in case of error
......
721 721
    @param success: whether the migration was a success or a failure
722 722

  
723 723
    """
724
    return self._SingleNodeCall(node, "finalize_migration",
724
    return self._SingleNodeCall(node, "instance_finalize_migration_dst",
725 725
                                [self._InstDict(instance), info, success])
726 726

  
727 727
  @_RpcTimeout(_TMO_SLOW)
......
744 744
    return self._SingleNodeCall(node, "instance_migrate",
745 745
                                [self._InstDict(instance), target, live])
746 746

  
747
  @_RpcTimeout(_TMO_SLOW)
748
  def call_instance_finalize_migration_src(self, node, instance, success, live):
749
    """Finalize the instance migration on the source node.
750

  
751
    This is a single-node call.
752

  
753
    @type instance: L{objects.Instance}
754
    @param instance: the instance that was migrated
755
    @type success: bool
756
    @param success: whether the migration succeeded or not
757
    @type live: bool
758
    @param live: whether the user requested a live migration or not
759

  
760
    """
761
    return self._SingleNodeCall(node, "instance_finalize_migration_src",
762
                                [self._InstDict(instance), success, live])
763

  
764
  @_RpcTimeout(_TMO_SLOW)
765
  def call_instance_get_migration_status(self, node, instance):
766
    """Report migration status.
767

  
768
    This is a single-node call that must be executed on the source node.
769

  
770
    @type instance: L{objects.Instance}
771
    @param instance: the instance that is being migrated
772
    @rtype: L{objects.MigrationStatus}
773
    @return: the status of the current migration (one of
774
             L{constants.HV_MIGRATION_VALID_STATUSES}), plus any additional
775
             progress info that can be retrieved from the hypervisor
776

  
777
    """
778
    result = self._SingleNodeCall(node, "instance_get_migration_status",
779
                                  [self._InstDict(instance)])
780
    if not result.fail_msg and result.payload is not None:
781
      result.payload = objects.MigrationStatus.FromDict(result.payload)
782
    return result
783

  
747 784
  @_RpcTimeout(_TMO_NORMAL)
748 785
  def call_instance_reboot(self, node, inst, reboot_type, shutdown_timeout):
749 786
    """Reboots an instance.

Also available in: Unified diff