Skip to content

Commit 1c2c99c

Browse files
committed
doc(virtio-mem): document PATCH API in swagger and docs
Add entry for the patch API in Swagger and in the docs. Signed-off-by: Riccardo Mancini <[email protected]>
1 parent f78ab80 commit 1c2c99c

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

docs/device-api.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ specification:
104104
| `MemoryHotplugConfig` | total_size_mib | O | O | O | O | O | O | O | **R** |
105105
| | slot_size_mib | O | O | O | O | O | O | O | **R** |
106106
| | block_size_mi | O | O | O | O | O | O | O | **R** |
107+
| `MemoryHotplugSizeUpdate` | requested_size_mib | O | O | O | O | O | O | O | **R** |
107108

108109
\* `Drive`'s `drive_id`, `is_root_device` and `partuuid` can be configured by
109110
either virtio-block or vhost-user-block devices.

src/firecracker/swagger/firecracker.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,26 @@ paths:
549549
description: Internal server error
550550
schema:
551551
$ref: "#/definitions/Error"
552+
patch:
553+
summary: Updates the size of the hotpluggable memory region
554+
operationId: patchMemoryHotplug
555+
description:
556+
Updates the size of the hotpluggable memory region. The guest will plug and unplug memory to
557+
hit the requested memory.
558+
parameters:
559+
- name: body
560+
in: body
561+
description: Hotpluggable memory size update
562+
required: true
563+
schema:
564+
$ref: "#/definitions/MemoryHotplugSizeUpdate"
565+
responses:
566+
204:
567+
description: Hotpluggable memory configured
568+
default:
569+
description: Internal server error
570+
schema:
571+
$ref: "#/definitions/Error"
552572
get:
553573
summary: Retrieves the status of the hotpluggable memory
554574
operationId: getMemoryHotplug
@@ -1422,6 +1442,15 @@ definitions:
14221442
description: (Logical) Block size for the hotpluggable memory in MiB. This will determine the logical
14231443
granularity of hot-plug memory for the guest. Refer to the device documentation on how to tune this value.
14241444

1445+
MemoryHotplugSizeUpdate:
1446+
type: object
1447+
description:
1448+
An update to the size of the hotpluggable memory region.
1449+
properties:
1450+
requested_size_mib:
1451+
type: integer
1452+
description: New target region size.
1453+
14251454
MemoryHotplugStatus:
14261455
type: object
14271456
description:

0 commit comments

Comments
 (0)