Add the iscsi_gui.py install module, and the call to it. Add iscsi glade file. diff -uprN -X /home/patman/dontdiff anaconda-10.91.12/gui.py iscsi-anaconda-10.91.12/gui.py --- anaconda-10.91.12/gui.py 2006-01-30 13:11:00.000000000 -0800 +++ iscsi-anaconda-10.91.12/gui.py 2006-02-02 12:53:06.000000000 -0800 @@ -60,6 +60,7 @@ stepToClass = { "mouse" : ("mouse_gui", "MouseWindow"), "welcome" : ("welcome_gui", "WelcomeWindow"), "installtype" : ("installpath_gui", "InstallPathWindow"), + "iscsi" : ("iscsi_gui", "iscsiWindow"), "zfcpconfig" : ("zfcp_gui", "ZFCPWindow"), "partitionmethod" : ("partmethod_gui", "PartitionMethodWindow"), "partition" : ("partition_gui", "PartitionWindow"), diff -uprN -X /home/patman/dontdiff anaconda-10.91.12/iw/iscsi_gui.py iscsi-anaconda-10.91.12/iw/iscsi_gui.py --- anaconda-10.91.12/iw/iscsi_gui.py 1969-12-31 16:00:00.000000000 -0800 +++ iscsi-anaconda-10.91.12/iw/iscsi_gui.py 2006-02-02 12:53:06.000000000 -0800 @@ -0,0 +1,82 @@ +# +# iscsi_gui.py: gui interface for configuration of iscsi +# +# Copyright 2005 IBM, Inc. +# +# This software may be freely redistributed under the terms of the GNU +# general public license. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# + + +import gtk +import gobject +import gui +import iutil +from rhpl.translate import _, N_ +from iw_gui import * +import ipwidget + +import logging +log = logging.getLogger("anaconda") + +class iscsiWindow(InstallWindow): + def __init__(self, ics): + InstallWindow.__init__(self, ics) + ics.setTitle(_("iSCSI Configuration")) + ics.setNextEnabled(True) + # ics.readHTML("iSCSI") + + def getPrev(self): + # Just leave iscsid running, we'll shut it down if the ipaddr is + # cleared in iscsi.startup() + return + + def getNext(self): + + try: + self.iscsi.ipaddr = self.ip_widget.dehydrate() + except ipwidget.IPMissing, msg: + self.intf.messageWindow(_("Error with Data"), + _("No IP address entered, skipping iSCSI setup")) + except ipwidget.IPError, msg: + self.intf.messageWindow(_("Error with Data"), _("%s") % (msg[0],)) + raise gui.StayOnScreen + + self.iscsi.port = self.port.get_text() + self.iscsi.initiator = self.initiator.get_text() + + self.iscsi.startup() + + return None + + def getScreen(self, iscsi, intf): + self.intf = intf + self.iscsi = iscsi + + (self.xml, widget) = gui.getGladeWidget("iscsi-config.glade", "iscsiRows") + self.ip_table = self.xml.get_widget("iscsiTable") + self.ip_widget = ipwidget.IPEditor() + self.ip_widget.hydrate(self.iscsi.ipaddr) + + self.port = self.xml.get_widget("iscsiPort") + if self.iscsi.port: + self.port.set_text(self.iscsi.port) + + self.initiator = self.xml.get_widget("iscsiInitiator") + if self.iscsi.initiator: + self.initiator.set_text(self.iscsi.initiator) + + # put the IP address widget in the right (1, 2) upper (0, 1) + # corner of our 3 rows by 2 columns table. + + # XXX there is too much space around the IP address. Using this + # variant had no affect: + # self.ip_table.attach(self.ip_widget.getWidget(), 1, 2, 0, 1, gtk.FILL|gtk.EXPAND) + self.ip_table.attach(self.ip_widget.getWidget(), 1, 2, 0, 1) + return widget + +# vim:tw=78:ts=4:et:sw=4 diff -uprN -X /home/patman/dontdiff anaconda-10.91.12/ui/iscsi-config.glade iscsi-anaconda-10.91.12/ui/iscsi-config.glade --- anaconda-10.91.12/ui/iscsi-config.glade 1969-12-31 16:00:00.000000000 -0800 +++ iscsi-anaconda-10.91.12/ui/iscsi-config.glade 2006-02-02 12:53:06.000000000 -0800 @@ -0,0 +1,215 @@ +<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> +<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd"> + +<glade-interface> + +<widget class="GtkWindow" id="iSCSI"> + <property name="visible">True</property> + <property name="title">iSCSI parameters</property> + <property name="type">GTK_WINDOW_TOPLEVEL</property> + <property name="window_position">GTK_WIN_POS_NONE</property> + <property name="modal">False</property> + <property name="default_width">200</property> + <property name="default_height">150</property> + <property name="resizable">True</property> + <property name="destroy_with_parent">False</property> + <property name="decorated">True</property> + <property name="skip_taskbar_hint">False</property> + <property name="skip_pager_hint">False</property> + <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property> + <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> + <property name="focus_on_map">True</property> + + <child> + <widget class="GtkVBox" id="iscsiRows"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkLabel" id="label2"> + <property name="visible">True</property> + <property name="label" translatable="yes">Enter iSCSI configuration information</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkAlignment" id="alignment1"> + <property name="visible">True</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xscale">0</property> + <property name="yscale">1</property> + <property name="top_padding">10</property> + <property name="bottom_padding">0</property> + <property name="left_padding">30</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkTable" id="iscsiTable"> + <property name="border_width">10</property> + <property name="visible">True</property> + <property name="n_rows">3</property> + <property name="n_columns">2</property> + <property name="homogeneous">False</property> + <property name="row_spacing">4</property> + <property name="column_spacing">4</property> + + <child> + <widget class="GtkLabel" id="labeliscsiAddr"> + <property name="visible">True</property> + <property name="label" translatable="yes">Target IP Address</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="labeliscsiPort"> + <property name="visible">True</property> + <property name="label" translatable="yes">port number [default 3260]</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="labeliscsiInititiator"> + <property name="visible">True</property> + <property name="label" translatable="yes">Initiator</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkEntry" id="iscsiPort"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">*</property> + <property name="activates_default">False</property> + <property name="width_chars">6</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkEntry" id="iscsiInitiator"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">*</property> + <property name="activates_default">False</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="y_options"></property> + </packing> + </child> + </widget> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + </widget> + </child> +</widget> + +</glade-interface>