fix CLOUDSTACK-1852, use findHostsForMigration to list available hosts for migration

This commit is contained in:
Mice Xia 2013-07-11 10:39:30 +08:00
parent 63206d601a
commit 742bc8dc83

View File

@ -2628,11 +2628,11 @@
validation: { required: true },
select: function(args) {
$.ajax({
url: createURL("listHosts&VirtualMachineId=" + args.context.routers[0].id),
url: createURL("findHostsForMigration&VirtualMachineId=" + args.context.routers[0].id),
dataType: "json",
async: true,
success: function(json) {
var hostObjs = json.listhostsresponse.host;
var hostObjs = json.findhostsformigrationresponse.host;
var items = [];
$(hostObjs).each(function() {
items.push({id: this.id, description: (this.name + " (" + (this.suitableformigration? "Suitable": "Not Suitable") + ")")});
@ -3072,11 +3072,11 @@
validation: { required: true },
select: function(args) {
$.ajax({
url: createURL("listHosts&VirtualMachineId=" + args.context.internallbinstances[0].id),
url: createURL("findHostsForMigration&VirtualMachineId=" + args.context.internallbinstances[0].id),
dataType: "json",
async: true,
success: function(json) {
var hostObjs = json.listhostsresponse.host;
var hostObjs = json.findhostsformigrationresponse.host;
var items = [];
$(hostObjs).each(function() {
items.push({id: this.id, description: (this.name + " (" + (this.suitableformigration? "Suitable": "Not Suitable") + ")")});
@ -3645,11 +3645,11 @@
validation: { required: true },
select: function(args) {
$.ajax({
url: createURL("listHosts&VirtualMachineId=" + args.context.routers[0].id),
url: createURL("findHostsForMigration&VirtualMachineId=" + args.context.routers[0].id),
dataType: "json",
async: true,
success: function(json) {
var hostObjs = json.listhostsresponse.host;
var hostObjs = json.findhostsformigrationresponse.host;
var items = [];
$(hostObjs).each(function() {
items.push({id: this.id, description: (this.name + " (" + (this.suitableformigration? "Suitable": "Not Suitable") + ")")});
@ -6497,7 +6497,7 @@
dataType: "json",
async: true,
success: function(json) {
var hostObjs = json.listhostsresponse.host;
var hostObjs = json.findhostsformigrationresponse.host;
var items = [];
$(hostObjs).each(function() {
if(this.requiresStorageMotion == false){
@ -7437,11 +7437,11 @@
validation: { required: true },
select: function(args) {
$.ajax({
url: createURL("listHosts&VirtualMachineId=" + args.context.routers[0].id),
url: createURL("findHostsForMigration&VirtualMachineId=" + args.context.routers[0].id),
dataType: "json",
async: true,
success: function(json) {
var hostObjs = json.listhostsresponse.host;
var hostObjs = json.findhostsformigrationresponse.host;
var items = [];
$(hostObjs).each(function() {
items.push({id: this.id, description: (this.name + " (" + (this.suitableformigration? "Suitable": "Not Suitable") + ")")});
@ -7985,7 +7985,7 @@
dataType: "json",
async: true,
success: function(json) {
var hostObjs = json.listhostsresponse.host;
var hostObjs = json.findhostsformigrationresponse.host;
var items = [];
$(hostObjs).each(function() {
if(this.requiresStorageMotion == false){