mirror of
https://github.com/apache/cloudstack.git
synced 2025-12-16 10:32:34 +01:00
Merge pull request #1396 from nitin-maharana/CloudStack-Nitin26_4.7
CLOUDSTACK-9269: Missing field for Switch type for Management and Storage traffic types# Repro Steps: Create an Advanced zone(VMware). Configure physical network. Edit traffic type (Management or Storage) Observe the switch type dropdown list is missing. If we choose Guest or Public the dropdown is visible. See the below snapshots. # Expected Result: The list should be shown in case of Management and storage. # Actual Result: The list is missing in case of management and storage. # Fix: Showing vswitchtype for all traffic types in case of VMware. # Traffic Type - Guest:  # Traffic Type - Management (Issue):  * pr/1396: CLOUDSTACK-9269: Missing field for Switch type for Management and Storage traffic types Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
commit
80724b01bc
@ -310,69 +310,67 @@
|
||||
};
|
||||
|
||||
if(zoneType == 'Advanced') {
|
||||
if($trafficType.hasClass('guest') || $trafficType.hasClass('public')) {
|
||||
if(trafficData.vSwitchType == null) {
|
||||
var useDvs = false;
|
||||
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.dvswitch'
|
||||
name: 'vmware.use.nexus.vswitch'
|
||||
},
|
||||
async: false,
|
||||
success: function(json) {
|
||||
if (json.listconfigurationsresponse.configuration[0].value == 'true') {
|
||||
useDvs = true;
|
||||
useNexusDvs = 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';
|
||||
fields.vSwitchName.defaultValue = 'epp0';
|
||||
} else {
|
||||
trafficData.vSwitchType = 'vmwaredvs';
|
||||
fields.vSwitchName.defaultValue = 'dvSwitch0';
|
||||
}
|
||||
} else { //useDvs == false
|
||||
trafficData.vSwitchType = 'vmwaresvs';
|
||||
fields.vSwitchName.defaultValue = 'vSwitch0';
|
||||
if (useNexusDvs == true) {
|
||||
trafficData.vSwitchType = 'nexusdvs';
|
||||
fields.vSwitchName.defaultValue = 'epp0';
|
||||
} else {
|
||||
trafficData.vSwitchType = 'vmwaredvs';
|
||||
fields.vSwitchName.defaultValue = 'dvSwitch0';
|
||||
}
|
||||
}
|
||||
|
||||
$.extend(fields, {
|
||||
vSwitchType: {
|
||||
label: 'label.vSwitch.type',
|
||||
select: function (args) {
|
||||
args.response.success({
|
||||
data: [{
|
||||
id: 'nexusdvs',
|
||||
description: 'Cisco Nexus 1000v Distributed Virtual Switch'
|
||||
}, {
|
||||
id: 'vmwaresvs',
|
||||
description: 'VMware vNetwork Standard Virtual Switch'
|
||||
}, {
|
||||
id: 'vmwaredvs',
|
||||
description: 'VMware vNetwork Distributed Virtual Switch'
|
||||
}]
|
||||
});
|
||||
},
|
||||
defaultValue: trafficData.vSwitchType
|
||||
}
|
||||
});
|
||||
} else { //useDvs == false
|
||||
trafficData.vSwitchType = 'vmwaresvs';
|
||||
fields.vSwitchName.defaultValue = 'vSwitch0';
|
||||
}
|
||||
}
|
||||
|
||||
$.extend(fields, {
|
||||
vSwitchType: {
|
||||
label: 'label.vSwitch.type',
|
||||
select: function (args) {
|
||||
args.response.success({
|
||||
data: [{
|
||||
id: 'nexusdvs',
|
||||
description: 'Cisco Nexus 1000v Distributed Virtual Switch'
|
||||
}, {
|
||||
id: 'vmwaresvs',
|
||||
description: 'VMware vNetwork Standard Virtual Switch'
|
||||
}, {
|
||||
id: 'vmwaredvs',
|
||||
description: 'VMware vNetwork Distributed Virtual Switch'
|
||||
}]
|
||||
});
|
||||
},
|
||||
defaultValue: trafficData.vSwitchType
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
fields = {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user