diff mbox series

[8/9] auto-t: add affinities property for station, and extended_service_set

Message ID 20240813155638.74987-8-prestwoj@gmail.com (mailing list archive)
State New
Headers show
Series [1/9] doc: Document station Affinities property | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
prestwoj/iwd-ci-gitlint success GitLint

Commit Message

James Prestwood Aug. 13, 2024, 3:56 p.m. UTC
---
 autotests/util/iwd.py | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
diff mbox series

Patch

diff --git a/autotests/util/iwd.py b/autotests/util/iwd.py
index 1d4a5472..83f2d9ef 100755
--- a/autotests/util/iwd.py
+++ b/autotests/util/iwd.py
@@ -596,6 +596,11 @@  class Device(IWDDBusAbstract):
         props = self._station_properties()
         return props.get('ConnectedNetwork')
 
+    @property
+    def connected_bss(self):
+        props = self._station_properties()
+        return props.get('ConnectedAccessPoint')
+
     @property
     def powered(self):
         '''
@@ -630,6 +635,19 @@  class Device(IWDDBusAbstract):
         self._station_debug._prop_proxy.Set(IWD_STATION_DEBUG_INTERFACE,
                                             'AutoConnect', value)
 
+    @property
+    def affinities(self):
+        return self._station_properties()['Affinities']
+
+    @affinities.setter
+    def affinities(self, values):
+        self._station_properties()
+        self._station_prop_if.Set(
+            IWD_STATION_INTERFACE, 'Affinities',
+            dbus.Array([dbus.ObjectPath(v) for v in values], signature="o"),
+            reply_handler=self._success, error_handler=self._failure)
+        self._wait_for_async_op()
+
     def scan(self, wait=True):
         '''Schedule a network scan.
 
@@ -975,6 +993,10 @@  class Network(IWDDBusAbstract):
         '''
         return bool(self._properties['Connected'])
 
+    @property
+    def extended_service_set(self):
+        return self._properties['ExtendedServiceSet']
+
     def connect(self, wait=True):
         '''
             Connect to the network. Request the device implied by the object