'Finishing the task flow
:param image_id: Glance Image ID'

def execute(self, image_id):

    task = script_utils.get_task(self.task_repo, self.task_id)
    if (task is None):
        return
    try:
        task.succeed({'image_id': image_id})
    except Exception as e:
        log_msg = _LE('Task    ID    %(task_id)s    failed.    Error:    %(exc_type)s:    %(e)s')
        LOG.exception(log_msg, {'exc_type': six.text_type(type(e)), 'e': encodeutils.exception_to_unicode(e), 'task_id': task.task_id})
        err_msg = _('Error:    %(exc_type)s:    %(e)s')
        task.fail((err_msg % {'exc_type': six.text_type(type(e)), 'e': encodeutils.exception_to_unicode(e)}))
    finally:
        self.task_repo.save(task)
    LOG.info(_LI('%(task_id)s    of    %(task_type)s    completed'), {'task_id': self.task_id, 'task_type': self.task_type})
