Class: Y2Network::Autoinst::RoutingReader
- Inherits:
-
Object
- Object
- Y2Network::Autoinst::RoutingReader
- Defined in:
- src/lib/y2network/autoinst/routing_reader.rb
Overview
This class is responsible of importing the AutoYast routing section
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#config ⇒ Routing
Creates a new Routing config from the imported profile routing section.
-
#initialize(section) ⇒ RoutingReader
constructor
A new instance of RoutingReader.
Constructor Details
#initialize(section) ⇒ RoutingReader
Returns a new instance of RoutingReader.
34 35 36 |
# File 'src/lib/y2network/autoinst/routing_reader.rb', line 34 def initialize(section) @section = section end |
Instance Attribute Details
#section ⇒ AutoinstProfile::RoutingSection (readonly)
31 32 33 |
# File 'src/lib/y2network/autoinst/routing_reader.rb', line 31 def section @section end |
Instance Method Details
#config ⇒ Routing
Creates a new Routing config from the imported profile routing section
41 42 43 44 45 46 |
# File 'src/lib/y2network/autoinst/routing_reader.rb', line 41 def config tables = section.routes ? [Y2Network::RoutingTable.new(build_routes)] : [] Y2Network::Routing.new(tables: tables, forward_ipv4: !!section.ipv4_forward, forward_ipv6: !!section.ipv6_forward) end |