On 02/25/2014 03:54 AM, Mark Wu wrote:
Aline, could you please review this patch? Thanks!
Hi Mark,
this patch is already merged!
commit 8c0ad966b22fea115482c91616d1a22f589aa9dc
On 02/21/2014 04:59 PM, Mark Wu wrote:
> "kimchi_isos" is reserved for internal use. So we should throw a clear
> error to avoid confusing user.
>
> Signed-off-by: Mark Wu <wudxw(a)linux.vnet.ibm.com>
> ---
> src/kimchi/i18n.py | 1 +
> src/kimchi/model/storagepools.py | 4 ++--
> 2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/src/kimchi/i18n.py b/src/kimchi/i18n.py
> index 7d08254..4f0fa12 100644
> --- a/src/kimchi/i18n.py
> +++ b/src/kimchi/i18n.py
> @@ -133,6 +133,7 @@ messages = {
> "KCHPOOL0028E": _("Error while extending logical pool %(pool)s.
> Details: %(err)s"),
> "KCHPOOL0029E": _("The parameter disks only can be updated for
> logical storage pool."),
> "KCHPOOL0030E": _("The SCSI host adapter name must be a
string."),
> + "KCHPOOL0031E": _("The StoragePool kimchi_isos is reserved for
> internal use"),
>
> "KCHVOL0001E": _("Storage volume %(name)s already
exists"),
> "KCHVOL0002E": _("Storage volume %(name)s does not exist in
> storage pool %(pool)s"),
> diff --git a/src/kimchi/model/storagepools.py
> b/src/kimchi/model/storagepools.py
> index d0a8342..cf66a86 100644
> --- a/src/kimchi/model/storagepools.py
> +++ b/src/kimchi/model/storagepools.py
> @@ -72,8 +72,8 @@ class StoragePoolsModel(object):
> conn = self.conn.get()
> try:
> name = params['name']
> - if name in (ISO_POOL_NAME, ):
> - raise InvalidOperation("KCHPOOL0001E", {'name':
name})
> + if name == ISO_POOL_NAME:
> + raise InvalidOperation("KCHPOOL0031E")
>
> if params['type'] == 'kimchi-iso':
> task_id = self._do_deep_scan(params)