Skip to content

Commit da8a93d

Browse files
committed
chore(virtio-pmem): update swagger file
Add description of pmem endpoint. Signed-off-by: Egor Lazarchuk <[email protected]>
1 parent 532756e commit da8a93d

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

src/firecracker/swagger/firecracker.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,38 @@ paths:
282282
schema:
283283
$ref: "#/definitions/Error"
284284

285+
/pmem/{id}:
286+
put:
287+
summary: Creates or updates a pmem device. Pre-boot only.
288+
description:
289+
Creates new pmem device with ID specified by id parameter.
290+
If a pmem device with the specified ID already exists, updates its state based on new input.
291+
Will fail if update is not possible.
292+
operationId: putGuestPmemByID
293+
parameters:
294+
- name: id
295+
in: path
296+
description: The id of the guest pmem device
297+
required: true
298+
type: string
299+
- name: body
300+
in: body
301+
description: Guest pmem device properties
302+
required: true
303+
schema:
304+
$ref: "#/definitions/Pmem"
305+
responses:
306+
204:
307+
description: Pmem device is created/updated
308+
400:
309+
description: Pmem device cannot be created/updated due to bad input
310+
schema:
311+
$ref: "#/definitions/Error"
312+
default:
313+
description: Internal server error.
314+
schema:
315+
$ref: "#/definitions/Error"
316+
285317
/logger:
286318
put:
287319
summary: Initializes the logger by specifying a named pipe or a file for the logs output.
@@ -934,6 +966,20 @@ definitions:
934966
Path to the socket of vhost-user-block backend.
935967
This field is required for vhost-user-block config should be omitted for virtio-block configuration.
936968

969+
Pmem:
970+
type: object
971+
required:
972+
- id
973+
- is_root_device
974+
- shared
975+
properties:
976+
id:
977+
type: string
978+
is_root_device:
979+
type: boolean
980+
shared:
981+
type: boolean
982+
937983
Error:
938984
type: object
939985
properties:

0 commit comments

Comments
 (0)