Re: [PATCH rhel6-branch] Control all devs by NM by default + filtering (iSCSI, FCoE) (#606745)

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

 



Radek Vykydal wrote:
diff --git a/network.py b/network.py
index 02f1ff2..f6b09e7 100644
--- a/network.py
+++ b/network.py
@@ -307,17 +307,34 @@ class NetworkDevice(IfcfgFile):
         lf.close()
         f.close()
- def isStorageDevice(self, anaconda):
+    def usedByFCoE(self, anaconda):
+        return self.iface == "eth1"

Ignore this line, it was there only for testing,
I don't have real FCoE stuff.

         import storage
-        rootdev = anaconda.id.storage.rootDevice
-        # FIXME: use d.host_address to only add "NM_CONTROLLED=no"
-        # for interfaces actually used enroute to the device
         for d in anaconda.id.storage.devices:
-            if isinstance(d, storage.devices.NetworkStorageDevice) and\
-               (rootdev.dependsOn(d) or d.nic == self.iface):
+            if (isinstance(d, storage.devices.NetworkStorageDevice) and
+                d.nic == self.iface):
                 return True
         return False
+ def usedByRootOnISCSI(self, anaconda):
+        import storage
+        rootdev = anaconda.id.storage.rootDevice
+        for d in anaconda.id.storage.devices:
+            if (isinstance(d, storage.devices.NetworkStorageDevice) and
+                d.host_address and
+                rootdev.dependsOn(d)):
+                if self.iface == ifaceForHostIP(d.host_address):
+                    return True
+        return False
+
+    def usedByISCSI(self, anaconda):
+        import storage
+        for d in anaconda.id.storage.devices:
+            if (isinstance(d, storage.devices.NetworkStorageDevice) and
+                d.host_address):
+                if self.iface == ifaceForHostIP(d.host_address):
+                    return True
+        return False
class Network:

_______________________________________________
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