Class: Y2Network::Autoinst::HostnameReader
- Inherits:
-
Object
- Object
- Y2Network::Autoinst::HostnameReader
- Defined in:
- src/lib/y2network/autoinst/hostname_reader.rb
Overview
This class is responsible of importing hostname setup from the AutoYast dns section
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#config ⇒ Hostname
Creates a new Hostname config from the imported profile dns section.
-
#initialize(section) ⇒ HostnameReader
constructor
NOTE: for historical reasons DNS section contains even hostname.
Constructor Details
#initialize(section) ⇒ HostnameReader
NOTE: for historical reasons DNS section contains even hostname
33 34 35 |
# File 'src/lib/y2network/autoinst/hostname_reader.rb', line 33 def initialize(section) @section = section end |
Instance Attribute Details
#section ⇒ AutoinstProfile::DNSSection (readonly)
29 30 31 |
# File 'src/lib/y2network/autoinst/hostname_reader.rb', line 29 def section @section end |
Instance Method Details
#config ⇒ Hostname
Creates a new Hostname config from the imported profile dns section
40 41 42 43 44 45 46 |
# File 'src/lib/y2network/autoinst/hostname_reader.rb', line 40 def config Y2Network::Hostname.new( dhcp_hostname: dhcp_hostname_for(section.dhcp_hostname), static: section.hostname || static_hostname, installer: section.hostname ) end |