vmware: Fixed instance creation failure on dvswitch when using vlan id 4095 (#4557)

Fixed instance creation failure on dvswitch when using vlan id 4095
This commit is contained in:
Spaceman1984 2021-01-12 09:53:16 +02:00 committed by GitHub
parent 4d33e159f7
commit ec4d83da4d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1073,6 +1073,10 @@ public class HypervisorHostHelper {
}
public static VmwareDistributedVirtualSwitchVlanSpec createDVPortVlanSpec(Integer vlanId, String vlanRange) {
if (vlanId != null && vlanId == 4095){
vlanId = null;
vlanRange = "0-4094";
}
if (vlanId == null && vlanRange != null && !vlanRange.isEmpty()) {
s_logger.debug("Creating dvSwitch port vlan-trunk spec with range: " + vlanRange);
VmwareDistributedVirtualSwitchTrunkVlanSpec trunkVlanSpec = new VmwareDistributedVirtualSwitchTrunkVlanSpec();