1# Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5AUTHOR = 'wiley, pstew, quiche'
6TIME = 'SHORT'
7NAME = 'network_WiFi_RoamSuspendSSID.rsn'
8TEST_TYPE = 'Server'
9DOC = """
10This test verifies that the connection manager connects to a
11previously connected network on resume from suspend when an
12SSID disappears during suspend.
13
14"""
15
16from autotest_lib.server.cros.network import hostap_config
17
18
19def run(machine):
20    wpa_config0 = xmlrpc_security_types.WPAConfig(
21            psk='chromeos0',
22            wpa_mode=xmlrpc_security_types.WPAConfig.MODE_PURE_WPA2)
23    wpa_config1 = xmlrpc_security_types.WPAConfig(
24            psk='chromeos1',
25            wpa_mode=xmlrpc_security_types.WPAConfig.MODE_PURE_WPA2)
26    ap_config0 = hostap_config.HostapConfig(channel=1,
27                                            security_config=wpa_config0)
28    ap_config1 = hostap_config.HostapConfig(channel=44,
29                                            security_config=wpa_config1)
30    job.run_test('network_WiFi_RoamSuspendSSID',
31                 tag=NAME.split('.')[1],
32                 host=hosts.create_host(machine),
33                 raw_cmdline_args=args,
34                 additional_params=(ap_config0, ap_config1))
35
36
37parallel_simple(run, machines)
38