mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-4089: UI > zone wizard > VMware hypervisor > physical network > edit Public/Guest traffic type > vSwitchType dropdown > set default option upon configuration 'vmware.use.dvswtich' and 'vmware.use.nexus.vswitch'.
This commit is contained in:
parent
d4d42bb22d
commit
94cd470a0a
@ -309,7 +309,45 @@
|
||||
}
|
||||
};
|
||||
|
||||
if($trafficType.hasClass('guest') || $trafficType.hasClass('public')) {
|
||||
if($trafficType.hasClass('guest') || $trafficType.hasClass('public')) {
|
||||
if(trafficData.vSwitchType == null) {
|
||||
var useDvs = false;
|
||||
$.ajax({
|
||||
url: createURL('listConfigurations'),
|
||||
data: {
|
||||
name: 'vmware.use.dvswitch'
|
||||
},
|
||||
async: false,
|
||||
success: function(json) {
|
||||
if (json.listconfigurationsresponse.configuration[0].value == 'true') {
|
||||
useDvs = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
if (useDvs == true) {
|
||||
var useNexusDvs = false;
|
||||
$.ajax({
|
||||
url: createURL('listConfigurations'),
|
||||
data: {
|
||||
name: 'vmware.use.nexus.vswitch'
|
||||
},
|
||||
async: false,
|
||||
success: function(json) {
|
||||
if (json.listconfigurationsresponse.configuration[0].value == 'true') {
|
||||
useNexusDvs = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
if (useNexusDvs == true) {
|
||||
trafficData.vSwitchType = 'nexusdvs';
|
||||
} else {
|
||||
trafficData.vSwitchType = 'vmwaredvs';
|
||||
}
|
||||
} else { //useDvs == false
|
||||
trafficData.vSwitchType = 'vmwaresvs';
|
||||
}
|
||||
}
|
||||
|
||||
$.extend(fields, {
|
||||
vSwitchType: {
|
||||
label: 'vSwitch Type',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user