Home | History | Annotate | Download | only in hosts

Lines Matching defs:ATTR

41     ATTR = ''
44 def _get_config_val(host, config_file, attr):
46 Get the `attr` for `host` from `config_file`.
50 @param attr Attribute to get from config file.
52 @return The attr val as set in the config file, or `None` if
56 '. $CONFIG && echo $%s' % (config_file, attr))
61 def _validate_attr(host, val, expected_val, attr, config_file):
63 Check that the attr setting is valid for the host.
67 * There was no attr setting from the file (i.e. the setting
69 * The attr setting is valid, the attr is known,
75 @param attr Attribute we're validating.
81 'is not set' % (attr, config_file))
84 '%s is %s; it should be %s' % (attr, val, expected_val))
105 return 'servo %s setting is correct' % self.ATTR
113 ATTR = 'SERIAL'
133 serialval = self._get_config_val(host, config, self.ATTR)
136 self.ATTR, config)
148 ATTR = 'BOARD'
166 boardval = self._get_config_val(host, config, self.ATTR)
168 self._validate_attr(host, boardval, host.servo_board, self.ATTR,