Class: Y2Network::Wicked::ConnectionConfigWriters::Bonding
- Defined in:
- src/lib/y2network/wicked/connection_config_writers/bonding.rb
Overview
This class is responsible for writing the information from a ConnectionConfig::Bonding object to the underlying system.
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#file_ports(conn) ⇒ Hash<Integer, String>
Convenience method to obtain the map of devices in the bonding in the file format.
- #update_file(conn) ⇒ Object
Methods inherited from Base
Constructor Details
This class inherits a constructor from Y2Network::Wicked::ConnectionConfigWriters::Base
Instance Method Details
#file_ports(conn) ⇒ Hash<Integer, String>
Convenience method to obtain the map of devices in the bonding in the file format
40 41 42 |
# File 'src/lib/y2network/wicked/connection_config_writers/bonding.rb', line 40 def file_ports(conn) conn.ports.each_with_index.with_object({}) { |(name, i), h| h[i] = name } end |
#update_file(conn) ⇒ Object
30 31 32 33 34 |
# File 'src/lib/y2network/wicked/connection_config_writers/bonding.rb', line 30 def update_file(conn) file.bonding_slaves = file_ports(conn) file.bonding_module_opts = conn. file.bonding_master = "yes" end |