-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwst-schema.yaml
1276 lines (1233 loc) · 49.8 KB
/
wst-schema.yaml
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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
$schema: "https://json-schema.org/draft/2020-12/schema"
title: JsonSchema for WST configuration
type: object
properties:
version:
title: WST configuration version
description: The current version is 1.0. Internally the value is converted to string but number is accepted.
type: [ string, number ]
name:
title: WST project name
description: The name should be short as it might be used in some messages produced by WST.
type: string
description:
title: WST project description
description: The description should describe project purpose.
type: string
spec:
$ref: '#/$defs/spec'
$defs:
parameters:
title: Parameters object
description: |
The parameters object is a map of parameters provided in various parts for customization. It can be a nested map
if needed creating some sort of a tree structure. The leaves are always scalar values.
type: object
patternProperties:
"^[a-zA-Z_][a-z0-9_]+$":
oneOf:
- type: [ string, number, boolean ]
- $ref: '#/$defs/parameters'
commonEnvironment:
title: Common environment
description: |
The common environment serves as a base environment for all environments.
properties:
ports:
title: Environment ports
description: The ports specifies the port range that can be used by services in environment
type: object
properties:
start:
title: Ports range start
type: integer
end:
title: Ports range end
type: integer
containerEnvironment:
title: Container environment
description: |
The container environment serves as a base environment for all environments that run OCI containers.
allOf:
- $ref: '#/$defs/commonEnvironment'
- title: Container specific properties
type: object
properties:
registry:
$ref: '#/$defs/containerRegistry'
dockerEnvironment:
title: Docker environment
description: |
The Docker environment handles communication with Docker daemon.
allOf:
- $ref: '#/$defs/containerEnvironment'
- title: Docker specific properties
type: object
properties:
name_prefix:
title: Prefix for the network and services names
description: The namespace is optional and
type: string
kubernetesEnvironment:
title: Kubernetes environment
description: |
The Kubernetes environment handles communication with Docker daemon.
allOf:
- $ref: '#/$defs/containerEnvironment'
- title: Kubernetes specific properties
type: object
properties:
namespace:
title: Prefix for the network and services
type: string
kubeconfig:
title: Kubernetes config file path
type: string
environments:
title: Environment definitions
description: |
Environments can be specified either as an object defining the used sandboxes or as a string representing a path
to fetch sandbox definitions from.
type: [ object, string ]
properties:
common:
$ref: '#/$defs/commonEnvironment'
local:
$ref: '#/$defs/commonEnvironment'
container:
$ref: '#/$defs/containerEnvironment'
docker:
$ref: '#/$defs/dockerEnvironment'
kubernetes:
$ref: '#/$defs/kubernetesEnvironment'
headers:
title: HTTP Headers
description: Map of HTTP headers where key is header name and value is its value.
type: object
patternProperties:
"^[a-zA-Z_][a-z0-9_]+$":
title: Header value
type: string
metricsExpectation:
title: Metrics expectation action
description: |
The metrics expectation allows verifying the metrics currently only saved by benchmark.
type: object
properties:
id:
title: Metrics ID
description: |
The metrics ID identifies the saved metrics saved by one of the actions (currently just benchmark). The
default last value matches the default benchmark metrics ID which means that if there is just one benchmark
being and its ID is unchanged, then there is no need to specify this property.
type: string
default: last
rules:
title: Metric rules
description: |
The rules are used to check the expectations. All checks have to pass to result in successful execution.
type: array
items:
title: Metrics rule
description: |
The metrics rule checks a single metric. Each rule contains metric name that is fetched and its value is
compared by the operator with the supplied value.
type: object
properties:
metric:
title: Metric name
type: string
operator:
title: Comparison operator
type: string
enum: [ eq, ne, gt, ge, le, lt ]
value:
title: Compared value
description: Value to compare the metric with.
type: number
outputExpectation:
title: Output expectation action
description: |
The output expectation checks the service's output, which usually contains the service logs. This allows
for the verification of the expected service behavior.
type: object
properties:
command:
title: Command name for command usage
description: |
Command identifier to specify which command output to check. Empty value means checking the service output.
When set, verifies output from the command with specified id.
type: string
default: ""
order:
title: Expected order of messages
description: |
This defines the expected order of messages when there are multiple messages in an array. It specifies
whether these messages need to be in a fixed sequence or can appear in any order.
type: string
enum: [ fixed, random ]
default: fixed
match:
title: Match type for each message
description: |
Defines how each message should be matched against the actual output. exact - the message must match
completely, regexp - the message is treated as a regular expression pattern, prefix - the actual output
must start with the expected message, suffix - the actual output must end with the expected message, infix -
the expected message must appear somewhere in the actual output.
type: string
enum: [ exact, regexp, prefix, suffix, infix ]
default: exact
type:
title: Output type
type: string
enum: [ stdout, stderr ]
default: any
messages:
title: Array of expected messages
type: array
items:
title: Message item
description: |
Each message item should be either an exact string, a regular expression pattern, or a partial match
depending on the match type setting.
type: string
render_template:
title: Template rendering switch
description: |
This switch selects whether template rendering is used for messages.
type: boolean
default: true
responseExpectation:
title: Response expectation action
description: |
The response expectation allows verifying the response from the selected request.
type: object
properties:
request:
title: Request ID
description: |
The request ID identifies the request whose response is checked in this expectation. The default last value
matches the default request ID of the request action which means that if there is just one request being
done and its ID is unchanged, then there is no need to specify this property.
type: string
default: last
headers:
$ref: '#/$defs/headers'
body:
title: Response body to match
description: |
The response body is the expected body for the response of the selected request.
type: [ object, string ]
properties:
content:
title: Response body content to match
description: |
The content represents the content or pattern that needs to match the actual request response. It should
be a string but number is also allowed for easier configuration if only number is returned.
type: [ string, number ]
match:
title: Match type for the content
description: |
Defines how content should be matched against the actual response body. exact matches the body completely,
regexp treats content as regular expression pattern, prefix matches if body starts with content, suffix
matches if body ends with content, infix matches if content appears anywhere in the body.
type: string
enum: [ exact, regexp, prefix, suffix, infix ]
default: exact
render_template:
title: Template rendering switch
description: |
The switch selects whether the template rendering is used for body content.
type: boolean
default: true
status:
title: Status code to match
description: |
The status is the expected status code for the response of the selected request.
type: integer
serverExpectation:
title: Server expectation action definition
description: |
The expectation is an action type that checks whether the provided expectation type aligns with what's expected.
It's usually used for pattern matching of response data or output from the logs.
type: object
allOf:
- properties:
parameters:
$ref: '#/$defs/parameters'
- oneOf:
- properties:
output:
$ref: '#/$defs/metricsExpectation'
- properties:
output:
$ref: '#/$defs/outputExpectation'
- properties:
response:
$ref: '#/$defs/responseExpectation'
serverExpectations:
title: Server expectations mapping
description: |
The expectations mapping object allows for the definition of custom expectations that can be executed by actions.
As noted in the actions' descriptions, the action name can be composed of various parts. In the case of
expectations, it's formatted as follows:
expect[/<server_name>/<expectation_name>]
Here, <server_name> is the name of the server where the expectation is defined, and <expectation_name>
corresponds to the name matching the key of this object.
type: object
additionalProperties:
$ref: '#/$defs/serverExpectation'
sandboxHook:
title: Sandbox lifecycle hook
description: |
The sandbox hook defines an action for a specific sandbox lifecycle hook on the service. It allows for the
definition of a command, a signal, or a native hook.
type: object
oneOf:
- properties:
native:
title: Native sandbox hook
description: |
The native hook is a method provided by the sandbox itself for a specific lifecycle hook. For instance,
it is used for containers to natively restart the application.
type: object
properties:
type:
title: 'Native sandbox hook type'
type: string
enum: [ 'start', 'restart', 'stop' ]
- properties:
command:
title: Command sandbox hook
description: |
This property represents the shell command that gets executed.
type: object
oneOf:
- properties:
executable:
title: Program path to execute
description: |
The executable is a single program to execute.
type: string
args:
title: Program arguments
description: |
The arguments can be either a string, in which case a shell is used, or an array of strings, which
executes the program directly without using the shell.
type: array
items:
type: string
- properties:
command:
title: Command to execute in shell environment
description: |
This property represents the stringified version of the executable and its arguments that is
passed as a parameter the the shell.
type: string
shell:
title: Shell path to use
description: |
This property represents the shell path that is going to be executed with a command. On Linux
and other Unix systems, the /bin/sh is used by default. On Windows cmd.exe is used by default.
type: string
- properties:
signal:
title: Signal sandbox hook
description: |
The signal sent to the sandbox service. It uses the service PID to send the signal. Note that the service
needs to be running; hence, it can't be used for the start hook.
type: [string, integer]
commonSandbox:
title: Common sandbox
description: |
This object defines a set of common sandbox properties and it is a base sandbox for all sandboxes. Currently
a set of hooks is common to all sandboxes.
type: object
properties:
available:
title: Availability switch
description: |
This property specifies whether the sandbox is available. It is usually used to disable some sandboxes
on server platforms that have no availability for them (e.g. RHEL containers).
dirs:
title: Sandbox directories
description: |
The directories for various servers and service files.
type: object
properties:
conf:
title: Configuration directory
description: This is used as a base directory for all server configuration files. Usually /etc on Linux.
type: string
run:
title: Runtime directory
description: This is used for system runtime files. For example PID files should be stored here.
type: string
script:
title: Script directory
description: |
This is used as a base directory for all service script files. For example for web server, the web root
directory would be used
type: string
hooks:
title: Sandbox hooks
description: |
Those lifecycle hooks are called when even specified in the object key happens. Currently start, stop, restart
and reload hooks can be defined.
type: object
properties:
reload:
$ref: '#/$defs/sandboxHook'
restart:
$ref: '#/$defs/sandboxHook'
start:
$ref: '#/$defs/sandboxHook'
stop:
$ref: '#/$defs/sandboxHook'
containerRegistry:
title: Container registry
description: |
This property is used to pull and push images from and to the registry.
type: object
properties:
auth:
title: Registry authentication credentials
type: object
properties:
username:
title: Registry user username
type: string
password:
title: Registry user password
type: string
containerSandbox:
title: Container sandbox
description: |
The container sandbox serves as a base sandbox for all sandboxes that run OCI containers.
allOf:
- $ref: '#/$defs/commonSandbox'
- title: Container specific properties
type: object
properties:
image:
oneOf:
- title: Image name and tag
type: string
- type: object
properties:
name:
title: Image name
type: string
tag:
title: Image tag
type: string
registry:
$ref: '#/$defs/containerRegistry'
sandboxes:
title: Sandboxes definitions
description: |
Sandboxes can be specified either as an object defining the used sandboxes or as a string representing a path to
fetch sandbox definitions from.
type: [ object, string ]
properties:
common:
$ref: '#/$defs/commonSandbox'
local:
$ref: '#/$defs/commonSandbox'
docker:
$ref: '#/$defs/containerSandbox'
kubernetes:
allOf:
- $ref: '#/$defs/containerSandbox'
- type: object
properties:
auth:
title: Kubernetes authentication
type: object
properties:
kubeconfig:
title: Kubernetes config file path
type: string
server:
title: Server
description: |
A server can be specified either as an object defining the server properties or as a server name string.
type: [ object, string ]
properties:
extends:
title: Parent server name
description: |
This property selects the parent server to inherit properties from.
type: string
name:
title: Server name
type: string
tag:
title: Server tag
description: The tag is used if not part of the name as a server tag.
user:
title: Server user
description: Default user for the server. If not set, then currently logged in user is used.
type: string
group:
title: Server group
description: Default group for the server. If not set, then currently logged in user group is used.
type: string
port:
title: Server primary exported port
description: This is meant only for container environments where the port is specific to the container.
type: string
configs:
title: Configuration files
type: object
additionalProperties:
type: object
properties:
file:
type: string
parameters:
$ref: '#/$defs/parameters'
actions:
title: Custom actions
description: |
This property defines customized actions of the server that can be used by instances.
type: object
properties:
expect:
type: object
additionalProperties:
$ref: '#/$defs/serverExpectations'
parameters:
$ref: '#/$defs/parameters'
sandboxes:
$ref: '#/$defs/sandboxes'
servers:
title: Servers
description: |
Servers can be specified either as an object defining each server or as a string, which is a path to fetch
server definitions from.
type: [ object, string ]
patternProperties:
"^[a-z][a-z0-9-_]+$":
$ref: '#/$defs/server'
scripts:
title: Scripts for inclusion in services
description: |
Scripts represent a set of files where the filename is an object key and its actual content is the value.
These scripts can be linked to services.
type: object
additionalProperties:
title: Script data and settings
description: |
The script primarily defines the content to be included within the service.
type: [ object, string ]
properties:
content:
title: Script content
type: string
path:
title: Path to be stored
description: |
Denotes the path in the service sandbox where the script will be mounted. If not specified, the script's
key will be used. This property is useful for long, complex paths, or paths that require templates.
mode:
title: File access mode
description: Indicates the file's access mode, according to standard Unix permissions.
type: [ string, integer ]
default: '0644'
parameters:
$ref: '#/$defs/parameters'
services:
title: Set of instance-specific services
description: |
The services represent an object of services where the key is its name and the value is a service object.
type: object
additionalProperties:
title: Service to run
description: |
The service is a combination of a server and a sandbox with a supplied configuration.
type: object
properties:
server:
title: Server to use
description: |
Server points to the server used by the service. As the server defines the configuration, it's
important to ensure that a compatible server is used. The service name is used if the value isn't
specified.
type: object
properties:
name:
title: Server name
description: The name is used for selecting the server used by service.
tag:
title: Server tag
description: The tag is used if not part of the name as a server tag.
sandbox:
title: Sandbox to use
description: |
Sandbox should define the server sandbox in which to run the service.
type: string
enum: [ local, docker, kubernetes ]
configs:
title: Configuration files to include
description: |
This object defines the configuration files that will be included from the server. The key is the
configuration filename as defined in the server, and the value is the configuration object.
type: object
additionalProperties:
type: [ object ]
properties:
include:
title: Service inclusion switch
description: Whether the server config is going to be included to the service.
default: true
parameters:
$ref: '#/$defs/parameters'
resources:
title: Resource included in the service
description: It is container for scripts and other resources defined in the future.
type: object
properties:
scripts:
title: Scripts included in the service
description: |
The scripts can have either a boolean or array value. If a boolean is provided, then 'true' means that
all scripts are included in the service and 'false' means that no scripts will be included. If an array
is provided, then only the listed scripts are included in the service.
default: true
type: [ array, boolean ]
items:
type: string
requires:
title: Required services
description: |
The list of services that has to be started before starting the service containing this property.
customExpectation:
title: Custom expectation
description: |
The custom expectation that is taken from the service defined server.
type: object
properties:
name:
title: Custom expectation name
description: The name is used for selecting the expectation from the server expectations.
parameters:
$ref: '#/$defs/parameters'
actionExpectation:
title: Expectation action
description: |
The expectation is an action type that checks whether the provided expectation type aligns with what's expected.
It's usually used for pattern matching of response data or output from the logs.
type: object
allOf:
- properties:
service:
title: Service name
description: The service that the expectation is executed on.
type: string
timeout:
title: Action timeout
description: |
This sets the action timeout in milliseconds and overwritten the default timeout. Negative value means
unlimited and 0 means using the default value defined in the instance action timeout.
type: integer
when:
title: When to run the action
description: |
This field specifies when the action should be executed. If `on_success` is selected, the action runs only
if all previous actions have completed successfully. If `on_failure` is selected, the action runs only if
at least one of the previous actions has failed. If `always` is selected, the action will run regardless
of the success or failure of previous actions.
type: string
enum: [ always, on_success, on_failure ]
default: on_success
- oneOf:
- properties:
custom:
$ref: '#/$defs/customExpectation'
- properties:
metrics:
$ref: '#/$defs/metricsExpectation'
- properties:
output:
$ref: '#/$defs/outputExpectation'
- properties:
response:
$ref: '#/$defs/responseExpectation'
actionBench:
title: Benchmark action
description: |
The benchmark action defines the details of the benchmark done on to the service.
type: object
properties:
service:
title: Service name
description: The service that the benchmark is executed on.
type: string
timeout:
title: Action timeout
description: |
This sets the action timeout in milliseconds and overwritten the default timeout. Negative value means
unlimited and 0 means using the default value defined in the instance action timeout.
type: integer
when:
title: When to run the action
description: |
This field specifies when the action should be executed. If `on_success` is selected, the action runs only
if all previous actions have completed successfully. If `on_failure` is selected, the action runs only if
at least one of the previous actions has failed. If `always` is selected, the action will run regardless
of the success or failure of previous actions.
type: string
enum: [ always, on_success, on_failure ]
default: on_success
id:
title: Benchmark ID
description: |
Identifies benchmark which is use as identifier for storing metrics. This can be then used in metrics
expectation.
type: string
default: last
path:
title: Benchmark request path
description: Request URL path used for benchmark which can also contain query parameters.
type: string
default: /
encode_path:
title: Whether the path should be URL encoded
description: |
There are test cases when it is convenient to pass not URL encoded path and this is the option to disabled it.
type: boolean
default: true
method:
title: Benchmark request method
type: string
enum: [ GET, HEAD, POST, PUT, PATCH, DELETE, PURGE ]
default: GET
headers:
$ref: '#/$defs/headers'
frequency:
title: Benchmark request rate frequency
description: The frequency specifies number of requests send per second.
type: integer
duration:
title: Benchmark request duration
description: The length of benchmark in milliseconds.
type: integer
actionCommand:
title: Command action
description: |
The command action defines the details of a command to be executed by the service.
type: object
properties:
service:
title: Service name
description: The name of the service where the command will be executed.
type: string
timeout:
title: Action timeout
description: |
This sets the action timeout in milliseconds and overwritten the default timeout. Negative value means
unlimited and 0 means using the default value defined in the instance action timeout.
type: integer
when:
title: When to run the action
description: |
This field specifies when the action should be executed. If `on_success` is selected, the action runs only
if all previous actions have completed successfully. If `on_failure` is selected, the action runs only if
at least one of the previous actions has failed. If `always` is selected, the action will run regardless
of the success or failure of previous actions.
type: string
enum: [ always, on_success, on_failure ]
default: on_success
id:
title: Command ID
description: |
A unique identifier for the command that is used for storing output data. This identifier can be referenced
in command expectations.
type: string
default: last
command:
title: Command to execute
description: |
Specifies the command to be executed. When a string is used, the command will be executed through the
specified shell, allowing shell features like pipes and redirections (example: "echo 'Hello' > file.txt").
When an array is used, the command is executed directly without shell interpretation where the first element
is the command and subsequent elements are arguments (example: ["echo", "Hello"]). The array format is
preferred for direct command execution with precise argument passing.
type: [string, array]
items:
type: string
shell:
title: Shell to use
description: Specifies which shell to use when executing a string command.
type: string
default: /bin/sh
actionNot:
title: Not action
description: |
The not action inverts the success/failure status of the contained action. If the contained action succeeds,
the not action returns failure, and if the contained action fails, the not action returns success.
type: object
properties:
action:
title: Action to invert
description: The action whose result will be inverted.
$ref: '#/$defs/action'
timeout:
title: Action timeout
description: |
This sets the action timeout in milliseconds and overwritten the default timeout. Negative value means
unlimited and 0 means using the default value defined in the instance action timeout.
type: integer
when:
title: When to run the action
description: |
This field specifies when the action should be executed. If `on_success` is selected, the action runs only
if all previous actions have completed successfully. If `on_failure` is selected, the action runs only if
at least one of the previous actions has failed. If `always` is selected, the action will run regardless
of the success or failure of previous actions.
type: string
enum: [ always, on_success, on_failure ]
default: on_success
actionParallel:
title: Parallel action
description: |
The parallel action executes multiple actions concurrently. The parallel action succeeds only if all
contained actions succeed. If any action fails, the parallel action fails but continues executing
other actions.
type: object
properties:
actions:
title: Actions to execute
description: List of actions to execute in parallel.
type: array
items:
$ref: '#/$defs/action'
timeout:
title: Action timeout
description: |
This sets the action timeout in milliseconds and overwritten the default timeout. Negative value means
unlimited and 0 means using the default value defined in the instance action timeout.
type: integer
when:
title: When to run the action
description: |
This field specifies when the action should be executed. If `on_success` is selected, the action runs only
if all previous actions have completed successfully. If `on_failure` is selected, the action runs only if
at least one of the previous actions has failed. If `always` is selected, the action will run regardless
of the success or failure of previous actions.
type: string
enum: [ always, on_success, on_failure ]
default: on_success
actionRequest:
title: Request action
description: |
The request action defines the details of the request to be sent to the service.
type: object
properties:
service:
title: Service name
description: The service that the request is executed on.
type: string
timeout:
title: Action timeout
description: |
This sets the action timeout in milliseconds and overwritten the default timeout. Negative value means
unlimited and 0 means using the default value defined in the instance action timeout.
type: integer
when:
title: When to run the action
description: |
This field specifies when the action should be executed. If `on_success` is selected, the action runs only
if all previous actions have completed successfully. If `on_failure` is selected, the action runs only if
at least one of the previous actions has failed. If `always` is selected, the action will run regardless
of the success or failure of previous actions.
type: string
enum: [ always, on_success, on_failure ]
default: on_success
id:
title: Request ID
description: Identifies request which can be then used in response expectation.
type: string
default: last
path:
title: Request path
description: Request URL path which can also contain query parameters.
type: string
default: /
method:
title: Request method
type: string
enum: [ GET, HEAD, POST, PUT, PATCH, DELETE, PURGE ]
default: GET
headers:
$ref: '#/$defs/headers'
actionRestart:
title: Restart services
description: |
The restart action starts the selected or all services.
type: object
properties:
service:
title: Service name to restart
description: |
The service that is going to be restarted. If neither service nor services is specified, then all services are
going to be restarted.
type: string
services:
title: List of service names to restart
description: |
The services that are going to be restarted. If neither service nor services is specified, then all services
are going to be restarted.
type: array
items:
type: string
timeout:
title: Action timeout
description: |
This sets the action timeout in milliseconds and overwritten the default timeout. Negative value means
unlimited and 0 means using the default value defined in the instance action timeout.
type: integer
when:
title: When to run the action
description: |
This field specifies when the action should be executed. If `on_success` is selected, the action runs only
if all previous actions have completed successfully. If `on_failure` is selected, the action runs only if
at least one of the previous actions has failed. If `always` is selected, the action will run regardless
of the success or failure of previous actions.
type: string
enum: [ always, on_success, on_failure ]
default: on_success
reload:
title: Reload services
description: |
The reload flag indicates to service to use reload method rather than a complete restart if possible. This is
supported only by some sandboxes (usually not supported by container services).
type: boolean
default: false
actionSequential:
title: Sequential action
description: |
The sequential action executes multiple actions in sequence. The execution continues until either all actions
complete successfully or an action fails. If any action fails, the sequential action stops execution and returns
failure.
type: object
properties:
actions:
title: Actions to execute
description: List of actions to execute in sequence.
type: array
items:
$ref: '#/$defs/action'
name:
title: Custom name
description: |
The custom name is used for server look up when using server action.
type: string
service:
title: Service name
description: |
The service name is used only to identify the server that defines the custom sequential action.
type: string
timeout:
title: Action timeout
description: |
This sets the action timeout in milliseconds and overwritten the default timeout. Negative value means
unlimited and 0 means using the default value defined in the instance action timeout.
type: integer
when:
title: When to run the action
description: |
This field specifies when the action should be executed. If `on_success` is selected, the action runs only
if all previous actions have completed successfully. If `on_failure` is selected, the action runs only if
at least one of the previous actions has failed. If `always` is selected, the action will run regardless
of the success or failure of previous actions.
type: string
enum: [ always, on_success, on_failure ]
default: on_success
actionStart:
title: Start action
description: |
The start action starts the selected or all services.
type: object
properties:
service:
title: Service name to start
description: |
The service that is going to be started. If neither service nor services is specified, then all services are
going to be started.
type: string
services:
title: List of service names to start
description: |
The services that are going to be started. If neither service nor services is specified, then all services are
started.
type: array
items: