Changes in v2:
- added unit tests
- added support to all default disk types
These patches implement the backend support to change the disk type
when editing a template.
To test it:
- create a default template:
$ curl -u user:passwd -H "Content-Type: application/json" -H "Accept:
application/json"
http://localhost:8010/templates -X POST -d'{"name":
"test_default_template", "cdrom":<valid_cdrom_path>}'
- changing the disk type of the default template to 'dmg':
$ curl -u user:passwd -H "Content-Type: application/json" -H "Accept:
application/json"
http://localhost:8010/templates/test_default_template -X PUT
-d'{"disks":[{"index":0,"size":10, "type":
"dmg"}]}'
Daniel Henrique Barboza (2):
Choose disk image type in vm template - backend
Unit tests for the new disk image types
docs/API.md | 1 +
src/kimchi/API.json | 8 ++++++-
src/kimchi/i18n.py | 1 +
src/kimchi/vmtemplate.py | 5 +++-
tests/test_mockmodel.py | 62 +++++++++++++++++++++++++++++++++++++++---------
tests/test_model.py | 14 +++++++++++
6 files changed, 78 insertions(+), 13 deletions(-)
--
1.8.3.1