api: Fix vm.add-device argument type

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 34412c9b41 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 <fabiano.fidencio@intel.com>
Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Fabiano Fidêncio 2022-10-21 19:15:46 +02:00 committed by Bo Chen
parent 802f489e4d
commit b4e3942708

View File

@ -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: