Re: [PATCH 20/22] NetworkStorageDevice filtering.

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

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Nack.  Looks like this patch just needs to be finished up.

On Tue, 27 Apr 2010, Radek Vykydal wrote:

- a fix?
- filter-out NetworkStorageDevices from network configuration/enablement
 UI (disable selection)?
---
iw/network_gui.py       |    1 +
network.py              |    7 ++++++-
textw/netconfig_text.py |    2 ++
3 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/iw/network_gui.py b/iw/network_gui.py
index 15fdf34..1ec4d83 100644
--- a/iw/network_gui.py
+++ b/iw/network_gui.py
@@ -126,6 +126,7 @@ def runNMCE(anaconda=None, blocking=True):
def selectNetDevicesDialog(network, select_install_device=True):

    netdevs = network.netdevices
+    # TODORV: (*) move NetworkStorageDevice filtering here?
    devs = netdevs.keys()
    devs.sort()

diff --git a/network.py b/network.py
index d947011..1c8bf67 100644
--- a/network.py
+++ b/network.py
@@ -572,6 +572,9 @@ class Network:
                self.overrideDHCPhostname):
                dev.set(('DHCP_HOSTNAME', self.hostname))

+            # TODORV: maybe move this to place where we set NM_CONTROLLED
+            # for devices before calling write (see comments with (*)).
+            # Then we could remove anaconda parameter from this method.
            # tell NetworkManager not to touch any interfaces used during
            # installation when / is on a network backed device.
            if anaconda is not None:
@@ -580,8 +583,10 @@ class Network:
                # FIXME: use d.host_address to only add "NM_CONTROLLED=no"
                # for interfaces actually used enroute to the device
                for d in anaconda.storage.devices:
+                    # TODORV: I don't understand this,
+                    # shouldn't the condition be changed from or to and?
                    if isinstance(d, storage.devices.NetworkStorageDevice) and\
-                       (rootdev.dependsOn(d) or d.nic == device):
+                       (rootdev.dependsOn(d) and d.nic == device):
                        dev.set(('NM_CONTROLLED', 'no'))
                        break

diff --git a/textw/netconfig_text.py b/textw/netconfig_text.py
index 9b0b156..6af04be 100644
--- a/textw/netconfig_text.py
+++ b/textw/netconfig_text.py
@@ -104,6 +104,7 @@ class NetworkConfiguratorText:
            ksdevice = ksdevice.get('DEVICE')
        selected_interface = None

+        # TODORV: (*) move NetworkStorageDevice filtering here?
        for dev in devs:
            hwaddr = netdevs[dev].get("HWADDR")

@@ -194,6 +195,7 @@ class NetworkConfiguratorText:
                                                 _("You must select a network device"))
                continue

+            # TODORV: (*) move NetworkStorageDevice filtering here?
            for name, dev in netdevs.items():
                if name in selected:
                    dev.set(('NM_CONTROLLED', 'yes'))


- -- David Cantrell <dcantrell@xxxxxxxxxx>
Red Hat / Honolulu, HI

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAkvfkZUACgkQ5hsjjIy1VkknlQCggI7bQksw7+x+h9kIYODW0+SM
GUgAnifP9kSe5jl1+mZA4mOf/U5l2sC2
=WNEE
-----END PGP SIGNATURE-----

_______________________________________________
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