avocado_i2n¶
avocado_i2n package¶
Subpackages¶
avocado_i2n.cartgraph package¶
Submodules¶
avocado_i2n.cartgraph.graph module¶
avocado_i2n.cartgraph.node module¶
avocado_i2n.cartgraph.object module¶
-
class
avocado_i2n.cartgraph.object.
TestObject
(suffix, config)[source]¶ Bases:
object
A wrapper for a test object used in one or more test nodes.
-
params
¶ Parameters (cache) property.
-
final_restr
¶ Final restriction to make the object parsing variant unique.
-
long_suffix
¶ Sufficiently unique suffix to identify a variantless test object.
-
id
¶ Unique ID to identify a test object.
-
__init__
(suffix, config)[source]¶ Construct a test object (vm) for any test nodes (tests).
Parameters: - name (str) – name of the test object
- config (
param.Reparsable
) – variant configuration for the test object
-
is_permanent
()[source]¶ If the test object is permanent, it can only be created manually (possibly through the use of manual setup steps).
On states on permanent test object are treated differently than on states on normal test object since they are preserved through test runs and even host shutdowns.
-
-
class
avocado_i2n.cartgraph.object.
NetObject
(name, config)[source]¶ Bases:
avocado_i2n.cartgraph.object.TestObject
A Net wrapper for a test object used in one or more test nodes.
-
class
avocado_i2n.cartgraph.object.
VMObject
(name, config)[source]¶ Bases:
avocado_i2n.cartgraph.object.TestObject
A VM wrapper for a test object used in one or more test nodes.
-
class
avocado_i2n.cartgraph.object.
ImageObject
(name, config)[source]¶ Bases:
avocado_i2n.cartgraph.object.TestObject
An image wrapper for a test object used in one or more test nodes.
-
id
¶ Sufficiently unique ID to identify a test object.
-
Module contents¶
avocado_i2n.plugins package¶
Submodules¶
Module contents¶
Submodules¶
avocado_i2n.cmd_parser module¶
avocado_i2n.intertest_setup module¶
avocado_i2n.loader module¶
avocado_i2n.params_parser module¶
SUMMARY¶
Module for handling all Cartesian config parsing and making it reusable and maximally performant.
Copyright: Intra2net AG
INTERFACE¶
-
exception
avocado_i2n.params_parser.
EmptyCartesianProduct
(message)[source]¶ Bases:
Exception
Empty Cartesian product of variants
-
class
avocado_i2n.params_parser.
ParsedContent
(content)[source]¶ Bases:
object
Class for parsed content of a general type.
-
class
avocado_i2n.params_parser.
ParsedFile
(content)[source]¶ Bases:
avocado_i2n.params_parser.ParsedContent
Class for parsed content of file type.
-
class
avocado_i2n.params_parser.
ParsedStr
(content)[source]¶ Bases:
avocado_i2n.params_parser.ParsedContent
Class for parsed content of string type.
-
class
avocado_i2n.params_parser.
ParsedDict
(content)[source]¶ Bases:
avocado_i2n.params_parser.ParsedContent
Class for parsed content of dictionary type.
-
class
avocado_i2n.params_parser.
Reparsable
[source]¶ Bases:
object
Class to represent quickly parsable Cartesian configuration, producing both parser and parameters (parser dicts) on demand.
-
parse_next_file
(pfile)[source]¶ Add a file parsing step.
Parameters: pfile (str) – file to be parsed next If the parsable file has a relative form (not and absolute path), it will be searched in the relative test suite config directory.
-
parse_next_str
(pstring)[source]¶ Add a string parsing step.
Parameters: pstring (str) – string to be parsed next
-
parse_next_dict
(pdict)[source]¶ Add a dictionary parsing step.
Parameters: pdict ({str, str}) – dictionary to be parsed next
-
parse_next_batch
(base_file=None, base_str='', base_dict=None, ovrwrt_file=None, ovrwrt_str='', ovrwrt_dict=None)[source]¶ Parse a batch of base file, string, and dictionary, and possibly an overwrite file (with custom parameters at the user’s home location).
Parameters: - base_file (str or None) – file to be parsed first
- base_str (str or None) – string to be parsed first
- base_dict ({str, str} or None) – params to be added first
- ovrwrt_file (str or None) – file to be parsed last
- ovrwrt_str (str or None) – string to be parsed last
- ovrwrt_dict ({str, str} or None) – params to be added last
The priority of the setting follows the order of the arguments: Dictionary with some parameters is topmost, string with some parameters is next and the file with parameters is taken as a base. The overwriting version is taken last, the base version first.
-
-
avocado_i2n.params_parser.
all_restrictions
()[source]¶ Return all restrictions that can be passed for any test configuration.
Returns: all available (from configuration) vms Return type: [str]
-
avocado_i2n.params_parser.
all_objects
(key='vms', composites=None)[source]¶ Return all test objects that can be passed for any test configuration.
Param: str key: key to extract parametric objects from Parameters: composites ([str]) – composite restriction of the returned objects Returns: all available (from configuration) objects of a given type Return type: [str]
-
avocado_i2n.params_parser.
main_vm
()[source]¶ Return the default main vm that can be passed for any test configuration.
Returns: main available (from configuration) vm Return type: str or None
-
avocado_i2n.params_parser.
re_str
(variant_str, base_str='', tag='')[source]¶ Add a variant restriction to the base string, optionally adding a custom tag as well.
Parameters: - variant_str (str) – variant restriction
- base_str (str) – string where the variant restriction will be added
- tag (str) – additional tag to the variant combination
Returns: restricted parameter string
Return type: str
-
avocado_i2n.params_parser.
join_str
(variant_strs, base_str='')[source]¶ Join all object variant restrictions over the base string.
Parameters: - variant_strs ({str, str}) – variant restrictions for each object as key, value pair
- base_str (str) – string where the variant restriction will be added
Returns: restricted parameter string
Return type: str