Class: DInstaller::Network

Inherits:
Object
  • Object
show all
Defined in:
lib/dinstaller/network.rb

Overview

Backend class to handle network configuration

Instance Method Summary collapse

Constructor Details

#initialize(logger) ⇒ Network

Returns a new instance of Network.



30
31
32
# File 'lib/dinstaller/network.rb', line 30

def initialize(logger)
  @logger = logger
end

Instance Method Details

#installObject

Writes the network configuration to the installed system



44
45
46
# File 'lib/dinstaller/network.rb', line 44

def install
  Yast::WFM.CallFunction("save_network", [])
end

#probeObject

Probes the network configuration



35
36
37
38
39
40
41
# File 'lib/dinstaller/network.rb', line 35

def probe
  logger.info "Probing network"
  Yast::Lan.read_config
  settings = Y2Network::ProposalSettings.instance
  settings.refresh_packages
  settings.apply_defaults
end