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

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@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

Reviewed-by: Daniel Barboza <danielhb@linux.vnet.ibm.com> On 01/06/2014 11:57 PM, Rodrigo Trujillo wrote:
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@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]

On 01/06/2014 11:57 PM, Rodrigo Trujillo wrote:
Storagepool class has its own crete() function which does not has
typo: crete()
include the function validate_param(). This patch fixes this problem
Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo@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]
participants (3)
-
Aline Manera
-
Daniel H Barboza
-
Rodrigo Trujillo