[Kimchi-devel] [PATCH 0/6 V3] Host's repositories management support

Aline Manera alinefm at linux.vnet.ibm.com
Mon Feb 17 14:48:35 UTC 2014


I got the following errors while running tests:

======================================================================
ERROR: test_get_hostinfo (test_model.ModelTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/alinefm/kimchi/tests/test_model.py", line 800, in 
test_get_hostinfo
objstore_loc=self.tmp_store)
File "/home/alinefm/kimchi/src/kimchi/model/model.py", line 60, in __init__
models.append(instance(**kargs))
File "/home/alinefm/kimchi/src/kimchi/model/host.py", line 307, in __init__
self.host_repositories = Repositories()
File "/home/alinefm/kimchi/src/kimchi/basemodel.py", line 54, in __call__
cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs)
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 64, in __init__
self._scanSystemRepositories()
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 72, in 
_scanSystemRepositories
self.addRepository(repo)
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 79, in 
addRepository
repo = {'repo_id': repo_id,
NameError: global name 'repo_id' is not defined

======================================================================
ERROR: test_get_hoststats (test_model.ModelTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/alinefm/kimchi/tests/test_model.py", line 811, in 
test_get_hoststats
objstore_loc=self.tmp_store)
File "/home/alinefm/kimchi/src/kimchi/model/model.py", line 60, in __init__
models.append(instance(**kargs))
File "/home/alinefm/kimchi/src/kimchi/model/host.py", line 307, in __init__
self.host_repositories = Repositories()
File "/home/alinefm/kimchi/src/kimchi/basemodel.py", line 54, in __call__
cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs)
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 64, in __init__
self._scanSystemRepositories()
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 72, in 
_scanSystemRepositories
self.addRepository(repo)
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 79, in 
addRepository
repo = {'repo_id': repo_id,
NameError: global name 'repo_id' is not defined

======================================================================
ERROR: test_get_interfaces (test_model.ModelTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/alinefm/kimchi/tests/test_model.py", line 625, in 
test_get_interfaces
objstore_loc=self.tmp_store)
File "/home/alinefm/kimchi/src/kimchi/model/model.py", line 60, in __init__
models.append(instance(**kargs))
File "/home/alinefm/kimchi/src/kimchi/model/host.py", line 307, in __init__
self.host_repositories = Repositories()
File "/home/alinefm/kimchi/src/kimchi/basemodel.py", line 54, in __call__
cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs)
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 64, in __init__
self._scanSystemRepositories()
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 72, in 
_scanSystemRepositories
self.addRepository(repo)
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 79, in 
addRepository
repo = {'repo_id': repo_id,
NameError: global name 'repo_id' is not defined

======================================================================
ERROR: test_multithreaded_connection (test_model.ModelTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/alinefm/kimchi/tests/test_model.py", line 559, in 
test_multithreaded_connection
inst = model.Model('test:///default', self.tmp_store)
File "/home/alinefm/kimchi/src/kimchi/model/model.py", line 60, in __init__
models.append(instance(**kargs))
File "/home/alinefm/kimchi/src/kimchi/model/host.py", line 307, in __init__
self.host_repositories = Repositories()
File "/home/alinefm/kimchi/src/kimchi/basemodel.py", line 54, in __call__
cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs)
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 64, in __init__
self._scanSystemRepositories()
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 72, in 
_scanSystemRepositories
self.addRepository(repo)
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 79, in 
addRepository
repo = {'repo_id': repo_id,
NameError: global name 'repo_id' is not defined

======================================================================
ERROR: test_network (test_model.ModelTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/alinefm/kimchi/tests/test_model.py", line 521, in test_network
inst = model.Model('qemu:///system', self.tmp_store)
File "/home/alinefm/kimchi/src/kimchi/model/model.py", line 60, in __init__
models.append(instance(**kargs))
File "/home/alinefm/kimchi/src/kimchi/model/host.py", line 307, in __init__
self.host_repositories = Repositories()
File "/home/alinefm/kimchi/src/kimchi/basemodel.py", line 54, in __call__
cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs)
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 64, in __init__
self._scanSystemRepositories()
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 72, in 
_scanSystemRepositories
self.addRepository(repo)
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 79, in 
addRepository
repo = {'repo_id': repo_id,
NameError: global name 'repo_id' is not defined

======================================================================
ERROR: test_object_store (test_model.ModelTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/alinefm/kimchi/tests/test_model.py", line 593, in 
test_object_store
'α', 'β')
File "/usr/lib/python2.7/unittest/case.py", line 476, in assertRaises
callableObj(*args, **kwargs)
File "/home/alinefm/kimchi/src/kimchi/objectstore.py", line 57, in get
raise NotFoundError("KCHOBJST0001E", {'item': ident})
File "/home/alinefm/kimchi/src/kimchi/exception.py", line 33, in __init__
paths = cherrypy.request.app.root.paths
AttributeError: 'NoneType' object has no attribute 'root'

======================================================================
ERROR: test_repository_create (test_model.ModelTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/alinefm/kimchi/tests/test_model.py", line 860, in 
test_repository_create
objstore_loc=self.tmp_store)
File "/home/alinefm/kimchi/src/kimchi/model/model.py", line 60, in __init__
models.append(instance(**kargs))
File "/home/alinefm/kimchi/src/kimchi/model/host.py", line 307, in __init__
self.host_repositories = Repositories()
File "/home/alinefm/kimchi/src/kimchi/basemodel.py", line 54, in __call__
cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs)
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 64, in __init__
self._scanSystemRepositories()
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 72, in 
_scanSystemRepositories
self.addRepository(repo)
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 79, in 
addRepository
repo = {'repo_id': repo_id,
NameError: global name 'repo_id' is not defined

======================================================================
ERROR: test_repository_disable_enable (test_model.ModelTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/alinefm/kimchi/tests/test_model.py", line 932, in 
test_repository_disable_enable
objstore_loc=self.tmp_store)
File "/home/alinefm/kimchi/src/kimchi/model/model.py", line 60, in __init__
models.append(instance(**kargs))
File "/home/alinefm/kimchi/src/kimchi/model/host.py", line 307, in __init__
self.host_repositories = Repositories()
File "/home/alinefm/kimchi/src/kimchi/basemodel.py", line 54, in __call__
cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs)
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 64, in __init__
self._scanSystemRepositories()
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 72, in 
_scanSystemRepositories
self.addRepository(repo)
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 79, in 
addRepository
repo = {'repo_id': repo_id,
NameError: global name 'repo_id' is not defined

======================================================================
ERROR: test_repository_update (test_model.ModelTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/alinefm/kimchi/tests/test_model.py", line 902, in 
test_repository_update
objstore_loc=self.tmp_store)
File "/home/alinefm/kimchi/src/kimchi/model/model.py", line 60, in __init__
models.append(instance(**kargs))
File "/home/alinefm/kimchi/src/kimchi/model/host.py", line 307, in __init__
self.host_repositories = Repositories()
File "/home/alinefm/kimchi/src/kimchi/basemodel.py", line 54, in __call__
cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs)
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 64, in __init__
self._scanSystemRepositories()
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 72, in 
_scanSystemRepositories
self.addRepository(repo)
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 79, in 
addRepository
repo = {'repo_id': repo_id,
NameError: global name 'repo_id' is not defined

======================================================================
ERROR: test_storagepool (test_model.ModelTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/alinefm/kimchi/tests/test_model.py", line 246, in 
test_storagepool
inst = model.Model('qemu:///system', self.tmp_store)
File "/home/alinefm/kimchi/src/kimchi/model/model.py", line 60, in __init__
models.append(instance(**kargs))
File "/home/alinefm/kimchi/src/kimchi/model/host.py", line 307, in __init__
self.host_repositories = Repositories()
File "/home/alinefm/kimchi/src/kimchi/basemodel.py", line 54, in __call__
cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs)
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 64, in __init__
self._scanSystemRepositories()
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 72, in 
_scanSystemRepositories
self.addRepository(repo)
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 79, in 
addRepository
repo = {'repo_id': repo_id,
NameError: global name 'repo_id' is not defined

======================================================================
ERROR: test_storagevolume (test_model.ModelTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/alinefm/kimchi/tests/test_model.py", line 310, in 
test_storagevolume
inst = model.Model('qemu:///system', self.tmp_store)
File "/home/alinefm/kimchi/src/kimchi/model/model.py", line 60, in __init__
models.append(instance(**kargs))
File "/home/alinefm/kimchi/src/kimchi/model/host.py", line 307, in __init__
self.host_repositories = Repositories()
File "/home/alinefm/kimchi/src/kimchi/basemodel.py", line 54, in __call__
cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs)
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 64, in __init__
self._scanSystemRepositories()
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 72, in 
_scanSystemRepositories
self.addRepository(repo)
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 79, in 
addRepository
repo = {'repo_id': repo_id,
NameError: global name 'repo_id' is not defined

======================================================================
ERROR: test_template_create (test_model.ModelTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/alinefm/kimchi/tests/test_model.py", line 405, in 
test_template_create
objstore_loc=self.tmp_store)
File "/home/alinefm/kimchi/src/kimchi/model/model.py", line 60, in __init__
models.append(instance(**kargs))
File "/home/alinefm/kimchi/src/kimchi/model/host.py", line 307, in __init__
self.host_repositories = Repositories()
File "/home/alinefm/kimchi/src/kimchi/basemodel.py", line 54, in __call__
cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs)
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 64, in __init__
self._scanSystemRepositories()
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 72, in 
_scanSystemRepositories
self.addRepository(repo)
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 79, in 
addRepository
repo = {'repo_id': repo_id,
NameError: global name 'repo_id' is not defined

======================================================================
ERROR: test_template_storage_customise (test_model.ModelTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/alinefm/kimchi/tests/test_model.py", line 366, in 
test_template_storage_customise
inst = model.Model(objstore_loc=self.tmp_store)
File "/home/alinefm/kimchi/src/kimchi/model/model.py", line 60, in __init__
models.append(instance(**kargs))
File "/home/alinefm/kimchi/src/kimchi/model/host.py", line 307, in __init__
self.host_repositories = Repositories()
File "/home/alinefm/kimchi/src/kimchi/basemodel.py", line 54, in __call__
cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs)
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 64, in __init__
self._scanSystemRepositories()
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 72, in 
_scanSystemRepositories
self.addRepository(repo)
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 79, in 
addRepository
repo = {'repo_id': repo_id,
NameError: global name 'repo_id' is not defined

======================================================================
ERROR: test_template_update (test_model.ModelTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/alinefm/kimchi/tests/test_model.py", line 446, in 
test_template_update
objstore_loc=self.tmp_store)
File "/home/alinefm/kimchi/src/kimchi/model/model.py", line 60, in __init__
models.append(instance(**kargs))
File "/home/alinefm/kimchi/src/kimchi/model/host.py", line 307, in __init__
self.host_repositories = Repositories()
File "/home/alinefm/kimchi/src/kimchi/basemodel.py", line 54, in __call__
cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs)
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 64, in __init__
self._scanSystemRepositories()
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 72, in 
_scanSystemRepositories
self.addRepository(repo)
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 79, in 
addRepository
repo = {'repo_id': repo_id,
NameError: global name 'repo_id' is not defined

======================================================================
ERROR: test_use_test_host (test_model.ModelTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/alinefm/kimchi/tests/test_model.py", line 718, in 
test_use_test_host
objstore_loc=self.tmp_store)
File "/home/alinefm/kimchi/src/kimchi/model/model.py", line 60, in __init__
models.append(instance(**kargs))
File "/home/alinefm/kimchi/src/kimchi/model/host.py", line 307, in __init__
self.host_repositories = Repositories()
File "/home/alinefm/kimchi/src/kimchi/basemodel.py", line 54, in __call__
cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs)
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 64, in __init__
self._scanSystemRepositories()
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 72, in 
_scanSystemRepositories
self.addRepository(repo)
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 79, in 
addRepository
repo = {'repo_id': repo_id,
NameError: global name 'repo_id' is not defined

======================================================================
ERROR: test_vm_cdrom (test_model.ModelTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/alinefm/kimchi/tests/test_model.py", line 167, in test_vm_cdrom
inst = model.Model(objstore_loc=self.tmp_store)
File "/home/alinefm/kimchi/src/kimchi/model/model.py", line 60, in __init__
models.append(instance(**kargs))
File "/home/alinefm/kimchi/src/kimchi/model/host.py", line 307, in __init__
self.host_repositories = Repositories()
File "/home/alinefm/kimchi/src/kimchi/basemodel.py", line 54, in __call__
cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs)
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 64, in __init__
self._scanSystemRepositories()
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 72, in 
_scanSystemRepositories
self.addRepository(repo)
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 79, in 
addRepository
repo = {'repo_id': repo_id,
NameError: global name 'repo_id' is not defined

======================================================================
ERROR: test_vm_edit (test_model.ModelTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/alinefm/kimchi/tests/test_model.py", line 485, in test_vm_edit
objstore_loc=self.tmp_store)
File "/home/alinefm/kimchi/src/kimchi/model/model.py", line 60, in __init__
models.append(instance(**kargs))
File "/home/alinefm/kimchi/src/kimchi/model/host.py", line 307, in __init__
self.host_repositories = Repositories()
File "/home/alinefm/kimchi/src/kimchi/basemodel.py", line 54, in __call__
cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs)
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 64, in __init__
self._scanSystemRepositories()
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 72, in 
_scanSystemRepositories
self.addRepository(repo)
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 79, in 
addRepository
repo = {'repo_id': repo_id,
NameError: global name 'repo_id' is not defined

======================================================================
ERROR: test_vm_graphics (test_model.ModelTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/alinefm/kimchi/tests/test_model.py", line 100, in 
test_vm_graphics
inst = model.Model(objstore_loc=self.tmp_store)
File "/home/alinefm/kimchi/src/kimchi/model/model.py", line 60, in __init__
models.append(instance(**kargs))
File "/home/alinefm/kimchi/src/kimchi/model/host.py", line 307, in __init__
self.host_repositories = Repositories()
File "/home/alinefm/kimchi/src/kimchi/basemodel.py", line 54, in __call__
cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs)
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 64, in __init__
self._scanSystemRepositories()
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 72, in 
_scanSystemRepositories
self.addRepository(repo)
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 79, in 
addRepository
repo = {'repo_id': repo_id,
NameError: global name 'repo_id' is not defined

======================================================================
ERROR: test_vm_ifaces (test_model.ModelTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/alinefm/kimchi/tests/test_model.py", line 126, in test_vm_ifaces
inst = model.Model(objstore_loc=self.tmp_store)
File "/home/alinefm/kimchi/src/kimchi/model/model.py", line 60, in __init__
models.append(instance(**kargs))
File "/home/alinefm/kimchi/src/kimchi/model/host.py", line 307, in __init__
self.host_repositories = Repositories()
File "/home/alinefm/kimchi/src/kimchi/basemodel.py", line 54, in __call__
cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs)
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 64, in __init__
self._scanSystemRepositories()
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 72, in 
_scanSystemRepositories
self.addRepository(repo)
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 79, in 
addRepository
repo = {'repo_id': repo_id,
NameError: global name 'repo_id' is not defined

======================================================================
ERROR: test_vm_info (test_model.ModelTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/alinefm/kimchi/tests/test_model.py", line 54, in test_vm_info
inst = model.Model('test:///default', self.tmp_store)
File "/home/alinefm/kimchi/src/kimchi/model/model.py", line 60, in __init__
models.append(instance(**kargs))
File "/home/alinefm/kimchi/src/kimchi/model/host.py", line 307, in __init__
self.host_repositories = Repositories()
File "/home/alinefm/kimchi/src/kimchi/basemodel.py", line 54, in __call__
cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs)
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 64, in __init__
self._scanSystemRepositories()
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 72, in 
_scanSystemRepositories
self.addRepository(repo)
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 79, in 
addRepository
repo = {'repo_id': repo_id,
NameError: global name 'repo_id' is not defined

======================================================================
ERROR: test_vm_lifecycle (test_model.ModelTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/alinefm/kimchi/tests/test_model.py", line 75, in 
test_vm_lifecycle
inst = model.Model(objstore_loc=self.tmp_store)
File "/home/alinefm/kimchi/src/kimchi/model/model.py", line 60, in __init__
models.append(instance(**kargs))
File "/home/alinefm/kimchi/src/kimchi/model/host.py", line 307, in __init__
self.host_repositories = Repositories()
File "/home/alinefm/kimchi/src/kimchi/basemodel.py", line 54, in __call__
cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs)
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 64, in __init__
self._scanSystemRepositories()
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 72, in 
_scanSystemRepositories
self.addRepository(repo)
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 79, in 
addRepository
repo = {'repo_id': repo_id,
NameError: global name 'repo_id' is not defined

======================================================================
ERROR: test_vm_list_sorted (test_model.ModelTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/alinefm/kimchi/tests/test_model.py", line 701, in 
test_vm_list_sorted
inst = model.Model(objstore_loc=self.tmp_store)
File "/home/alinefm/kimchi/src/kimchi/model/model.py", line 60, in __init__
models.append(instance(**kargs))
File "/home/alinefm/kimchi/src/kimchi/model/host.py", line 307, in __init__
self.host_repositories = Repositories()
File "/home/alinefm/kimchi/src/kimchi/basemodel.py", line 54, in __call__
cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs)
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 64, in __init__
self._scanSystemRepositories()
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 72, in 
_scanSystemRepositories
self.addRepository(repo)
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 79, in 
addRepository
repo = {'repo_id': repo_id,
NameError: global name 'repo_id' is not defined

======================================================================
ERROR: test_vm_storage_provisioning (test_model.ModelTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/alinefm/kimchi/tests/test_model.py", line 228, in 
test_vm_storage_provisioning
inst = model.Model(objstore_loc=self.tmp_store)
File "/home/alinefm/kimchi/src/kimchi/model/model.py", line 60, in __init__
models.append(instance(**kargs))
File "/home/alinefm/kimchi/src/kimchi/model/host.py", line 307, in __init__
self.host_repositories = Repositories()
File "/home/alinefm/kimchi/src/kimchi/basemodel.py", line 54, in __call__
cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs)
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 64, in __init__
self._scanSystemRepositories()
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 72, in 
_scanSystemRepositories
self.addRepository(repo)
File "/home/alinefm/kimchi/src/kimchi/repositories.py", line 79, in 
addRepository
repo = {'repo_id': repo_id,
NameError: global name 'repo_id' is not defined

======================================================================
ERROR: test_server_start (test_server.ServerTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/alinefm/kimchi/tests/test_server.py", line 40, in 
test_server_start
model = kimchi.mockmodel.MockModel('/tmp/obj-store-test')
File "/home/alinefm/kimchi/src/kimchi/mockmodel.py", line 62, in __init__
self.reset()
File "/home/alinefm/kimchi/src/kimchi/mockmodel.py", line 82, in reset
self.host_repositories = MockRepositories()
File "/home/alinefm/kimchi/src/kimchi/mockmodel.py", line 1067, in __init__
"repo_name": "kimchi_repo_1392167832"}}
TypeError: unhashable type: 'dict'

======================================================================
ERROR: setUpModule (test_plugin)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/alinefm/kimchi/tests/test_plugin.py", line 45, in setUpModule
model = kimchi.mockmodel.MockModel('/tmp/obj-store-test')
File "/home/alinefm/kimchi/src/kimchi/mockmodel.py", line 62, in __init__
self.reset()
File "/home/alinefm/kimchi/src/kimchi/mockmodel.py", line 82, in reset
self.host_repositories = MockRepositories()
File "/home/alinefm/kimchi/src/kimchi/mockmodel.py", line 1067, in __init__
"repo_name": "kimchi_repo_1392167832"}}
TypeError: unhashable type: 'dict'

----------------------------------------------------------------------
Ran 64 tests in 15.956s

FAILED (errors=41)
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
docs/API.md:845: trailing whitespace.
+ * baseurl: URL to the repodata directory when "is_mirror" is false.
docs/API.md:866: trailing whitespace.
+ * baseurl: URL to the repodata directory when "is_mirror" is false.
docs/API.md:881: trailing whitespace.
+ * gpgkey: URL pointing to the ASCII-armored GPG key file for the
src/kimchi/mockmodel.py:828: trailing whitespace.
+ except:


On 02/15/2014 07:49 PM, Paulo Vital wrote:
> V2 -> V3:
>   * PEP8 compatibility
>   * Improved mockmodel.py and model/host.py
>   * Updated API.json and backend files to use new exception error system code
>
> V1 -> V2:
>   * Removed the enable/disable from docs/API.md and src/kimchi/API.json
>   * fixed wrong URI on test_rest.py
>   * PEP8 compatibility
>   * Updated repositories.py to make consistent with docs/API.md
>   * Raised correct exceptions
>   * Changed model/host.py and mockmodel.py to generate repo_id if not provided
>   * Changed mockmodel.py to declare MockRepositories class
>
> V1:
>
> This patch set provides support to host's repositories management operations.
> At this point, an agnostic class is providing support to backend and
> REST API operations. In addition, YUM (for RHEL, Fedora, SLES and OpenSuse)
> and APT (for Debian and Ubuntu) specific classes are provided to support the
> operation os each software update system.
>
> To test the backend execute the following commands:
> $ cd tests
> $ sudo ./run_tests.sh test_model.ModelTests.test_repository_create
> $ sudo ./run_tests.sh test_model.ModelTests.test_repository_update
> $ sudo ./run_tests.sh test_model.ModelTests.test_repository_disable_enable
>
> To test the REST API, execute the following commands (all them are agnostic of the
> host's distro):
>
> 1) Get list of all repositories enabled in the host:
> $ curl -u <USER> -H 'Content-type: application/json' -H 'Accept: application/json' http://localhost:8000/host/repositories/ -X GET
>
> 2) Create a new repository:
> $ curl -u <USER> -H 'Content-type: application/json' -H 'Accept: application/json' http://localhost:8000/host/repositories/ -X POST -d'
> {
>      "repo_id": "fedora-fake",
>      "baseurl": "http://www.fedora.org",
>      "gpgkey": "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-fake-19"
> }
> '
>
> 3) Get information from a specific repository:
> $ curl -u <USER> -H 'Content-type: application/json' -H 'Accept: application/json' http://localhost:8000/host/repositories/fedora-fake
>
> 4) Update a specific repository:
> $ curl -u <USER> -H 'Content-type: application/json' -H 'Accept: application/json' http://localhost:8000/host/repositories/fedora-fake -X PUT -d'
> {
>      "repo_id":"fedora-fake",
>      "repo_name":"Fedora 19 FAKEs",
>      "baseurl": "http://www.fedora.org/downloads"
> }
> '
>
> 5) Disable a specific repository:
> $ curl -u <USER> -H 'Content-type: application/json' -H 'Accept: application/json' http://localhost:8000/host/repositories/fedora-fake/disable -X POST -d ''
>
> 6) Enable a specific repository:
> $ curl -u <USER> -H 'Content-type: application/json' -H 'Accept: application/json' http://localhost:8000/host/repositories/fedora-fake/enable -X POST -d ''
>
> 7) Delete a specific repository:
> $ curl -u <USER> -H 'Content-type: application/json' -H 'Accept: application/json' http://localhost:8000/host/repositories/fedora-fake -X DELETE
>
> Paulo Vital (6):
>    Host's repositories management: Update API.md
>    Host's repositories management: Update REST API
>    Host's repositories management: Update backend.
>    Host's repositories management: Update Makefile
>    Host's repositories management: Update test-cases.
>    Host's repositories management: Update error exception messages.
>
>   Makefile.am                |   1 +
>   docs/API.md                |  77 ++++++
>   src/kimchi/API.json        |  76 ++++++
>   src/kimchi/Makefile.am     |   1 +
>   src/kimchi/control/host.py |  21 ++
>   src/kimchi/i18n.py         |  19 ++
>   src/kimchi/mockmodel.py    | 133 +++++++++++
>   src/kimchi/model/host.py   |  54 ++++-
>   src/kimchi/repositories.py | 585 +++++++++++++++++++++++++++++++++++++++++++++
>   tests/test_model.py        | 100 ++++++++
>   tests/test_rest.py         |  33 +++
>   11 files changed, 1099 insertions(+), 1 deletion(-)
>   create mode 100644 src/kimchi/repositories.py
>




More information about the Kimchi-devel mailing list