Class: Y2Network::DNS
- Inherits:
-
Object
- Object
- Y2Network::DNS
- Includes:
- Yast2::Equatable
- Defined in:
- src/lib/y2network/dns.rb
Overview
DNS configuration (nameservers, search domains, etc.).
Instance Attribute Summary collapse
-
#nameservers ⇒ Array<IPAddr>
List of nameservers.
-
#resolv_conf_policy ⇒ String
Resolv.conf update policy.
-
#searchlist ⇒ Array<String>
List of search domains.
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ DNS
constructor
A new instance of DNS.
Constructor Details
#initialize(opts = {}) ⇒ DNS
TODO:
receive an array instead all these arguments
Returns a new instance of DNS.
44 45 46 47 48 |
# File 'src/lib/y2network/dns.rb', line 44 def initialize(opts = {}) @nameservers = opts[:nameservers] || [] @searchlist = opts[:searchlist] || [] @resolv_conf_policy = opts[:resolv_conf_policy] end |
Instance Attribute Details
#nameservers ⇒ Array<IPAddr>
Returns List of nameservers.
28 29 30 |
# File 'src/lib/y2network/dns.rb', line 28 def nameservers @nameservers end |
#resolv_conf_policy ⇒ String
Returns resolv.conf update policy.
34 35 36 |
# File 'src/lib/y2network/dns.rb', line 34 def resolv_conf_policy @resolv_conf_policy end |
#searchlist ⇒ Array<String>
Returns List of search domains.
31 32 33 |
# File 'src/lib/y2network/dns.rb', line 31 def searchlist @searchlist end |