[Kimchi-devel] [PATCH] [Kimchi] Issue #924: Before deleting a storagepool, kimchi should check if any template is using that
Ramon Medeiros
ramonn at linux.vnet.ibm.com
Mon Apr 11 13:38:52 UTC 2016
Reviewed-By: Ramon Medeiros <ramonn at br.ibm.com>
On 04/07/2016 04:27 PM, Jose Ricardo Ziviani wrote:
> ---
> model/storagepools.py | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/model/storagepools.py b/model/storagepools.py
> index cf3ed21..4a0d34c 100644
> --- a/model/storagepools.py
> +++ b/model/storagepools.py
> @@ -33,6 +33,7 @@ from wok.plugins.kimchi.model.host import DeviceModel
> from wok.plugins.kimchi.model.libvirtstoragepool import StoragePoolDef
> from wok.plugins.kimchi.osinfo import defaults as tmpl_defaults
> from wok.plugins.kimchi.scan import Scanner
> +from wok.plugins.kimchi.utils import pool_name_from_uri
>
>
> ISO_POOL_NAME = u'kimchi_isos'
> @@ -437,7 +438,7 @@ class StoragePoolModel(object):
> t_info = session.get('template', tmpl)
> for disk in t_info['disks']:
> t_pool = disk['pool']['name']
> - if t_pool == pool_name:
> + if pool_name_from_uri(t_pool) == pool_name:
> return True
> return False
>
--
Ramon Nunes Medeiros
Kimchi Developer
Linux Technology Center Brazil
IBM Systems & Technology Group
Phone : +55 19 2132 7878
ramonn at br.ibm.com
More information about the Kimchi-devel
mailing list