[Kimchi-devel] [PATCH 19/22] Update server to use the new model

Aline Manera alinefm at linux.vnet.ibm.com
Tue Jan 28 20:21:33 UTC 2014


From: Aline Manera <alinefm at br.ibm.com>

Also update control/config.py to use capabilities_lookup() instead of
using the model method directly
And correct import in control/storagepools.py

Signed-off-by: Aline Manera <alinefm at br.ibm.com>
---
 src/kimchi/control/config.py       |    6 +-----
 src/kimchi/control/storagepools.py |    2 +-
 src/kimchi/server.py               |    2 +-
 3 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/src/kimchi/control/config.py b/src/kimchi/control/config.py
index cc41e8a..2c3b264 100644
--- a/src/kimchi/control/config.py
+++ b/src/kimchi/control/config.py
@@ -52,11 +52,7 @@ class Capabilities(Resource):
 
     @property
     def data(self):
-        caps = ['libvirt_stream_protocols', 'qemu_stream',
-                'screenshot', 'system_report_tool']
-        ret = dict([(x, None) for x in caps])
-        ret.update(self.model.get_capabilities())
-        return ret
+        return self.info
 
 
 class Distros(Collection):
diff --git a/src/kimchi/control/storagepools.py b/src/kimchi/control/storagepools.py
index 3b8ef79..8a6823c 100644
--- a/src/kimchi/control/storagepools.py
+++ b/src/kimchi/control/storagepools.py
@@ -30,7 +30,7 @@ from kimchi.control.base import Collection, Resource
 from kimchi.control.storagevolumes import IsoVolumes, StorageVolumes
 from kimchi.control.utils import get_class_name, model_fn, parse_request
 from kimchi.control.utils import validate_params
-from kimchi.model import ISO_POOL_NAME
+from kimchi.model_.storagepools import ISO_POOL_NAME
 from kimchi.control.utils import UrlSubNode
 
 
diff --git a/src/kimchi/server.py b/src/kimchi/server.py
index 2a9f53f..9cc4c3c 100644
--- a/src/kimchi/server.py
+++ b/src/kimchi/server.py
@@ -30,7 +30,7 @@ import sslcert
 
 from kimchi import auth
 from kimchi import config
-from kimchi import model
+from kimchi.model_ import model
 from kimchi import mockmodel
 from kimchi import vnc
 from kimchi.control import sub_nodes
-- 
1.7.10.4




More information about the Kimchi-devel mailing list