Skip to content

Commit

Permalink
Improve code documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ancorgs committed Feb 20, 2020
1 parent bbf3362 commit 0f47d06
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/modules/FcoeClient.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class Interface < Hash
# @!method [](k)
# I am not sure when the keys are present/absent :-/
# @option k [String] 'fcoe_vlan'
# "eth1.500" or "not configured" or "not available"
# "eth1.500-fcoe" or "not configured" or "not available"
# @option k [String] 'vlan_interface'
# "500", or "0" for no VLAN used; yes, the name is nonsense, should be "vid"
# @option k [String] 'dev_name' "eth1"
Expand Down Expand Up @@ -1690,6 +1690,7 @@ def AutoPackages
# @return [String, nil] nil if no FCoE VLAN is configured for the given interface
def fcoe_vlan(card)
fcoe_vlan = card["fcoe_vlan"]
# It should never contain a nil or an empty string, but better safe than sorry
return nil if fcoe_vlan.nil? || fcoe_vlan.empty?
return nil if fcoe_vlan == @NOT_AVAILABLE || fcoe_vlan == @NOT_CONFIGURED

Expand Down

0 comments on commit 0f47d06

Please sign in to comment.