[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [test-API][PATCH 2/2] Define domain from xml should support image format option



  * add imageformat as optional param in define
  * modify define xml for image format support

Signed-off-by: Wayne Sun <gsun redhat com>
---
 repos/domain/define.py                 |    1 +
 repos/domain/xmls/kvm_guest_define.xml |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/repos/domain/define.py b/repos/domain/define.py
index 0a06dfd..a70ddad 100644
--- a/repos/domain/define.py
+++ b/repos/domain/define.py
@@ -16,6 +16,7 @@ from utils import utils
 required_params = ('guestname', 'diskpath',)
 optional_params = {'memory': 1048576,
                    'vcpu': 1,
+                   'imageformat' : 'raw',
                    'hddriver' : 'virtio',
                    'nicdriver': 'virtio',
                    'macaddr': '52:54:00:97:e4:28',
diff --git a/repos/domain/xmls/kvm_guest_define.xml b/repos/domain/xmls/kvm_guest_define.xml
index 4599b2e..6da0ad4 100644
--- a/repos/domain/xmls/kvm_guest_define.xml
+++ b/repos/domain/xmls/kvm_guest_define.xml
@@ -19,7 +19,7 @@
   <on_crash>restart</on_crash>
   <devices>
     <disk type='file' device='disk'>
-      <driver name='qemu' type='qcow2'/>
+      <driver name='qemu' type='IMAGEFORMAT'/>
       <source file='DISKPATH'/>
       <target dev='vda' bus='HDDRIVER'/>
     </disk>
-- 
1.7.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]