The testing are failing with this patch set:
======================================================================
ERROR: test_use_test_host (test_model.ModelTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/alinefm/kimchi/tests/test_model.py", line 929, in
test_use_test_host
self.assertTrue('kimchi-vm' in vms)
File "/home/alinefm/kimchi/src/kimchi/rollbackcontext.py", line 53,
in __exit__
undo(*args, **kwargs)
File "/home/alinefm/kimchi/src/kimchi/model/vms.py", line 425, in delete
info = self.lookup(name)
File "/home/alinefm/kimchi/src/kimchi/model/vms.py", line 382, in lookup
access_xml = (get_vm_metadata_element(dom, "access") or
File "/home/alinefm/kimchi/src/kimchi/model/utils.py", line 103, in
get_vm_metadata_element
'err': e.message})
OperationFailed: KCHVM0030E: KCHVM0030E
======================================================================
ERROR: test_vm_info (test_model.ModelTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/alinefm/kimchi/tests/test_model.py", line 71, in test_vm_info
info = inst.vm_lookup('test')
File "/home/alinefm/kimchi/src/kimchi/model/vms.py", line 382, in lookup
access_xml = (get_vm_metadata_element(dom, "access") or
File "/home/alinefm/kimchi/src/kimchi/model/utils.py", line 103, in
get_vm_metadata_element
'err': e.message})
OperationFailed: KCHVM0030E: KCHVM0030E
----------------------------------------------------------------------
Ran 158 tests in 209.205s
FAILED (errors=2)
[24/Apr/2014:12:12:22] ENGINE Waiting for child threads to terminate...
make[3]: *** [check-local] Error 1
make[3]: Leaving directory `/home/alinefm/kimchi/tests'
make[2]: *** [check-am] Error 2
make[2]: Leaving directory `/home/alinefm/kimchi/tests'
make[1]: *** [check] Error 2
make[1]: Leaving directory `/home/alinefm/kimchi/tests'
make: *** [check-recursive] Error 1
I noticed in my system libvirt raises libvirt.VIR_ERR_NO_SUPPORT when
trying to use setMetadata (instead of libvirt.VIR_ERR_NO_DOMAIN_METADATA)
We need to adjust it too.
On 04/24/2014 02:30 AM, shaohef(a)linux.vnet.ibm.com wrote:
From: ShaoHe Feng <shaohef(a)linux.vnet.ibm.com>
V6 -> V7:
After V6 rebase, still find one error code "KCHVM0029E" does not change.
V5 -> V6:
rebase
V4 -> V5:
it is wrong to call dom.isPersistent in V4, fix it.
V3 -> V4:
work around if libvirt do not support metadata API well.
V2 -> V3:
move the virDomain.metadata and virDomain.setMetadata to model/utils.py
add testcase
V1 -> V2:
libvirt also support virDomain.metadata and virDomain.setMetadata two api.
use virDomain.metadata to get the user and group.
use virDomain.setMetadata to set the user and group.
ShaoHe Feng (5):
Add two function to set and get domain xml metadata
bug fix: get user and group when vm is living.
update test case to set/get user and group when VM is running
write the template OS info to vm metadata
manually manage the metadata element
src/kimchi/i18n.py | 1 +
src/kimchi/model/utils.py | 73 +++++++++++++++++++++++++++++++++
src/kimchi/model/vms.py | 102 ++++++++++++++++++++++++++++------------------
tests/test_model.py | 13 ++++++
4 files changed, 150 insertions(+), 39 deletions(-)