vmm: Add a 'resize-zone' action to the API actions

Implement a new VM action called 'resize-zone' allowing the user to
resize one specific memory zone at a time. This relies on all the
preliminary work from the previous commits to resize each virtio-mem
device independently from each others.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf
2020-09-10 17:34:15 +02:00
parent 141df701dd
commit 015c78411e
9 changed files with 194 additions and 5 deletions

View File

@@ -150,6 +150,22 @@ paths:
404:
description: The VM instance could not be resized because it is not created.
/vm.resize-zone:
put:
summary: Resize a memory zone
requestBody:
description: The target size for the memory zone
content:
application/json:
schema:
$ref: '#/components/schemas/VmResizeZone'
required: true
responses:
204:
description: The memory zone was successfully resized.
500:
description: The memory zone could not be resized.
/vm.add-device:
put:
summary: Add a new device to the VM
@@ -774,6 +790,16 @@ components:
type: integer
format: int64
VmResizeZone:
type: object
properties:
id:
type: string
desired_ram:
description: desired memory zone size in bytes
type: integer
format: int64
VmAddDevice:
type: object
properties: