avocado.plugins.spawners package

Submodules

avocado.plugins.spawners.podman module

class avocado.plugins.spawners.podman.PodmanCLI

Bases: avocado.core.plugin_interfaces.CLI

configure(parser)

Configures the command line parser with options specific to this plugin.

description = 'podman spawner command line options for "run"'
name = 'podman'
run(config)

Execute any action the plugin intends.

Example of action may include activating a special features upon finding that the requested command line options were set by the user.

Note: this plugin class is not intended for adding new commands, for that please use CLICmd.

class avocado.plugins.spawners.podman.PodmanSpawner(config=None, job=None)

Bases: avocado.core.plugin_interfaces.DeploymentSpawner, avocado.core.spawners.common.SpawnerMixin

METHODS = [<SpawnMethod.STANDALONE_EXECUTABLE: <object object>>]
static check_task_requirements(runtime_task)

Check the runtime task requirements needed to be able to run

create_task_output_dir(runtime_task)

Creates output directory in the intended location, before the task spawn.

The output directory path will be saved to the task.runnable.config for the usage by runners.

Parameters:runtime_task (avocado.core.task.runtime.RuntimeTask) – wrapper for a Task with additional runtime information.
deploy_artifacts()

Basic artifacts deployment for the isolated environment.

During this stage test references (i.e: mytest.py), data files (i.e: mytest.py.data/), and any other basic requirement should be deployed to the isolated environment. Please keep in mind that test requirements defined at the requirements resolver level are not part of this deployment and it will be fulfilled by the requirement resolver.

This method should also be executed before spawning the task.

deploy_avocado(where)

Avocado deployment for the isolated environment.

This method should be executed before spawning the task.

Parameters:where – handle for where the spawner should deploy avocado. You can use this parameter to pass any valid argument, like a container, vm, or any other isolated environment object or identifier.
description = 'Podman (container) based spawner'
get_eggs_paths(py_major, py_minor)

Return the basic eggs needed to bootstrap Avocado.

This will return a tuple with the current location and where this should be deployed.

is_task_alive(runtime_task)

Determines if a task is alive or not.

Parameters:runtime_task (avocado.core.task.runtime.RuntimeTask) – wrapper for a Task with additional runtime information.
python_version
spawn_task(runtime_task)

Spawns a task return whether the spawning was successful.

Parameters:runtime_task (avocado.core.task.runtime.RuntimeTask) – wrapper for a Task with additional runtime information.
wait_task(runtime_task)

Waits for a task to finish.

Parameters:runtime_task (avocado.core.task.runtime.RuntimeTask) – wrapper for a Task with additional runtime information.
class avocado.plugins.spawners.podman.PodmanSpawnerInit

Bases: avocado.core.plugin_interfaces.Init

description = 'Podman (container) based spawner initialization'
initialize()

Entry point for the plugin to perform its initialization.

avocado.plugins.spawners.process module

class avocado.plugins.spawners.process.ProcessSpawner(config=None, job=None)

Bases: avocado.core.plugin_interfaces.Spawner, avocado.core.spawners.common.SpawnerMixin

METHODS = [<SpawnMethod.STANDALONE_EXECUTABLE: <object object>>]
static check_task_requirements(runtime_task)

Check the runtime task requirements needed to be able to run

create_task_output_dir(runtime_task)

Creates output directory in the intended location, before the task spawn.

The output directory path will be saved to the task.runnable.config for the usage by runners.

Parameters:runtime_task (avocado.core.task.runtime.RuntimeTask) – wrapper for a Task with additional runtime information.
description = 'Process based spawner'
static is_task_alive(runtime_task)

Determines if a task is alive or not.

Parameters:runtime_task (avocado.core.task.runtime.RuntimeTask) – wrapper for a Task with additional runtime information.
spawn_task(runtime_task)

Spawns a task return whether the spawning was successful.

Parameters:runtime_task (avocado.core.task.runtime.RuntimeTask) – wrapper for a Task with additional runtime information.
static wait_task(runtime_task)

Waits for a task to finish.

Parameters:runtime_task (avocado.core.task.runtime.RuntimeTask) – wrapper for a Task with additional runtime information.

Module contents