mirror of
https://github.com/apache/cloudstack.git
synced 2025-12-18 11:34:23 +01:00
CLOUDSTACK-2782: UI - zone wizard - add cluster step - remove obsolete code.
This commit is contained in:
parent
86c0e28c04
commit
402cc917b9
@ -3362,16 +3362,12 @@
|
|||||||
array1.push("&clustername=" + todb(clusterName));
|
array1.push("&clustername=" + todb(clusterName));
|
||||||
|
|
||||||
if(args.data.cluster.hypervisor == "VMware"){
|
if(args.data.cluster.hypervisor == "VMware"){
|
||||||
|
|
||||||
var vmwareData = {
|
var vmwareData = {
|
||||||
|
|
||||||
zoneId: args.data.returnedZone.id,
|
zoneId: args.data.returnedZone.id,
|
||||||
username: args.data.cluster.vCenterUsername,
|
username: args.data.cluster.vCenterUsername,
|
||||||
password: args.data.cluster.vCenterPassword,
|
password: args.data.cluster.vCenterPassword,
|
||||||
name: args.data.cluster.vCenterDatacenter
|
name: args.data.cluster.vCenterDatacenter
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: createURL('addVmwareDc&url=' + todb(url)),
|
url: createURL('addVmwareDc&url=' + todb(url)),
|
||||||
data: vmwareData,
|
data: vmwareData,
|
||||||
@ -3383,12 +3379,11 @@
|
|||||||
dataType: "json",
|
dataType: "json",
|
||||||
async: true,
|
async: true,
|
||||||
success: function(json) {
|
success: function(json) {
|
||||||
stepFns.addPrimaryStorage({
|
stepFns.addPrimaryStorage({ //skip "add host step" when hypervisor is VMware
|
||||||
data: $.extend(args.data, {
|
data: $.extend(args.data, {
|
||||||
returnedCluster: json.addclusterresponse.cluster[0]
|
returnedCluster: json.addclusterresponse.cluster[0]
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
error: function(XMLHttpResponse) {
|
error: function(XMLHttpResponse) {
|
||||||
var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
|
var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
|
||||||
@ -3396,40 +3391,26 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
else{
|
else{
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: createURL("addCluster" + array1.join("")),
|
url: createURL("addCluster" + array1.join("")),
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
async: true,
|
async: true,
|
||||||
success: function(json) {
|
success: function(json) {
|
||||||
if(args.data.cluster.hypervisor != "VMware") {
|
|
||||||
stepFns.addHost({
|
stepFns.addHost({
|
||||||
data: $.extend(args.data, {
|
data: $.extend(args.data, {
|
||||||
returnedCluster: json.addclusterresponse.cluster[0]
|
returnedCluster: json.addclusterresponse.cluster[0]
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
}
|
|
||||||
else {
|
|
||||||
stepFns.addPrimaryStorage({
|
|
||||||
data: $.extend(args.data, {
|
|
||||||
returnedCluster: json.addclusterresponse.cluster[0]
|
|
||||||
})
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
error: function(XMLHttpResponse) {
|
error: function(XMLHttpResponse) {
|
||||||
var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
|
var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
|
||||||
error('addCluster', errorMsg, { fn: 'addCluster', args: args });
|
error('addCluster', errorMsg, { fn: 'addCluster', args: args });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user