4
4
title : VILLAScontroller API
5
5
description : ' A HTTP/REST API for controlling VILLAScontroller remotely for querying component status as well as issuing control actions.'
6
6
version : 0.0.1
7
+ contact :
8
+ name : " Steffen Vogel"
9
+ email : " svogel2@eonerc.rwth-aachen.de"
7
10
license :
8
11
name : Apache-2.0
9
12
url : https://www.apache.org/licenses/LICENSE-2.0
13
+
10
14
servers :
11
15
- url : https://villas.k8s.eonerc.rwth-aachen.de/api/v1
12
16
description : Demo instance at RWTH Aachen
17
+
13
18
paths :
19
+
14
20
/ :
15
21
get :
16
22
summary : ' Get status of VILLAScontroller daemon'
17
23
operationId : getStatus
24
+ tags :
25
+ - status
18
26
responses :
19
27
' 200 ' :
20
28
description : ' '
@@ -66,9 +74,31 @@ paths:
66
74
version : ' #1 SMP Fri Sep 3 15:33:01 UTC 2021'
67
75
machine : x86_64
68
76
77
+ /health :
78
+ get :
79
+ operationId : getHealth
80
+ summary : Query health of daemon.
81
+ tags :
82
+ - status
83
+ responses :
84
+ ' 200 ' :
85
+ description : The daemon is healthy
86
+ content :
87
+ application/json :
88
+ schema :
89
+ type : object
90
+ properties :
91
+ status :
92
+ type : string
93
+ example :
94
+ status : ok
95
+
69
96
70
97
/component/{uuid} :
71
98
get :
99
+ summary : ' Get the current status of a component'
100
+ operationId : getComponentStatus
101
+
72
102
parameters :
73
103
- name : uuid
74
104
in : path
@@ -77,10 +107,8 @@ paths:
77
107
type : string
78
108
format : uuid
79
109
80
- operationId : getComponentStatus
81
- summary : ' Get the current status of a component'
82
110
responses :
83
- 200 :
111
+ ' 200 ' :
84
112
description : ' '
85
113
content :
86
114
application/json :
@@ -186,139 +214,114 @@ paths:
186
214
uuid : f4751894-205e-11eb-aefb-0741ff98abca
187
215
schema :
188
216
create :
189
- $schema : ' http://json-schema.org/draft-07/schema'
190
- $id : ' http://example.com/example.json'
217
+ # $schema: 'http://json-schema.org/draft-07/schema'
191
218
type : object
192
219
default : {}
193
220
required :
194
- - name
195
- - category
196
- - location
197
- - owner
198
- - realm
199
- - type
200
- - api_url
201
- - ws_url
221
+ - name
222
+ - category
223
+ - location
224
+ - owner
225
+ - realm
226
+ - type
227
+ - api_url
228
+ - ws_url
202
229
properties :
203
230
name :
204
- $id : ' #/properties/name'
205
231
type : string
206
232
title : Component name
207
233
default : New Component
208
- examples :
209
- - ' Generic Simulator #1'
234
+ examples : ' Generic Simulator #1'
210
235
owner :
211
- $id : ' #/properties/owner'
212
236
type : string
213
237
title : Component owner
214
- default : ' '
215
238
examples :
216
- - rmr
217
- - svg
239
+ - rmr
240
+ - svg
218
241
realm :
219
- $id : ' #/properties/realm'
220
242
type : string
221
243
title : Component realm
222
244
default : ' '
223
245
examples :
224
- - de.rwth-aachen.eonerc.acs
246
+ - de.rwth-aachen.eonerc.acs
225
247
category :
226
- $id : ' #/properties/category'
227
248
type : string
228
249
title : Component category
229
- default : ' '
230
250
examples :
231
- - simulator
251
+ - simulator
232
252
location :
233
- $id : ' #/properties/location'
234
253
type : string
235
254
title : Component location
236
- default : ' '
237
255
examples :
238
- - Richard's PC
256
+ - Richard's PC
239
257
type :
240
- $id : ' #/properties/type'
241
258
type : string
242
- title : The type schema
243
- default : ' '
244
- examples :
245
- - generic
259
+ default : generic
246
260
uuid :
247
- $id : ' #/properties/uuid'
248
- type : ' null'
249
- title : The uuid schema
250
- default : null
261
+ type : ' string'
262
+ format : uuid
251
263
ws_url :
252
- $id : ' #/properties/ws_url'
253
264
type : string
254
- title : The ws_url schema
255
- default : ' '
256
265
examples :
257
- - ' https://villas.k8s.eonerc.rwth-aachen.de/ws/relay/generic_1'
266
+ - ' https://villas.k8s.eonerc.rwth-aachen.de/ws/relay/generic_1'
258
267
api_url :
259
- $id : ' #/properties/api_url'
260
268
type : string
261
- title : The api_url schema
262
- default : ' '
263
269
examples :
264
- - ' https://villas.k8s.eonerc.rwth-aachen.de/api/ic/generic_1'
270
+ - ' https://villas.k8s.eonerc.rwth-aachen.de/api/ic/generic_1'
265
271
shell :
266
- $id : ' #/properties/shell'
267
272
type : boolean
268
- title : The shell schema
269
273
default : false
270
274
examples :
271
- - true
275
+ - true
272
276
whitelist :
273
- $id : ' #/properties/whitelist'
274
277
type : array
275
278
title : The whitelist schema
276
279
default : []
277
280
examples :
278
- - - /sbin/ping
279
- - ^echo
281
+ - - /sbin/ping
282
+ - ^echo
280
283
additionalItems : true
281
284
items :
282
- $id : ' #/properties/whitelist/items'
283
285
anyOf :
284
- - $id : ' #/properties/whitelist/items/anyOf/0'
285
- type : string
286
- title : The first anyOf schema
287
- default : ' '
288
- examples :
289
- - /sbin/ping
290
- - ^echo
291
- additionalProperties : true
292
-
286
+ - type : string
287
+ examples :
288
+ - /sbin/ping
289
+ - ^echo
293
290
294
291
post :
295
292
operationId : executeComponentAction
296
293
summary : ' Send a control action to the component'
294
+ requestBody :
295
+ required : true
296
+ content :
297
+ application/json :
298
+ schema :
299
+ type : object
300
+ properties :
301
+ action :
302
+ type : string
303
+ enum :
304
+ - start
305
+ - stop
306
+ - pause
307
+ - resume
308
+ - create
309
+ - delete
310
+ - shutdown
311
+ - reset
312
+ parameters :
313
+ oneOf :
314
+ - $ref : ../villas/controller/schemas/manager/generic/create.yaml
315
+ - $ref : ../villas/controller/schemas/manager/kubernetes/create.yaml
316
+ - $ref : ../villas/controller/schemas/simulator/dpsim/start.yaml
317
+ - $ref : ../villas/controller/schemas/simulator/dummy/start.yaml
318
+
297
319
responses :
298
- 200 :
320
+ ' 200 ' :
299
321
description : ' '
300
322
content :
301
- application/json :
302
- schema :
303
- type : object
304
- additionalProperties : true
323
+ application/json : {}
305
324
306
- example :
307
- runtime : 10.2
308
325
309
- /health :
310
- get :
311
- operationId : getHealth
312
- summary : Query health of daemon.
313
- responses :
314
- ' 200 ' :
315
- description : The daemon is healthy
316
- content :
317
- application/json :
318
- schema :
319
- type : object
320
- properties :
321
- status :
322
- type : string
323
- example :
324
- status : ok
326
+ # example:
327
+ # runtime: 10.2
0 commit comments