Class: Y2Network::Autoinst::DNSReader
- Inherits:
-
Object
- Object
- Y2Network::Autoinst::DNSReader
- Defined in:
- src/lib/y2network/autoinst/dns_reader.rb
Overview
This class is responsible of importing the AutoYast dns section
Constant Summary collapse
- DEFAULT_RESOLV_CONF_POLICY =
"auto".freeze
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#config ⇒ DNS
Creates a new DNS config from the imported profile dns section.
-
#initialize(section) ⇒ DNSReader
constructor
A new instance of DNSReader.
Constructor Details
#initialize(section) ⇒ DNSReader
Returns a new instance of DNSReader.
35 36 37 |
# File 'src/lib/y2network/autoinst/dns_reader.rb', line 35 def initialize(section) @section = section end |
Instance Attribute Details
#section ⇒ AutoinstProfile::DNSSection (readonly)
30 31 32 |
# File 'src/lib/y2network/autoinst/dns_reader.rb', line 30 def section @section end |
Instance Method Details
#config ⇒ DNS
Creates a new DNS config from the imported profile dns section
42 43 44 45 46 47 48 |
# File 'src/lib/y2network/autoinst/dns_reader.rb', line 42 def config Y2Network::DNS.new( nameservers: valid_ips(section.nameservers), resolv_conf_policy: section.resolv_conf_policy || DEFAULT_RESOLV_CONF_POLICY, searchlist: section.searchlist ) end |