Skip to content

Commit

Permalink
Tweaks from the review
Browse files Browse the repository at this point in the history
  • Loading branch information
mchf committed Jan 27, 2022
1 parent a12ed5b commit f2e64c9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/cfa/interface_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -315,13 +315,13 @@ def variable_name(param_name)
## BONDING

# @!attribute [r] bonding_master
# TODO: this name doesn't correspond to inclusive naming, however as log as the
# TODO: this name doesn't correspond to inclusive naming, however as long as the
# name is used in syscfg file, the name is kept even here to avoid confusion
# @return [String] whether the interface is a bond device or not
define_variable(:bonding_master)

# @!attribute [r] bonding_slaves
# TODO: this name doesn't correspond to inclusive naming, however as log as the
# TODO: this name doesn't correspond to inclusive naming, however as long as the
# name is used in syscfg file, the name is kept even here to avoid confusion
# @return [Hash] Bonding slaves
define_collection_variable(:bonding_slave)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ def configure_as_port(parent)
port_type = "bond" if parent.type.bonding?
return unless port_type

# slave-type is NetworkManager API
file.connection["slave-type"] = port_type
file.connection["master"] = parent.name
end
Expand Down
6 changes: 6 additions & 0 deletions src/lib/y2network/widgets/bond_port.rb
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,12 @@ def justify_dev_name(name)
# device names if at least two devices shared the same physical port id
# TODO: backend method
#
# NOTE: term port is slightly overloaded here. Name of method refers to
# physical ports of a NIC card (one card can have multiple "plugs" - ports).
# On the other hand param name refers to pure virtual bonding ports (network
# devices provided by the system which are virtualy tighted together into a
# virtual bond device)
#
# @param ports [Array<String>] devices included in the bonding
# @return [Hash{String => Array<String>}] of duplicated physical port ids
def repeated_physical_port_ids(ports)
Expand Down

0 comments on commit f2e64c9

Please sign in to comment.