opentf-toolkit-nightly 0.56.0.dev1000__py3-none-any.whl → 0.56.0.dev1007__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- opentf/commons/expressions.py +12 -17
- opentf/schemas/opentestfactory.org/v1/Workflow.json +156 -41
- {opentf_toolkit_nightly-0.56.0.dev1000.dist-info → opentf_toolkit_nightly-0.56.0.dev1007.dist-info}/METADATA +1 -1
- {opentf_toolkit_nightly-0.56.0.dev1000.dist-info → opentf_toolkit_nightly-0.56.0.dev1007.dist-info}/RECORD +7 -7
- {opentf_toolkit_nightly-0.56.0.dev1000.dist-info → opentf_toolkit_nightly-0.56.0.dev1007.dist-info}/LICENSE +0 -0
- {opentf_toolkit_nightly-0.56.0.dev1000.dist-info → opentf_toolkit_nightly-0.56.0.dev1007.dist-info}/WHEEL +0 -0
- {opentf_toolkit_nightly-0.56.0.dev1000.dist-info → opentf_toolkit_nightly-0.56.0.dev1007.dist-info}/top_level.txt +0 -0
opentf/commons/expressions.py
CHANGED
|
@@ -387,26 +387,14 @@ def evaluate_status_function(name: str, contexts) -> bool:
|
|
|
387
387
|
"""Evaluate job status function.
|
|
388
388
|
|
|
389
389
|
Annotates the contexts[SPECIAL_FUNCTIONS] entry with a `__called__`
|
|
390
|
-
sub-entry
|
|
391
|
-
usage.
|
|
390
|
+
sub-entry, so that caller can detect status function usage.
|
|
392
391
|
"""
|
|
393
|
-
|
|
392
|
+
funcs = contexts.get(SPECIAL_FUNCTIONS, {})
|
|
393
|
+
if name not in funcs:
|
|
394
394
|
raise ValueError(f'Unknown function {name}()')
|
|
395
395
|
# a status function has been used
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
if name == 'always':
|
|
399
|
-
return True
|
|
400
|
-
if external_functions := contexts.get(SPECIAL_FUNCTIONS):
|
|
401
|
-
if name in external_functions:
|
|
402
|
-
return external_functions[name]
|
|
403
|
-
raise ValueError(f'Unknown function {name}()')
|
|
404
|
-
if name == 'success':
|
|
405
|
-
return contexts['job']['status'] == 'success'
|
|
406
|
-
if name == 'failure':
|
|
407
|
-
return contexts['job']['status'] == 'failure'
|
|
408
|
-
if name == 'cancelled':
|
|
409
|
-
return contexts['job']['status'] == 'cancelled'
|
|
396
|
+
funcs['__called__'] = True
|
|
397
|
+
return funcs[name]
|
|
410
398
|
|
|
411
399
|
|
|
412
400
|
def _evaluate_identifier(
|
|
@@ -648,11 +636,18 @@ def evaluate_bool(expr: str, contexts, special_functions=None) -> bool:
|
|
|
648
636
|
|
|
649
637
|
`expr` may be surrounded by `${{` and `}}`.
|
|
650
638
|
|
|
639
|
+
`special_functions`, if provided, is a dictionary of function names
|
|
640
|
+
to bools.
|
|
641
|
+
|
|
651
642
|
# Required parameters
|
|
652
643
|
|
|
653
644
|
- expr: a string
|
|
654
645
|
- contexts: a dictionary
|
|
655
646
|
|
|
647
|
+
# Optional parameters
|
|
648
|
+
|
|
649
|
+
- special_functions: a dictionary or None (None by default)
|
|
650
|
+
|
|
656
651
|
# Returned value
|
|
657
652
|
|
|
658
653
|
A boolean.
|
|
@@ -64,8 +64,11 @@
|
|
|
64
64
|
"jobs": {
|
|
65
65
|
"$ref": "#/definitions/jobs"
|
|
66
66
|
},
|
|
67
|
+
"inputs": {
|
|
68
|
+
"$ref": "#/definitions/inputs"
|
|
69
|
+
},
|
|
67
70
|
"outputs": {
|
|
68
|
-
"
|
|
71
|
+
"$ref": "#/definitions/outputs"
|
|
69
72
|
}
|
|
70
73
|
},
|
|
71
74
|
"required": [
|
|
@@ -80,7 +83,7 @@
|
|
|
80
83
|
"pattern": "^[a-zA-Z][a-zA-Z0-9-]*$"
|
|
81
84
|
}
|
|
82
85
|
},
|
|
83
|
-
"
|
|
86
|
+
"job-generator": {
|
|
84
87
|
"type": "object",
|
|
85
88
|
"properties": {
|
|
86
89
|
"name": {
|
|
@@ -89,29 +92,26 @@
|
|
|
89
92
|
"if": {
|
|
90
93
|
"type": "string"
|
|
91
94
|
},
|
|
95
|
+
"runs-on": {
|
|
96
|
+
"$ref": "#/definitions/runs-on"
|
|
97
|
+
},
|
|
92
98
|
"needs": {
|
|
93
99
|
"$ref": "#/definitions/needs"
|
|
94
100
|
},
|
|
95
|
-
"variables": {
|
|
96
|
-
"$ref": "#/definitions/variables"
|
|
97
|
-
},
|
|
98
101
|
"defaults": {
|
|
99
102
|
"$ref": "#/definitions/defaults"
|
|
100
103
|
},
|
|
101
|
-
"
|
|
102
|
-
"$ref": "#/definitions/
|
|
103
|
-
},
|
|
104
|
-
"strategy": {
|
|
105
|
-
"$ref": "#/definitions/strategy"
|
|
106
|
-
},
|
|
107
|
-
"outputs": {
|
|
108
|
-
"type": "object"
|
|
104
|
+
"variables": {
|
|
105
|
+
"$ref": "#/definitions/variables"
|
|
109
106
|
},
|
|
110
107
|
"timeout-minutes": {
|
|
111
108
|
"$ref": "#/definitions/number-expression"
|
|
112
109
|
},
|
|
113
|
-
"
|
|
114
|
-
"$ref": "#/definitions/
|
|
110
|
+
"strategy": {
|
|
111
|
+
"$ref": "#/definitions/strategy"
|
|
112
|
+
},
|
|
113
|
+
"jobs": {
|
|
114
|
+
"$ref": "#/definitions/jobs"
|
|
115
115
|
},
|
|
116
116
|
"generator": {
|
|
117
117
|
"type": "string"
|
|
@@ -120,7 +120,13 @@
|
|
|
120
120
|
"type": "string"
|
|
121
121
|
},
|
|
122
122
|
"with": {
|
|
123
|
-
"
|
|
123
|
+
"$ref": "#/definitions/with"
|
|
124
|
+
},
|
|
125
|
+
"outputs": {
|
|
126
|
+
"$ref": "#/definitions/outputs"
|
|
127
|
+
},
|
|
128
|
+
"continue-on-error": {
|
|
129
|
+
"$ref": "#/definitions/boolean-expression"
|
|
124
130
|
}
|
|
125
131
|
},
|
|
126
132
|
"oneOf": [
|
|
@@ -133,11 +139,16 @@
|
|
|
133
139
|
"required": [
|
|
134
140
|
"uses"
|
|
135
141
|
]
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"required": [
|
|
145
|
+
"jobs"
|
|
146
|
+
]
|
|
136
147
|
}
|
|
137
148
|
],
|
|
138
149
|
"additionalProperties": false
|
|
139
150
|
},
|
|
140
|
-
"
|
|
151
|
+
"job-steps": {
|
|
141
152
|
"type": "object",
|
|
142
153
|
"properties": {
|
|
143
154
|
"name": {
|
|
@@ -146,29 +157,23 @@
|
|
|
146
157
|
"if": {
|
|
147
158
|
"type": "string"
|
|
148
159
|
},
|
|
160
|
+
"runs-on": {
|
|
161
|
+
"$ref": "#/definitions/runs-on"
|
|
162
|
+
},
|
|
149
163
|
"needs": {
|
|
150
164
|
"$ref": "#/definitions/needs"
|
|
151
165
|
},
|
|
152
|
-
"variables": {
|
|
153
|
-
"$ref": "#/definitions/variables"
|
|
154
|
-
},
|
|
155
166
|
"defaults": {
|
|
156
167
|
"$ref": "#/definitions/defaults"
|
|
157
168
|
},
|
|
158
|
-
"
|
|
159
|
-
"$ref": "#/definitions/
|
|
160
|
-
},
|
|
161
|
-
"strategy": {
|
|
162
|
-
"$ref": "#/definitions/strategy"
|
|
163
|
-
},
|
|
164
|
-
"outputs": {
|
|
165
|
-
"type": "object"
|
|
169
|
+
"variables": {
|
|
170
|
+
"$ref": "#/definitions/variables"
|
|
166
171
|
},
|
|
167
172
|
"timeout-minutes": {
|
|
168
173
|
"$ref": "#/definitions/number-expression"
|
|
169
174
|
},
|
|
170
|
-
"
|
|
171
|
-
"$ref": "#/definitions/
|
|
175
|
+
"strategy": {
|
|
176
|
+
"$ref": "#/definitions/strategy"
|
|
172
177
|
},
|
|
173
178
|
"steps": {
|
|
174
179
|
"type": "array",
|
|
@@ -191,7 +196,7 @@
|
|
|
191
196
|
"type": "string"
|
|
192
197
|
},
|
|
193
198
|
"with": {
|
|
194
|
-
"
|
|
199
|
+
"$ref": "#/definitions/with"
|
|
195
200
|
},
|
|
196
201
|
"variables": {
|
|
197
202
|
"$ref": "#/definitions/variables"
|
|
@@ -249,6 +254,12 @@
|
|
|
249
254
|
}
|
|
250
255
|
]
|
|
251
256
|
}
|
|
257
|
+
},
|
|
258
|
+
"outputs": {
|
|
259
|
+
"$ref": "#/definitions/outputs"
|
|
260
|
+
},
|
|
261
|
+
"continue-on-error": {
|
|
262
|
+
"$ref": "#/definitions/boolean-expression"
|
|
252
263
|
}
|
|
253
264
|
},
|
|
254
265
|
"required": [
|
|
@@ -264,6 +275,7 @@
|
|
|
264
275
|
},
|
|
265
276
|
{
|
|
266
277
|
"type": "array",
|
|
278
|
+
"minItems": 1,
|
|
267
279
|
"items": {
|
|
268
280
|
"type": "string",
|
|
269
281
|
"pattern": "(^[a-zA-Z_][a-zA-Z0-9_-]*$)|(^\\$\\{\\{.*\\}\\}$)"
|
|
@@ -293,19 +305,21 @@
|
|
|
293
305
|
}
|
|
294
306
|
]
|
|
295
307
|
},
|
|
308
|
+
"identifier-expression": {
|
|
309
|
+
"type": "string",
|
|
310
|
+
"pattern": "(^[a-zA-Z][a-zA-Z0-9-]*$)|(^\\$\\{\\{.*\\}\\}$)"
|
|
311
|
+
},
|
|
296
312
|
"runs-on": {
|
|
297
313
|
"anyOf": [
|
|
298
314
|
{
|
|
299
|
-
"
|
|
300
|
-
"pattern": "(^[a-zA-Z][a-zA-Z0-9-]*$)|(^\\$\\{\\{.*\\}\\}$)"
|
|
315
|
+
"$ref": "#/definitions/identifier-expression"
|
|
301
316
|
},
|
|
302
317
|
{
|
|
303
318
|
"type": "array",
|
|
319
|
+
"minItems": 1,
|
|
304
320
|
"items": {
|
|
305
|
-
"
|
|
306
|
-
|
|
307
|
-
},
|
|
308
|
-
"minItems": 1
|
|
321
|
+
"$ref": "#/definitions/identifier-expression"
|
|
322
|
+
}
|
|
309
323
|
},
|
|
310
324
|
{
|
|
311
325
|
"type": "object"
|
|
@@ -359,7 +373,57 @@
|
|
|
359
373
|
"$ref": "#/definitions/boolean-expression"
|
|
360
374
|
},
|
|
361
375
|
"matrix": {
|
|
362
|
-
"type": "object"
|
|
376
|
+
"type": "object",
|
|
377
|
+
"properties": {
|
|
378
|
+
"exclude": {
|
|
379
|
+
"type": "array",
|
|
380
|
+
"minItems": 1,
|
|
381
|
+
"items": {
|
|
382
|
+
"type": "object",
|
|
383
|
+
"patternProperties": {
|
|
384
|
+
"^[a-zA-Z][a-zA-Z0-9-]*$": {
|
|
385
|
+
"type": "string"
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
},
|
|
390
|
+
"include": {
|
|
391
|
+
"type": "array",
|
|
392
|
+
"minItems": 1,
|
|
393
|
+
"items": {
|
|
394
|
+
"type": "object",
|
|
395
|
+
"patternProperties": {
|
|
396
|
+
"^[a-zA-Z][a-zA-Z0-9-]*$": {
|
|
397
|
+
"type": "string"
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
},
|
|
403
|
+
"patternProperties": {
|
|
404
|
+
"^[a-zA-Z][a-zA-Z0-9-]*$": {
|
|
405
|
+
"type": "array",
|
|
406
|
+
"minItems": 1,
|
|
407
|
+
"items": {
|
|
408
|
+
"oneOf": [
|
|
409
|
+
{
|
|
410
|
+
"type": "string"
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
"type": "number"
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
"type": "object",
|
|
417
|
+
"patternProperties": {
|
|
418
|
+
"^[a-zA-Z][a-zA-Z0-9-]*$": {
|
|
419
|
+
"type": "string"
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
]
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
}
|
|
363
427
|
}
|
|
364
428
|
},
|
|
365
429
|
"minProperties": 1,
|
|
@@ -423,16 +487,67 @@
|
|
|
423
487
|
"^[a-zA-Z_][a-zA-Z0-9_-]*$": {
|
|
424
488
|
"oneOf": [
|
|
425
489
|
{
|
|
426
|
-
"$ref": "#/definitions/
|
|
490
|
+
"$ref": "#/definitions/job-generator"
|
|
427
491
|
},
|
|
428
492
|
{
|
|
429
|
-
"$ref": "#/definitions/
|
|
493
|
+
"$ref": "#/definitions/job-steps"
|
|
430
494
|
}
|
|
431
495
|
]
|
|
432
496
|
}
|
|
433
497
|
},
|
|
434
498
|
"minProperties": 1
|
|
435
499
|
},
|
|
500
|
+
"with": {
|
|
501
|
+
"type": "object"
|
|
502
|
+
},
|
|
503
|
+
"inputs": {
|
|
504
|
+
"type": "object",
|
|
505
|
+
"patternProperties": {
|
|
506
|
+
"^[a-zA-Z_][a-zA-Z0-9_-]*$": {
|
|
507
|
+
"type": "object",
|
|
508
|
+
"properties": {
|
|
509
|
+
"description": {
|
|
510
|
+
"type": "string"
|
|
511
|
+
},
|
|
512
|
+
"required": {
|
|
513
|
+
"type": "boolean"
|
|
514
|
+
},
|
|
515
|
+
"default": {
|
|
516
|
+
"type": "string"
|
|
517
|
+
},
|
|
518
|
+
"depreciationMessage": {
|
|
519
|
+
"type": "string"
|
|
520
|
+
}
|
|
521
|
+
},
|
|
522
|
+
"required": [
|
|
523
|
+
"description"
|
|
524
|
+
],
|
|
525
|
+
"additionalProperties": false
|
|
526
|
+
}
|
|
527
|
+
},
|
|
528
|
+
"minProperties": 1
|
|
529
|
+
},
|
|
530
|
+
"outputs": {
|
|
531
|
+
"type": "object",
|
|
532
|
+
"patternProperties": {
|
|
533
|
+
"^[a-zA-Z_][a-zA-Z0-9_-]*$": {
|
|
534
|
+
"type": "object",
|
|
535
|
+
"properties": {
|
|
536
|
+
"description": {
|
|
537
|
+
"type": "string"
|
|
538
|
+
},
|
|
539
|
+
"value": {
|
|
540
|
+
"type": "string"
|
|
541
|
+
}
|
|
542
|
+
},
|
|
543
|
+
"required": [
|
|
544
|
+
"value"
|
|
545
|
+
],
|
|
546
|
+
"additionalProperties": false
|
|
547
|
+
}
|
|
548
|
+
},
|
|
549
|
+
"minProperties": 1
|
|
550
|
+
},
|
|
436
551
|
"resources": {
|
|
437
552
|
"type": "object",
|
|
438
553
|
"properties": {
|
|
@@ -513,4 +628,4 @@
|
|
|
513
628
|
}
|
|
514
629
|
}
|
|
515
630
|
}
|
|
516
|
-
}
|
|
631
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: opentf-toolkit-nightly
|
|
3
|
-
Version: 0.56.0.
|
|
3
|
+
Version: 0.56.0.dev1007
|
|
4
4
|
Summary: OpenTestFactory Orchestrator Toolkit
|
|
5
5
|
Home-page: https://gitlab.com/henixdevelopment/open-source/opentestfactory/python-toolkit
|
|
6
6
|
Author: Martin Lafaix
|
|
@@ -2,13 +2,13 @@ opentf/commons/__init__.py,sha256=KRY8ShQw_0ZZ0oEOiKi4-xnWofE_QsFjEe1T8wUxJ-w,21
|
|
|
2
2
|
opentf/commons/auth.py,sha256=bM2Z3kxm2Wku1lKXaRAIg37LHvXWAXIZIqjplDfN2P8,15899
|
|
3
3
|
opentf/commons/config.py,sha256=GmvInVnUsXIwlNfgTQeQ_pPs97GeGTGn2S2QZEFwss8,7828
|
|
4
4
|
opentf/commons/datasources.py,sha256=4ye-TMtaE88O8GVcWx-FtKXOC8aIZLteR6wfIr7Do8U,25232
|
|
5
|
-
opentf/commons/expressions.py,sha256=
|
|
5
|
+
opentf/commons/expressions.py,sha256=jM_YKXVOFhvOE2aE2IuacuvxhIsOYTFs2oQkpcbWR6g,19645
|
|
6
6
|
opentf/commons/pubsub.py,sha256=7khxAHVZiwJRcwIBJ6MPR-f3xY9144-2eNLROwq5F-4,5894
|
|
7
7
|
opentf/commons/schemas.py,sha256=YSCvlmqc7satt-OqIoYXnmhOyo9h8wIpNyKaBAY4u9c,4039
|
|
8
8
|
opentf/commons/selectors.py,sha256=DEpLgRAr5HXSpSYI4liXP2hLUTvOSexFa9Vfa1xIQTk,7134
|
|
9
9
|
opentf/schemas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
10
|
opentf/schemas/abac.opentestfactory.org/v1alpha1/Policy.json,sha256=JXsfNAPSEYggeyaDutSQBeG38o4Bmcr70dPLWWeqIh8,2105
|
|
11
|
-
opentf/schemas/opentestfactory.org/v1/Workflow.json,sha256=
|
|
11
|
+
opentf/schemas/opentestfactory.org/v1/Workflow.json,sha256=FEPqeeUeBfPPyaDAceqhj3XP8j8VVqHAvKHvp3KAl3I,21459
|
|
12
12
|
opentf/schemas/opentestfactory.org/v1alpha1/AgentRegistration.json,sha256=NQykqU-lKE8LtBhBiFUcpVJq00MRG6dZsoM1xedx6uQ,1230
|
|
13
13
|
opentf/schemas/opentestfactory.org/v1alpha1/AllureCollectorOutput.json,sha256=-L9DDWA0A4x54bPMn4m6Qwi2tf2nHvzIPFOElTjaVck,1366
|
|
14
14
|
opentf/schemas/opentestfactory.org/v1alpha1/ChannelHandlerHooks.json,sha256=6K6m9praw_f2biCMHfTsHPYia5z2jq10dciRLqf3ogI,1239
|
|
@@ -49,8 +49,8 @@ opentf/scripts/startup.py,sha256=Da2zo93pBWbdRmj-wgekgLcF94rpNc3ZkbvR8R0w8XY,212
|
|
|
49
49
|
opentf/toolkit/__init__.py,sha256=icNo_jz2IfhwddunQpfq6F-0xeKS70S-0Or5zJliEZs,21692
|
|
50
50
|
opentf/toolkit/channels.py,sha256=6xcVKHUK2FdyVKIQmPQbakngfVuQDzCcD_lInOdKpro,17171
|
|
51
51
|
opentf/toolkit/core.py,sha256=MvvWUrS4dvo3Qrd_Yl9uND3CllL0qtMi-y1S-Na1uQs,9621
|
|
52
|
-
opentf_toolkit_nightly-0.56.0.
|
|
53
|
-
opentf_toolkit_nightly-0.56.0.
|
|
54
|
-
opentf_toolkit_nightly-0.56.0.
|
|
55
|
-
opentf_toolkit_nightly-0.56.0.
|
|
56
|
-
opentf_toolkit_nightly-0.56.0.
|
|
52
|
+
opentf_toolkit_nightly-0.56.0.dev1007.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
53
|
+
opentf_toolkit_nightly-0.56.0.dev1007.dist-info/METADATA,sha256=pLFIB6HPFkbNt6Vt10A2E5yzYss5Wl0TPva-l83VBcg,1946
|
|
54
|
+
opentf_toolkit_nightly-0.56.0.dev1007.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
55
|
+
opentf_toolkit_nightly-0.56.0.dev1007.dist-info/top_level.txt,sha256=_gPuE6GTT6UNXy1DjtmQSfCcZb_qYA2vWmjg7a30AGk,7
|
|
56
|
+
opentf_toolkit_nightly-0.56.0.dev1007.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|