commit 4f5010f69db1c8af39ae411ee1e605933e298d0b
parent f6f08f9b96914eea1831437bcf5eb922c5045944
Author: James Prestwood <prestwoj@gmail.com>
Date: Thu, 12 Aug 2021 13:38:08 -0700
auto-t: iwd.py: add autoconnect property/StationDebug
Diffstat:
1 file changed, 31 insertions(+), 0 deletions(-)
diff --git a/autotests/util/iwd.py b/autotests/util/iwd.py
@@ -226,6 +226,21 @@ class AdHocDevice(IWDDBusAbstract):
def connected_peers(self):
return self._properties['ConnectedPeers']
+class StationDebug(IWDDBusAbstract):
+ '''
+ Class represents net.connman.iwd.StationDebug
+ '''
+ _iface_name = IWD_STATION_DEBUG_INTERFACE
+
+ def __init__(self, *args, **kwargs):
+ self._debug_props = None
+ self._debug_iface = None
+
+ IWDDBusAbstract.__init__(self, *args, **kwargs)
+
+ @property
+ def autoconnect(self):
+ return self._properties['AutoConnect']
class Device(IWDDBusAbstract):
'''
@@ -238,6 +253,7 @@ class Device(IWDDBusAbstract):
self._wps_manager_if = None
self._station_if = None
self._station_props = None
+ self._station_debug = None
IWDDBusAbstract.__init__(self, *args, **kwargs)
@property
@@ -354,6 +370,21 @@ class Device(IWDDBusAbstract):
props = self._station_properties()
return bool(props['Scanning'])
+ @property
+ def autoconnect(self):
+ if not self._station_debug:
+ self._station_debug = StationDebug(self._object_path)
+
+ return self._station_debug.autoconnect
+
+ @autoconnect.setter
+ def autoconnect(self, value):
+ if not self._station_debug:
+ self._station_debug = StationDebug(self._object_path)
+
+ self._station_debug._prop_proxy.Set(IWD_STATION_DEBUG_INTERFACE,
+ 'AutoConnect', value)
+
def scan(self):
'''Schedule a network scan.