Class: Registration::UI::AutoyastConfigWorkflow

Inherits:
Object
  • Object
show all
Includes:
Yast, Yast::I18n, Yast::Logger, Yast::UIShortcuts
Defined in:
src/lib/registration/ui/autoyast_config_workflow.rb

Overview

this class runs the AutoYast configuration workflow

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ AutoyastConfigWorkflow

constructor


35
36
37
38
39
# File 'src/lib/registration/ui/autoyast_config_workflow.rb', line 35

def initialize(config)
  textdomain "registration"

  @config = config
end

Class Method Details

.run(config) ⇒ Object

run the AutoYast configuration workflow


28
29
30
31
# File 'src/lib/registration/ui/autoyast_config_workflow.rb', line 28

def self.run(config)
  workflow = AutoyastConfigWorkflow.new(config)
  workflow.run
end

Instance Method Details

#runSymbol

run the workflow


43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'src/lib/registration/ui/autoyast_config_workflow.rb', line 43

def run
  aliases = {
    "general"         => ->() { configure_registration },
    "addons"          => [->() { select_addons }, true],
    "remote_addons"   => [->() { select_remote_addons }, true],
    "addons_eula"     => [->() { addons_eula }, true],
    "addons_regcodes" => [->() { addons_reg_codes }, true]
  }

  sequence = {
    "ws_start"        => "general",
    "general"         => {
      abort:  :abort,
      next:   :next,
      addons: "addons"
    },
    "addons"          => {
      abort:    :abort,
      next:     "general",
      download: "remote_addons"
    },
    "remote_addons"   => {
      addons: "addons",
      abort:  :abort,
      next:   "addons_eula"
    },
    "addons_eula"     => {
      abort: :abort,
      next:  "addons_regcodes"
    },
    "addons_regcodes" => {
      abort: :abort,
      next:  "addons"
    }
  }

  log.info "Starting scc_auto sequence"
  Sequencer.Run(aliases, sequence)
end