[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
patch for add iscsi target problem
- From: Dawei Pang <dwpang redflag-linux com>
- To: anaconda-devel-list redhat com
- Subject: patch for add iscsi target problem
- Date: Fri, 22 Jun 2007 10:07:58 +0800
Hi,
The patch can fix three problem of iscsi configuration.
In GUI install method,
1. choose "Add iSCSI target" and add driver, anaconda will show the
"Enable network interface", after configuring network, press OK, it will
return to the partition method page, it should go to the iscsi
configuration.
2. we need use _handleIPMissing function in the netconfig_dialog.py so
as to handle IPMissing exception like class NetworkWindow of network_gui.py.
3. when isys.configNetDevice() raise an exception in the
netconfig_dialog.py, I think anaconda should show error window, not only
use log.error()
Please check the patch,thank you very much.
diff -Nura anaconda/iw/autopart_type.py anaconda.new/iw/autopart_type.py
--- anaconda/iw/autopart_type.py 2007-05-01 03:21:03.000000000 +0800
+++ anaconda.new/iw/autopart_type.py 2007-06-21 17:16:53.000000000 +0800
@@ -121,7 +121,8 @@
net = NetworkConfigurator(self.anaconda.id.network)
ret = net.run()
net.destroy()
- return ret
+ if ret != gtk.RESPONSE_OK:
+ return ret
(dxml, dialog) = gui.getGladeWidget("iscsi-config.glade",
"iscsiDialog")
diff -Nura anaconda/iw/netconfig_dialog.py anaconda.new/iw/netconfig_dialog.py
--- anaconda/iw/netconfig_dialog.py 2007-05-31 02:37:40.000000000 +0800
+++ anaconda.new/iw/netconfig_dialog.py 2007-06-21 23:17:50.000000000 +0800
@@ -137,10 +137,21 @@
_("An error occurred converting the value "
"entered for \"%s\":\n%s") %(field, errmsg))
d.set_title(_("Error With Data"))
+ d.set_position(gtk.WIN_POS_CENTER)
gui.addFrame(d)
d.run()
d.destroy()
+ def _handleIPMissing(self, field):
+ d = gtk.MessageDialog(None, 0, gtk.MESSAGE_ERROR,
+ gtk.BUTTONS_OK,
+ _("A value is required for the field %s.") %(field,))
+ d.set_title(_("Error With Data"))
+ d.set_position(gtk.WIN_POS_CENTER)
+ gui.addFrame(d)
+ d.run()
+ d.destroy()
+
def _cancel(self, *args):
gtk.main_quit()
self.rc = gtk.RESPONSE_CANCEL
@@ -180,6 +191,9 @@
except network.IPError, msg:
self._handleIPError(_("IP Address"), msg)
return
+ except network.IPMissing, msg:
+ self._handleIPMissing(_("IP Address"))
+ return
try:
network.sanityCheckIPString(ipv4nm)
@@ -187,12 +201,18 @@
except network.IPError, msg:
self._handleIPError(_("Netmask"), msg)
return
+ except network.IPMissing, msg:
+ self._handleIPMissing(_("Netmask"))
+ return
try:
network.sanityCheckIPString(gateway)
except network.IPError, msg:
self._handleIPError(_("Gateway"), msg)
return
+ except network.IPMissing, msg:
+ self._handleIPMissing(_("Gateway"))
+ return
try:
if ns:
@@ -200,12 +220,16 @@
except network.IPError, msg:
self._handleIPError(_("Nameserver"), msg)
return
+ except network.IPMissing, msg:
+ self._handleIPMissing(_("Nameserver"))
+ return
-
try:
isys.configNetDevice(netdev, gateway)
except Exception, e:
- log.error("Error configuring network device: %s" %(e,))
+ self._handleIPError(_("Error configuring network device:"), e)
+ return
+
self.rc = gtk.RESPONSE_OK
if ns:
f = open("/etc/resolv.conf", "w")
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]