vmm: api: Add a /api/v1/vm.restore endpoint

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
Samuel Ortiz
2020-02-26 01:00:26 +01:00
committed by Rob Bradford
parent 92c73c3b78
commit 8f300bed83
3 changed files with 88 additions and 22 deletions

View File

@@ -171,24 +171,6 @@ paths:
404:
description: The device could not be removed from the VM instance.
/vm.snapshot:
put:
summary: Returns a VM snapshot.
requestBody:
description: The snapshot configuration
content:
application/json:
schema:
$ref: '#/components/schemas/VmSnapshotConfig'
required: true
responses:
204:
description: The VM instance was successfully snapshotted.
404:
description: The VM instance could not be snapshotted because it is not created.
405:
description: The VM instance could not be snapshotted because it is not booted.
/vm.add-disk:
put:
summary: Add a new disk to the VM
@@ -237,6 +219,40 @@ paths:
500:
description: The new device could not be added to the VM instance.
/vm.snapshot:
put:
summary: Returns a VM snapshot.
requestBody:
description: The snapshot configuration
content:
application/json:
schema:
$ref: '#/components/schemas/VmSnapshotConfig'
required: true
responses:
204:
description: The VM instance was successfully snapshotted.
404:
description: The VM instance could not be snapshotted because it is not created.
405:
description: The VM instance could not be snapshotted because it is not booted.
/vm.restore:
put:
summary: Restore a VM from a snapshot.
requestBody:
description: The restore configuration
content:
application/json:
schema:
$ref: '#/components/schemas/VmRestoreConfig'
required: true
responses:
204:
description: The VM instance was successfully restored.
404:
description: The VM instance could not be restored because it is already created.
components:
schemas:
@@ -566,3 +582,9 @@ components:
properties:
destination_url:
type: string
VmRestoreConfig:
type: object
properties:
source_url:
type: string