[Kimchi-devel] [PATCH v5 0/5] CDROM Management

Daniel Barboza danielhb at linux.vnet.ibm.com
Fri Feb 14 01:45:33 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.

Changelog:

v5:
- Addressed Aline's comments from her review in v4

v4:
- Imports fix, author fix, pep8 fixes
- Cut off HDD support
- lxml changes in model/vms.py
- test_model.py changes - add, update and remove cdroms
- existing device name verification in model/vms.py
- changed the code to use the new exception model

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

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>}'

Daniel Henrique Barboza (2):
  CDROM Management: API.md and externalized error messages
  CDROM Management: changes in tests/test_model.py

Rodrigo Trujillo (3):
  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               |  37 ++++++++
 src/kimchi/control/vm/storages.py |  49 +++++++++++
 src/kimchi/i18n.py                |  11 +++
 src/kimchi/mockmodel.py           |  63 ++++++++++++++
 src/kimchi/model/vms.py           | 173 +++++++++++++++++++++++++++++++++++++-
 src/kimchi/xmlutils.py            |   2 +-
 tests/test_model.py               |  56 ++++++++++++
 tests/test_rest.py                |  56 ++++++++++++
 9 files changed, 465 insertions(+), 3 deletions(-)
 create mode 100644 src/kimchi/control/vm/storages.py

-- 
1.8.3.1




More information about the Kimchi-devel mailing list