From b4e39427080293c674b8db627ee6daf1f1b56806 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Fri, 21 Oct 2022 19:15:46 +0200 Subject: [PATCH] api: Fix vm.add-device argument type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The add_device() function, from the device manager code, takes a DeviceConfig as a parameter, instead of a VmAddDevice. The change was originally done as part of 34412c9b41126 and it didn't break Kata Containers because the VmAddDevice and DeviceConfig structs share most of their fields, besides the optional for serialization `pci_segment`, which is not used by the client yet. Signed-off-by: Fabiano FidĂȘncio Signed-off-by: Sebastien Boeuf --- vmm/src/api/openapi/cloud-hypervisor.yaml | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/vmm/src/api/openapi/cloud-hypervisor.yaml b/vmm/src/api/openapi/cloud-hypervisor.yaml index c793ce3ed..46d9aac83 100644 --- a/vmm/src/api/openapi/cloud-hypervisor.yaml +++ b/vmm/src/api/openapi/cloud-hypervisor.yaml @@ -185,7 +185,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/VmAddDevice" + $ref: "#/components/schemas/DeviceConfig" required: true responses: 200: @@ -1077,17 +1077,6 @@ components: type: integer format: int64 - VmAddDevice: - type: object - properties: - path: - type: string - iommu: - type: boolean - default: false - id: - type: string - VmRemoveDevice: type: object properties: