Class: Y2Network::Clients::DNS

Inherits:
Yast::Client
  • Object
show all
Includes:
Yast::Logger
Defined in:
src/lib/y2network/clients/dns.rb

Overview

DNS client for configuring DNS and hostname settings

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeDNS

Constructor


41
42
43
44
45
46
47
48
49
# File 'src/lib/y2network/clients/dns.rb', line 41

def initialize
  textdomain "network"
  Yast.include self, "network/services/dns.rb"

  @hostname = "hostname"
  @nameserver1 = "nameserver1"
  @nameserver2 = "nameserver2"
  @nameserver3 = "nameserver3"
end

Instance Attribute Details

#hostnameObject (readonly)

Returns the value of attribute hostname.


38
39
40
# File 'src/lib/y2network/clients/dns.rb', line 38

def hostname
  @hostname
end

#nameserver1Object (readonly)

Returns the value of attribute nameserver1.


38
39
40
# File 'src/lib/y2network/clients/dns.rb', line 38

def nameserver1
  @nameserver1
end

#nameserver2Object (readonly)

Returns the value of attribute nameserver2.


38
39
40
# File 'src/lib/y2network/clients/dns.rb', line 38

def nameserver2
  @nameserver2
end

#nameserver3Object (readonly)

Returns the value of attribute nameserver3.


38
39
40
# File 'src/lib/y2network/clients/dns.rb', line 38

def nameserver3
  @nameserver3
end

Instance Method Details

#mainObject


51
52
53
# File 'src/lib/y2network/clients/dns.rb', line 51

def main
  log_and_return { CommandLine.Run(cmdline_definition) }
end