[wifi interop lab] Get interop lab up and going

Wifi interop lab will allow for testing ChromeOS DUTs against 50+
commercially sold APs across different channels/frequencies. All the APs
are statically configured and this configuration is reflected in
chaos_ap_list.conf.

Due to the time it takes to test a given DUT against all APs (~3hrs) and
the fact that we can only run the test on 1 DUT at a time (due to
current design limitations), the plan is to split the test runs across
different days such that the test(s) will be run on each DUT once per
week.

Old design docs:
https://docs.google.com/document/d/1tnp0JbL6Z9kxNsrBKeh2ZoTFxiH2WzFK49LsGZRGLd0/edit#
https://docs.google.com/document/d/1BxwqwTZ7c84nXyiJPpyzSX1hDvZTch4kWtPpIBluNa4/edit

AP configurations:
https://go/chaos-ap-configs

DUT setups:
http://go/wifi-device-life-cycle-chaos

Test run flow chart:
https://go/chaos-test-run-flow-chart

We also plan to continue adding newer APs to the interop lab as needed.

BUG=chromium:906277
TEST=Tested using kevin against all APs in chaos lab; unit tests (e.g.,
     `utils/unittest_suite.py -r server/cros/ap_configurators/`)

Change-Id: Ief141529fc0df264dac804e771aaba82fbcb5d65
Reviewed-on: https://chromium-review.googlesource.com/1341180
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Dinesh Kumar Sunkara <dsunkara@google.com>
Reviewed-by: Kirtika Ruchandani <kirtika@chromium.org>
diff --git a/server/cros/network/chaos_clique_utils.py b/server/cros/network/chaos_clique_utils.py
index 0d9cd09..cf63441 100644
--- a/server/cros/network/chaos_clique_utils.py
+++ b/server/cros/network/chaos_clique_utils.py
@@ -10,6 +10,7 @@
 
 import common
 from autotest_lib.client.common_lib import error
+from autotest_lib.client.common_lib import utils
 from autotest_lib.client.common_lib.cros.network import ap_constants
 from autotest_lib.client.common_lib.cros.network import iw_runner
 from autotest_lib.server import hosts
@@ -286,8 +287,14 @@
     wifi_if = capturer.get_wlanif(freq, 'managed')
     capturer.host.run('%s link set %s up' % (capturer.cmd_ip, wifi_if))
     # We have some APs that need a while to come on-line
-    networks = capturer.iw_runner.wait_for_scan_result(
-            wifi_if, ssids=[ssid], timeout_seconds=300)
+    networks = utils.poll_for_condition(
+            condition=lambda: capturer.iw_runner.wait_for_scan_result(
+                    wifi_if,
+                    ssids=[ssid],
+                    wait_for_all=True),
+            timeout=300,
+            sleep_interval=35,
+            desc='Timed out getting IWBSSes')
     capturer.remove_interface(wifi_if)
     return networks