posix_session - Posix Remote Session

POSIX compliant OS translator.

Translates OS-unaware calls into POSIX compliant calls/utilities. POSIX is a set of standards for portability between Unix operating systems which not all Linux distributions (or the tools most frequently bundled with said distributions) adhere to. Most of Linux distributions are mostly compliant though. This intermediate module implements the common parts of mostly POSIX compliant distributions.

class PosixSession

Bases: OSSession

An intermediary class implementing the POSIX standard.

static combine_short_options(**opts: bool) str

Combine shell options into one argument.

These are options such as -x, -v, -f which are combined into -xvf.

Parameters:

opts (bool) – The keys are option names (usually one letter) and the bool values indicate whether to include the option in the resulting argument.

Returns:

The options combined into one argument.

Return type:

str

guess_dpdk_remote_dir(remote_dir: str | pathlib.PurePath) PurePosixPath

Overrides guess_dpdk_remote_dir().

get_remote_tmp_dir() PurePosixPath

Overrides get_remote_tmp_dir().

get_dpdk_build_env_vars(arch: Architecture) dict

Overrides get_dpdk_build_env_vars().

Supported architecture: i686.

join_remote_path(*args: str | pathlib.PurePath) PurePosixPath

Overrides join_remote_path().

remote_path_exists(remote_path: str | pathlib.PurePath) bool

Overrides remote_path_exists().

copy_from(source_file: str | pathlib.PurePath, destination_dir: str | pathlib.Path) None

Overrides copy_from().

copy_to(source_file: str | pathlib.Path, destination_dir: str | pathlib.PurePath) None

Overrides copy_to().

copy_dir_from(source_dir: str | pathlib.PurePath, destination_dir: str | pathlib.Path, compress_format: TarCompressionFormat = TarCompressionFormat.none, exclude: str | list[str] | None = None) None

Overrides copy_dir_from().

copy_dir_to(source_dir: str | pathlib.Path, destination_dir: str | pathlib.PurePath, compress_format: TarCompressionFormat = TarCompressionFormat.none, exclude: str | list[str] | None = None) None

Overrides copy_dir_to().

remove_remote_file(remote_file_path: str | pathlib.PurePath, force: bool = True) None

Overrides remove_remote_dir().

remove_remote_dir(remote_dir_path: str | pathlib.PurePath, recursive: bool = True, force: bool = True) None

Overrides remove_remote_dir().

create_remote_tarball(remote_dir_path: str | pathlib.PurePath, compress_format: TarCompressionFormat = TarCompressionFormat.none, exclude: str | list[str] | None = None) PurePosixPath

Overrides create_remote_tarball().

extract_remote_tarball(remote_tarball_path: str | pathlib.PurePath, expected_dir: str | pathlib.PurePath | None = None) None

Overrides extract_remote_tarball().

is_remote_dir(remote_path: PurePath) bool

Overrides is_remote_dir().

is_remote_tarfile(remote_tarball_path: PurePath) bool

Overrides is_remote_tarfile().

get_tarball_top_dir(remote_tarball_path: str | pathlib.PurePath) str | pathlib.PurePosixPath | None

Overrides get_tarball_top_dir().

build_dpdk(env_vars: dict, meson_args: MesonArgs, remote_dpdk_dir: str | pathlib.PurePath, remote_dpdk_build_dir: str | pathlib.PurePath, rebuild: bool = False, timeout: float = 1200) None

Overrides build_dpdk().

get_dpdk_version(build_dir: str | pathlib.PurePath) str

Overrides get_dpdk_version().

kill_cleanup_dpdk_apps(dpdk_prefix_list: Iterable[str]) None

Overrides kill_cleanup_dpdk_apps().

get_dpdk_file_prefix(dpdk_prefix: str) str

Overrides get_dpdk_file_prefix().

get_compiler_version(compiler_name: str) str

Overrides get_compiler_version().

get_node_info() OSSessionInfo

Overrides get_node_info().