-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathapi.yaml
More file actions
230 lines (229 loc) · 7.88 KB
/
api.yaml
File metadata and controls
230 lines (229 loc) · 7.88 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
paths:
/config:
post:
tags: ['Configuration']
operationId: set_config
description: >-
Sets configuration resources on the traffic generator.
requestBody:
required: true
content:
application/json:
schema:
$ref: '../config/config.yaml#/components/schemas/Config'
responses:
'200':
$ref: '../result/request.yaml#/components/responses/Success'
x-field-uid: 1
default:
$ref: '../result/request.yaml#/components/responses/Failure'
x-field-uid: 2
get:
tags: ['Configuration']
operationId: get_config
responses:
'200':
description: >-
Config response from the traffic generator
content:
application/json:
schema:
$ref: '../config/config.yaml#/components/schemas/Config'
x-field-uid: 1
default:
$ref: '../result/request.yaml#/components/responses/Failure'
x-field-uid: 2
patch:
tags: ['Configuration']
operationId: update_config
description: >-
Updates specific attributes of resources configured on the traffic generator.
The fetched configuration shall reflect the updates applied successfully.
The Response.Warnings in the Success response is available for
implementers to disclose additional information about a state change
including any implicit changes that are outside the scope of the state
change.
requestBody:
required: true
content:
application/json:
schema:
$ref: '../config/update.yaml#/components/schemas/Config.Update'
responses:
'200':
$ref: '../result/request.yaml#/components/responses/Success'
x-field-uid: 1
default:
$ref: '../result/request.yaml#/components/responses/Failure'
x-field-uid: 2
/config/append:
patch:
tags: ['Configuration']
operationId: append_config
description: >-
Append new attributes of resources to existing configuration on the traffic generator.
Resource names should not be part of existing configuration of that resource type;
it should be unique for the operation to succeed. A failed append might leave the
configuration in an undefined state and if the error is due to some invalid or unsupported
configuration in the appended resources, it is expected that the user fix the error and
restart from SetConfig operation.
The fetched configuration shall also reflect the new configuration applied successfully.
requestBody:
required: true
content:
application/json:
schema:
$ref: '../config/append.yaml#/components/schemas/Config.Append'
responses:
'200':
$ref: '../result/request.yaml#/components/responses/Success'
x-field-uid: 1
default:
$ref: '../result/request.yaml#/components/responses/Failure'
x-field-uid: 2
/config/delete:
patch:
tags: ['Configuration']
operationId: delete_config
description: >-
Delete attributes of resources from existing configuration on the traffic generator.
Resource names should already be part of existing configuration of that resource type;
for the operation to succeed. A failed delete will leave the configuration in an undefined
state and if the error is due to some invalid or unsupported configuration in the deleted
resources, it is expected that the user fix the error and restart from SetConfig operation.
On successful deletion the fetched configuration shall not reflect the removed configuration.
requestBody:
required: true
content:
application/json:
schema:
$ref: '../config/delete.yaml#/components/schemas/Config.Delete'
responses:
'200':
$ref: '../result/request.yaml#/components/responses/Success'
x-field-uid: 1
default:
$ref: '../result/request.yaml#/components/responses/Failure'
x-field-uid: 2
/control/state:
post:
tags: ['Control']
operationId: set_control_state
description: >-
Sets the operational state of configured resources.
requestBody:
required: true
content:
application/json:
schema:
$ref: '../control/state.yaml#/components/schemas/Control.State'
responses:
'200':
$ref: '../result/request.yaml#/components/responses/Success'
x-field-uid: 1
default:
$ref: '../result/request.yaml#/components/responses/Failure'
x-field-uid: 2
/control/action:
post:
tags: ['Control']
operationId: set_control_action
description: >-
Triggers actions against configured resources.
requestBody:
required: true
content:
application/json:
schema:
$ref: '../control/action.yaml#/components/schemas/Control.Action'
responses:
'200':
description: >-
Response for actions triggered against configured resources.
content:
application/json:
schema:
$ref: '../control/action.yaml#/components/schemas/Control.Action.Response'
x-field-uid: 1
default:
$ref: '../result/request.yaml#/components/responses/Failure'
x-field-uid: 2
/monitor/metrics:
description: >-
Metrics API
post:
tags: ['Monitor']
operationId: get_metrics
requestBody:
description: >-
Request to traffic generator for metrics of choice
required: true
content:
application/json:
schema:
$ref: '../result/metrics.yaml#/components/schemas/Metrics.Request'
responses:
'200':
description: >-
Response from traffic generator for chosen metrics
content:
application/json:
schema:
$ref: '../result/metrics.yaml#/components/schemas/Metrics.Response'
x-field-uid: 1
default:
$ref: '../result/request.yaml#/components/responses/Failure'
x-field-uid: 2
/monitor/states:
description: >-
States API
post:
tags: ['Monitor']
operationId: get_states
requestBody:
description: >-
Request to traffic generator for states of choice
required: true
content:
application/json:
schema:
$ref: '../result/states.yaml#/components/schemas/States.Request'
responses:
'200':
description: >-
Response from traffic generator for chosen states
content:
application/json:
schema:
$ref: '../result/states.yaml#/components/schemas/States.Response'
x-field-uid: 1
default:
$ref: '../result/request.yaml#/components/responses/Failure'
x-field-uid: 2
/monitor/capture:
description: >-
Capture results API
post:
tags: ['Monitor']
operationId: get_capture
requestBody:
description: >-
Capture results request to the traffic generator.
required: true
content:
application/json:
schema:
$ref: '../result/capture.yaml#/components/schemas/Capture.Request'
responses:
'200':
description: >-
Capture results response from the traffic generator.
content:
application/octet-stream:
schema:
type: string
format: binary
x-field-uid: 1
default:
$ref: '../result/request.yaml#/components/responses/Failure'
x-field-uid: 2