[Kimchi-devel] [PATCH] Fix: Storagepool json schema has not been tested when create new SP

Rodrigo Trujillo rodrigo.trujillo at linux.vnet.ibm.com
Tue Jan 7 01:57:35 UTC 2014


Storagepool class has its own crete() function which does not has
include the function validate_param(). This patch fixes this problem

Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo at linux.vnet.ibm.com>
---
 src/kimchi/control/storagepools.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/kimchi/control/storagepools.py b/src/kimchi/control/storagepools.py
index 466b4b6..782f5a6 100644
--- a/src/kimchi/control/storagepools.py
+++ b/src/kimchi/control/storagepools.py
@@ -29,6 +29,7 @@ import cherrypy
 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
 
 
@@ -48,6 +49,7 @@ class StoragePools(Collection):
             raise cherrypy.HTTPError(405, error)
 
         params = parse_request()
+        validate_params(params, self, 'create')
         args = self.model_args + [params]
         name = create(*args)
         args = self.resource_args + [name]
-- 
1.8.1.4




More information about the Kimchi-devel mailing list