Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1073,6 +1073,10 @@ public static VMwareDVSPvlanConfigSpec createDVPortPvlanConfigSpec(int vlanId, i
}

public static VmwareDistributedVirtualSwitchVlanSpec createDVPortVlanSpec(Integer vlanId, String vlanRange) {
if (vlanId != null && vlanId == 4095){
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Spaceman1984 Have you tested this?

this method createDVPortVlanSpec() is called only when vlanId is null, so if check here is always 'false' and the underlying code never executes. Please check and try to fix this in the appropriate top level method in the call stack.

Copy link
Copy Markdown
Contributor Author

@Spaceman1984 Spaceman1984 Jan 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method is not onlly called when vlanid is null.
If vid is not null, spvlanid would be evaluated and if spvlanid is null, the method will be called.

if (vid == null || spvlanid == null) {
    vlanspec = createDVPortVlanSpec(vid, vlanRange);
    ...
}

I tested this as I stated in the description.

vlanId = null;
vlanRange = "0-4094";
}
Comment thread
Spaceman1984 marked this conversation as resolved.
if (vlanId == null && vlanRange != null && !vlanRange.isEmpty()) {
s_logger.debug("Creating dvSwitch port vlan-trunk spec with range: " + vlanRange);
VmwareDistributedVirtualSwitchTrunkVlanSpec trunkVlanSpec = new VmwareDistributedVirtualSwitchTrunkVlanSpec();
Expand Down