@ansible-flow/assets 0.0.0-stage → 0.85.0

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.
@@ -0,0 +1,111 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://ansible-flow-designer.local/scenarios.schema.json",
4
+ "title": "Ansible Flow scenario tests",
5
+ "description": "Scenario tests for the flow next to this file (<key>.scenarios.yaml, AFD-58). Each scenario runs every step as its stub on local-connection hosts, forces the outcomes listed, and checks where each host ends.",
6
+ "type": "object",
7
+ "required": [
8
+ "scenarios"
9
+ ],
10
+ "additionalProperties": false,
11
+ "properties": {
12
+ "flow": {
13
+ "type": "string",
14
+ "description": "The key of the flow these scenarios test (the flow next to this file)."
15
+ },
16
+ "scenarios": {
17
+ "type": "array",
18
+ "description": "The scenarios, run one after another.",
19
+ "items": {
20
+ "type": "object",
21
+ "required": [
22
+ "name",
23
+ "expect"
24
+ ],
25
+ "additionalProperties": false,
26
+ "properties": {
27
+ "name": {
28
+ "type": "string",
29
+ "description": "What the scenario shows, unique in the file."
30
+ },
31
+ "inputs": {
32
+ "type": "object",
33
+ "description": "Run inputs. The flow's targets input (a host_list) lists the hosts the scenario runs on."
34
+ },
35
+ "groups": {
36
+ "type": "object",
37
+ "description": "Inventory groups for patterns the flow uses besides its targets (inventory_target): group -> hosts.",
38
+ "additionalProperties": {
39
+ "type": "array",
40
+ "items": {
41
+ "type": "string"
42
+ }
43
+ }
44
+ },
45
+ "force": {
46
+ "type": "object",
47
+ "description": "Outcomes to force: step key (or subflow/step inside a subflow) -> outcome -> hosts. failed sends hosts down failed_hosts; unreachable, timeout and unchanged need that port enabled; false applies to decisions (they take true otherwise).",
48
+ "additionalProperties": {
49
+ "type": "object",
50
+ "additionalProperties": false,
51
+ "properties": {
52
+ "failed": {
53
+ "type": "array",
54
+ "items": {
55
+ "type": "string"
56
+ },
57
+ "description": "Hosts sent down failed_hosts."
58
+ },
59
+ "unreachable": {
60
+ "type": "array",
61
+ "items": {
62
+ "type": "string"
63
+ },
64
+ "description": "Hosts sent down unreachable."
65
+ },
66
+ "timeout": {
67
+ "type": "array",
68
+ "items": {
69
+ "type": "string"
70
+ },
71
+ "description": "Hosts sent down timeout."
72
+ },
73
+ "unchanged": {
74
+ "type": "array",
75
+ "items": {
76
+ "type": "string"
77
+ },
78
+ "description": "Hosts sent down unchanged."
79
+ },
80
+ "false": {
81
+ "type": "array",
82
+ "items": {
83
+ "type": "string"
84
+ },
85
+ "description": "Hosts sent down false (decisions)."
86
+ }
87
+ }
88
+ }
89
+ },
90
+ "approvals": {
91
+ "type": "object",
92
+ "description": "Approval key -> outcome for this run (default approved).",
93
+ "additionalProperties": {
94
+ "enum": [
95
+ "approved",
96
+ "rejected"
97
+ ]
98
+ }
99
+ },
100
+ "expect": {
101
+ "type": "object",
102
+ "description": "Host -> where it must end: an end node key (subflow/end inside a subflow), or <step>.<port> for an output nobody wired.",
103
+ "additionalProperties": {
104
+ "type": "string"
105
+ }
106
+ }
107
+ }
108
+ }
109
+ }
110
+ }
111
+ }