-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathexecution.yaml
More file actions
654 lines (618 loc) · 17 KB
/
execution.yaml
File metadata and controls
654 lines (618 loc) · 17 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
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
swagger: "2.0"
info:
version: "4.0.0"
title: Ingenium Execution API
basePath: /api/v4
schemes:
- http
consumes:
- application/json
produces:
- application/json
securityDefinitions:
UserSecurity:
type: apiKey
name: user_api_key
in: header
AdminSecurity:
type: apiKey
name: admin_api_key
in: header
security:
- UserSecurity: []
paths:
/executions/{execution_id}:
put:
tags:
- Execution
description: Register an execution
operationId: register_execution
parameters:
- $ref: "#/parameters/execution_id"
- name: venue_info
in: body
description: information about the venue used
required: true
schema:
$ref: "#/definitions/VenueInfo"
responses:
204:
description: Success
default:
description: Error
schema:
$ref: "#/definitions/ErrorResponse"
delete:
tags:
- Execution
description: Unregister an execution
operationId: unregister_execution
parameters:
- $ref: "#/parameters/execution_id"
responses:
204:
description: Deleted
default:
description: Error
schema:
$ref: "#/definitions/ErrorResponse"
/executions/{execution_id}/run:
post:
tags:
- Execution
description: Run a step
operationId: run_step
parameters:
- $ref: "#/parameters/execution_id"
- name: run_mode
in: query
description: run step in sync or asynchronous mode. Async mode will result in a HTTP 202 response.
required: false
type: string
enum:
- SYNC
- ASYNC
default: SYNC
- name: elem_id
in: query
description: element id to be executed. Use if step is not provided.
required: false
type: string
- name: step
in: body
description: Step to execute
required: false
schema:
$ref: "#/definitions/Step"
responses:
200:
description: Success
schema:
$ref: "#/definitions/Step"
202:
description: Execution started
schema:
$ref: "#/definitions/Step"
default:
description: Error
schema:
$ref: "#/definitions/ErrorResponse"
/executions/{execution_id}/config_value:
get:
tags:
- Execution
description: Get value of a configuration variable of an execution
operationId: get_config_value
parameters:
- $ref: "#/parameters/execution_id"
- name: parameter_name
in: query
description: name of a configuration parameter of an execution
type: string
required: true
responses:
200:
description: Success
schema:
$ref: "#/definitions/VariableValueResponse"
default:
description: Error
schema:
$ref: "#/definitions/ErrorResponse"
/executions/{execution_id}/variable_value:
get:
tags:
- Execution
description: Get value of a step variable
operationId: get_variable_value
parameters:
- $ref: "#/parameters/execution_id"
- name: variable_name
in: query
description: name of the variable in kernel
type: string
required: true
responses:
200:
description: Success
schema:
$ref: "#/definitions/VariableValueResponse"
default:
description: Error
schema:
$ref: "#/definitions/ErrorResponse"
/executions/{execution_id}/copy_state:
post:
tags:
- Execution
description: Copy execution state to another execution
operationId: copy_execution_state
parameters:
- $ref: "#/parameters/execution_id"
- name: target_execution_id
in: query
description: id of the target execution to which state will be copied
type: string
required: true
responses:
200:
description: Array of execution state parameters
schema:
type: array
items:
$ref: "#/definitions/VariableValueResponse"
default:
description: Error
schema:
$ref: "#/definitions/ErrorResponse"
/executions/{execution_id}/switch:
post:
tags:
- Execution
description: Switch a worker to another execution (used for automatic execution)
operationId: switch_execution
parameters:
- $ref: "#/parameters/execution_id"
- name: target_execution_id
in: query
description: id of the target execution
type: string
required: true
responses:
204:
description: Updated
default:
description: Error
schema:
$ref: "#/definitions/ErrorResponse"
/executions/{execution_id}/halt:
post:
tags:
- Execution
description: Halt the execution if the kernel is running a step
operationId: halt_kernel
parameters:
- $ref: "#/parameters/execution_id"
responses:
202:
description: Success
default:
description: Error
schema:
$ref: "#/definitions/ErrorResponse"
/logging:
get:
tags:
- Logging
operationId: "get_logging"
description: Get logging configuration
responses:
200:
description: "Logging status info"
schema:
$ref: "#/definitions/LoggingInfo"
default:
description: "Error"
schema:
$ref: "#/definitions/ErrorResponse"
post:
tags:
- Logging
operationId: update_logging
description: Update logging configuration
parameters:
- name: logging_info
in: body
description: Logging info
required: true
schema:
$ref: "#/definitions/LoggingInfo"
responses:
204:
description: "Updated"
default:
description: "Error"
schema:
$ref: "#/definitions/ErrorResponse"
/health:
get:
tags:
- Health
operationId: get_health
description: Get health status of the service
parameters: []
responses:
200:
description: Received service status
schema:
$ref: "#/definitions/HealthStatus"
default:
description: Error
schema:
$ref: "#/definitions/ErrorResponse"
definitions:
VenueInfo:
type: object
properties:
venue_id:
type: string
name:
type: string
description: Name of the venue (must be unique)
description:
type: string
description: Description of venue
ampcs_address:
type: string
description: "Network address of the machine that ampcs services/software\
\ is run from for the venue in question (i.e. smap_wsts_17.jpl.nasa.gov)"
sse_address:
type: string
description: "Network address of the machine that sse services/software is\
\ run from for the venue in question (i.e. smap_wsts_17.jpl.nasa.gov)"
location:
type: string
description: physical location of the machine (e.g., building 123)
type:
type: string
description: Type of venue
enum:
- WSTS
- Testbed
- ATLO
- Other
ProcedureElement:
discriminator: elem_type
properties:
elem_id:
type: string
description: The unique identifier of the element
elem_type:
type: string
description: Type of the element
enum:
- SECTION
- PROCEDURE_SECTION
- PARAGRAPH
- STEP
procedure_id:
type: string
description: id of the procedure to which the element belongs (null for elements of execution without procedure)
procedure_section_id:
type: string
description: id of the procedure section that contains this element. This will be empty for elements that were not imported from a procedure.
execution_id:
type: string
description: id of the execution to which the element belongs (null for elements of procedure)
parent_id:
type: string
description: id of the parent element. empty string for elements that are direct children of execution or procedure
number:
type: string
description: element number in procedure or execution
title:
type: string
description:
type: string
files:
type: array
items:
$ref: '#/definitions/FileInfo'
comments:
type: array
items:
$ref: '#/definitions/Comment'
procedure_modification_status:
type: string
description: |
whether any redline/blueline is associated with the element
* `NONE` - Not under run for score
* `ORIGINAL` - Original from procedure
* `MODIFIED` - Replaced by a redline
* `MODIFYING` - Redline/blueline element that replaces the original element
* `DELETED` - Redlined/bluelined by deletion
* `ADDED` - Redlined/bluelined by addition
enum:
- NONE
- ORIGINAL
- MODIFIED
- MODIFYING
- DELETED
- ADDED
procedure_modification:
$ref: '#/definitions/ProcedureModification'
FileInfo:
type: object
description: Meta data of an attached file
properties:
file_id:
type: string
description: unique id of the file resource
file_name:
type: string
description: original name of the file
execution_id:
type: string
description: id of the execution to which the file belongs
url:
type: string
description: download url of the file
Comment:
properties:
comment_id:
type: string
description: id of the comment
execution_id:
type: string
description: id of the execution to which the comment belongs
content:
type: string
description: comment text in HTML
time_updated:
description: Time the comment was created or updated
type: string
user_name:
description: Name of the user who commented
type: string
user_id:
description: User account name
type: string
files:
type: array
items:
$ref: '#/definitions/FileInfo'
ProcedureModification:
description: modification from procedure and its status
properties:
modification_type:
description: type of the modification
type: string
enum:
- NONE
- REDLINE
- BLUELINE
justification:
$ref: '#/definitions/ModificationComment'
approval:
$ref: '#/definitions/ModificationApproval'
ModificationComment:
description: comment to an element with procedure modifications
properties:
content:
type: string
description: comment text in HTML
user_name:
description: Name of the user
type: string
time_updated:
description: Time the comment was created or updated
type: string
ModificationApproval:
description: approval status of an element with procedure modifications (redline/blueline)
properties:
content:
type: string
description: comment text in HTML
user_name:
description: Name of the user who approved the modification
type: string
time_updated:
description: Time the modification was approved
type: string
status:
description: approval status
type: string
enum:
- PENDING
- APPROVED
- DISAPPROVED
Step:
allOf:
- $ref: '#/definitions/ProcedureElement'
- type: object
properties:
step_type:
type: string
description: Type of the element
enum:
- MANUAL_INPUT
- MANUAL_EIP
- VENUE_CONFIG_MANUAL
- ENVIRONMENT_MANUAL
- GDS_MANUAL
- VERIFICATION_ITEM
- VERIFICATION_ITEM_STATUS
- GRAPH_EHA
- QUERY_EVR
- BUS_1553
- VERIFY_EHA
- WAIT_EHA
- WAIT_EVR
- LIST_DATA_PRODUCTS
- WAIT_DATA_PRODUCTS
- CMD
- CMD_FILE
- CMD_SCMF
- CMD_SSE
- VENUE_CONFIG_GET
- VENUE_CONFIG_UPDATE
- VENUE_CONFIG_CHECK
- MANUAL_VERIFICATION
- CUSTOM_SCRIPT
- ANALYSIS
- WAIT
- TOC
executed:
type: boolean
description: true if this step has been executed
variable:
$ref: "#/definitions/Variable"
code:
$ref: "#/definitions/Code"
guard:
type: string
description: guard condition
notices:
type: array
items:
$ref: "#/definitions/Notice"
ErrorResponse:
properties:
message:
type: string
description: short error message
details:
type: array
description: details about the error that may include stack trace
items:
type: string
error_type:
type: string
description: type of the error
enum:
- USER_INPUT_ERROR
- INGENIUM_SERVICE_ERROR
- EXTERNAL_SERVICE_ERROR
error_source:
description: |
Service or S/W component where the error occurred
type: string
enum:
- AMPCS
- VENUE_SERVER
- EMBEDDED_CODE
- EXECUTION_KERNEL
- EXECUTION_SERVER
- VENUE_CONFIGURATION
- OTHER
http_code_at_source:
type: integer
description: HTTP response status code of the root error at the source. Zero if not applicable.
Variable:
description: This maps the results of the step to a variable for use in guard functions
type: object
required:
- name
properties:
name:
description: Name of the variable that will be referenced
type: string
Code:
type: object
required:
- name
properties:
name:
description: Name of the function in Ingenium's version control that should be executed
type: string
commit:
description: Commit hash of the function to be executed
type: string
default: Latest
release:
description: Tagged release of the function to be executed. Note that if release and commit are provided the release takes priority
type: string
default: Latest
Notice:
type: object
required:
- category
- message
properties:
category:
description: type of notice
type: string
enum:
- TESTBED_WARNING
- PERSONNEL_CAUTION
message:
type: string
description: human readable message of the notice
VariableValueResponse:
type: object
required:
- name
- value
properties:
name:
description: variable name
type: string
value:
description: variable value. Its format depends on type of the variable.
type: object
LoggingInfo:
type: object
required:
- level
properties:
level:
type: string
description: Current log level
enum:
- CRITICAL
- ERROR
- WARNING
- INFO
- DEBUG
HealthStatus:
type: object
required:
- status
properties:
status:
type: string
description: Current status of service
enum:
- OK
- ERROR
- UNKNOWN
message:
type: string
description: Any error message
parameters:
execution_id:
name: execution_id
in: path
description: unique id of execution
required: true
type: string
kernel_id:
name: kernel_id
in: path
description: unique id of kernel
required: true
type: string
offset:
name: offset
in: query
description: Start index for pagination. zero based.
required: false
type: integer
default: 0
limit:
name: limit
in: query
description: Max number of elements to return.
required: false
type: integer
default: 50