This repository has been archived by the owner on Nov 28, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 36
/
swagger.yaml
302 lines (302 loc) · 7.04 KB
/
swagger.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
swagger: '2.0'
info:
title: RMD API
description: Resource Management Daemon API specification
version: "0.3.0"
contact:
name: RMD API Support
url: http://www.rmd.org
email: rmd@intel.com
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
schemes:
- http
basePath: /v1
produces:
- application/json
paths:
/cache:
get:
summary: Host cache information
description: |
Get the cache information, include level 2, level 3 cache information it has
tags:
- cache
responses:
200:
description: cache info
schema:
type: object
properties:
cpuinfo:
$ref: '#/definitions/CachesSummary'
/cache/{cache_level}:
get:
summary: Host cache topology for specific level
description: |
Get the cache information for specified cache level, also the endpoint suppport provide llc
tags:
- cache
parameters:
- name: cache_level
in: path
description: cache level
required: true
type: string
enum: ['l3', 'l2', 'llc']
responses:
200:
description: An array cache information
schema:
type: array
items:
$ref: '#/definitions/CacheInfos'
/workloads:
get:
summary: Get all RMD managed work loads running on the host
description: |
Get all work loads running on the host
tags:
- workload
responses:
200:
description: Workload object
schema:
type: array
items:
$ref: '#/definitions/Workload'
post:
summary: Create a workload with enforcement
description: |
Create a workload by providing task list or cpu list
tags:
- workload
parameters:
- name: body
in: body
required: true
schema:
type: string
example:
core_ids: ["22"]
cache:
max: 4
min: 2
responses:
201:
description: New Workload object created
schema:
type: array
items:
$ref: '#/definitions/Workload'
400:
description: Bad request
/workloads/{workload_id}:
get:
summary: Get workload by id
description: |
Get workload by id
parameters:
- name: workload_id
in: path
description: workload id
required: true
type: string
tags:
- workload
responses:
200:
description: Workload object
schema:
$ref: '#/definitions/Workload'
delete:
summary: Delete workload by id
description: |
Delete workload by id
parameters:
- name: workload_id
in: path
description: workload id
required: true
type: string
tags:
- workload
responses:
200:
description: delete workload
patch:
summary: Update policy or cache ways of a workload
description: |
Update policy or cache ways of a workload
tags:
- workload
parameters:
- name: workload_id
in: path
description: workload id
required: true
type: string
- name: body
in: body
required: true
schema:
type: string
example:
cache:
max: 4
min: 2
responses:
200:
description: Workload object
schema:
$ref: '#/definitions/Workload'
400:
description: Bad request
404:
description: Not found
/hospitality:
post:
summary: Get hospitality for a request
description: |
Get hospitality for a request
tags:
- hospitality
parameters:
- name: body
in: body
required: true
schema:
type: string
example:
max_cache: 4
min_cache: 2
responses:
200:
description: Score of hospitality
schema:
$ref: '#/definitions/Score'
/policy:
get:
summary: List pre-defined workload policies for submodules
description: |
List pre-defined policies for all defined modules
tags:
- policy
responses:
200:
description: list of pre-defined policies
schema:
$ref: '#/definitions/Policy'
definitions:
CacheSummary:
type: object
properties:
number:
type: integer
format: int32
description: number of cache
cache_id:
type: array
items:
type: string
CachesSummary:
type: object
properties:
rdt:
type: boolean
description: rdt supported
cqm:
type: boolean
description: cache quality monitoring supported
cdp:
type: boolean
description: code data prioritization supported
caches:
$ref: '#/definitions/CacheSummary'
CacheInfo:
type: object
properties:
cache_id:
type: string
description: cache id
total_size:
type: string
description: total size of the cache
cdp:
type: boolean
description: code data prioritization supported
CacheInfos:
type: object
properties:
number:
type: integer
format: int32
description: number of cache information
Caches:
$ref: '#/definitions/CacheInfo'
Workload:
type: object
properties:
id:
description: Id of the workload
type: integer
format: int32
core_ids:
description: CPU core ids the workload running on
type: array
items:
type: string
task_ids:
description: Task ids of the workload
type: array
items:
type: string
policy:
description: Name of policy used to configure this workload
type: string
status:
description: Workload creation status
type: string
cos_name:
description: Corresponding Class Of Service name
type: string
cache:
description: Cache ways assignments configuration
type: object
properties:
min:
type: integer
max:
type: integer
CacheScore:
type: object
properties:
l3:
type: object
Score:
type: object
properties:
score:
$ref: '#/definitions/CacheScore'
CachePolicy:
type: object
properties:
max:
type: integer
min:
type: integer
ComplexPolicy:
type: object
properties:
cache:
$ref: '#/definitions/CachePolicy'
Policy:
type: object
properties:
gold:
$ref: '#/definitions/ComplexPolicy'
silver:
$ref: '#/definitions/ComplexPolicy'
bronze:
$ref: '#/definitions/ComplexPolicy'