Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Side by Side Diff: server/site_linux_router.py

Issue 6473009: autotest: reset wifi ap config state on deconfig (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git@master
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import logging, re, time 5 import logging, re, time
6 from autotest_lib.client.common_lib import error 6 from autotest_lib.client.common_lib import error
7 7
8 def isLinuxRouter(router): 8 def isLinuxRouter(router):
9 router_uname = router.run('uname').stdout 9 router_uname = router.run('uname').stdout
10 return re.search('Linux', router_uname) 10 return re.search('Linux', router_uname)
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 ignore_status=True) 338 ignore_status=True)
339 if not result.stderr or 'No such device' in result.stderr: 339 if not result.stderr or 'No such device' in result.stderr:
340 break 340 break
341 time.sleep(1) 341 time.sleep(1)
342 else: 342 else:
343 raise error.TestFail("Unable to delete bridge %s: %s" % 343 raise error.TestFail("Unable to delete bridge %s: %s" %
344 (self.bridgeif, result.stderr)) 344 (self.bridgeif, result.stderr))
345 345
346 346
347 self.hostapd['configured'] = False 347 self.hostapd['configured'] = False
348 # reset config state to default
349 self.hostapd['conf'] = {
350 'ssid': self.defssid,
351 'bridge': self.bridgeif,
352 'hw_mode': 'g'
353 }
348 354
349 355
350 def get_ssid(self): 356 def get_ssid(self):
351 return self.hostapd['conf']['ssid'] 357 return self.hostapd['conf']['ssid']
352 358
353 359
354 def set_txpower(self, params): 360 def set_txpower(self, params):
355 self.router.run("%s dev %s set txpower %s" % 361 self.router.run("%s dev %s set txpower %s" %
356 (self.cmd_iw, params.get('interface', 362 (self.cmd_iw, params.get('interface',
357 self.hostapd['interface']), 363 self.hostapd['interface']),
358 params.get('power', 'auto'))) 364 params.get('power', 'auto')))
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698