Add missing live migration methods to ComputeDriver base class
Several live migration-related methods are implemented in the virt drivers (and used in compute/manager), but missing from the base class: pre_live_migration() pre_block_migration() post_live_migration_at_destination() This adds those, fixing bug 1071404. Change-Id: Iccca4706462c5452882e34608df6e477d2280099
This commit is contained in:
		
				
					committed by
					
						
						Gerrit Code Review
					
				
			
			
				
	
			
			
			
						parent
						
							33825bea5b
						
					
				
				
					commit
					e23b3fbac5
				
			@@ -342,6 +342,27 @@ class ComputeDriver(object):
 | 
			
		||||
        """
 | 
			
		||||
        raise NotImplementedError()
 | 
			
		||||
 | 
			
		||||
    def pre_live_migration(self, ctxt, instance_ref,
 | 
			
		||||
                           block_device_info, network_info):
 | 
			
		||||
        """Prepare an instance for live migration
 | 
			
		||||
 | 
			
		||||
        :param ctxt: security context
 | 
			
		||||
        :param instance_ref: instance object that will be migrated
 | 
			
		||||
        :param block_device_info: instance block device information
 | 
			
		||||
        :param network_info: instance network information
 | 
			
		||||
        """
 | 
			
		||||
        raise NotImplementedError()
 | 
			
		||||
 | 
			
		||||
    def pre_block_migration(self, ctxt, instance_ref, disk_info):
 | 
			
		||||
        """Prepare a block device for migration
 | 
			
		||||
 | 
			
		||||
        :param ctxt: security context
 | 
			
		||||
        :param instance_ref: instance object that will have its disk migrated
 | 
			
		||||
        :param disk_info: information about disk to be migrated (as returned
 | 
			
		||||
                          from get_instance_disk_info())
 | 
			
		||||
        """
 | 
			
		||||
        raise NotImplementedError()
 | 
			
		||||
 | 
			
		||||
    def live_migration(self, ctxt, instance_ref, dest,
 | 
			
		||||
                       post_method, recover_method, block_migration=False,
 | 
			
		||||
                       migrate_data=None):
 | 
			
		||||
@@ -364,6 +385,18 @@ class ComputeDriver(object):
 | 
			
		||||
        """
 | 
			
		||||
        raise NotImplementedError()
 | 
			
		||||
 | 
			
		||||
    def post_live_migration_at_destination(self, ctxt, instance_ref,
 | 
			
		||||
                                           network_info,
 | 
			
		||||
                                           block_migration=False):
 | 
			
		||||
        """Post operation of live migration at destination host.
 | 
			
		||||
 | 
			
		||||
        :param ctxt: security context
 | 
			
		||||
        :param instance_ref: instance object that is migrated
 | 
			
		||||
        :param network_info: instance network information
 | 
			
		||||
        :param block_migration: if true, post operation of block_migration.
 | 
			
		||||
        """
 | 
			
		||||
        raise NotImplementedError()
 | 
			
		||||
 | 
			
		||||
    def check_can_live_migrate_destination(self, ctxt, instance_ref,
 | 
			
		||||
                                           block_migration=False,
 | 
			
		||||
                                           disk_over_commit=False):
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user