From b62d5d22ffb5366537166bca55407002787d4613 Mon Sep 17 00:00:00 2001 From: Sebastien Boeuf Date: Fri, 12 Jun 2020 09:55:51 +0200 Subject: [PATCH] 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 --- vmm/src/api/openapi/cloud-hypervisor.yaml | 48 ++++++++++++++++++++--- 1 file changed, 42 insertions(+), 6 deletions(-) diff --git a/vmm/src/api/openapi/cloud-hypervisor.yaml b/vmm/src/api/openapi/cloud-hypervisor.yaml index 5c5edb283..ff65fcefa 100644 --- a/vmm/src/api/openapi/cloud-hypervisor.yaml +++ b/vmm/src/api/openapi/cloud-hypervisor.yaml @@ -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