-
Notifications
You must be signed in to change notification settings - Fork 4
/
elemental-openapi.yaml
487 lines (487 loc) · 13.1 KB
/
elemental-openapi.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
openapi: 3.0.3
info:
description: "This API can be used to interact with the Cluster API Elemental operator.<br
/>\n\tThis API is for <b>Internal</b> use by the <a href=\"https://github.com/rancher-sandbox/cluster-api-provider-elemental/tree/main/cmd/agent\">Elemental
CAPI agent</a> and it's not supported for public use.<br />\n\tUse it at your
own risk.<br />\n\t<br />\n\tThe schemas are mapping the related <a href=\"https://github.com/rancher-sandbox/cluster-api-provider-elemental/tree/main/api/v1beta1\">Elemental
CAPI resources</a>.<br />"
title: Elemental API
version: v0.0.1
paths:
/elemental/v1/namespaces/{namespace}/registrations/{registrationName}:
get:
description: This endpoint returns an ElementalRegistration.
parameters:
- in: path
name: namespace
required: true
schema:
type: string
- in: path
name: registrationName
required: true
schema:
type: string
- in: header
name: Registration-Authorization
schema:
type: string
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/ApiRegistrationResponse'
description: Returns the ElementalRegistration
"401":
content:
text/html:
schema:
type: string
description: If the 'Registration-Authorization' header does not contain
a Bearer token
"403":
content:
text/html:
schema:
type: string
description: If the 'Registration-Authorization' token is not valid
"404":
content:
text/html:
schema:
type: string
description: If the ElementalRegistration is not found
"500":
content:
text/html:
schema:
type: string
description: Internal Server Error
summary: Get ElementalRegistration
/elemental/v1/namespaces/{namespace}/registrations/{registrationName}/hosts:
post:
description: This endpoint creates a new ElementalHost.
parameters:
- in: path
name: namespace
required: true
schema:
type: string
- in: path
name: registrationName
required: true
schema:
type: string
- in: header
name: Authorization
schema:
type: string
- in: header
name: Registration-Authorization
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ApiHostCreateRequest'
responses:
"201":
description: ElementalHost correctly created. Location Header contains its
URI
"400":
content:
text/html:
schema:
type: string
description: ElementalHost request is badly formatted
"401":
content:
text/html:
schema:
type: string
description: If the 'Authorization' or 'Registration-Authorization' headers
do not contain Bearer tokens
"403":
content:
text/html:
schema:
type: string
description: If the 'Authorization' or 'Registration-Authorization' tokens
are not valid
"404":
content:
text/html:
schema:
type: string
description: ElementalRegistration not found
"409":
content:
text/html:
schema:
type: string
description: ElementalHost with same name within this ElementalRegistration
already exists
"500":
content:
text/html:
schema:
type: string
description: Internal Server Error
summary: Create a new ElementalHost
/elemental/v1/namespaces/{namespace}/registrations/{registrationName}/hosts/{hostName}:
delete:
description: This endpoint deletes an existing ElementalHost.
parameters:
- in: path
name: namespace
required: true
schema:
type: string
- in: path
name: registrationName
required: true
schema:
type: string
- in: path
name: hostName
required: true
schema:
type: string
- in: header
name: Authorization
schema:
type: string
responses:
"202":
description: ElementalHost correctly deleted.
"401":
content:
text/html:
schema:
type: string
description: If the 'Authorization' header does not contain a Bearer token
"403":
content:
text/html:
schema:
type: string
description: If the 'Authorization' token is not valid
"404":
content:
text/html:
schema:
type: string
description: ElementalHost not found
"500":
content:
text/html:
schema:
type: string
description: Internal Server Error
summary: Delete an existing ElementalHost
patch:
description: This endpoint patches an existing ElementalHost.
parameters:
- in: path
name: namespace
required: true
schema:
type: string
- in: path
name: registrationName
required: true
schema:
type: string
- in: path
name: hostName
required: true
schema:
type: string
- in: header
name: Authorization
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ApiHostPatchRequest'
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/ApiHostResponse'
description: Returns the patched ElementalHost
"400":
content:
text/html:
schema:
type: string
description: If the ElementalHostPatch request is badly formatted
"401":
content:
text/html:
schema:
type: string
description: If the 'Authorization' header does not contain a Bearer token
"403":
content:
text/html:
schema:
type: string
description: If the 'Authorization' token is not valid
"404":
content:
text/html:
schema:
type: string
description: If the ElementalRegistration or the ElementalHost are not found
"500":
content:
text/html:
schema:
type: string
description: Internal Server Error
summary: Patch ElementalHost
/elemental/v1/namespaces/{namespace}/registrations/{registrationName}/hosts/{hostName}/bootstrap:
get:
description: This endpoint returns the ElementalHost bootstrap instructions.
parameters:
- in: path
name: namespace
required: true
schema:
type: string
- in: path
name: registrationName
required: true
schema:
type: string
- in: path
name: hostName
required: true
schema:
type: string
- in: header
name: Authorization
schema:
type: string
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/ApiBootstrapResponse'
description: Returns the ElementalHost bootstrap instructions
"401":
content:
text/html:
schema:
type: string
description: If the 'Authorization' header does not contain a Bearer token
"403":
content:
text/html:
schema:
type: string
description: If the 'Authorization' token is not valid
"404":
content:
text/html:
schema:
type: string
description: If the ElementalRegistration or ElementalHost are not found,
or if there are no bootstrap instructions yet
"500":
content:
text/html:
schema:
type: string
description: Internal Server Error
summary: Get ElementalHost bootstrap
components:
schemas:
ApiBootstrapResponse:
properties:
config:
type: string
format:
type: string
type: object
ApiHostCreateRequest:
properties:
annotations:
additionalProperties:
type: string
type: object
labels:
additionalProperties:
type: string
type: object
name:
type: string
pubKey:
type: string
type: object
ApiHostPatchRequest:
properties:
annotations:
additionalProperties:
type: string
type: object
bootstrapped:
nullable: true
type: boolean
condition:
$ref: '#/components/schemas/V1Beta1Condition'
inPlaceUpdate:
nullable: true
type: string
installed:
nullable: true
type: boolean
labels:
additionalProperties:
type: string
type: object
phase:
nullable: true
type: string
reset:
nullable: true
type: boolean
type: object
ApiHostResponse:
properties:
annotations:
additionalProperties:
type: string
type: object
bootstrapReady:
type: boolean
bootstrapped:
type: boolean
inPlaceUpgrade:
type: string
installed:
type: boolean
labels:
additionalProperties:
type: string
type: object
name:
type: string
needsReset:
type: boolean
osVersionManagement:
additionalProperties:
$ref: '#/components/schemas/RuntimeRawExtension'
type: object
type: object
ApiRegistrationResponse:
properties:
config:
$ref: '#/components/schemas/V1Beta1Config'
hostAnnotations:
additionalProperties:
type: string
type: object
hostLabels:
additionalProperties:
type: string
type: object
type: object
RuntimeRawExtension:
type: object
V1Beta1Agent:
properties:
debug:
type: boolean
hostname:
$ref: '#/components/schemas/V1Beta1Hostname'
insecureAllowHttp:
type: boolean
insecureSkipTlsVerify:
type: boolean
noSmbios:
type: boolean
osPlugin:
type: string
postInstall:
$ref: '#/components/schemas/V1Beta1PostAction'
postReset:
$ref: '#/components/schemas/V1Beta1PostAction'
reconciliation:
type: integer
useSystemCertPool:
type: boolean
workDir:
type: string
type: object
V1Beta1Condition:
properties:
lastTransitionTime:
type: string
message:
type: string
reason:
type: string
severity:
type: string
status:
type: string
type:
type: string
type: object
V1Beta1Config:
properties:
cloudConfig:
additionalProperties:
$ref: '#/components/schemas/RuntimeRawExtension'
type: object
elemental:
$ref: '#/components/schemas/V1Beta1Elemental'
type: object
V1Beta1Elemental:
properties:
agent:
$ref: '#/components/schemas/V1Beta1Agent'
install:
additionalProperties:
$ref: '#/components/schemas/RuntimeRawExtension'
type: object
registration:
$ref: '#/components/schemas/V1Beta1Registration'
reset:
additionalProperties:
$ref: '#/components/schemas/RuntimeRawExtension'
type: object
type: object
V1Beta1Hostname:
properties:
prefix:
type: string
useExisting:
type: boolean
type: object
V1Beta1PostAction:
properties:
powerOff:
type: boolean
reboot:
type: boolean
type: object
V1Beta1Registration:
properties:
caCert:
type: string
token:
type: string
tokenDuration:
type: integer
uri:
type: string
type: object