[Kimchi-devel] [PATCHv4 0/7] Support image based template

lvroyce at linux.vnet.ibm.com lvroyce at linux.vnet.ibm.com
Thu Jul 24 09:02:17 UTC 2014


From: Royce Lv <lvroyce at linux.vnet.ibm.com>

v3>v4,
    Aggreated image scanning and name generate logic to vmtemplate.py
to avoid duplicate code.
    Updated testcases accordingly.
v2>v3,
    Clear unused iso link,
    Adding mockmodel and tests

How to test:
   create a image using:
       POST /templates {'name':'mytemp', 'disks':[{'base':'a_base_img_path'}]}
   create a vm using:
       POST /vms {'template': '/templates/mytemp', 'pool'....}

Passed test:
1. regression:
    (1) create vm from local iso based template
    (2) create vm from remote iso based template
2. name generating test:
    (1) iso/image with valid distro can produce right name
    (2) iso/image with unknown distro can produce right name
3. functional test:
    (1) create template from img
    (2) create vm from img based template
Royce Lv (7):
  Add image probe function
  Change doc and api specification
  Change 'cdrom' to a optional param
  Fix: Prevent iso links filling in osinfo.py
  Create volume based on backing store image
  Update mockmodel of base img vm
  Add tests for image based template

 Makefile.am                          |   1 +
 contrib/DEBIAN/control.in            |   4 +-
 contrib/kimchi.spec.fedora.in        |   2 +
 contrib/kimchi.spec.suse.in          |   2 +
 docs/API.md                          |   3 +-
 docs/README.md                       |   9 ++-
 src/kimchi/API.json                  |   8 ++-
 src/kimchi/control/storagevolumes.py |   2 +-
 src/kimchi/control/templates.py      |   2 +-
 src/kimchi/exception.py              |   4 ++
 src/kimchi/i18n.py                   |   8 ++-
 src/kimchi/imageinfo.py              |  66 ++++++++++++++++++++++
 src/kimchi/mockmodel.py              |  21 +++----
 src/kimchi/model/templates.py        |  12 +---
 src/kimchi/model/vms.py              |   1 +
 src/kimchi/osinfo.py                 |  24 +-------
 src/kimchi/vmtemplate.py             | 104 +++++++++++++++++++++++++----------
 tests/test_mockmodel.py              |  12 ++--
 tests/test_model.py                  |  25 +++++++++
 tests/test_osinfo.py                 |   8 ---
 tests/test_rest.py                   |  35 +++++++++++-
 tests/test_vmtemplate.py             |  25 ++++++---
 22 files changed, 276 insertions(+), 102 deletions(-)
 create mode 100644 src/kimchi/imageinfo.py

-- 
1.8.3.2




More information about the Kimchi-devel mailing list