[Kimchi-devel] [PATCH 00/22] Refactor Model
Aline Manera
alinefm at linux.vnet.ibm.com
Tue Jan 28 20:21:14 UTC 2014
From: Aline Manera <alinefm at br.ibm.com>
Hi all,
This patch set splitted model.py into several model implementations.
One for each resource in kimchi.
It also includes a mechanism implemented by Zhou Zheng Sheng to automatically
load all the models in one. So we don't nee to change tests and controller
to work with new models.
It is just the first step.
I also will send a patch to split mockmodel
And finally, a new one to separate common code and specific code from models.
I am sending it separately because all that require a lot of work (and tests)
and also can conflict with new features.
I am planning to merge it on next Wed (when sprint 2 ends) so I hope those
changes will not impact so much any developer.
PS. it seems to to be a huge patch set but I just move code from one place to
another. There is no new implementation/feature in there.
Aline Manera (22):
refactor model: Separate libvirtconnection from model.py
refactor model: Move StoragePooldef from model to
libvirtstoragepools.py
refactor model: Create a common model builder
Create a model to join all model resources implementation
refactor model: Create a separated model for task resource
refactor model: Create a separated model for plugins resource
refactor model: Create a separated model for debug report resource
refactor model: Create a separated model for config resource
refactor model: Create a separated model for network resource
refactor model: Create a separated model for interface resource
refactor model: Create a separated model for storage pool resource
refactor model: Create a separated model for storage volume resource
refactor model: Create a separated model for storage server resource
refactor model: Create a separated model for storage target resource
refactor model: Create a separated model for template resource
refactor model: Create a separated model for vm resource
refactor model: Create a separated model for vm interface resource
refactor model: Create a separated model for host resource
Update server to use the new model
Update tests to use the new model
Update mockmodel imports
Delete former model.py and rename model_ to model
Makefile.am | 1 +
src/kimchi/basemodel.py | 55 +
src/kimchi/control/config.py | 6 +-
src/kimchi/control/storagepools.py | 2 +-
src/kimchi/control/utils.py | 12 +-
src/kimchi/mockmodel.py | 27 +-
src/kimchi/model.py | 2025 --------------------------------
src/kimchi/model/__init__.py | 21 +
src/kimchi/model/config.py | 87 ++
src/kimchi/model/debugreports.py | 167 +++
src/kimchi/model/host.py | 201 ++++
src/kimchi/model/interfaces.py | 46 +
src/kimchi/model/libvirtconnection.py | 122 ++
src/kimchi/model/libvirtstoragepool.py | 257 ++++
src/kimchi/model/model.py | 53 +
src/kimchi/model/networks.py | 265 +++++
src/kimchi/model/plugins.py | 31 +
src/kimchi/model/storagepools.py | 246 ++++
src/kimchi/model/storageservers.py | 78 ++
src/kimchi/model/storagetargets.py | 86 ++
src/kimchi/model/storagevolumes.py | 176 +++
src/kimchi/model/tasks.py | 39 +
src/kimchi/model/templates.py | 172 +++
src/kimchi/model/utils.py | 33 +
src/kimchi/model/vmifaces.py | 135 +++
src/kimchi/model/vms.py | 450 +++++++
src/kimchi/server.py | 2 +-
src/kimchi/utils.py | 46 +-
tests/test_model.py | 91 +-
tests/test_storagepool.py | 4 +-
tests/utils.py | 4 +-
31 files changed, 2831 insertions(+), 2109 deletions(-)
create mode 100644 src/kimchi/basemodel.py
delete mode 100644 src/kimchi/model.py
create mode 100644 src/kimchi/model/__init__.py
create mode 100644 src/kimchi/model/config.py
create mode 100644 src/kimchi/model/debugreports.py
create mode 100644 src/kimchi/model/host.py
create mode 100644 src/kimchi/model/interfaces.py
create mode 100644 src/kimchi/model/libvirtconnection.py
create mode 100644 src/kimchi/model/libvirtstoragepool.py
create mode 100644 src/kimchi/model/model.py
create mode 100644 src/kimchi/model/networks.py
create mode 100644 src/kimchi/model/plugins.py
create mode 100644 src/kimchi/model/storagepools.py
create mode 100644 src/kimchi/model/storageservers.py
create mode 100644 src/kimchi/model/storagetargets.py
create mode 100644 src/kimchi/model/storagevolumes.py
create mode 100644 src/kimchi/model/tasks.py
create mode 100644 src/kimchi/model/templates.py
create mode 100644 src/kimchi/model/utils.py
create mode 100644 src/kimchi/model/vmifaces.py
create mode 100644 src/kimchi/model/vms.py
--
1.7.10.4
More information about the Kimchi-devel
mailing list