pyats.aetest.datafile package¶
Submodules¶
- class pyats.aetest.datafile.loader.DatafileLoader(schema={Optional (str) extends: Use (function) <function str_or_list>, Optional (str) parameters: <class 'dict'>, Optional (str) processors: {Optional (str) pre: Use (function) <function load_processors>, Optional (str) post: Use (function) <function load_processors>, Optional (str) exception: Use (function) <function load_processors>, Optional (str) context: Use (function) <function load_processors>}, Optional (str) common_setup: {Optional (str) parameters: <class 'dict'>, Optional (str) processors: {Optional (str) pre: Use (function) <function load_processors>, Optional (str) post: Use (function) <function load_processors>, Optional (str) exception: Use (function) <function load_processors>, Optional (str) context: Use (function) <function load_processors>}, Any (str) *: Any (str) *}, Optional (str) testcases: {Any (str) *: {Optional (str) uid: <class 'str'>, Optional (str) groups: <class 'list'>, Optional (str) description: <class 'str'>, Optional (str) parameters: <class 'dict'>, Optional (str) processors: {Optional (str) pre: Use (function) <function load_processors>, Optional (str) post: Use (function) <function load_processors>, Optional (str) exception: Use (function) <function load_processors>, Optional (str) context: Use (function) <function load_processors>}, Any (str) *: Any (str) *}}, Optional (str) common_cleanup: {Optional (str) parameters: <class 'dict'>, Optional (str) processors: {Optional (str) pre: Use (function) <function load_processors>, Optional (str) post: Use (function) <function load_processors>, Optional (str) exception: Use (function) <function load_processors>, Optional (str) context: Use (function) <function load_processors>}, Any (str) *: Any (str) *}, Any (str) *: Any (str) *}, enable_extensions=True, testbed=None)¶
Bases:
pyats.utils.yaml.loader.Loader
Subclass of utils.yaml.Loader class that performs the loading of datafiles that drives the testscript (or, acts as inputs that sets variables and parameters in a testscript).
built-in __init__
instantiates base class Loader with datafile schema and support for one datafile to extend another datafile via the use of recursive file loading.
- pyats.aetest.datafile.schema.load_processors(value)¶
load_processor
Load a schema list of [x.y.z, a.b.c] into ‘from x.y import z’, etc, and return the imported z. or Loads a schema list of
[{'processor': 'x.y.z', 'args': [1,2,3] 'kwargs': dict(a=1,b=2)}]
into from x.y import z, z = functools.partial(z, args = args, kwargs=kwargs)
- pyats.aetest.datafile.schema.str_or_list(value)¶
check_file
translates str/list into list.