-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathconstants.py
More file actions
189 lines (174 loc) · 5.26 KB
/
Copy pathconstants.py
File metadata and controls
189 lines (174 loc) · 5.26 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
# Define the keywords for sorting.
# numeric fields are without .keyword
DIRECTIONS = ("asc", "desc")
FIELDS = (
"ciSystem.keyword",
"benchmark.keyword",
"ocpVersion.keyword",
"releaseStream.keyword",
"platform.keyword",
"networkType.keyword",
"ipsec.keyword",
"fips.keyword",
"encrypted.keyword",
"publish.keyword",
"computeArch.keyword",
"controlPlaneArch.keyword",
"jobStatus.keyword",
"startDate",
"endDate",
"workerNodesCount",
"masterNodesCount",
"infraNodesCount",
"totalNodesCount",
"nodeName",
"cpu",
"benchmark",
"ocpVersion",
"jobStatus",
"formal",
"ciSystem",
)
AGG_BUCKET_SIZE = 1000
MAX_PAGE = 10000
OCP_SHORT_VER_LEN = 6
OCP_FIELD_CONSTANT_DICT = {
"ciSystem": "ciSystem.keyword",
"platform": "platform.keyword",
"benchmark": "benchmark.keyword",
"releaseStream": "releaseStream.keyword",
"networkType": "networkType.keyword",
"workerNodesCount": "workerNodesCount",
"jobStatus": "jobStatus.keyword",
"controlPlaneArch": "controlPlaneArch.keyword",
"publish": "publish.keyword",
"fips": "fips.keyword",
"encrypted": "encrypted.keyword",
"ipsec": "ipsec.keyword",
"ocpVersion": "ocpVersion.keyword",
"build": "ocpVersion.keyword",
"upstream": "upstreamJob.keyword",
"clusterType": "clusterType.keyword",
}
OLS_FIELD_CONSTANT_DICT = {
"benchmark": "benchmark.keyword",
"releaseStream": "releaseStream.keyword",
"platform": "platform.keyword",
"workerNodesCount": "workerNodesCount",
"olsTestWorkers": "olsTestWorkers",
"olsTestDuration": "olsTestDuration.keyword",
"jobStatus": "jobStatus.keyword",
}
QUAY_FIELD_CONSTANT_DICT = {
"benchmark": "benchmark.keyword",
"platform": "platform.keyword",
"releaseStream": "releaseStream.keyword",
"workerNodesCount": "workerNodesCount",
"jobStatus": "jobStatus.keyword",
"build": "ocpVersion.keyword",
"upstream": "upstreamJob.keyword",
"clusterType": "clusterType.keyword",
"ciSystem": "ciSystem.keyword",
"imagePushPulls": "imagePushPulls",
"concurrency": "concurrency",
"hitSize": "hitSize",
}
RELEASE_STREAM_DICT = {
"fast": "Fast",
"stable": "Stable",
"eus": "EUS",
"candidate": "Release Candidate",
"rc": "Release Candidate",
"nightly": "Nightly",
"ci": "ci",
"ec": "Engineering Candidate",
}
TELCO_FIELDS_DICT = {
"cpu": "CPU",
"benchmark": "Benchmark",
"releaseStream": "Release Stream",
"nodeName": "Node Name",
"startDate": "Start Date",
"endDate": "End Date",
"jobStatus": "Status",
"ocpVersion": "Build",
"isFormal": "Formal",
}
FILEDS_DISPLAY_NAMES = {
"ciSystem": "CI System",
"platform": "Platform",
"benchmark": "Benchmark",
"releaseStream": "Release Stream",
"networkType": "Network Type",
"workerNodesCount": "Worker Count",
"jobStatus": "Status",
"controlPlaneArch": "Control Plane Architecture",
"publish": "Control Plane Access",
"fips": "FIPS Enabled",
"encrypted": "Is Encrypted",
"ipsec": "Has IPSEC",
"ocpVersion": "Versions",
"build": "Build",
"computeArch": "Compute Architecture",
"jobStatus": "Status",
"startDate": "Start Date",
"endDate": "End Date",
"result": "Status",
"product": "Product",
"testName": "Test Name",
"attack": "Test Name",
"concurrency": "Concurrency",
"imagePushPulls": "Image Push/Pulls",
"olsTestWorkers": "Parallel Users",
"olsTestDuration": "Load Duration",
"hitSize": "Hit Size",
"isFormal": "Is Formal",
}
FIELDS_FILTER_DICT = {
"nodeName": "node_name",
"cpu": "cpu",
"benchmark": "test_type",
"ocpVersion": "ocp_version",
"releaseStream": "ocp_build",
"jobStatus": "status",
"endDate": "_indextime",
"startDate": "_indextime",
"formal": "isFormal",
}
HCE_FIELD_CONSTANT_DICT = {
"testName": "test.keyword",
"product": "group.keyword",
"result": "result.keyword",
}
OCM_FIELD_CONSTANT_DICT = {
"jobStatus": "jobStatus.keyword",
"testName": "attack.keyword",
"ciSystem": "ciSystem.keyword",
}
OSO_FIELD_CONSTANT_DICT = {
"ciSystem": "ciSystem.keyword",
"networkType": "networkType.keyword",
"jobStatus": "jobStatus.keyword",
"ocpVersion": "ocpVersion.keyword",
"build": "ocpVersion.keyword",
}
JOB_STATUS_MAP = {
"pass": "success",
"fail": "failure",
"success": "success",
"failure": "failure",
"error": "failure",
"passed": "success",
"failed": "failure",
}
keys_to_keep = ["product", "testName", "jobStatus", "ciSystem", "releaseStream"]
SPLUNK_SEMAPHORE_COUNT = 5 # Arbitrary concurrency limit in an asyncio semaphore
# These products don't need to be included in the filter dict when applying
# filters on the Home tab, as the filtering function will automatically handle
# them using the corresponding product-to-mapper lookup.
STANDOUT_PRODUCTS = ["ocp", "telco", "quay"]
# These products aren't listed by their exact names like "hce" and "ocm",
# but instead represent grouped categories such as "Developer" or "Insights".
GENERAL_PRODUCTS = ["hce", "ocm"]
TELCO_STATUS_MAP = {"success": "passed", "failed": "failed", "failure": "failure"}
REVERSE_RELEASE_STREAM_MAP = {v.lower(): kf for kf, v in RELEASE_STREAM_DICT.items()}