misc#

Miscellaneous Tools

Functions

chdir(newdir)

Change current directory, used as a context manager, ie:

check_mandatory_keys(data_dict, mandatory_keys)

Check all mandatory argument in a dictionary.

find_by_key(data, target)

Find a value by key in a dictionary.

get_function_name()

Get the name of the function where this one is launched.

in_docker()

Check if the session is running inside a docker

list_to_dict(dict_list)

Return a dictionary from a list [key, value, key_2, value_2...]

nested_set(dic, keys, value)

Set value in nested directory:

remove_empty_values(list_with_empty_values)

Remove empty values from list:

run_cli(cmd[, timeout, check_return_value, ...])

Run a command line.

Classes

ListEnum(value)

List Enum (enum with function listing names and values)