A fixup of commit 1282239f8035100da50fe7fe2f7be532677e042a.
As NM docs say: This property may not refer to the actual data interface until the device has successfully established a data connection, indicated by the device's State becoming ACTIVATED. --- pyanaconda/nm.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/nm.py b/pyanaconda/nm.py index 1faf07c..8114a4d 100644 --- a/pyanaconda/nm.py +++ b/pyanaconda/nm.py @@ -150,7 +150,7 @@ def nm_devices(): device_type = _get_property(device, "DeviceType", ".Device") if device_type not in supported_device_types: continue - iface = _get_property(device, "IpInterface", ".Device") + iface = _get_property(device, "Interface", ".Device") interfaces.append(iface)
return interfaces @@ -175,6 +175,8 @@ def nm_activated_devices(): devices = _get_property(ac, "Devices", ".Connection.Active") for device in devices: iface = _get_property(device, "IpInterface", ".Device") + if not iface: + iface = _get_property(device, "Interface", ".Device") interfaces.append(iface)
return interfaces @@ -498,7 +500,7 @@ def nm_device_slaves(name):
slave_ifaces = [] for slave in slaves: - iface = _get_property(slave, "IpInterface", ".Device") + iface = _get_property(slave, "Interface", ".Device") slave_ifaces.append(iface)
return slave_ifaces
On Wed, 2014-05-28 at 10:13 +0200, Radek Vykydal wrote:
A fixup of commit 1282239f8035100da50fe7fe2f7be532677e042a.
As NM docs say: This property may not refer to the actual data interface until the device has successfully established a data connection, indicated by the device's State becoming ACTIVATED.
pyanaconda/nm.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/nm.py b/pyanaconda/nm.py index 1faf07c..8114a4d 100644 --- a/pyanaconda/nm.py +++ b/pyanaconda/nm.py @@ -150,7 +150,7 @@ def nm_devices(): device_type = _get_property(device, "DeviceType", ".Device") if device_type not in supported_device_types: continue
iface = _get_property(device, "IpInterface", ".Device")
iface = _get_property(device, "Interface", ".Device") interfaces.append(iface)return interfaces
@@ -175,6 +175,8 @@ def nm_activated_devices(): devices = _get_property(ac, "Devices", ".Connection.Active") for device in devices: iface = _get_property(device, "IpInterface", ".Device")
if not iface:iface = _get_property(device, "Interface", ".Device") interfaces.append(iface)return interfaces
@@ -498,7 +500,7 @@ def nm_device_slaves(name):
slave_ifaces = [] for slave in slaves:
iface = _get_property(slave, "IpInterface", ".Device")
iface = _get_property(slave, "Interface", ".Device") slave_ifaces.append(iface)return slave_ifaces
Looks good to me.
anaconda-patches@lists.fedorahosted.org