summaryrefslogtreecommitdiffstats
path: root/textw/partition_text.py
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2009-07-02 11:31:19 +0200
committerHans de Goede <hdegoede@redhat.com>2009-07-02 22:05:40 +0200
commit81334650378fe67bf9adc22daf67ccf41688be04 (patch)
treefaab618c7164ebd6de2776ca8a58f0b12139636c /textw/partition_text.py
parent4031b12d3e59a6904ad3ab8c092c5a101216f2f6 (diff)
downloadanaconda-81334650378fe67bf9adc22daf67ccf41688be04.tar.gz
anaconda-81334650378fe67bf9adc22daf67ccf41688be04.tar.xz
anaconda-81334650378fe67bf9adc22daf67ccf41688be04.zip
Initial FCoE support
This patch adds support for using FCoE during the installation. This patch merely lays the initial ground work, there is more work todo: - The system will not boot without manual help after the install, as dracut / mkinitrd do not support FCoE yet - If FCoE is not used for / but for example for /srv, then information about the nic used for FCoE needs to be written in a to be defined config file in the system, and rc.sysinit needs to be thought to read this file and bring up FCoE SAN's / Fabrics not used for / - kickstart support for FCoE still needs to be done
Diffstat (limited to 'textw/partition_text.py')
-rw-r--r--textw/partition_text.py29
1 files changed, 28 insertions, 1 deletions
diff --git a/textw/partition_text.py b/textw/partition_text.py
index fdf349666..f14a273d6 100644
--- a/textw/partition_text.py
+++ b/textw/partition_text.py
@@ -162,6 +162,9 @@ class PartitionTypeWindow:
newdrv.append("Add iSCSI target")
if iutil.isS390():
newdrv.append( "Add zFCP LUN" )
+ from storage import fcoe
+ if fcoe.has_fcoe():
+ newdrv.append("Add FCoE SAN")
if len(newdrv) == 0:
return INSTALL_BACK
@@ -176,12 +179,18 @@ class PartitionTypeWindow:
if button == TEXT_BACK_CHECK:
return INSTALL_BACK
- if choice == 1:
+ if newdrv[choice] == "Add zFCP LUN":
try:
return self.addZFCPDriveDialog(screen)
except ValueError, e:
ButtonChoiceWindow(screen, _("Error"), str(e))
return INSTALL_BACK
+ elif newdrv[choice] == "Add FCoE SAN":
+ try:
+ return self.addFcoeDriveDialog(screen)
+ except ValueError, e:
+ ButtonChoiceWindow(screen, _("Error"), str(e))
+ return INSTALL_BACK
else:
try:
return self.addIscsiDriveDialog(screen)
@@ -206,6 +215,24 @@ class PartitionTypeWindow:
return INSTALL_OK
+ def addFcoeDriveDialog(self, screen):
+ (button, entries) = EntryWindow(screen,
+ _("Add FCoE SAN"),
+ _("Enter the device name for the NIC which is connected to the FCoE SAN. For example \"eth0\"."),
+ prompts = [ _("NIC device name") ] )
+ if button == TEXT_CANCEL_CHECK:
+ return INSTALL_BACK
+
+ nic = entries[0].strip()
+ if nic not in self.anaconda.id.network.available():
+ ButtonChoiceWindow(screen, _("Error"),
+ _("%s is not a valid NIC device name.") % nic)
+ return INSTALL_BACK
+
+ self.anaconda.id.storage.fcoe.addSan(nic)
+
+ return INSTALL_OK
+
def addIscsiDriveDialog(self, screen):
if not network.hasActiveNetDev():
ButtonChoiceWindow(screen, _("Error"),