Debian Codegraph @

test/lib/ansible_test/_internal/constants.py

raw
1 """Constants used by ansible-test. Imports should not be used in this file (other than to import the target common constants)."""
2
3 from __future__ import annotations
4
5 from .._util.target.common.constants import (
6 CONTROLLER_PYTHON_VERSIONS,
7 REMOTE_ONLY_PYTHON_VERSIONS,
8 )
9
10 STATUS_HOST_CONNECTION_ERROR = 4
11
12 # Setting a low soft RLIMIT_NOFILE value will improve the performance of subprocess.Popen on Python 2.x when close_fds=True.
13 # This will affect all Python subprocesses. It will also affect the current Python process if set before subprocess is imported for the first time.
14 SOFT_RLIMIT_NOFILE = 1024
15
16 # File used to track the ansible-test test execution timeout.
17 TIMEOUT_PATH = '.ansible-test-timeout.json'
18 TIMEOUT_MARGIN_SECONDS = 10
19
20 CONTROLLER_MIN_PYTHON_VERSION = CONTROLLER_PYTHON_VERSIONS[0]
21 SUPPORTED_PYTHON_VERSIONS = REMOTE_ONLY_PYTHON_VERSIONS + CONTROLLER_PYTHON_VERSIONS
22
23 SUPPORTED_POWERSHELL_VERSIONS = [
24 '7.6.0',
25 ]
26 """
27 PowerShell versions supported by ansible-test.
28 Full versions must be specified since they are used to install specific releases.
29 Only one entry for each {major}.{minor} version is supported.
30 """
31
32 REMOTE_PROVIDERS = [
33 'default',
34 'aws',
35 'azure',
36 'mac',
37 ]
38
39 SECCOMP_CHOICES = [
40 'default',
41 'unconfined',
42 ]
43
44 # This bin symlink map must exactly match the contents of the bin directory.
45 # It is necessary for payload creation to reconstruct the bin directory when running ansible-test from an installed version of ansible.
46 # It is also used to construct the injector directory at runtime.
47 # It is also used to construct entry points when not running ansible-test from source.
48 ANSIBLE_BIN_SYMLINK_MAP = {
49 'ansible': '../lib/ansible/cli/adhoc.py',
50 'ansible-config': '../lib/ansible/cli/config.py',
51 'ansible-console': '../lib/ansible/cli/console.py',
52 'ansible-doc': '../lib/ansible/cli/doc.py',
53 'ansible-galaxy': '../lib/ansible/cli/galaxy.py',
54 'ansible-inventory': '../lib/ansible/cli/inventory.py',
55 'ansible-playbook': '../lib/ansible/cli/playbook.py',
56 'ansible-pull': '../lib/ansible/cli/pull.py',
57 'ansible-test': '../test/lib/ansible_test/_util/target/cli/ansible_test_cli_stub.py',
58 'ansible-vault': '../lib/ansible/cli/vault.py',
59 }