vmm: Add HTTP API to resize the VM

Currently only increasing the number of vCPUs is supported but in the
future it will be extended.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford
2019-11-26 16:46:10 +00:00
parent e7d4eae527
commit 86339b4cb4
6 changed files with 117 additions and 3 deletions

View File

@@ -123,6 +123,16 @@ paths:
405:
description: The VM instance could not reboot because it is not booted.
/vm.resize:
put:
summary: Resize the VM
requestBody:
description: The target size for the VM
content:
application/json:
schema:
$ref: '#/components/schemas/VmResize'
required: true
components:
schemas:
@@ -411,3 +421,13 @@ components:
iommu:
type: boolean
default: false
VmResize:
required:
- desired_vcpus
type: object
properties:
cpu_count:
minimum: 1
default: 1
type: integer