3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 21:22:37 +01:00

auto-t: iwd.py: add roam() method

This will use the Roam() developer method to force a roam to
a certain BSS. This is particularly useful for any test requiring
roams that are not testing IWD's BSS selection logic. Rather than
creating hwsim rules, setting low RSSI values, and waiting for the
roam logic/scan to happen Roam() can be used to force the roam
logic immediately.
This commit is contained in:
James Prestwood 2021-08-12 13:21:56 -07:00 committed by Denis Kenzior
parent 3402f5994b
commit 77d5b57e9e

View File

@ -542,6 +542,12 @@ class Device(IWDDBusAbstract):
IWD_STATION_DEBUG_INTERFACE) IWD_STATION_DEBUG_INTERFACE)
self._station_debug_if.ConnectBssid(dbus.ByteArray.fromhex(address.replace(':', ''))) self._station_debug_if.ConnectBssid(dbus.ByteArray.fromhex(address.replace(':', '')))
def roam(self, address):
self._station_debug_if = dbus.Interface(self._bus.get_object(IWD_SERVICE,
self.device_path),
IWD_STATION_DEBUG_INTERFACE)
self._station_debug_if.Roam(dbus.ByteArray.fromhex(address.replace(':', '')))
def __str__(self, prefix = ''): def __str__(self, prefix = ''):
return prefix + 'Device: ' + self.device_path + '\n'\ return prefix + 'Device: ' + self.device_path + '\n'\
+ prefix + '\tName:\t\t' + self.name + '\n'\ + prefix + '\tName:\t\t' + self.name + '\n'\