[PATCH 01/11] Add a button to bring up the Add Additional dialogs.

Radek Vykydal rvykydal at redhat.com
Mon Apr 15 13:53:15 UTC 2013


The patches look good to me.
> I'll have to apply your patch and play with this to really see what you
> mean.

screencast:
http://rvykydal.fedorapeople.org/patch_iscsi_bind.webm

>>  From 6e75cb279545f7045b26b28ca6bd7a9aea2cd3f9 Mon Sep 17 00:00:00 2001
>> From: Radek Vykydal <rvykydal at redhat.com>
>> Date: Thu, 11 Apr 2013 11:11:53 +0200
>> Subject: [PATCH] Add support ford iSCSI iface binding.
>>
>> ---
>>   pyanaconda/ui/gui/spokes/advstorage/iscsi.glade | 29 +++++++++++++++++++++++++
>>   pyanaconda/ui/gui/spokes/advstorage/iscsi.py    | 21 ++++++++++++++++--
>>   2 files changed, 48 insertions(+), 2 deletions(-)
>>
>> diff --git a/pyanaconda/ui/gui/spokes/advstorage/iscsi.glade b/pyanaconda/ui/gui/spokes/advstorage/iscsi.glade
>> index 34b0c41..977f955 100644
>> --- a/pyanaconda/ui/gui/spokes/advstorage/iscsi.glade
>> +++ b/pyanaconda/ui/gui/spokes/advstorage/iscsi.glade
>> @@ -643,6 +643,22 @@
>>                         </object>
>>                         <packing>
>>                           <property name="left_attach">0</property>
>> +                        <property name="top_attach">7</property>
>> +                        <property name="width">3</property>
>> +                        <property name="height">1</property>
>> +                      </packing>
>> +                    </child>
>> +                    <child>
>> +                      <object class="GtkCheckButton" id="bindCheckbutton">
>> +                        <property name="label" translatable="yes">Bind targets to network interfaces</property>
>> +                        <property name="visible">True</property>
>> +                        <property name="can_focus">True</property>
>> +                        <property name="receives_default">False</property>
>> +                        <property name="xalign">0</property>
>> +                        <property name="draw_indicator">True</property>
>> +                      </object>
>> +                      <packing>
>> +                        <property name="left_attach">0</property>
>>                           <property name="top_attach">6</property>
>>                           <property name="width">3</property>
>>                           <property name="height">1</property>
> Remember to make the checkbutton accessible with the keyboard.

Should be fixed in new version of the patch I'm sending.

>> @@ -243,6 +250,15 @@ class ISCSIDialog(GUIObject):
>>           discoveredLabel.set_markup(discoveredLabel.get_label() % {"initiatorName": credentials.initiator,
>>                                                                     "targetAddress": credentials.targetIP})
>>   
>> +        bind = self._bindCheckbox.get_active()
>> +        if self.iscsi.mode == "none" and not bind:
>> +            self.iscsi.delete_interfaces()
>> +        elif (self.iscsi.mode == "bind"
>> +              or self.iscsi.mode == "none" and bind):
>> +            activated = set(nm.nm_activated_devices())
>> +            created = set(self.iscsi.ifaces.values())
>> +            self.iscsi.create_interfaces(activated - created)
>> +
>>           spinner = self.builder.get_object("waitSpinner")
>>           spinner.start()
>>   
> Does this take any time at all?  If so, it should go into _discover.

It is calling iscaiadm tool, I moved it into _discover in new version.

> Also, do you need to convert activated-created into a list before
> passing it to create_interfaces?

The return value should be just an iterable.

One more thing I noticed - values of Target and LUN in Search tab seem
to be wrong for iSCSI currently. Perhaps node.tpgt for the former can
be used. For the latter, I don't know where is the best place to parse 
it from.

Radek



More information about the anaconda-patches mailing list