Module: Yast::RelocationServerWizardsInclude
- Defined in:
- ../../src/include/relocation-server/wizards.rb
Instance Method Summary (collapse)
- - (Object) initialize_relocation_server_wizards(include_target)
-
- (Object) MainSequence
Main workflow of the relocation-server configuration.
-
- (Object) RelocationServerSequence
Whole configuration of relocation-server.
Instance Method Details
- (Object) initialize_relocation_server_wizards(include_target)
32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File '../../src/include/relocation-server/wizards.rb', line 32 def initialize_relocation_server_wizards(include_target) textdomain "relocation-server" Yast.import "Arch" Yast.import "Sequencer" Yast.import "Wizard" Yast.import "CWM" Yast.import "CWMTab" Yast.import "CWMServiceStart" Yast.import "CWMFirewallInterfaces" Yast.include include_target, "relocation-server/complex.rb" Yast.include include_target, "relocation-server/dialogs.rb" end |
- (Object) MainSequence
Main workflow of the relocation-server configuration
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 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 |
# File '../../src/include/relocation-server/wizards.rb', line 49 def MainSequence = { "fw-xend" => CWMFirewallInterfaces.CreateOpenFirewallWidget( { "services" => ["service:xend-relocation-server"], "display_details" => true } ), "xend" => { "widget" => :custom, "help" => Ops.get_string(@HELPS, "xend_configuration", ""), "custom_widget" => XendConfigurationDialogContent(), "handle" => fun_ref( method(:HandleXendConfigurationDialog), "symbol (string, map)" ), "init" => fun_ref( method(:InitXendConfigurationDialog), "void (string)" ), "store" => fun_ref( method(:StoreXendConfigurationDialog), "void (string, map)" ) }, "libvirt" => { "widget" => :custom, "help" => Ops.get_string(@HELPS, "libvirt_configuration", ""), "custom_widget" => LibvirtConfigurationDialogContent(), "handle" => fun_ref( method(:HandleLibvirtConfigurationDialog), "symbol (string, map)" ), "init" => fun_ref( method(:InitLibvirtConfigurationDialog), "void (string)" ), "store" => fun_ref( method(:StoreLibvirtConfigurationDialog), "void (string, map)" ) }, "fw-libvirt" => CWMFirewallInterfaces.CreateOpenFirewallWidget( { "services" => [ "service:libvirtd-relocation-server", "service:sshd" ], "display_details" => true } ) } tabs = { "xend_configuration" => { "header" => _("&Xend"), "widget_names" => ["xend", "fw-xend"], "contents" => XendConfigurationDialogContent() }, "kvm_configuration" => { "header" => _("&KVM"), "widget_names" => ["libvirt", "fw-libvirt"], "contents" => LibvirtConfigurationDialogContent() }, "libxl_configuration" => { "header" => _("&Xen Libxl"), "widget_names" => ["libvirt", "fw-libvirt"], "contents" => LibvirtConfigurationDialogContent() } } if !RelocationServer.is_xend() Builtins.remove(tabs, "xend_configuration") if !Arch.is_kvm Builtins.remove(tabs, "kvm_configuration") else Builtins.remove(tabs, "libxl_configuration") end else Builtins.remove(tabs, "kvm_configuration") end wd_arg = { "tab_order" => ["xend_configuration"], "tabs" => tabs, "widget_descr" => , "initial_tab" => "xend_configuration" } if !RelocationServer.is_xend() if Arch.is_kvm Ops.set(wd_arg, "tab_order", ["kvm_configuration"]) Ops.set(wd_arg, "initial_tab", "kvm_configuration") else Ops.set(wd_arg, "tab_order", ["libxl_configuration"]) Ops.set(wd_arg, "initial_tab", "libxl_configuration") end end wd = { "tab" => CWMTab.CreateWidget(wd_arg) } contents = VBox("tab") w = CWM.CreateWidgets( ["tab"], Convert.convert( wd, :from => "map <string, any>", :to => "map <string, map <string, any>>" ) ) caption = _("Relocation Server Configuration") contents = CWM.PrepareDialog(contents, w) Wizard.SetContentsButtons( caption, contents, "", Label.BackButton, Label.OKButton ) Wizard.HideBackButton Wizard.SetAbortButton(:abort, Label.CancelButton) Wizard.SetDesktopTitleAndIcon("relocation-server") CWM.Run(w, { :abort => fun_ref(method(:ReallyExit), "boolean ()") }) end |
- (Object) RelocationServerSequence
Whole configuration of relocation-server
180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 |
# File '../../src/include/relocation-server/wizards.rb', line 180 def RelocationServerSequence 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 Wizard.SetDesktopTitleAndIcon("relocation-server") ret = Sequencer.Run(aliases, sequence) UI.CloseDialog deep_copy(ret) end |