Re: [PATCH 2/5] Move addDriveDialog() and friends to their own class

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 04/14/2010 06:55 PM, Steffen Maier wrote:
On 04/14/2010 05:47 PM, Hans de Goede wrote:
The reason behind this is to make these functions available for using
them in rescue mode too.

Note to reviewers, the code of addDriveDialog() and friends has not
changed a single letter it was only moved to the new textw/add_drive_text.py
file (and some boilerplate was added on the top to make it into a new class).
---
  textw/add_drive_text.py |  180 +++++++++++++++++++++++++++++++++++++++++++++++
  textw/partition_text.py |  165 +------------------------------------------
  2 files changed, 183 insertions(+), 162 deletions(-)
  create mode 100644 textw/add_drive_text.py

diff --git a/textw/add_drive_text.py b/textw/add_drive_text.py
new file mode 100644
index 0000000..b8edc29
--- /dev/null
+++ b/textw/add_drive_text.py
@@ -0,0 +1,180 @@

+    def addZFCPDriveDialog(self, screen):
+        (button, entries) = EntryWindow(screen,
+                                        _("Add FCP Device"),
+                                        _("zSeries machines can access industry-standard SCSI devices via Fibre Channel (FCP). You need to provide a 16 bit device number, a 64 bit World Wide Port Name (WWPN), and a 64 bit FCP LUN for each device."),
+                                        prompts = [ "Device number",
+                                                    "WWPN",
+                                                    "FCP LUN" ] )
+        if button == TEXT_CANCEL_CHECK:
+            return INSTALL_BACK
+
+        devnum = entries[0].strip()
+        wwpn = entries[1].strip()
+        fcplun = entries[2].strip()
+        try:
+            storage.zfcp.ZFCP().addFCP(devnum, wwpn, fcplun)
+        except ValueError, e:
+            log.warn(str(e)) # alternatively popup error dialog instead

Oh yes, please. Since addFCP is always called based on interactive user
input here, I would prefer to popup an error dialog. The ValueError
messages returned by ZFCP are human readable translated strings anyway.
The GUI equivalent does the following already:


Please file a bug against RHEL-6 for this then I'll take care of it.

Regards,

Hans

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux