On 01/06/2014 07:32 AM, lvroyce(a)linux.vnet.ibm.com wrote:
From: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
Add support for cdrom query and add a new cdrom:
list:
GET /vms/vm1/cdroms
--> [{u'path': u'/home/royce/isorepo/Fedora-19-x86_64-DVD.iso',
u'name': u'hdc'}]
I think 'source' and 'dev' are more consistent with libvirt terminology
[{u'source': u'/home/royce/isorepo/Fedora-19-x86_64-DVD.iso',
u'dev':
u'hdc'}]
add:
POST /vms/vm1/cdroms
{'name':'hde', 'path': 'path-of-your-iso'}
get detial:
GET /vms/vm1/cdroms/hdc
-->{u'path': u'/home/royce/isorepo/Fedora-19-x86_64-DVD.iso',
u'name': u'hdc'}
REF:
https://github.com/kimchi-project/kimchi/wiki/customize-VM
NOTE: Change media will be covered in cdrom update patch. This only covers query and
add a new cdrom device.
Royce Lv (5):
cdrom: Update API.md for add cdrom and query cdrom
cdrom: update controller
cdrom: Add convinient functions to deal with xml parse
cdrom: update model.py
cdrom: Add model test to check cdrom operations
docs/API.md | 15 ++++++++
src/kimchi/API.json | 16 +++++++++
src/kimchi/control/vms.py | 22 ++++++++++++
src/kimchi/model.py | 90 +++++++++++++++++++++++++++++++++++++++++++++--
src/kimchi/xmlutils.py | 5 +++
tests/test_model.py | 29 +++++++++++++++
6 files changed, 175 insertions(+), 2 deletions(-)