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

Aline Manera alinefm at linux.vnet.ibm.com
Tue Jan 7 17:33:47 UTC 2014


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




More information about the Kimchi-devel mailing list