Module: Yast::IscsiLioServerWizardsInclude

Defined in:
../../src/include/iscsi-lio-server/wizards.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) initialize_iscsi_lio_server_wizards(include_target)



34
35
36
37
38
39
40
41
42
# File '../../src/include/iscsi-lio-server/wizards.rb', line 34

def initialize_iscsi_lio_server_wizards(include_target)
  textdomain "iscsi-lio-server"

  Yast.import "Sequencer"
  Yast.import "Wizard"

  Yast.include include_target, "iscsi-lio-server/complex.rb"
  Yast.include include_target, "iscsi-lio-server/dialogs.rb"
end

- (Object) IscsiLioServerAutoSequence

Whole configuration of iscsi-lio-server but without reading and writing. For use with autoinstallation.

Returns:

  • sequence result



108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# File '../../src/include/iscsi-lio-server/wizards.rb', line 108

def IscsiLioServerAutoSequence
  # Initialization dialog caption
  caption = _("iSCSI LIO Target Configuration")
  # Initialization dialog contents
  contents = Label(_("Initializing..."))

  Wizard.CreateDialog
  Wizard.SetContentsButtons(
    caption,
    contents,
    "",
    Label.BackButton,
    Label.NextButton
  )

  ret = MainSequence()

  UI.CloseDialog
  deep_copy(ret)
end

- (Object) IscsiLioServerSequence

Whole configuration of iscsi-lio-server

Returns:

  • sequence result



83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# File '../../src/include/iscsi-lio-server/wizards.rb', line 83

def IscsiLioServerSequence
  aliases = {
    "read"  => [lambda { ReadDialog() }, true],
    "main"  => lambda { MainSequence() },
    "write" => [lambda { WriteDialog() }, true]
  }

  sequence = {
    "ws_start" => "read",
    "read"     => { :abort => :abort, :next => "main" },
    "main"     => { :abort => :abort, :next => "write" },
    "write"    => { :abort => :abort, :next => :next }
  }

  Wizard.CreateDialog

  ret = Sequencer.Run(aliases, sequence)

  UI.CloseDialog
  deep_copy(ret)
end

- (Object) MainSequence

Main workflow of the iscsi-lio-server configuration

Returns:

  • sequence result



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
# File '../../src/include/iscsi-lio-server/wizards.rb', line 46

def MainSequence
  # FIXME: adapt to your needs
  aliases = {
    "summary" => lambda { SummaryDialog() },
    "add"     => lambda { AddDialog() },
    "edit"    => lambda { EditDialog() },
    "auth"    => lambda { AuthDialog() },
    "expert"  => lambda { ExpertDialog() }
  }

  # FIXME: adapt to your needs
  sequence = {
    "ws_start" => "summary",
    "summary"  => {
      :abort => :abort,
      :next  => :next,
      :add   => "add",
      :edit  => "edit"
    },
    "add"      => {
      :abort  => :abort,
      :next   => "auth",
      :back   => :back,
      :expert => "expert"
    },
    "expert"   => { :abort => :abort, :next => "add", :back => :back },
    "edit"     => { :abort => :abort, :next => "auth", :back => :back },
    "auth"     => { :abort => :abort, :next => "summary", :back => :back }
  }

  ret = Sequencer.Run(aliases, sequence)

  deep_copy(ret)
end