Skip to content

Commit

Permalink
- bnc#871633 - yast2 virtualization fails to install xen pattern
Browse files Browse the repository at this point in the history
- Print correct message at end of install depending on what was
  selected
- Adjust alignment and spacing of main dialog
- Cleanup whitespace in code
- 3.1.6
  • Loading branch information
charlesa committed Apr 3, 2014
1 parent 2386cf3 commit 3092b8f
Show file tree
Hide file tree
Showing 3 changed files with 117 additions and 100 deletions.
10 changes: 10 additions & 0 deletions package/yast2-vm.changes
@@ -1,3 +1,13 @@
-------------------------------------------------------------------
Wed Apr 2 16:13:41 MDT 2014 - carnold@suse.com

- bnc#871633 - yast2 virtualization fails to install xen pattern
- Print correct message at end of install depending on what was
selected
- Adjust alignment and spacing of main dialog
- Cleanup whitespace in code
- 3.1.6

-------------------------------------------------------------------
Wed Mar 12 15:49:26 CET 2014 - aginies@suse.com

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-vm.spec
Expand Up @@ -17,7 +17,7 @@


Name: yast2-vm
Version: 3.1.5
Version: 3.1.6
Release: 0
Group: System/YaST

Expand Down
205 changes: 106 additions & 99 deletions src/modules/VM_XEN.rb
Expand Up @@ -220,78 +220,89 @@ def ConfigureDom0(is_s390)
# error popup
abortmsg = _("The installation will be aborted.")

def Information
widgets = Frame(_("Choose Hypervisor(s) to install"),
HBox(VBox(
Label("server: all minimal system to get a running Hypervisor"),
Label("tools: configure, manage and monitor virtual machines"),
),
),
)
end
def VMButtonBox
widgetB = ButtonBox(
PushButton(Id(:accept), Label.AcceptButton),
PushButton(Id(:cancel), Label.CancelButton),
)
end
def KVMDialog
widgetKVM = Frame(_("KVM Hypervisor"),
HBox(
Left(CheckBox(Id(:kvm_server), Opt(:key_F6), "KVM server")),
Left(CheckBox(Id(:kvm_tools), Opt(:key_F7), "KVM tools")),
),
)
end
def LXCDialog
widgetLXC = Frame(_("libvirt LXC containers"),
HBox(
Left(CheckBox(Id(:lxc), Opt(:key_F4), "libvirt LXC daemon")),
),
)
end

