mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-10-26 08:42:29 +01:00 
			
		
		
		
	fix CLOUDSTACK-1852, use findHostsForMigration to list available hosts for migration
This commit is contained in:
		
							parent
							
								
									63206d601a
								
							
						
					
					
						commit
						742bc8dc83
					
				| @ -2628,11 +2628,11 @@ | |||||||
|                               validation: { required: true }, |                               validation: { required: true }, | ||||||
|                               select: function(args) { |                               select: function(args) { | ||||||
|                                 $.ajax({ |                                 $.ajax({ | ||||||
|                                   url: createURL("listHosts&VirtualMachineId=" + args.context.routers[0].id), |                                   url: createURL("findHostsForMigration&VirtualMachineId=" + args.context.routers[0].id), | ||||||
|                                   dataType: "json", |                                   dataType: "json", | ||||||
|                                   async: true, |                                   async: true, | ||||||
|                                   success: function(json) { |                                   success: function(json) { | ||||||
|                                     var hostObjs = json.listhostsresponse.host; |                                     var hostObjs = json.findhostsformigrationresponse.host; | ||||||
|                                     var items = []; |                                     var items = []; | ||||||
|                                     $(hostObjs).each(function() { |                                     $(hostObjs).each(function() { | ||||||
|                                       items.push({id: this.id, description: (this.name + " (" + (this.suitableformigration? "Suitable": "Not Suitable") + ")")}); |                                       items.push({id: this.id, description: (this.name + " (" + (this.suitableformigration? "Suitable": "Not Suitable") + ")")}); | ||||||
| @ -3072,11 +3072,11 @@ | |||||||
|                               validation: { required: true }, |                               validation: { required: true }, | ||||||
|                               select: function(args) { |                               select: function(args) { | ||||||
|                                 $.ajax({ |                                 $.ajax({ | ||||||
|                                   url: createURL("listHosts&VirtualMachineId=" + args.context.internallbinstances[0].id), |                                   url: createURL("findHostsForMigration&VirtualMachineId=" + args.context.internallbinstances[0].id), | ||||||
|                                   dataType: "json", |                                   dataType: "json", | ||||||
|                                   async: true, |                                   async: true, | ||||||
|                                   success: function(json) { |                                   success: function(json) { | ||||||
|                                     var hostObjs = json.listhostsresponse.host; |                                     var hostObjs = json.findhostsformigrationresponse.host; | ||||||
|                                     var items = []; |                                     var items = []; | ||||||
|                                     $(hostObjs).each(function() { |                                     $(hostObjs).each(function() { | ||||||
|                                       items.push({id: this.id, description: (this.name + " (" + (this.suitableformigration? "Suitable": "Not Suitable") + ")")}); |                                       items.push({id: this.id, description: (this.name + " (" + (this.suitableformigration? "Suitable": "Not Suitable") + ")")}); | ||||||
| @ -3645,11 +3645,11 @@ | |||||||
|                               validation: { required: true }, |                               validation: { required: true }, | ||||||
|                               select: function(args) { |                               select: function(args) { | ||||||
|                                 $.ajax({ |                                 $.ajax({ | ||||||
|                                   url: createURL("listHosts&VirtualMachineId=" + args.context.routers[0].id), |                                   url: createURL("findHostsForMigration&VirtualMachineId=" + args.context.routers[0].id), | ||||||
|                                   dataType: "json", |                                   dataType: "json", | ||||||
|                                   async: true, |                                   async: true, | ||||||
|                                   success: function(json) { |                                   success: function(json) { | ||||||
|                                     var hostObjs = json.listhostsresponse.host; |                                     var hostObjs = json.findhostsformigrationresponse.host; | ||||||
|                                     var items = []; |                                     var items = []; | ||||||
|                                     $(hostObjs).each(function() { |                                     $(hostObjs).each(function() { | ||||||
|                                       items.push({id: this.id, description: (this.name + " (" + (this.suitableformigration? "Suitable": "Not Suitable") + ")")}); |                                       items.push({id: this.id, description: (this.name + " (" + (this.suitableformigration? "Suitable": "Not Suitable") + ")")}); | ||||||
| @ -6497,12 +6497,12 @@ | |||||||
|                                       dataType: "json", |                                       dataType: "json", | ||||||
|                                       async: true, |                                       async: true, | ||||||
|                                       success: function(json) { |                                       success: function(json) { | ||||||
|                                         var hostObjs = json.listhostsresponse.host; |                                         var hostObjs = json.findhostsformigrationresponse.host; | ||||||
|                                         var items = []; |                                         var items = []; | ||||||
|                                         $(hostObjs).each(function() { |                                         $(hostObjs).each(function() { | ||||||
|                                           if(this.requiresStorageMotion == false){ |                                           if(this.requiresStorageMotion == false){ | ||||||
|                                           items.push({id: this.id, description: (this.name + " (" + (this.suitableformigration? "Suitable": "Not Suitable") + ")")}); |                                             items.push({id: this.id, description: (this.name + " (" + (this.suitableformigration? "Suitable": "Not Suitable") + ")")}); | ||||||
|                                            } |                                           } | ||||||
|                                         }); |                                         }); | ||||||
|                                         args.response.success({data: items}); |                                         args.response.success({data: items}); | ||||||
|                                       } |                                       } | ||||||
| @ -7437,11 +7437,11 @@ | |||||||
|                       validation: { required: true }, |                       validation: { required: true }, | ||||||
|                       select: function(args) { |                       select: function(args) { | ||||||
|                         $.ajax({ |                         $.ajax({ | ||||||
|                           url: createURL("listHosts&VirtualMachineId=" + args.context.routers[0].id), |                           url: createURL("findHostsForMigration&VirtualMachineId=" + args.context.routers[0].id), | ||||||
|                           dataType: "json", |                           dataType: "json", | ||||||
|                           async: true, |                           async: true, | ||||||
|                           success: function(json) { |                           success: function(json) { | ||||||
|                             var hostObjs = json.listhostsresponse.host; |                             var hostObjs = json.findhostsformigrationresponse.host; | ||||||
|                             var items = []; |                             var items = []; | ||||||
|                             $(hostObjs).each(function() { |                             $(hostObjs).each(function() { | ||||||
|                               items.push({id: this.id, description: (this.name + " (" + (this.suitableformigration? "Suitable": "Not Suitable") + ")")}); |                               items.push({id: this.id, description: (this.name + " (" + (this.suitableformigration? "Suitable": "Not Suitable") + ")")}); | ||||||
| @ -7985,11 +7985,11 @@ | |||||||
|                           dataType: "json", |                           dataType: "json", | ||||||
|                           async: true, |                           async: true, | ||||||
|                           success: function(json) { |                           success: function(json) { | ||||||
|                             var hostObjs = json.listhostsresponse.host; |                             var hostObjs = json.findhostsformigrationresponse.host; | ||||||
|                             var items = []; |                             var items = []; | ||||||
|                             $(hostObjs).each(function() { |                             $(hostObjs).each(function() { | ||||||
|                               if(this.requiresStorageMotion == false){ |                               if(this.requiresStorageMotion == false){ | ||||||
|                               items.push({id: this.id, description: (this.name + " (" + (this.suitableformigration? "Suitable": "Not Suitable") + ")")}); |                                 items.push({id: this.id, description: (this.name + " (" + (this.suitableformigration? "Suitable": "Not Suitable") + ")")}); | ||||||
|                               } |                               } | ||||||
|                             }); |                             }); | ||||||
|                             args.response.success({data: items}); |                             args.response.success({data: items}); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user