-
-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathconstants.py
More file actions
71 lines (63 loc) · 1.48 KB
/
constants.py
File metadata and controls
71 lines (63 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
from enum import IntEnum
__all__ = [
'API_VERSION',
'ARCHITECTURES',
'ALLOWED_CHANNELS',
'COMMAND_TIMEOUT_EXIT_CODE',
'COSTS',
'DRIVERS',
'DEFAULT_FILE_CHUNK_SIZE',
'DEBIAN_FLAVORS',
'RHEL_FLAVORS',
'SUPPORTED_ARCHITECTURES',
'SUPPORTED_DISTRIBUTIONS',
'DEFAULT_REQUEST_TIMEOUT',
'DEFAULT_UPLOADER_CONCURRENCY',
'DEFAULT_SSH_AUTH_METHODS',
'X32_ARCHITECTURES',
'X64_ARCHITECTURES',
]
# YYYYMMDD format for API version
API_VERSION = '20210512'
COSTS = [str(i) for i in range(5)]
ARCHITECTURES = ('x86_64', 'aarch64', 'ppc64le', 's390x')
DRIVERS = ('docker', 'opennebula')
X32_ARCHITECTURES = [
'i386',
'i486',
'i586',
'i686',
]
X64_ARCHITECTURES = [
'x86_64',
'amd64',
'arm64',
'aarch64',
'ppc64le',
]
SUPPORTED_ARCHITECTURES = X32_ARCHITECTURES + X64_ARCHITECTURES + ['s390x']
SUPPORTED_DISTRIBUTIONS = ['almalinux', 'centos', 'ubuntu', 'debian']
RHEL_FLAVORS = [
'rhel',
'fedora',
'centos',
'almalinux',
]
DEBIAN_FLAVORS = ['debian', 'ubuntu', 'raspbian']
ALLOWED_CHANNELS = ['stable', 'beta']
DEFAULT_FILE_CHUNK_SIZE = 8388608 # 8 megabytes in bytes
DEFAULT_REQUEST_TIMEOUT = 60 # 1 minute
DEFAULT_UPLOADER_CONCURRENCY = 4
# Exit code the same as HTTP request
COMMAND_TIMEOUT_EXIT_CODE = 408
DEFAULT_SSH_AUTH_METHODS = [
'gssapi-keyex',
'gssapi-with-mic',
'hostbased',
'publickey',
]
class TapStatusEnum(IntEnum):
FAILED = 0
DONE = 1
TODO = 2
SKIPPED = 3