-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathapp_manager_openapi.yml
More file actions
145 lines (145 loc) · 3.9 KB
/
Copy pathapp_manager_openapi.yml
File metadata and controls
145 lines (145 loc) · 3.9 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
swagger: "2.0"
info:
title: Swagger Node Distruption Client - OpenAPI 3.0
description: |-
API to be implemented in the application manager, i.e. the client side of the Node Distruption logic.
version: 1.0.0
host: localhost
schemes:
- https
externalDocs:
description: Find out more about Node Disruption v2
url: https://github.com/criteo/node-disruption-controller
securityDefinitions:
Bearer:
type: apiKey
name: Authorization
in: header
description: JWT Token
security: []
tags:
- name: disruption
definitions:
Disruption:
description: Disprution describes a disruption of nodes by a given source.
type: object
properties:
uid:
type: string
description: Unique ID for this disruption
example: f45ac82c-7571-4770-8de1-dfdb0bf598de
name:
type: string
description: Human readable identifier of the disruption
example: hw-maint-123
type:
type: string
description: Type of disruption
example: decommission
nodes:
type: array
description: Nodes affected by this disruption
items:
type: string
example:
- hello.example.com
createdBy:
type: string
description: Source of the disruption
example: maintenance-manager
creationDate:
type: string
format: date-time
description: When the disruption was created
startDate:
type: string
format: date-time
description: Expected start date of the disruption
deadlineDate:
type: string
format: date-time
description: Start date + duration pre-calculated
duration:
type: integer
format: int64
example: 3600
description: For how long in seconds the disruption is expected to last after the start date.
Error:
description: Error details when available
type: string
example: "unable to contact internal tools"
parameters:
disruptionParam:
in: body
name: body
description: Disruption
schema:
$ref: '#/definitions/Disruption'
responses:
RetryAfter:
description: Cannot be processed right now, retry later / after Retry-After value
headers:
Retry-After:
description: Delay in seconds.
type: integer
UnexpectedError:
description: Unexpected error
schema:
$ref: "#/definitions/Error"
# securitySchemes:
# jwt:
# type: http
# scheme: bearer
# description: "Use JWT token provided as bearer token"
paths:
/prepare:
post:
summary: Prepare application for a disruption.
operationId: prepareApplication
tags:
- disruption
consumes:
- application/json
parameters:
- $ref: '#/parameters/disruptionParam'
responses:
'200':
description: Accepted, preparation planned.
'424':
description: Unable to accept due to internal constraints.
'425':
$ref: '#/responses/RetryAfter'
default:
$ref: '#/responses/UnexpectedError'
/ready:
post:
summary: Check application readiness for a disruption.
operationId: checkReadiness
tags:
- disruption
consumes:
- application/json
parameters:
- $ref: '#/parameters/disruptionParam'
responses:
'200':
description: Ready.
'425':
$ref: '#/responses/RetryAfter'
default:
$ref: '#/responses/UnexpectedError'
/terminate:
post:
summary: Notify the end of a disruption if the application needs to unprepare.
operationId: terminateDisruption
tags:
- disruption
consumes:
- application/json
parameters:
- $ref: '#/parameters/disruptionParam'
responses:
'200':
description: Acknowledged.
default:
$ref: '#/responses/UnexpectedError'