[node-patches] Change in ovirt-node[master]: installer: Add mutliple fake options
fabiand at fedoraproject.org
fabiand at fedoraproject.org
Thu Mar 7 19:06:55 UTC 2013
Fabian Deutsch has uploaded a new change for review.
Change subject: installer: Add mutliple fake options
......................................................................
installer: Add mutliple fake options
Now buttons for installation and upgrade are shown on a dry run.
Change-Id: Icaa07dc773ec5165a63e7d8c2f9d27c3012a72ae
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M scripts/tui/src/ovirt/node/installer/welcome_page.py
1 file changed, 16 insertions(+), 15 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/67/12867/1
diff --git a/scripts/tui/src/ovirt/node/installer/welcome_page.py b/scripts/tui/src/ovirt/node/installer/welcome_page.py
index 8349d97..6f3d465 100644
--- a/scripts/tui/src/ovirt/node/installer/welcome_page.py
+++ b/scripts/tui/src/ovirt/node/installer/welcome_page.py
@@ -53,7 +53,7 @@
def ui_content(self):
ws = [ui.Header("header[0]", "Installation")]
- ws += [self.___installation_option()]
+ ws += self.___installation_options()
ws += [ui.Divider("divider[0]")]
ws += self.__additional_infos()
self.widgets.add(ws)
@@ -79,9 +79,10 @@
nav.to_plugin(installer.upgrade_page.Plugin)
self._model["method"] = "reinstall"
- def ___installation_option(self):
+ def ___installation_options(self):
if self.application.args.dry:
- return ui.Button("button.install", "Install Hypervisor (dry)")
+ return [ui.Button("button.install", "Install Hypervisor (dry)"),
+ ui.Button("button.upgrade", "Upgrade Hypervisor (dry)")]
media = utils.system.InstallationMedia()
@@ -89,29 +90,29 @@
has_root = os.path.exists("/dev/disk/by-label/ROOT")
if has_hostvg and has_root:
- return ui.Label("Major version upgrades are unsupported, " +
- "uninstall existing version first")
+ return [ui.Label("Major version upgrades are unsupported, " +
+ "uninstall existing version first")]
if has_hostvg:
installed = utils.system.InstalledMedia()
try:
if media > installed:
- return ui.Button("button.upgrade",
- "Upgrade %s to %s" % (media, installed))
+ return [ui.Button("button.upgrade",
+ "Upgrade %s to %s" % (media, installed))]
elif media < installed:
- return ui.Button("button.downgrade",
- "Downgrade %s to %s" % (media,
- installed))
- return ui.Button("button.reinstall",
- "Reinstall %s" % installed)
+ return [ui.Button("button.downgrade",
+ "Downgrade %s to %s" % (media,
+ installed))]
+ return [ui.Button("button.reinstall",
+ "Reinstall %s" % installed)]
except:
self.logger.error("Unable to get version numbers for " +
"upgrade, invalid installation or media")
- return ui.Label("Invalid installation, please reboot from " +
- "media and choose Reinstall")
+ return [ui.Label("Invalid installation, please reboot from " +
+ "media and choose Reinstall")]
- return ui.Button("button.install", "Install Hypervisor %s" % media)
+ return [ui.Button("button.install", "Install Hypervisor %s" % media)]
def __additional_infos(self):
ws = []
--
To view, visit http://gerrit.ovirt.org/12867
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Icaa07dc773ec5165a63e7d8c2f9d27c3012a72ae
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at fedoraproject.org>
More information about the node-patches
mailing list