This is needed for virtual devices, eg bond and vlan.
---
pyanaconda/ui/gui/spokes/network.py | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/network.py b/pyanaconda/ui/gui/spokes/network.py
index e22c2e8..34ed405 100644
--- a/pyanaconda/ui/gui/spokes/network.py
+++ b/pyanaconda/ui/gui/spokes/network.py
@@ -28,7 +28,6 @@
# see we_dont_have_nm_applet_as_secrets_agent
# - callback on NM_CLIENT_ACTIVE_CONNECTIONS
# - support connection to hidden network (ap-other)
-# - device_is_stored
# - NMClient.CLIENT_WIRELESS_ENABLED callback (hw switch?) - test
# - nm-c-e run: blocking? logging?
@@ -569,8 +568,12 @@ class NetworkControlBox(object):
return None
def _device_is_stored(self, nm_device):
- """TODO check that device with Udi of nm_device is already in
- liststore"""
+ """Check that device with Udi of nm_device is already in
liststore"""
+ udi = nm_device.get_udi()
+ model = self.builder.get_object("liststore_devices")
+ for row in model:
+ if (udi == row[DEVICES_COLUMN_OBJECT].get_udi()):
+ return True
return False
def add_device_to_list(self, device):
--
1.7.11.7