vmm: openapi: Update the OpenAPI definition

Now that PCI device hotplug returns a response, the OpenAPI definition
must reflect it, describing what is expected to be received.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf 2020-06-12 09:55:51 +02:00 committed by Rob Bradford
parent 4fe7347fb9
commit b62d5d22ff

View File

@ -150,8 +150,12 @@ paths:
$ref: '#/components/schemas/VmAddDevice'
required: true
responses:
204:
200:
description: The new device was successfully added to the VM instance.
content:
application/json:
schema:
$ref: '#/components/schemas/PciDeviceInfo'
404:
description: The new device could not be added to the VM instance.
@ -182,8 +186,12 @@ paths:
$ref: '#/components/schemas/DiskConfig'
required: true
responses:
204:
200:
description: The new disk was successfully added to the VM instance.
content:
application/json:
schema:
$ref: '#/components/schemas/PciDeviceInfo'
500:
description: The new disk could not be added to the VM instance.
@ -198,8 +206,12 @@ paths:
$ref: '#/components/schemas/FsConfig'
required: true
responses:
204:
200:
description: The new device was successfully added to the VM instance.
content:
application/json:
schema:
$ref: '#/components/schemas/PciDeviceInfo'
500:
description: The new device could not be added to the VM instance.
@ -214,8 +226,12 @@ paths:
$ref: '#/components/schemas/PmemConfig'
required: true
responses:
204:
200:
description: The new device was successfully added to the VM instance.
content:
application/json:
schema:
$ref: '#/components/schemas/PciDeviceInfo'
500:
description: The new device could not be added to the VM instance.
@ -230,8 +246,12 @@ paths:
$ref: '#/components/schemas/NetConfig'
required: true
responses:
204:
200:
description: The new device was successfully added to the VM instance.
content:
application/json:
schema:
$ref: '#/components/schemas/PciDeviceInfo'
500:
description: The new device could not be added to the VM instance.
@ -246,8 +266,12 @@ paths:
$ref: '#/components/schemas/VsockConfig'
required: true
responses:
204:
200:
description: The new device was successfully added to the VM instance.
content:
application/json:
schema:
$ref: '#/components/schemas/PciDeviceInfo'
500:
description: The new device could not be added to the VM instance.
@ -311,6 +335,18 @@ components:
enum: [Created, Running, Shutdown, Paused]
description: Virtual Machine information
PciDeviceInfo:
required:
- id
- bdf
type: object
properties:
id:
type: string
bdf:
type: string
description: Information about a PCI device
VmConfig:
required:
- kernel