integer and boolen are defined in wlauto.utils.types; they perform more
intuitive conversions from other types, particularly strings, so are
more suitable than int and bool for parameters. If, for whatever reason,
native types are in fact desired for a Parameter, this behavior can be
supressed by specifying convert_types=False when defining the parameter.
- added caseless_string type. This behaves exactly like a string, except
this ignores case in comparisons. It does, however, preserve case. E.g.
>>> s = caseless_string('Test')
>>> s == 'test'
True
>>> print s
Test
- added list_of type generating function. This allows to dynamically
generate type-safe list types based on an existing type. E.g.
>>> list_of_bool = list_of(bool)
>>> list_of_bool(['foo', 0, 1, '', True])
[True, False, True, False, True]
- Update core_names Device Parameter to be of type caseless_string
Keep duplicates in lists when merging device_config dict from agenda
with the rest of the config; This will ensure that core_name sand
core_clusters aren't reduced to just unique elements.
- raise an error if an agenda contains duplicate keys (by default PyYAML
will silently ignore this)
- raise an error if config section in an agenda is not dict-like
(before, this was allowed to propagate and relsulted an a traceback
further down the line).
Commit 2276ae0c5b54 ("Fixing config processing for extensions with
non-identifier names.") broke customizing the trace-cmd instrumentation
from the agenda. With an agenda like:
config:
instrumentation: [trace-cmd, delay]
trace_events: ['thermal*']
trace_buffer_size: 28000
trace_events and trace_buffer_size get added to the RunConfiguration's
_raw_config under the trace-cmd name, but then when it's looked up in
_finalize_config_list(), the dictionary is actually looked up using
identifier(extname), i.e. 'trace_cmd'. Fix this by adding the user's
configuration using identifier(name) as well.
Internally, WA expects extension names to be valid Python identifiers.
When this is not the case, conversion takes place when loading
configuration for the extension (e.g. "trace-cmd" gets converted to
"trace_cmd").
The conversion is intended to be transparent to the user, so
configuration stores values as they are provided by the user, however it
needs to perform the conversion internally, e.g. when querying
ExtensionLoader. This conversion was missing when performing a lookup of
one of the internal structures, which was causing earlier-collected
settings to not be propagated into the final config.
The param documentation states that for a boolean, "kind" should be
"as_bool" from wlauto.utils.misc, but there is no "as_bool". Currently,
workload automation automatically converts native python types like bool
and int to workload automation specific ones. Remove this bit from the
documentation as it's not true any more.
Change-Id: I0100708530bcf67556eda386c39bc444a3e0f2b2
The error message will now contain the offending extension (either
package name or full path to extension file) if a Python error occurs
when ExtensionLoader attempts to load it.
- connect() to device before issuing the initial reboot, as soft reset
requires a device connection.
- boot() has been implemented to wait properly for the device to reboot
after reset.
- port now defaults to 22 rather than being left unset, as need
something to connect to when polling for device after reboot.
- Only use -P option for scp when port is *not* 22; as that option
appears to cause intermittent issues with default scp on Ubuntu 12.04