From b1eb88258518e269b205d7fc0614878957eedc9a Mon Sep 17 00:00:00 2001 From: Jorge Schrauwen Date: Sun, 9 Aug 2015 13:01:46 +0000 Subject: [PATCH] salt.modules.smartos_imgadm - fix incorrect parsing of message on delete --- salt/modules/smartos_imgadm.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/salt/modules/smartos_imgadm.py b/salt/modules/smartos_imgadm.py index 3792d81a7f..77cc2494f9 100644 --- a/salt/modules/smartos_imgadm.py +++ b/salt/modules/smartos_imgadm.py @@ -262,6 +262,9 @@ def delete(uuid=None): ''' Remove an installed image + uuid : string + Specifies uuid to import + CLI Example: .. code-block:: bash @@ -279,8 +282,13 @@ def delete(uuid=None): if retcode != 0: ret['Error'] = _exit_status(retcode) return ret - ret[uuid] = res['stdout'].splitlines() - return ret + # output: Deleted image d5b3865c-0804-11e5-be21-dbc4ce844ddc + result = [] + for image in res['stdout'].splitlines(): + image = [var for var in image.split(" ") if var] + result.append(image[2]) + + return result def vacuum(verbose=False):