[Kimchi-devel] [PATCH v3 0/4] CDROM Management

Daniel Barboza danielhb at linux.vnet.ibm.com
Wed Feb 12 02:38:35 UTC 2014


From: Daniel Henrique Barboza <danielhb at linux.vnet.ibm.com>

This patch set implements host storage devices management.
It implements full CDROM device add, remove and update functionality.
It implements basic Disk functionalities.

To test this contribution:

- get info of all storages (cdrom and disks) of a VM

curl -u <user> -H "Content-Type: application/json" -H "Accept: application/json" http://localhost:8000/vms/<vm_name>/storages -X GET

- add a new cdrom to a VM

curl -u <user> -H "Content-Type: application/json" -H "Accept: application/json" http://localhost:8000/vms/<vm_name>/storages  -X POST -d'{"type": "cdrom", "path": "<path_to_iso>"}'

- get specific info from cdrom device

curl -u <user> -H "Content-Type: application/json" -H "Accet: application/json" http://localhost:8000/vms/<vm_name>/storages/<dev_name> -X GET

- delete a cdrom device from a VM

curl -u <user> -H "Content-Type: application/json" -H "Accet: application/json" http://localhost:8000/vms/<vm_name>/storages/<dev_name> -X DELETE

- update a cdrom device from a VM

curl -u <user> -H "Content-Type: application/json" -H "Accet: application/json" http://localhost:8000/vms/<vm_name>/storages/<dev_name> -X PUT -d '{"path":<path_to_iso>}'

Changelog:

V3:
- Using lxml to parse the XML information in model/vms.py
- Addressed comments/suggestions from the ML in other files

V2:
- Add devices to mockmodel and add test cases to rest API
- Assign name automatically to new devices, if not passed by user
- Fix minor errors


Rodrigo Trujillo (4):
  CDROM Management: Add storage sub-collection to sub-resource to guest
    resource
  CDROM Management: Update controller and API.json for guest storages
  CDROM Management: Devices management model implementation
  CDROM Management: Guest vm storage devices mockmodel and rest api test
    cases

 docs/API.md                       |  21 +++++
 src/kimchi/API.json               |  33 +++++++
 src/kimchi/control/vm/storages.py |  49 ++++++++++
 src/kimchi/mockmodel.py           |  66 ++++++++++++++
 src/kimchi/model/vms.py           | 184 +++++++++++++++++++++++++++++++++++++-
 src/kimchi/xmlutils.py            |   5 ++
 tests/test_rest.py                |  74 +++++++++++++++
 7 files changed, 428 insertions(+), 4 deletions(-)
 create mode 100644 src/kimchi/control/vm/storages.py

-- 
1.8.3.1




More information about the Kimchi-devel mailing list