blob: bebffdddf4f2b2c20138afdd7332b3bfd0471163 [file] [log] [blame]
Vic Yangebd6de62012-06-26 14:25:57 +08001# Copyright (c) 2012 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
5class FAFTClientAttribute(object):
6 """Class that tests platform name and gives client machine attributes."""
7 version = 1
8
9 DEFAULT_SETTING = {'keyboard_dev': True}
10
11 def __init__(self, platform):
12 """Initialized.
13
14 Args:
15 platform: Platform name returned by FAFT client.
16 """
17 self.__dict__.update(self.DEFAULT_SETTING)
18 self.__dict__.update(self._get_platform_setting(platform))
19
20
21 def _get_platform_setting(self, platform):
22 """Return platform-specific settings."""
23 setting = dict()
24
25 if platform in ['Aebl', 'Alex', 'Kaen', 'Lumpy', 'Mario', 'Seaboard',
26 'Stumpy', 'ZGB']:
27 setting['keyboard_dev'] = False
28
29 return setting