avocado_i2n.cmd_parser module¶
Parser for command line Cartesian parameters.
SUMMARY¶
Copyright: Intra2net AG
INTERFACE¶
- avocado_i2n.cmd_parser.params_from_cmd(config: Params) None[source]¶
Produce Cartesian parameters from a command line.
Take care of paths/utilities for all host controls.
- Parameters:
config – command line arguments
- Raises:
ValueErrorif a command line selected vm is not available from the configuration and thus supported or internal tests are restricted from the command line
Todo
Any dynamically created config keys here are usually entire data structures like dictionaries and lists and only used internally during the run which makes them unfit for displaying to the user and putting in a namespace scope like the officially registered plugin settings. Let’s wait to see if the multi-suite support in avocado would establish some standards for doing this first. Until then, the user won’t directly interact with these keys anyway.
- avocado_i2n.cmd_parser.full_vm_params_and_strs(param_dict: dict[str, str] | None, vm_strs: dict[str, str], use_vms_default: dict[str, bool]) tuple[Params, dict[str, str]][source]¶
Add default vm parameters and strings for missing command line such.
- Parameters:
param_dict – runtime parameters used for extra customization
vm_strs – command line vm-specific names and variant restrictions
use_vms_default – whether to use default variant restriction for a particular vm
- Returns:
complete vm parameters and strings
- Raises:
ValueErrorif no command line or default variant restriction could be found for some vm
- avocado_i2n.cmd_parser.full_tests_params_and_str(param_dict: dict[str, str] | None, tests_str: str, use_tests_default: bool) tuple[Params, str][source]¶
Add default tests parameters and string for missing command line such.
- Parameters:
param_dict – runtime parameters used for extra customization
tests_str – command line variant restrictions
use_tests_default – whether to use default primary restriction
- Returns:
complete tests parameters and string
- Raises:
ValueErrorif the default primary restriction could is not valid (among the available ones)