eiwd

no dbus iwd with iwctl functionality
git clone https://git.daat.foo/repos/eiwd.git
Log | Files | Refs | Submodules | README | LICENSE

commit 7a74a825a4d8c55509aac333d2193f267f8edf54
parent 57933425ca3b1542dfd555f37e41af0fe21e15b6
Author: James Prestwood <prestwoj@gmail.com>
Date:   Thu, 12 Aug 2021 16:12:31 -0700

auto-t: iwd.py: scan only on needed frequencies

get_ordered_network() now scans automatically and has been updated
to use the StationDebug.Scan() API rather than doing a full
dbus scan (unless full_scan = True). The frequencies to be scanned
are picked automatically based on the current hostapd status
(hidden behind ctx.hostapd.get_frequency()).

Diffstat:
Mautotests/util/iwd.py | 9++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/autotests/util/iwd.py b/autotests/util/iwd.py @@ -414,7 +414,7 @@ class Device(IWDDBusAbstract): self._wait_for_async_op() - def get_ordered_networks(self, scan_if_needed = True): + def get_ordered_networks(self, scan_if_needed = True, full_scan = False): '''Return the list of networks found in the most recent scan, sorted by their user interface importance score as calculated by iwd. If the device is @@ -440,7 +440,10 @@ class Device(IWDDBusAbstract): IWD._wait_for_object_condition(self, condition) try: - self.scan() + if full_scan: + self.scan() + else: + self.debug_scan(ctx.get_frequencies()) except InProgressEx: pass @@ -458,7 +461,7 @@ class Device(IWDDBusAbstract): return None - def get_ordered_network(self, network, scan_if_needed = True): + def get_ordered_network(self, network, scan_if_needed = True, full_scan = False): '''Returns a single network from ordered network call, or None if the network wasn't found. If the network is not found an exception is raised, this removes the need to extra asserts in autotests.