context - DTS execution context
Runtime contexts.
- class LocalContext
Bases:
object
Updatable context local to test suites and cases.
- lcore_filter_specifier
A number of lcores/cores/sockets to use or a list of lcore ids to use. The default will select one lcore for each of two cores on one socket, in ascending order of core ids.
- ascending_cores
Sort cores in ascending order (lowest to highest IDs). If
False
, sort in descending order.- Type:
bool
- append_prefix_timestamp
If
True
, will append a timestamp to DPDK file prefix.- Type:
bool
- timeout
The timeout used for the SSH channel that is dedicated to this interactive shell. This timeout is for collecting output, so if reading from the buffer and no output is gathered within the timeout, an exception is thrown.
- Type:
float
- reset() None
Reset the local context to the default values.
- __init__(lcore_filter_specifier: framework.testbed_model.cpu.LogicalCoreCount | framework.testbed_model.cpu.LogicalCoreList = <factory>, ascending_cores: bool = True, append_prefix_timestamp: bool = True, timeout: float = 15) None
- class Context
Bases:
object
Runtime context.
- __init__(sut_node: ~framework.testbed_model.node.Node, tg_node: ~framework.testbed_model.node.Node, topology: ~framework.testbed_model.topology.Topology, dpdk: DPDKRuntimeEnvironment, tg: TrafficGenerator, local: ~framework.context.LocalContext = <factory>) None
- get_ctx() Context
Retrieve the current runtime context.
- Raises:
InternalError – If there is no context.
- init_ctx(ctx: Context) None
Initialize context.
- filter_cores(specifier: framework.testbed_model.cpu.LogicalCoreCount | framework.testbed_model.cpu.LogicalCoreList, ascending_cores: bool | None = None)
Decorates functions that require a temporary update to the lcore specifier.