# Generate a pop dialog to allow user selection of Xen or KVM
if is_s390 == true
UI.OpenDialog(
VBox(
Information(),
VSpacing(1),
KVMDialog(),
LXCDialog(),
VMButtonBox(),
),
def Information
widgets = Frame(_("Choose Hypervisor(s) to install"),
HBox(
VBox(
Left(Label("Server: Minimal system to get a running Hypervisor")),
Left(Label("Tools: Configure, manage and monitor virtual machines")),
),
HSpacing(2),
),
)
end
def VMButtonBox
widgetB = ButtonBox(
PushButton(Id(:accept), Label.AcceptButton),
PushButton(Id(:cancel), Label.CancelButton),
)
end
def KVMDialog
widgetKVM = Frame(_("KVM Hypervisor"),
HBox(
Left(CheckBox(Id(:kvm_server), Opt(:key_F6), "KVM server")),
Left(CheckBox(Id(:kvm_tools), Opt(:key_F7), "KVM tools")),
),
)
end
def LXCDialog
widgetLXC = Frame(_("libvirt LXC containers"),
HBox(
Left(CheckBox(Id(:lxc), Opt(:key_F4), "libvirt LXC daemon")),
),
)
elsif isSLED == true
end

# Generate a pop dialog to allow user selection of Xen or KVM
if is_s390 == true
UI.OpenDialog(
VBox(
VSpacing(1),
Frame(_("Software to connect to Virtualization server"),
HBox(
Left(CheckBox(Id(:client_tools), "Virtualization client tools")
),
),
),
LXCDialog(),
VMButtonBox(),
),
)
HBox(
HSpacing(2),
VBox(
Information(),
VSpacing(1),
KVMDialog(),
LXCDialog(),
VMButtonBox(),
),
),
)
elsif isSLED == true
UI.OpenDialog(
HBox(
HSpacing(2),
VBox(
VSpacing(1),
Frame(_("Software to connect to Virtualization server"),
HBox(
Left(CheckBox(Id(:client_tools), "Virtualization client tools")),
),
),
LXCDialog(),
VMButtonBox(),
),
),
)
else
UI.OpenDialog(
VBox(
Information(),
VSpacing(1),
Frame(_("Xen Hypervisor"),
HBox(
Left(CheckBox(Id(:xen_server), Opt(:key_F8), "Xen server")),
Left(CheckBox(Id(:xen_tools), Opt(:key_F9), "Xen tools")),
),
),
KVMDialog(),
LXCDialog(),
VMButtonBox(),
),
)
HBox(
HSpacing(2),
VBox(
VSpacing(1),
Information(),
VSpacing(1),
Frame(_("Xen Hypervisor"),
HBox(
Left(CheckBox(Id(:xen_server), Opt(:key_F8), "Xen server")),
Left(CheckBox(Id(:xen_tools), Opt(:key_F9), "Xen tools")),
),
),
KVMDialog(),
LXCDialog(),
VMButtonBox(),
),
),
)
end

widget_id = UI.UserInput
Expand All @@ -309,8 +320,10 @@ def LXCDialog
install_vm = false
install_vm = true if install_xen_server
install_vm = true if install_xen_tools
install_xen = true if install_xen_server || install_xen_tools
install_vm = true if install_kvm_server
install_vm = true if install_kvm_tools
install_kvm = true if install_kvm_server || install_kvm_tools
install_vm = true if install_client_tools

if widget_id == :cancel || !install_vm && !install_lxc
Expand Down Expand Up @@ -516,44 +529,38 @@ def LXCDialog
"KVM components are installed. Reboot the machine and select the native kernel in the boot loader menu to install KVM guests."
)
message_xen_reboot = _(
"For installing Xen guests, reboot the machine and select the Xen section in the boot loader menu.\n"
"For installing Xen guests, reboot the machine and select the Xen section in the boot loader menu."
)
message_xen_ready = _("Xen Hypervisor and tools are installed.")
message = nil
message_lxc_ready = _("Libvirt LXC components are installed.")
message = ""

if install_xen == false
if Arch.is_xen == false
Popup.LongMessage(message_kvm_ready)
else
Popup.LongMessage(message_kvm_reboot)
if Arch.is_xen == false
if install_kvm
message.concat(message_kvm_ready)
message.concat("\n\n")
end
if install_xen
message.concat(message_xen_reboot)
message.concat("\n\n")
end
if install_lxc
message.concat(message_lxc_ready)
end
else
if Arch.is_xen == false
if install_kvm == true
message = Builtins.sformat(
"%1\n\n%2",
message_kvm_ready,
message_xen_reboot
)
else
message = message_xen_reboot
end
# popup message - ask user to reboot the machine
Popup.LongMessage(message)
else
# popup message - Notify user of successful completion (or already installed).
if install_kvm == true
message = Builtins.sformat(
"%1\n\n%2",
message_kvm_reboot,
message_xen_ready
)
else
message = message_xen_ready
end
Popup.Message(message)
if install_xen
message.concat(message_xen_ready)
message.concat("\n\n")
end
if install_kvm
message.concat(message_kvm_reboot)
message.concat("\n\n")
end
if install_lxc
message.concat(message_lxc_ready)
end
end
Popup.LongMessage(message)

Wizard.CloseDialog

Expand Down

0 comments on commit 3092b8f

Please sign in to comment.