config_io module
The config_io module offers high-level functions to save and load Xena Port Configuration files (.xpc) and Xena Test Case Configuration files (.xtc2).
|
Save port config to the specified filepath |
|
Load port config from the specified filepath |
|
Load port configuration from the specifiied filepath. |
|
Save testbed configuration to the specifiied filepath |
|
Load testbed configuration from the specifiied filepath |
|
Load module configuration from the specifiied filepath. |
Module Contents
The cli high-level function module.
- async save_port_config(tester, port, path, debug=False, halt_on_error=False)[source]
Save port config to the specified filepath
- async load_port_config(tester, port, path, debug=False, halt_on_error=False)[source]
Load port config from the specified filepath
- Parameters:
tester (testers.L23Tester) – Chassis object
port (ports.GenericL23Port) – Port object to load configuration to
load_path (str) – File path to load the port configuration from
- Returns:
List of tuples containing response and the corresponding command sent
- Return type:
- async port_config_from_file(tester, port, path, debug=False, halt_on_error=False)[source]
Load port configuration from the specifiied filepath. This function is a wrapper around load_port_config to provide backward compatibility.
- async save_testbed_config(tester, ports, path, testbed_name='<testbed>', with_module_config=True, debug=False, halt_on_error=False)[source]
Save testbed configuration to the specifiied filepath
- Parameters:
tester (testers.L23Tester) – Chassis object
ports (List[ports.GenericL23Port]) – List of port objects to save configuration from
path (str) – File path to save the test case configuration
testbed_name (str) – Name of the testbed
with_module_config (bool) – Whether to include module configuration in the saved test case configuration
- Returns:
Test case configuration string
- Return type:
- async load_testbed_config(tester, path, mode='default', delay_after_module_config=5, debug=False, halt_on_error=False)[source]
Load testbed configuration from the specifiied filepath
- Parameters:
tester (testers.L23Tester) – Chassis object
path (str) – File path to load the module configuration from
mode (str) – Load mode, “default | port | module”. “default” loads both module and port configurations, “port” loads only port configurations, “module” loads only module configurations.
delay_after_module_config (int) – Delay in seconds after configuring each module to ensure proper configuration
- Returns:
List of tuples containing response and the corresponding command sent
- Return type:
- async module_config_from_file(tester, path, debug=False, halt_on_error=False)[source]
Load module configuration from the specifiied filepath. This function is a wrapper around load_module_config to provide backward compatibility.
- Parameters:
tester (testers.L23Tester) – Chassis object
path (str) – File path to load the module configuration from