Skip to content

Commit

Permalink
Added comments for LanItems::Read and ::ReadHw
Browse files Browse the repository at this point in the history
  • Loading branch information
mchf committed Sep 11, 2013
1 parent f05b217 commit 7283206
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/modules/LanItems.rb
Expand Up @@ -853,6 +853,7 @@ def FindDeviceIndex(device)
ret
end

# preinitializates @Items according info on physically detected network cards
def ReadHw
@Items = {}
@Hardware = ReadHardware("netcard")
Expand Down Expand Up @@ -904,6 +905,14 @@ def ReadHw
nil
end

# initializates @Items
#
# It does:
# (1) read hardware present on the system
# (2) read known configurations (e.g. ifcfg-eth0)
# (3) joins together. Join is done via device name (e.g. eth0) as key.
# It is full outer join in -> you can have hwinfo part with no coresponding
# netconfig part (or vice versa) in @Items when the method is done.
def Read
ReadHw()
NetworkInterfaces.Read
Expand Down

0 comments on commit 7283206

Please sign in to comment.