[Kimchi-devel] [PATCHv3 0/8] Support img based template

lvroyce0210 at gmail.com lvroyce0210 at gmail.com
Sun Jul 20 15:07:57 UTC 2014


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

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

Known issues:
    1.This is only available for NFS and dir pool, logical pool in kimchi now adopted
raw format which does not suitable for qcow2 img(will fix later).
    iscsi, scsi pool volume size need to be checked and handled later.
    So in this version just support dir based pool.
    2.Due to template integrity check need be refactored, this check will be added later.

Royce Lv (8):
  Add image probe function
  Change doc and api specification
  Change 'cdrom' to a optional param
  Fix: Prevent iso links filling in osinfo.py
  Integrate image os probe in vm template create
  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              | 31 ++++++++++++---
 src/kimchi/model/templates.py        | 13 +++---
 src/kimchi/model/vms.py              |  1 +
 src/kimchi/osinfo.py                 | 24 +-----------
 src/kimchi/vmtemplate.py             | 76 ++++++++++++++++++++++++------------
 tests/test_model.py                  | 25 ++++++++++++
 tests/test_osinfo.py                 |  8 ----
 tests/test_rest.py                   | 32 ++++++++++++++-
 tests/test_vmtemplate.py             |  2 +-
 21 files changed, 244 insertions(+), 79 deletions(-)
 create mode 100644 src/kimchi/imageinfo.py

-- 
1.8.3.2




More information about the Kimchi-devel mailing list