Class: Yast::LanExportClient

Inherits:
Client
  • Object
show all
Defined in:
src/clients/lan_export.rb

Overview

Client for testing autoyast export and writes result to /tmp/test.yaml DEVELOPMENT ONLY, not for production use

Instance Method Summary collapse

Instance Method Details

#mainObject



29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'src/clients/lan_export.rb', line 29

def main
  Yast.import "UI"

  textdomain "network"

  # Open Trivial UI to get error messages
  Yast::UI.OpenDialog(Yast::Term.new(:PushButton, "Test"))
  WFM.CallFunction("lan_auto", ["Read"])
  res = WFM.CallFunction("lan_auto", ["Export"])
  File.write("/tmp/test.yaml", res.to_yaml)
  Yast::UI.CloseDialog

  nil
end