[Kimchi-devel] [PATCH 0/3] New backend API: get available devices from host
dhbarboza82 at gmail.com
dhbarboza82 at gmail.com
Tue Jul 14 15:00:02 UTC 2015
From: Daniel Henrique Barboza <dhbarboza82 at gmail.com>
This patch set adds a new API to retrieve only the available devices
from the host. 'available' means only the devices that weren't
attached to any other VM.
The backend is generic and can work with all devices, but the API
provided here is made for 'PCI' devices only as we do not provide
official support for USB and SCSI passthrough yet.
Usage:
get all available devices:
$ curl -u danielhb -H "Content-Type: application/json" -H "Accept: application/json" -X GET "http://localhost:8010/host/devices?_passthrough=true&_available_only=true"
get all available PCI devices:
$ curl -u danielhb -H "Content-Type: application/json" -H "Accept: application/json" -X GET "http://localhost:8010/host/devices?_passthrough=true&_available_only=true&_cap=pci"
Daniel Henrique Barboza (3):
Get available host passthrough devices: model changes
Adding new API in the UI APIs and docs
Mockmodel and test changes for the new API
docs/API.md | 2 +
src/kimchi/API.json | 6 +++
src/kimchi/i18n.py | 1 +
src/kimchi/mockmodel.py | 3 +-
src/kimchi/model/host.py | 105 ++++++++++++++++++++++++++++++++++++++++-
src/kimchi/model/vmhostdevs.py | 75 ++---------------------------
tests/test_host.py | 11 +++++
ui/js/src/kimchi.api.js | 14 ++++++
8 files changed, 144 insertions(+), 73 deletions(-)
--
2.4.3
More information about the Kimchi-devel
mailing list