opentf-toolkit-nightly 0.62.0.dev1311__py3-none-any.whl → 0.62.0.dev1317__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/__init__.py +10 -2
- opentf/commons/selectors.py +2 -1
- opentf/schemas/opentestfactory.org/v1/Workflow.json +38 -0
- {opentf_toolkit_nightly-0.62.0.dev1311.dist-info → opentf_toolkit_nightly-0.62.0.dev1317.dist-info}/METADATA +1 -1
- {opentf_toolkit_nightly-0.62.0.dev1311.dist-info → opentf_toolkit_nightly-0.62.0.dev1317.dist-info}/RECORD +8 -8
- {opentf_toolkit_nightly-0.62.0.dev1311.dist-info → opentf_toolkit_nightly-0.62.0.dev1317.dist-info}/LICENSE +0 -0
- {opentf_toolkit_nightly-0.62.0.dev1311.dist-info → opentf_toolkit_nightly-0.62.0.dev1317.dist-info}/WHEEL +0 -0
- {opentf_toolkit_nightly-0.62.0.dev1311.dist-info → opentf_toolkit_nightly-0.62.0.dev1317.dist-info}/top_level.txt +0 -0
opentf/commons/__init__.py
CHANGED
|
@@ -839,6 +839,8 @@ def validate_inputs(
|
|
|
839
839
|
|
|
840
840
|
Non-normalized inputs are removed from the dictionary.
|
|
841
841
|
|
|
842
|
+
Choices values are validated. Types are not checked.
|
|
843
|
+
|
|
842
844
|
# Required parameters
|
|
843
845
|
|
|
844
846
|
- declaration: a dictionary
|
|
@@ -866,13 +868,19 @@ def validate_inputs(
|
|
|
866
868
|
if definition.get('required', False):
|
|
867
869
|
raise ValueError(f'Mandatory input "{key}" not provided.')
|
|
868
870
|
_set_default(inputs, key, definition)
|
|
871
|
+
if definition.get('type') == 'choice':
|
|
872
|
+
if inputs.get(key) not in definition['options']:
|
|
873
|
+
allowed = '", "'.join(sorted(definition['options']))
|
|
874
|
+
raise ValueError(
|
|
875
|
+
f'Invalid value "{inputs.get(key)}" for input "{key}". Allowed values: "{allowed}".'
|
|
876
|
+
)
|
|
869
877
|
|
|
870
878
|
if additional_inputs:
|
|
871
879
|
return
|
|
872
880
|
|
|
873
881
|
for key in inputs:
|
|
874
882
|
if key not in declaration and key.replace('_', '-') not in declaration:
|
|
875
|
-
allowed = ', '.join(sorted(
|
|
883
|
+
allowed = '", "'.join(sorted(declaration))
|
|
876
884
|
raise ValueError(
|
|
877
|
-
f'Unexpected input "{key}" found. Allowed inputs: {allowed}.'
|
|
885
|
+
f'Unexpected input "{key}" found. Allowed inputs: "{allowed}".'
|
|
878
886
|
)
|
opentf/commons/selectors.py
CHANGED
|
@@ -172,7 +172,8 @@ def match_selectors(
|
|
|
172
172
|
|
|
173
173
|
where `expr` is one of `key`, `!key`, or `key op value`, with
|
|
174
174
|
`op` being one of `=`, `==`, or `!=`. The
|
|
175
|
-
`key in (value[, value...])
|
|
175
|
+
`key in (value[, value...])`, `key notin (value[, value...])`,
|
|
176
|
+
`(value[, value...]) in key` and `(value[, value...]) notin key`
|
|
176
177
|
set-based requirements are also implemented.
|
|
177
178
|
|
|
178
179
|
# Required parameters
|
|
@@ -554,6 +554,21 @@
|
|
|
554
554
|
"default": {
|
|
555
555
|
"type": "string"
|
|
556
556
|
},
|
|
557
|
+
"type": {
|
|
558
|
+
"enum": [
|
|
559
|
+
"string",
|
|
560
|
+
"number",
|
|
561
|
+
"boolean",
|
|
562
|
+
"choice"
|
|
563
|
+
]
|
|
564
|
+
},
|
|
565
|
+
"options": {
|
|
566
|
+
"type": "array",
|
|
567
|
+
"items": {
|
|
568
|
+
"type": "string"
|
|
569
|
+
},
|
|
570
|
+
"minItems": 1
|
|
571
|
+
},
|
|
557
572
|
"depreciationMessage": {
|
|
558
573
|
"type": "string"
|
|
559
574
|
}
|
|
@@ -561,6 +576,29 @@
|
|
|
561
576
|
"required": [
|
|
562
577
|
"description"
|
|
563
578
|
],
|
|
579
|
+
"if": {
|
|
580
|
+
"properties": {
|
|
581
|
+
"type": {
|
|
582
|
+
"const": "choice"
|
|
583
|
+
}
|
|
584
|
+
},
|
|
585
|
+
"required": [
|
|
586
|
+
"type"
|
|
587
|
+
]
|
|
588
|
+
|
|
589
|
+
},
|
|
590
|
+
"then": {
|
|
591
|
+
"required": [
|
|
592
|
+
"options"
|
|
593
|
+
]
|
|
594
|
+
},
|
|
595
|
+
"else": {
|
|
596
|
+
"not": {
|
|
597
|
+
"required": [
|
|
598
|
+
"options"
|
|
599
|
+
]
|
|
600
|
+
}
|
|
601
|
+
},
|
|
564
602
|
"additionalProperties": false
|
|
565
603
|
}
|
|
566
604
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: opentf-toolkit-nightly
|
|
3
|
-
Version: 0.62.0.
|
|
3
|
+
Version: 0.62.0.dev1317
|
|
4
4
|
Summary: OpenTestFactory Orchestrator Toolkit
|
|
5
5
|
Home-page: https://gitlab.com/henixdevelopment/open-source/opentestfactory/python-toolkit
|
|
6
6
|
Author: Martin Lafaix
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
opentf/commons/__init__.py,sha256=
|
|
1
|
+
opentf/commons/__init__.py,sha256=965jZDUnSWT8h6Bw283JgNp5mkxzEM0KMkoIwijWXAw,27083
|
|
2
2
|
opentf/commons/auth.py,sha256=gXRp_0Tf3bfd65F4QiQmh6C6vR9y3ugag_0DSvozJFk,15898
|
|
3
3
|
opentf/commons/config.py,sha256=RVSSdQhMle4oCo_z_AR2EQ4U6sUjSxw-qVBtjKuJVfo,10219
|
|
4
4
|
opentf/commons/exceptions.py,sha256=7dhUXO8iyAbqVwlUKxZhgRzGqVcb7LkG39hFlm-VxIA,2407
|
|
5
5
|
opentf/commons/expressions.py,sha256=jM_YKXVOFhvOE2aE2IuacuvxhIsOYTFs2oQkpcbWR6g,19645
|
|
6
6
|
opentf/commons/pubsub.py,sha256=M0bvajR9raUP-xe5mfRjdrweZyHQw1_Qsy56gS-Sck4,7676
|
|
7
7
|
opentf/commons/schemas.py,sha256=u1TdoGFNWoslWV7foBqXPgkGTQtRZWtXTr_PEd_TsFY,5189
|
|
8
|
-
opentf/commons/selectors.py,sha256=
|
|
8
|
+
opentf/commons/selectors.py,sha256=2mmnvfZ13KizBQLsIvHXPU0Qtf6hkIvJpYdejNRszUs,7203
|
|
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
11
|
opentf/schemas/opentestfactory.org/v1/ExecutionCommand.json,sha256=UtmAlTaYdPSZDeQnx-ocX8IonyEPWoNmgDkHwQwQxWE,4126
|
|
@@ -14,7 +14,7 @@ opentf/schemas/opentestfactory.org/v1/GeneratorResult.json,sha256=sOwieyDWi6UZR7
|
|
|
14
14
|
opentf/schemas/opentestfactory.org/v1/ProviderCommand.json,sha256=EU4kvEKxlqpH2IkLZ1HdBealuG6C0YzPkAtI7dNrfHg,4427
|
|
15
15
|
opentf/schemas/opentestfactory.org/v1/ProviderResult.json,sha256=Ej4zhCE3rCqCGKcaeAoIHwSJTV_7fw-rAxhJ52qA-Gs,9641
|
|
16
16
|
opentf/schemas/opentestfactory.org/v1/Subscription.json,sha256=hNaCUW3qSqqa1LY01Ao7kQ8FJhkjkwMrrPf4xihgSt4,7150
|
|
17
|
-
opentf/schemas/opentestfactory.org/v1/Workflow.json,sha256=
|
|
17
|
+
opentf/schemas/opentestfactory.org/v1/Workflow.json,sha256=17EE3VgrjSe_nOufJ2UZbgWbOSnK8Yu4TxIoJjGEkF4,24229
|
|
18
18
|
opentf/schemas/opentestfactory.org/v1/WorkflowCanceled.json,sha256=BCWxnm3rt4VWh9GXkIhdNY9JYohFWxi9Wg3JjXIavaU,1694
|
|
19
19
|
opentf/schemas/opentestfactory.org/v1/WorkflowCancellation.json,sha256=HAtc8xjrr-WwXwIck9B86BrHELkCb1oPYhTsRzHMMOE,1993
|
|
20
20
|
opentf/schemas/opentestfactory.org/v1/WorkflowCompleted.json,sha256=KtC9-oeaBNM3D60SFpmYnLMtqewUAGRoOJfVzb7CdHg,1635
|
|
@@ -58,8 +58,8 @@ opentf/scripts/startup.py,sha256=AcVXU2auPvqMb_6OpGzkVqrpgYV6vz7x_Rnv8YbAEkk,231
|
|
|
58
58
|
opentf/toolkit/__init__.py,sha256=xh0XggCuR4jumiYDeMGaklktMmV8_9HAb6K5z1oJzdU,22327
|
|
59
59
|
opentf/toolkit/channels.py,sha256=6qKSsAgq_oJpuDRiKqVUz-EAjdfikcCG3SFAGmKZdhQ,25551
|
|
60
60
|
opentf/toolkit/core.py,sha256=fqnGgaYnuVcd4fyeNIwpc0QtyUo7jsKeVgdkBfY3iqo,9443
|
|
61
|
-
opentf_toolkit_nightly-0.62.0.
|
|
62
|
-
opentf_toolkit_nightly-0.62.0.
|
|
63
|
-
opentf_toolkit_nightly-0.62.0.
|
|
64
|
-
opentf_toolkit_nightly-0.62.0.
|
|
65
|
-
opentf_toolkit_nightly-0.62.0.
|
|
61
|
+
opentf_toolkit_nightly-0.62.0.dev1317.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
62
|
+
opentf_toolkit_nightly-0.62.0.dev1317.dist-info/METADATA,sha256=a-uQFxjMjZdzOuib536HCOALi98E_7kQMNMOumpk9eo,2192
|
|
63
|
+
opentf_toolkit_nightly-0.62.0.dev1317.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
|
|
64
|
+
opentf_toolkit_nightly-0.62.0.dev1317.dist-info/top_level.txt,sha256=_gPuE6GTT6UNXy1DjtmQSfCcZb_qYA2vWmjg7a30AGk,7
|
|
65
|
+
opentf_toolkit_nightly-0.62.0.dev1317.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|