Skip to content
Open
Show file tree
Hide file tree
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
5 changes: 3 additions & 2 deletions src/vnm_mad/remotes/lib/no_vlan.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def activate
TProxy.setup_tproxy(@nic, :up)

# Skip if vlan device is already in the bridge.
next if !@nic[:phydev] || @nic[:phydev].empty? ||
next if @nic[:phydev].nil? || @nic[:phydev].empty? ||
@bridges[@nic[:bridge]].include?(@nic[:phydev])

# Add phydev device to the bridge.
Expand Down Expand Up @@ -178,7 +178,8 @@ def vlan_filter
process do |nic|
@nic = nic

next if @nic[:phydev].nil? || @nic[:bridge].nil? || [email protected]_trunk?
next if @nic[:phydev].nil? || @nic[:phydev].empty?
next if @nic[:bridge].nil? || [email protected]_trunk?

vlan_set = @nic.vlan_trunk

Expand Down
6 changes: 3 additions & 3 deletions src/vnm_mad/remotes/lib/vlan.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def activate
process do |nic|
@nic = nic

next if @nic[:phydev].nil?
next if @nic[:phydev].nil? || @nic[:phydev].empty?

# generate the name of the vlan device.
gen_vlan_dev_name
Expand Down Expand Up @@ -111,7 +111,7 @@ def deactivate

@nic = nic

next if @nic[:phydev].nil?
next if @nic[:phydev].nil? || @nic[:phydev].empty?
next if @bridges[@nic[:bridge]].nil?

# Get the name of the vlan device.
Expand Down Expand Up @@ -167,7 +167,7 @@ def update(vnet_id)
process do |nic|
next unless Integer(nic[:network_id]) == vnet_id

next if nic[:phydev].nil?
next if nic[:phydev].nil? || nic[:phydev].empty?

# the bridge should already exist as we're updating
next if @bridges[nic[:bridge]].nil?
Expand Down