mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-2782:UI Support to add VMware DC to CloudStack zone through the zone wizard
This commit is contained in:
parent
c8f143e3a7
commit
2a3cfe4b22
|
|
@ -3366,6 +3366,49 @@
|
|||
}
|
||||
array1.push("&clustername=" + todb(clusterName));
|
||||
|
||||
if(args.data.cluster.hypervisor == "VMware"){
|
||||
|
||||
var vmwareData = {
|
||||
|
||||
zoneId: args.data.returnedZone.id,
|
||||
username: args.data.cluster.vCenterUsername,
|
||||
password: args.data.cluster.vCenterPassword,
|
||||
name: args.data.cluster.vCenterDatacenter
|
||||
|
||||
};
|
||||
|
||||
$.ajax({
|
||||
url: createURL('addVmwareDc&url=' + todb(url)),
|
||||
data: vmwareData,
|
||||
success: function(json) {
|
||||
var item = json.addvmwaredcresponse.vmwaredc;
|
||||
if(item.id != null){
|
||||
$.ajax({
|
||||
url: createURL("addCluster" + array1.join("")),
|
||||
dataType: "json",
|
||||
async: true,
|
||||
success: function(json) {
|
||||
stepFns.addPrimaryStorage({
|
||||
data: $.extend(args.data, {
|
||||
returnedCluster: json.addclusterresponse.cluster[0]
|
||||
})
|
||||
});
|
||||
|
||||
},
|
||||
error: function(XMLHttpResponse) {
|
||||
var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
|
||||
error('addCluster', errorMsg, { fn: 'addCluster', args: args });
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
else{
|
||||
|
||||
$.ajax({
|
||||
url: createURL("addCluster" + array1.join("")),
|
||||
dataType: "json",
|
||||
|
|
@ -3391,6 +3434,8 @@
|
|||
error('addCluster', errorMsg, { fn: 'addCluster', args: args });
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
addHost: function(args) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue