)]}'
{"glance/api/authorization.py":[{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"2cf56fe1d73aebcd46ca758935e449aac2e22e6c","unresolved":false,"context_lines":[{"line_number":232,"context_line":"        if \u0027owner\u0027 in task:"},{"line_number":233,"context_line":"            owner \u003d task[\u0027owner\u0027]"},{"line_number":234,"context_line":"            if not self.context.is_admin:"},{"line_number":235,"context_line":"                if owner is None or owner !\u003d self.context.owner:"},{"line_number":236,"context_line":"                    message \u003d _(\"You are not permitted to create task by \""},{"line_number":237,"context_line":"                                \"owner: %s.\")"},{"line_number":238,"context_line":"                    raise exception.Forbidden(message % owner)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2Fy%2FA%3D","line":235,"updated":"2013-10-29 06:59:04.000000000","message":"It might be nice to just exclude the concept of owner being set to NULL entirely. We support that for images but its kinda unfortunate.\n\nNot sure if this is the right level to address that concern though.","commit_id":"7345af61a8add741486111754dfee563b820cf4c"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"acc24d177db36d61d72935cc603b07bfb66640c4","unresolved":false,"context_lines":[{"line_number":232,"context_line":"        if \u0027owner\u0027 in task:"},{"line_number":233,"context_line":"            owner \u003d task[\u0027owner\u0027]"},{"line_number":234,"context_line":"            if not self.context.is_admin:"},{"line_number":235,"context_line":"                if owner is None or owner !\u003d self.context.owner:"},{"line_number":236,"context_line":"                    message \u003d _(\"You are not permitted to create task by \""},{"line_number":237,"context_line":"                                \"owner: %s.\")"},{"line_number":238,"context_line":"                    raise exception.Forbidden(message % owner)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2Fuss%3D","line":235,"in_reply_to":"AAAATn%2F%2Fy%2FA%3D","updated":"2013-10-29 20:20:37.000000000","message":"Thanks for pointing that out, Mark. I\u0027ll make the change here nonetheless, and wait for the API patch to address it in the appropriate layer if necessary. Adding in a NOTE to keep track of the same.","commit_id":"7345af61a8add741486111754dfee563b820cf4c"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"a0c6dae5d93c0dbbf7cd182728df40093733c202","unresolved":false,"context_lines":[{"line_number":233,"context_line":"            owner \u003d task[\u0027owner\u0027]"},{"line_number":234,"context_line":"            if not self.context.is_admin:"},{"line_number":235,"context_line":"                if owner is None or owner !\u003d self.context.owner:"},{"line_number":236,"context_line":"                    message \u003d _(\"You are not permitted to create task by \""},{"line_number":237,"context_line":"                                \"owner: %s.\")"},{"line_number":238,"context_line":"                    raise exception.Forbidden(message % owner)"},{"line_number":239,"context_line":"        return super(TaskFactoryProxy, self).new_task(context, task)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2Fvpk%3D","line":236,"updated":"2013-10-29 17:23:45.000000000","message":"May the message might be \n\" You are not permitted to create task with/for the owner %s\" ?","commit_id":"7345af61a8add741486111754dfee563b820cf4c"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"acc24d177db36d61d72935cc603b07bfb66640c4","unresolved":false,"context_lines":[{"line_number":233,"context_line":"            owner \u003d task[\u0027owner\u0027]"},{"line_number":234,"context_line":"            if not self.context.is_admin:"},{"line_number":235,"context_line":"                if owner is None or owner !\u003d self.context.owner:"},{"line_number":236,"context_line":"                    message \u003d _(\"You are not permitted to create task by \""},{"line_number":237,"context_line":"                                \"owner: %s.\")"},{"line_number":238,"context_line":"                    raise exception.Forbidden(message % owner)"},{"line_number":239,"context_line":"        return super(TaskFactoryProxy, self).new_task(context, task)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2Fuso%3D","line":236,"in_reply_to":"AAAATn%2F%2Fvpk%3D","updated":"2013-10-29 20:20:37.000000000","message":"Thanks. Fixing up!","commit_id":"7345af61a8add741486111754dfee563b820cf4c"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"a0c6dae5d93c0dbbf7cd182728df40093733c202","unresolved":false,"context_lines":[{"line_number":235,"context_line":"                if owner is None or owner !\u003d self.context.owner:"},{"line_number":236,"context_line":"                    message \u003d _(\"You are not permitted to create task by \""},{"line_number":237,"context_line":"                                \"owner: %s.\")"},{"line_number":238,"context_line":"                    raise exception.Forbidden(message % owner)"},{"line_number":239,"context_line":"        return super(TaskFactoryProxy, self).new_task(context, task)"},{"line_number":240,"context_line":""},{"line_number":241,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2Fvos%3D","line":238,"updated":"2013-10-29 17:23:45.000000000","message":"Is it ok to have tasks with no owners?","commit_id":"7345af61a8add741486111754dfee563b820cf4c"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"acc24d177db36d61d72935cc603b07bfb66640c4","unresolved":false,"context_lines":[{"line_number":235,"context_line":"                if owner is None or owner !\u003d self.context.owner:"},{"line_number":236,"context_line":"                    message \u003d _(\"You are not permitted to create task by \""},{"line_number":237,"context_line":"                                \"owner: %s.\")"},{"line_number":238,"context_line":"                    raise exception.Forbidden(message % owner)"},{"line_number":239,"context_line":"        return super(TaskFactoryProxy, self).new_task(context, task)"},{"line_number":240,"context_line":""},{"line_number":241,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2FusU%3D","line":238,"in_reply_to":"AAAATn%2F%2Fvos%3D","updated":"2013-10-29 20:20:37.000000000","message":"Had a discussion with Mark offline and we\u0027r going with NOT having the ability to set the owner as NULL even as admin. We can sync up offline more if you feel this is an issue.","commit_id":"7345af61a8add741486111754dfee563b820cf4c"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"d221cd5b3751b541719af47ab905088889a2458f","unresolved":false,"context_lines":[{"line_number":229,"context_line":"                                               proxy_kwargs\u003dkwargs)"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"    def new_task(self, context, task):"},{"line_number":232,"context_line":"        if \u0027owner\u0027 in task:"},{"line_number":233,"context_line":"            owner \u003d task[\u0027owner\u0027]"},{"line_number":234,"context_line":"            #NOTE(nikhil): Unlike Images, Tasks are expected to have owner."},{"line_number":235,"context_line":"            # We currently do not allow even admins to set the owner to None."}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2Fufw%3D","line":232,"updated":"2013-10-29 20:31:40.000000000","message":"I am a little confused here by this check here.","commit_id":"6bd576cea2926324dd78f67d309e2da5f9c276b8"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"0e26d6524ad9fb2fd8f0fb07a7a81dcd17da619e","unresolved":false,"context_lines":[{"line_number":229,"context_line":"                                               proxy_kwargs\u003dkwargs)"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"    def new_task(self, context, task):"},{"line_number":232,"context_line":"        if \u0027owner\u0027 in task:"},{"line_number":233,"context_line":"            owner \u003d task[\u0027owner\u0027]"},{"line_number":234,"context_line":"            #NOTE(nikhil): Unlike Images, Tasks are expected to have owner."},{"line_number":235,"context_line":"            # We currently do not allow even admins to set the owner to None."}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2Ft6c%3D","line":232,"in_reply_to":"AAAATn%2F%2Fufw%3D","updated":"2013-10-30 01:22:28.000000000","message":"Changing the owner check logic a bit Iccha. Can you please tell me what you think about the next PS? Thanks.","commit_id":"6bd576cea2926324dd78f67d309e2da5f9c276b8"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"cc0847adc7d4efedf9d8adf93d1071e44c04d7dc","unresolved":false,"context_lines":[{"line_number":230,"context_line":""},{"line_number":231,"context_line":"    def new_task(self, context, task_type, task_input, owner):"},{"line_number":232,"context_line":"        #NOTE(nikhil): Unlike Images, Tasks are expected to have owner."},{"line_number":233,"context_line":"        # We currently do not allow even admins to set the owner to None."},{"line_number":234,"context_line":"        if owner is not None and (owner \u003d\u003d self.context.owner"},{"line_number":235,"context_line":"                                  or context.is_admin):"},{"line_number":236,"context_line":"            return super(TaskFactoryProxy, self).new_task(context, task_type,"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAATn%2F%2B%2FR4%3D","line":233,"updated":"2013-11-16 08:38:50.000000000","message":"Just a note for the future, should we do a little migration soon to set nullable\u003dFalse on the owner field in the Task table?","commit_id":"b62d0387a261b875a5e62f59b4716815a8807f08"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"da8dbb75607776eb77f5b8e1505acc5181d47c02","unresolved":false,"context_lines":[{"line_number":230,"context_line":""},{"line_number":231,"context_line":"    def new_task(self, context, task_type, task_input, owner):"},{"line_number":232,"context_line":"        #NOTE(nikhil): Unlike Images, Tasks are expected to have owner."},{"line_number":233,"context_line":"        # We currently do not allow even admins to set the owner to None."},{"line_number":234,"context_line":"        if owner is not None and (owner \u003d\u003d self.context.owner"},{"line_number":235,"context_line":"                                  or context.is_admin):"},{"line_number":236,"context_line":"            return super(TaskFactoryProxy, self).new_task(context, task_type,"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAATn%2F%2B43A%3D","line":233,"in_reply_to":"AAAATn%2F%2B%2Byc%3D","updated":"2013-11-18 23:00:15.000000000","message":"will work on the migration bit soon after this MP is merged :)","commit_id":"b62d0387a261b875a5e62f59b4716815a8807f08"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"04f4ee105f167e61175cc3bd33e4b6319f8ab2e7","unresolved":false,"context_lines":[{"line_number":230,"context_line":""},{"line_number":231,"context_line":"    def new_task(self, context, task_type, task_input, owner):"},{"line_number":232,"context_line":"        #NOTE(nikhil): Unlike Images, Tasks are expected to have owner."},{"line_number":233,"context_line":"        # We currently do not allow even admins to set the owner to None."},{"line_number":234,"context_line":"        if owner is not None and (owner \u003d\u003d self.context.owner"},{"line_number":235,"context_line":"                                  or context.is_admin):"},{"line_number":236,"context_line":"            return super(TaskFactoryProxy, self).new_task(context, task_type,"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAATn%2F%2B%2Byc%3D","line":233,"in_reply_to":"AAAATn%2F%2B%2FR4%3D","updated":"2013-11-16 21:55:21.000000000","message":"Yes! That is a awesome catch, Mark!","commit_id":"b62d0387a261b875a5e62f59b4716815a8807f08"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"d586f919ced8a94b9ca7c09c6d9c4632b411c92c","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        return ImmutableMemberProxy(member)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"def is_task_mutable(context, task):"},{"line_number":58,"context_line":"    \"\"\"Return True if the task is mutable in this context.\"\"\""},{"line_number":59,"context_line":"    if context.is_admin:"},{"line_number":60,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAATn%2F%2B2nw%3D","line":57,"updated":"2013-11-19 11:01:28.000000000","message":"Can we move this functions in a common place? We have similar functions for images in the sqlalchemy.api[0] module. It looks like these functions could be used by other modules as well.\n\n  [0] https://git.openstack.org/cgit/openstack/glance/tree/glance/db/sqlalchemy/api.py#n342","commit_id":"995e2d360940b4859bbb06d0d1a228b780f87c67"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"616eb9b67f02c155f34c11f4cb8633451c0c0f71","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        return ImmutableMemberProxy(member)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"def is_task_mutable(context, task):"},{"line_number":58,"context_line":"    \"\"\"Return True if the task is mutable in this context.\"\"\""},{"line_number":59,"context_line":"    if context.is_admin:"},{"line_number":60,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAATn%2F%2By6s%3D","line":57,"in_reply_to":"AAAATn%2F%2B2nw%3D","updated":"2013-11-20 03:53:23.000000000","message":"Hey Flavio, thanks for catching this. I feel like we may need to look into this separately. \n\nSeems like glance/api/authorization.py module re-implements what you\u0027r mentioning:-https://git.openstack.org/cgit/openstack/glance/tree/glance/api/authorization.py#n20\n\nIf you prefer, I can create a bug for this and correct all 3 in the same one? Please let me know your thoughts and will try to address it as soon as possible.","commit_id":"995e2d360940b4859bbb06d0d1a228b780f87c67"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"4f6a201c04d158a443557d8f72a5e1d19feb5455","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        return ImmutableMemberProxy(member)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"def is_task_mutable(context, task):"},{"line_number":58,"context_line":"    \"\"\"Return True if the task is mutable in this context.\"\"\""},{"line_number":59,"context_line":"    if context.is_admin:"},{"line_number":60,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAATn%2F%2By30%3D","line":57,"updated":"2013-11-20 03:55:05.000000000","message":"(Note) Flavio had some comments about this method in the previous PS.","commit_id":"99114c77dab98ffa8903552bfca6aabb802e04c2"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"e4334a3726b281cef141e6fc959619043aa94ecf","unresolved":false,"context_lines":[{"line_number":59,"context_line":"    if context.is_admin:"},{"line_number":60,"context_line":"        return True"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    if context.owner is None:"},{"line_number":63,"context_line":"        return False"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    return task.owner \u003d\u003d context.owner"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAATn%2F%2BlU8%3D","line":62,"updated":"2013-11-22 20:57:50.000000000","message":"Can the owner actually be None?  I note this later in the code:\n\n #NOTE(nikhil): Unlike Images, Tasks are expected to have owner.\n# We currently do not allow even admins to set the owner to None.","commit_id":"c8d0de8182a0d60c100c759aef7185b7d89abab3"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"995782ef40e796919b5189441cbf95c68a476128","unresolved":false,"context_lines":[{"line_number":59,"context_line":"    if context.is_admin:"},{"line_number":60,"context_line":"        return True"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    if context.owner is None:"},{"line_number":63,"context_line":"        return False"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    return task.owner \u003d\u003d context.owner"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAATn%2F%2Bke4%3D","line":62,"in_reply_to":"AAAATn%2F%2Bkpw%3D","updated":"2013-11-23 00:36:08.000000000","message":"That makes sense, Mark. Will keep it as it is.","commit_id":"c8d0de8182a0d60c100c759aef7185b7d89abab3"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"c084704524931f01726c3bc63c8451afe4b8b505","unresolved":false,"context_lines":[{"line_number":59,"context_line":"    if context.is_admin:"},{"line_number":60,"context_line":"        return True"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    if context.owner is None:"},{"line_number":63,"context_line":"        return False"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    return task.owner \u003d\u003d context.owner"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAATn%2F%2Bkpw%3D","line":62,"in_reply_to":"AAAATn%2F%2BlU8%3D","updated":"2013-11-22 23:21:15.000000000","message":"This is actually checking the \u0027context.owner\u0027 not the \u0027task.owner\u0027. Context.owner can sometimes be none, I think for anonymous access. So it is sensible here to return false, indicating \"No, you\u0027re anonymous, you can not modify any tasks\"","commit_id":"c8d0de8182a0d60c100c759aef7185b7d89abab3"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"eddd7260f2f210eb57eab2fed271a44615ff8d85","unresolved":false,"context_lines":[{"line_number":326,"context_line":"    expires_at \u003d _immutable_attr(\u0027base\u0027, \u0027expires_at\u0027)"},{"line_number":327,"context_line":"    created_at \u003d _immutable_attr(\u0027base\u0027, \u0027created_at\u0027)"},{"line_number":328,"context_line":"    updated_at \u003d _immutable_attr(\u0027base\u0027, \u0027updated_at\u0027)"},{"line_number":329,"context_line":""},{"line_number":330,"context_line":""},{"line_number":331,"context_line":"class ImageProxy(glance.domain.proxy.Image):"},{"line_number":332,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F%2Bc%2F8%3D","line":329,"updated":"2013-11-25 21:51:20.000000000","message":"should we be raising forbidden here for methods present in the Task Proxy class?","commit_id":"fdb4496e792f7f3fb831203bffeab7a736958742"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"fc04c0f2baa1e149b23400f4683910bfd5795d6c","unresolved":false,"context_lines":[{"line_number":326,"context_line":"    expires_at \u003d _immutable_attr(\u0027base\u0027, \u0027expires_at\u0027)"},{"line_number":327,"context_line":"    created_at \u003d _immutable_attr(\u0027base\u0027, \u0027created_at\u0027)"},{"line_number":328,"context_line":"    updated_at \u003d _immutable_attr(\u0027base\u0027, \u0027updated_at\u0027)"},{"line_number":329,"context_line":""},{"line_number":330,"context_line":""},{"line_number":331,"context_line":"class ImageProxy(glance.domain.proxy.Image):"},{"line_number":332,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F%2Bcqs%3D","line":329,"in_reply_to":"AAAATn%2F%2Bc%2F8%3D","updated":"2013-11-26 00:25:28.000000000","message":"excellent catch! done.","commit_id":"fdb4496e792f7f3fb831203bffeab7a736958742"}],"glance/api/policy.py":[{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"cc0847adc7d4efedf9d8adf93d1071e44c04d7dc","unresolved":false,"context_lines":[{"line_number":390,"context_line":"        return super(TaskRepoProxy, self).add(task)"},{"line_number":391,"context_line":""},{"line_number":392,"context_line":"    def save(self, task):"},{"line_number":393,"context_line":"        self.policy.enforce(self.context, \u0027save_task\u0027, {})"},{"line_number":394,"context_line":"        return super(TaskRepoProxy, self).save(task)"},{"line_number":395,"context_line":""},{"line_number":396,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAATn%2F%2B%2FRw%3D","line":393,"updated":"2013-11-16 08:38:50.000000000","message":"For consistency, this should be \"modify_task\" perhaps?","commit_id":"b62d0387a261b875a5e62f59b4716815a8807f08"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"da8dbb75607776eb77f5b8e1505acc5181d47c02","unresolved":false,"context_lines":[{"line_number":390,"context_line":"        return super(TaskRepoProxy, self).add(task)"},{"line_number":391,"context_line":""},{"line_number":392,"context_line":"    def save(self, task):"},{"line_number":393,"context_line":"        self.policy.enforce(self.context, \u0027save_task\u0027, {})"},{"line_number":394,"context_line":"        return super(TaskRepoProxy, self).save(task)"},{"line_number":395,"context_line":""},{"line_number":396,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAATn%2F%2B42k%3D","line":393,"in_reply_to":"AAAATn%2F%2B%2ByY%3D","updated":"2013-11-18 23:00:15.000000000","message":"Done","commit_id":"b62d0387a261b875a5e62f59b4716815a8807f08"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"04f4ee105f167e61175cc3bd33e4b6319f8ab2e7","unresolved":false,"context_lines":[{"line_number":390,"context_line":"        return super(TaskRepoProxy, self).add(task)"},{"line_number":391,"context_line":""},{"line_number":392,"context_line":"    def save(self, task):"},{"line_number":393,"context_line":"        self.policy.enforce(self.context, \u0027save_task\u0027, {})"},{"line_number":394,"context_line":"        return super(TaskRepoProxy, self).save(task)"},{"line_number":395,"context_line":""},{"line_number":396,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAATn%2F%2B%2ByY%3D","line":393,"in_reply_to":"AAAATn%2F%2B%2FRw%3D","updated":"2013-11-16 21:55:21.000000000","message":"ok sure.","commit_id":"b62d0387a261b875a5e62f59b4716815a8807f08"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"cc0847adc7d4efedf9d8adf93d1071e44c04d7dc","unresolved":false,"context_lines":[{"line_number":406,"context_line":"                                               proxy_kwargs\u003dproxy_kwargs)"},{"line_number":407,"context_line":""},{"line_number":408,"context_line":"    def new_task(self, context, task_type, task_input, owner):"},{"line_number":409,"context_line":"        return super(TaskFactoryProxy, self).new_task(context, task_type,"},{"line_number":410,"context_line":"                                                      task_input, owner)"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAATn%2F%2B%2FRY%3D","line":409,"updated":"2013-11-16 08:38:50.000000000","message":"I think you could simply leave this function off since you\u0027re just calling super()","commit_id":"b62d0387a261b875a5e62f59b4716815a8807f08"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"da8dbb75607776eb77f5b8e1505acc5181d47c02","unresolved":false,"context_lines":[{"line_number":406,"context_line":"                                               proxy_kwargs\u003dproxy_kwargs)"},{"line_number":407,"context_line":""},{"line_number":408,"context_line":"    def new_task(self, context, task_type, task_input, owner):"},{"line_number":409,"context_line":"        return super(TaskFactoryProxy, self).new_task(context, task_type,"},{"line_number":410,"context_line":"                                                      task_input, owner)"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAATn%2F%2B42o%3D","line":409,"in_reply_to":"AAAATn%2F%2B%2ByM%3D","updated":"2013-11-18 23:00:15.000000000","message":"Done","commit_id":"b62d0387a261b875a5e62f59b4716815a8807f08"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"04f4ee105f167e61175cc3bd33e4b6319f8ab2e7","unresolved":false,"context_lines":[{"line_number":406,"context_line":"                                               proxy_kwargs\u003dproxy_kwargs)"},{"line_number":407,"context_line":""},{"line_number":408,"context_line":"    def new_task(self, context, task_type, task_input, owner):"},{"line_number":409,"context_line":"        return super(TaskFactoryProxy, self).new_task(context, task_type,"},{"line_number":410,"context_line":"                                                      task_input, owner)"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAATn%2F%2B%2ByM%3D","line":409,"in_reply_to":"AAAATn%2F%2B%2FRY%3D","updated":"2013-11-16 21:55:21.000000000","message":"sounds good","commit_id":"b62d0387a261b875a5e62f59b4716815a8807f08"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"0901d2474acde729b43995818324e1c153487cd6","unresolved":false,"context_lines":[{"line_number":378,"context_line":"        )"},{"line_number":379,"context_line":""},{"line_number":380,"context_line":"    def get(self, task_id):"},{"line_number":381,"context_line":"        self.policy.enforce(self.context, \u0027get_task\u0027, {})"},{"line_number":382,"context_line":"        return super(TaskRepoProxy, self).get(task_id)"},{"line_number":383,"context_line":""},{"line_number":384,"context_line":"    def list(self, marker\u003dNone, limit\u003dNone, sort_key\u003d\u0027created_at\u0027,"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F%2Bc%2FM%3D","line":381,"updated":"2013-11-25 22:12:49.000000000","message":"could you add this to etc/policy.json as well as glance/tests/etc/policy.json please?\nsame for other new policies as well","commit_id":"fdb4496e792f7f3fb831203bffeab7a736958742"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"fc04c0f2baa1e149b23400f4683910bfd5795d6c","unresolved":false,"context_lines":[{"line_number":378,"context_line":"        )"},{"line_number":379,"context_line":""},{"line_number":380,"context_line":"    def get(self, task_id):"},{"line_number":381,"context_line":"        self.policy.enforce(self.context, \u0027get_task\u0027, {})"},{"line_number":382,"context_line":"        return super(TaskRepoProxy, self).get(task_id)"},{"line_number":383,"context_line":""},{"line_number":384,"context_line":"    def list(self, marker\u003dNone, limit\u003dNone, sort_key\u003d\u0027created_at\u0027,"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F%2Bcqg%3D","line":381,"in_reply_to":"AAAATn%2F%2Bc%2FM%3D","updated":"2013-11-26 00:25:28.000000000","message":"thanks for the heads up! done.","commit_id":"fdb4496e792f7f3fb831203bffeab7a736958742"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"0901d2474acde729b43995818324e1c153487cd6","unresolved":false,"context_lines":[{"line_number":381,"context_line":"        self.policy.enforce(self.context, \u0027get_task\u0027, {})"},{"line_number":382,"context_line":"        return super(TaskRepoProxy, self).get(task_id)"},{"line_number":383,"context_line":""},{"line_number":384,"context_line":"    def list(self, marker\u003dNone, limit\u003dNone, sort_key\u003d\u0027created_at\u0027,"},{"line_number":385,"context_line":"             sort_dir\u003d\u0027desc\u0027, filters\u003dNone):"},{"line_number":386,"context_line":"        self.policy.enforce(self.context, \u0027get_tasks\u0027, {})"},{"line_number":387,"context_line":"        return super(TaskRepoProxy, self).list("}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F%2Bc%2FE%3D","line":384,"updated":"2013-11-25 22:12:49.000000000","message":"you could possibly just use kwargs instead of listing each argument and their default value at every layer","commit_id":"fdb4496e792f7f3fb831203bffeab7a736958742"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"fc04c0f2baa1e149b23400f4683910bfd5795d6c","unresolved":false,"context_lines":[{"line_number":381,"context_line":"        self.policy.enforce(self.context, \u0027get_task\u0027, {})"},{"line_number":382,"context_line":"        return super(TaskRepoProxy, self).get(task_id)"},{"line_number":383,"context_line":""},{"line_number":384,"context_line":"    def list(self, marker\u003dNone, limit\u003dNone, sort_key\u003d\u0027created_at\u0027,"},{"line_number":385,"context_line":"             sort_dir\u003d\u0027desc\u0027, filters\u003dNone):"},{"line_number":386,"context_line":"        self.policy.enforce(self.context, \u0027get_tasks\u0027, {})"},{"line_number":387,"context_line":"        return super(TaskRepoProxy, self).list("}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F%2BckQ%3D","line":384,"in_reply_to":"AAAATn%2F%2Bc%2FE%3D","updated":"2013-11-26 00:25:28.000000000","message":"good suggestion. done.","commit_id":"fdb4496e792f7f3fb831203bffeab7a736958742"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"b7cebe45bdae745538b76fda57172a0dfb431e26","unresolved":false,"context_lines":[{"line_number":383,"context_line":""},{"line_number":384,"context_line":"    def list(self, **kwargs):"},{"line_number":385,"context_line":"        self.policy.enforce(self.context, \u0027get_tasks\u0027, {})"},{"line_number":386,"context_line":"        return super(TaskRepoProxy, self).list()"},{"line_number":387,"context_line":""},{"line_number":388,"context_line":"    def add(self, task):"},{"line_number":389,"context_line":"        self.policy.enforce(self.context, \u0027add_task\u0027, {})"}],"source_content_type":"text/x-python","patch_set":22,"id":"AAAATn%2F%2Bb6M%3D","line":386,"updated":"2013-11-26 04:30:04.000000000","message":"pass kwargs in pls","commit_id":"a38d9506316e34e5723f4dfa71b609046a03e182"},{"author":{"_account_id":7703,"name":"Venkatesh Sampath","email":"venkatesh.sampath@outlook.com","username":"venkateshsampath"},"change_message_id":"fe677eec9f3fd2b71ac5b295065faba50c2a1da4","unresolved":false,"context_lines":[{"line_number":383,"context_line":""},{"line_number":384,"context_line":"    def list(self, **kwargs):"},{"line_number":385,"context_line":"        self.policy.enforce(self.context, \u0027get_tasks\u0027, {})"},{"line_number":386,"context_line":"        return super(TaskRepoProxy, self).list()"},{"line_number":387,"context_line":""},{"line_number":388,"context_line":"    def add(self, task):"},{"line_number":389,"context_line":"        self.policy.enforce(self.context, \u0027add_task\u0027, {})"}],"source_content_type":"text/x-python","patch_set":22,"id":"AAAATn%2F%2Bb0o%3D","line":386,"in_reply_to":"AAAATn%2F%2Bb6M%3D","updated":"2013-11-26 05:24:38.000000000","message":"Will do the following in the next patch:\n- change the signature to list(self, *args, **kwargs)\n- supply *args \u0026 **kwargs to the super method.\n- fix the same in authorization.py\nthanks Zhi.","commit_id":"a38d9506316e34e5723f4dfa71b609046a03e182"}],"glance/common/exception.py":[{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"2cf56fe1d73aebcd46ca758935e449aac2e22e6c","unresolved":false,"context_lines":[{"line_number":293,"context_line":"    message \u003d _(\"%(cls)s exception was raised in the last rpc call: %(val)s\")"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":""},{"line_number":296,"context_line":"class TaskNotFound(NotFound):"},{"line_number":297,"context_line":"    message \u003d _(\"Task with the given id %(task_id)s was not found\")"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2Fy%2B4%3D","line":296,"updated":"2013-10-29 06:59:04.000000000","message":"Oh good catch. Should this subclass TaskException as well?","commit_id":"7345af61a8add741486111754dfee563b820cf4c"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"acc24d177db36d61d72935cc603b07bfb66640c4","unresolved":false,"context_lines":[{"line_number":293,"context_line":"    message \u003d _(\"%(cls)s exception was raised in the last rpc call: %(val)s\")"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":""},{"line_number":296,"context_line":"class TaskNotFound(NotFound):"},{"line_number":297,"context_line":"    message \u003d _(\"Task with the given id %(task_id)s was not found\")"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2FurQ%3D","line":296,"in_reply_to":"AAAATn%2F%2Fy%2B4%3D","updated":"2013-10-29 20:20:37.000000000","message":"Thanks for pointing this out, def makes sense.","commit_id":"7345af61a8add741486111754dfee563b820cf4c"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"2cf56fe1d73aebcd46ca758935e449aac2e22e6c","unresolved":false,"context_lines":[{"line_number":297,"context_line":"    message \u003d _(\"Task with the given id %(task_id)s was not found\")"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":""},{"line_number":300,"context_line":"class TaskException(GlanceException):"},{"line_number":301,"context_line":"    message \u003d _(\"An unknown task exception occurred\")"},{"line_number":302,"context_line":""},{"line_number":303,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2Fy%2BE%3D","line":300,"updated":"2013-10-29 06:59:04.000000000","message":"I\u0027m not sure this is necessary but seems okay.","commit_id":"7345af61a8add741486111754dfee563b820cf4c"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"acc24d177db36d61d72935cc603b07bfb66640c4","unresolved":false,"context_lines":[{"line_number":297,"context_line":"    message \u003d _(\"Task with the given id %(task_id)s was not found\")"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":""},{"line_number":300,"context_line":"class TaskException(GlanceException):"},{"line_number":301,"context_line":"    message \u003d _(\"An unknown task exception occurred\")"},{"line_number":302,"context_line":""},{"line_number":303,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2FurE%3D","line":300,"in_reply_to":"AAAATn%2F%2Fy%2BE%3D","updated":"2013-10-29 20:20:37.000000000","message":"fixing in the next PS.","commit_id":"7345af61a8add741486111754dfee563b820cf4c"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"2cf56fe1d73aebcd46ca758935e449aac2e22e6c","unresolved":false,"context_lines":[{"line_number":301,"context_line":"    message \u003d _(\"An unknown task exception occurred\")"},{"line_number":302,"context_line":""},{"line_number":303,"context_line":""},{"line_number":304,"context_line":"class InvalidTaskStatus(TaskException):"},{"line_number":305,"context_line":"    message \u003d _(\"Provided status of task is unsupported: %(status)s\")"},{"line_number":306,"context_line":""},{"line_number":307,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2Fy%2Bk%3D","line":304,"updated":"2013-10-29 06:59:04.000000000","message":"Should this subclass Invalid as well?","commit_id":"7345af61a8add741486111754dfee563b820cf4c"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"acc24d177db36d61d72935cc603b07bfb66640c4","unresolved":false,"context_lines":[{"line_number":301,"context_line":"    message \u003d _(\"An unknown task exception occurred\")"},{"line_number":302,"context_line":""},{"line_number":303,"context_line":""},{"line_number":304,"context_line":"class InvalidTaskStatus(TaskException):"},{"line_number":305,"context_line":"    message \u003d _(\"Provided status of task is unsupported: %(status)s\")"},{"line_number":306,"context_line":""},{"line_number":307,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2FurA%3D","line":304,"in_reply_to":"AAAATn%2F%2Fy%2Bk%3D","updated":"2013-10-29 20:20:37.000000000","message":"fixing in the next PS.","commit_id":"7345af61a8add741486111754dfee563b820cf4c"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"2cf56fe1d73aebcd46ca758935e449aac2e22e6c","unresolved":false,"context_lines":[{"line_number":305,"context_line":"    message \u003d _(\"Provided status of task is unsupported: %(status)s\")"},{"line_number":306,"context_line":""},{"line_number":307,"context_line":""},{"line_number":308,"context_line":"class InvalidTaskType(TaskException):"},{"line_number":309,"context_line":"    message \u003d _(\"Provided type of task is unsupported: %(type)s\")"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2Fy%2Bg%3D","line":308,"updated":"2013-10-29 06:59:04.000000000","message":"Should this subclass Invalid as well?","commit_id":"7345af61a8add741486111754dfee563b820cf4c"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"acc24d177db36d61d72935cc603b07bfb66640c4","unresolved":false,"context_lines":[{"line_number":305,"context_line":"    message \u003d _(\"Provided status of task is unsupported: %(status)s\")"},{"line_number":306,"context_line":""},{"line_number":307,"context_line":""},{"line_number":308,"context_line":"class InvalidTaskType(TaskException):"},{"line_number":309,"context_line":"    message \u003d _(\"Provided type of task is unsupported: %(type)s\")"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2Fuq8%3D","line":308,"in_reply_to":"AAAATn%2F%2Fy%2Bg%3D","updated":"2013-10-29 20:20:37.000000000","message":"fixing in the next PS.","commit_id":"7345af61a8add741486111754dfee563b820cf4c"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"2b835e9bbf27c4ed12076bdb08cbeccefdcf0276","unresolved":false,"context_lines":[{"line_number":297,"context_line":"    message \u003d _(\"An unknown task exception occurred\")"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":""},{"line_number":300,"context_line":"class TaskNotFound(TaskException, NotFound):"},{"line_number":301,"context_line":"    message \u003d _(\"Task with the given id %(task_id)s was not found\")"},{"line_number":302,"context_line":""},{"line_number":303,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2Fqb4%3D","line":300,"updated":"2013-10-30 18:06:50.000000000","message":"I don\u0027t know how I feel about the introduction of multiple inheritance here.  Do others have opinions?","commit_id":"336bf23807265f4b8c5480f16d324def9d504345"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"b333a499205b9aeb65168ef142ae3814f43f6e41","unresolved":false,"context_lines":[{"line_number":297,"context_line":"    message \u003d _(\"An unknown task exception occurred\")"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":""},{"line_number":300,"context_line":"class TaskNotFound(TaskException, NotFound):"},{"line_number":301,"context_line":"    message \u003d _(\"Task with the given id %(task_id)s was not found\")"},{"line_number":302,"context_line":""},{"line_number":303,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2FiEU%3D","line":300,"in_reply_to":"AAAATn%2F%2Fqb4%3D","updated":"2013-11-01 21:59:42.000000000","message":"Hey, John. This was based off Mark\u0027s half hearted remark.  I\u0027m okay either way, do you have a specific reason why we should not this way?","commit_id":"336bf23807265f4b8c5480f16d324def9d504345"}],"glance/db/__init__.py":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"0ac9d6e232638e9dc6728bfd8c0809a2a4e6c410","unresolved":false,"context_lines":[{"line_number":325,"context_line":"        )"},{"line_number":326,"context_line":""},{"line_number":327,"context_line":"    def _format_task_to_db(self, task):"},{"line_number":328,"context_line":"        task \u003d {\u0027id\u0027: task.task_id,"},{"line_number":329,"context_line":"                \u0027type\u0027: task.type,"},{"line_number":330,"context_line":"                \u0027status\u0027: task.status,"},{"line_number":331,"context_line":"                \u0027input\u0027: task.input,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2Fouk%3D","line":328,"updated":"2013-10-31 05:02:45.000000000","message":"please return this directly, we don\u0027t need a middle temporary variable \"task\" here. Also will keep consistent with above line #314.","commit_id":"cff31b020e7c520e9cd2d33ff5cf22ef90797194"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"e4985f421b28777ec7ecd66c6916de037cd53f52","unresolved":false,"context_lines":[{"line_number":325,"context_line":"        )"},{"line_number":326,"context_line":""},{"line_number":327,"context_line":"    def _format_task_to_db(self, task):"},{"line_number":328,"context_line":"        task \u003d {\u0027id\u0027: task.task_id,"},{"line_number":329,"context_line":"                \u0027type\u0027: task.type,"},{"line_number":330,"context_line":"                \u0027status\u0027: task.status,"},{"line_number":331,"context_line":"                \u0027input\u0027: task.input,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2FiYw%3D","line":328,"in_reply_to":"AAAATn%2F%2Fouk%3D","updated":"2013-11-01 21:46:37.000000000","message":"done","commit_id":"cff31b020e7c520e9cd2d33ff5cf22ef90797194"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"0ac9d6e232638e9dc6728bfd8c0809a2a4e6c410","unresolved":false,"context_lines":[{"line_number":385,"context_line":"        except (exception.NotFound, exception.Forbidden):"},{"line_number":386,"context_line":"            msg \u003d _(\u0027Could not find task %s\u0027) % task.task_id"},{"line_number":387,"context_line":"            raise exception.NotFound(msg)"},{"line_number":388,"context_line":"        new_values \u003d self.db_api.task_delete(self.context, task.task_id)"},{"line_number":389,"context_line":"        task.updated_at \u003d new_values[\u0027updated_at\u0027]"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2FouQ%3D","line":388,"updated":"2013-10-31 05:02:45.000000000","message":"I prefer move this line to above try-catch block also since db.task_delete() can raise above two exception also, in this case it can happened under such race condition context.\n\nwhy we name this result to \"new_*\", a little confuse here since we called a function to delete task but create. btw, are you sure \"task_delete()\" will return it? ( https://github.com/openstack/glance/blob/master/glance/db/sqlalchemy/api.py#L1201 ), and seems we have no one case for TaskRepo.remove() in https://review.openstack.org/#/c/54198/6/glance/tests/unit/test_db.py , IMO you can add one if you like, thanks.","commit_id":"cff31b020e7c520e9cd2d33ff5cf22ef90797194"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"e4985f421b28777ec7ecd66c6916de037cd53f52","unresolved":false,"context_lines":[{"line_number":385,"context_line":"        except (exception.NotFound, exception.Forbidden):"},{"line_number":386,"context_line":"            msg \u003d _(\u0027Could not find task %s\u0027) % task.task_id"},{"line_number":387,"context_line":"            raise exception.NotFound(msg)"},{"line_number":388,"context_line":"        new_values \u003d self.db_api.task_delete(self.context, task.task_id)"},{"line_number":389,"context_line":"        task.updated_at \u003d new_values[\u0027updated_at\u0027]"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2FiYs%3D","line":388,"in_reply_to":"AAAATn%2F%2FouQ%3D","updated":"2013-11-01 21:46:37.000000000","message":"done, done, done.","commit_id":"cff31b020e7c520e9cd2d33ff5cf22ef90797194"},{"author":{"_account_id":7701,"name":"Amala Basha","email":"amala.alungal@RACKSPACE.COM","username":"amalabasha"},"change_message_id":"6e6e99b81f6df633140a5350f9996f5391453286","unresolved":false,"context_lines":[{"line_number":382,"context_line":"                                                     task.task_id)"},{"line_number":383,"context_line":"        except (exception.NotFound, exception.Forbidden):"},{"line_number":384,"context_line":"            msg \u003d _(\u0027Could not find task %s\u0027) % task.task_id"},{"line_number":385,"context_line":"            raise exception.NotFound(msg)"},{"line_number":386,"context_line":"        return self._format_task_from_db(updated_values)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F%2Feoo%3D","line":385,"updated":"2013-11-05 05:23:36.000000000","message":"Do you raise NotFound in both cases?","commit_id":"e20cd5c991c065f4d58714694efbd8cd17a5c7f6"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"e4334a3726b281cef141e6fc959619043aa94ecf","unresolved":false,"context_lines":[{"line_number":387,"context_line":"        except (exception.NotFound, exception.Forbidden):"},{"line_number":388,"context_line":"            msg \u003d _(\u0027Could not find task %s\u0027) % task.task_id"},{"line_number":389,"context_line":"            raise exception.NotFound(msg)"},{"line_number":390,"context_line":"        return self._format_task_from_db(updated_values)"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAATn%2F%2BlPs%3D","line":390,"updated":"2013-11-22 20:57:50.000000000","message":"It seems strange that this is returning a fully formatted task that was just conceptually removed.","commit_id":"c8d0de8182a0d60c100c759aef7185b7d89abab3"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"c084704524931f01726c3bc63c8451afe4b8b505","unresolved":false,"context_lines":[{"line_number":387,"context_line":"        except (exception.NotFound, exception.Forbidden):"},{"line_number":388,"context_line":"            msg \u003d _(\u0027Could not find task %s\u0027) % task.task_id"},{"line_number":389,"context_line":"            raise exception.NotFound(msg)"},{"line_number":390,"context_line":"        return self._format_task_from_db(updated_values)"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAATn%2F%2Bkpg%3D","line":390,"in_reply_to":"AAAATn%2F%2BlPs%3D","updated":"2013-11-22 23:21:15.000000000","message":"Akk! yes good catch John.\n\nThe standard in the ImageRepo is actually to return nothing from save, add, and remove. Instead, if any thing needs to be modified, it is returned by reference by modifying the object that was passed in (in ImageRepo. we modify the image, in Task Repo, it would be modifying the task.\n\nFor an example in image_repo see line 275 above.\n\nSo I think remove, add, and save should be modified so that they do not return anything directly.","commit_id":"c8d0de8182a0d60c100c759aef7185b7d89abab3"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"995782ef40e796919b5189441cbf95c68a476128","unresolved":false,"context_lines":[{"line_number":387,"context_line":"        except (exception.NotFound, exception.Forbidden):"},{"line_number":388,"context_line":"            msg \u003d _(\u0027Could not find task %s\u0027) % task.task_id"},{"line_number":389,"context_line":"            raise exception.NotFound(msg)"},{"line_number":390,"context_line":"        return self._format_task_from_db(updated_values)"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAATn%2F%2Bkt8%3D","line":390,"in_reply_to":"AAAATn%2F%2BlPs%3D","updated":"2013-11-23 00:36:08.000000000","message":"Gotcha, thanks for pointing that out John and Mark. I see there is some code in Image Members that is returning stuff. Filed a bug for the same https://bugs.launchpad.net/glance/+bug/1254210","commit_id":"c8d0de8182a0d60c100c759aef7185b7d89abab3"}],"glance/db/sqlalchemy/api.py":[{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"e4334a3726b281cef141e6fc959619043aa94ecf","unresolved":false,"context_lines":[{"line_number":1194,"context_line":"        raise exception.TaskNotFound(task_id\u003dtask_id)"},{"line_number":1195,"context_line":""},{"line_number":1196,"context_line":"    task_ref.delete(session\u003dsession)"},{"line_number":1197,"context_line":"    return _task_format(task_ref)"},{"line_number":1198,"context_line":""},{"line_number":1199,"context_line":""},{"line_number":1200,"context_line":"def task_get_all(context, filters\u003dNone, marker\u003dNone, limit\u003dNone,"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAATn%2F%2BlPM%3D","line":1197,"updated":"2013-11-22 20:57:50.000000000","message":"Again I am curious about returning the deleted information.  I did not see where this was used but I could be missing some things.","commit_id":"c8d0de8182a0d60c100c759aef7185b7d89abab3"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"995782ef40e796919b5189441cbf95c68a476128","unresolved":false,"context_lines":[{"line_number":1194,"context_line":"        raise exception.TaskNotFound(task_id\u003dtask_id)"},{"line_number":1195,"context_line":""},{"line_number":1196,"context_line":"    task_ref.delete(session\u003dsession)"},{"line_number":1197,"context_line":"    return _task_format(task_ref)"},{"line_number":1198,"context_line":""},{"line_number":1199,"context_line":""},{"line_number":1200,"context_line":"def task_get_all(context, filters\u003dNone, marker\u003dNone, limit\u003dNone,"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAATn%2F%2Bke8%3D","line":1197,"in_reply_to":"AAAATn%2F%2BkpQ%3D","updated":"2013-11-23 00:36:08.000000000","message":"Thanks for the review, guys. Keeping it the same as per Mark\u0027s comments.","commit_id":"c8d0de8182a0d60c100c759aef7185b7d89abab3"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"c084704524931f01726c3bc63c8451afe4b8b505","unresolved":false,"context_lines":[{"line_number":1194,"context_line":"        raise exception.TaskNotFound(task_id\u003dtask_id)"},{"line_number":1195,"context_line":""},{"line_number":1196,"context_line":"    task_ref.delete(session\u003dsession)"},{"line_number":1197,"context_line":"    return _task_format(task_ref)"},{"line_number":1198,"context_line":""},{"line_number":1199,"context_line":""},{"line_number":1200,"context_line":"def task_get_all(context, filters\u003dNone, marker\u003dNone, limit\u003dNone,"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAATn%2F%2BkpQ%3D","line":1197,"in_reply_to":"AAAATn%2F%2BlPM%3D","updated":"2013-11-22 23:21:15.000000000","message":"I think here maybe it makes sense?\nOn line 294 in image_destroy, we return a normalized image object still.\n\nSo I think this line doesn\u0027t need to change.","commit_id":"c8d0de8182a0d60c100c759aef7185b7d89abab3"}],"glance/domain/__init__.py":[{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"72e88d3c4f27bc49aead2feec87ef8fe393d78f2","unresolved":false,"context_lines":[{"line_number":220,"context_line":""},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"class Task(object):"},{"line_number":223,"context_line":"    _supported_task_type \u003d (\u0027import\u0027, \u0027export\u0027, \u0027clone\u0027)"},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"    _supported_task_status \u003d (\u0027pending\u0027, \u0027success\u0027, \u0027failure\u0027, \u0027processing\u0027)"},{"line_number":226,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2FvPY%3D","line":223,"updated":"2013-10-29 17:42:26.000000000","message":"do we want to include export and clone when we actually support them?","commit_id":"7345af61a8add741486111754dfee563b820cf4c"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"2ede7379a23d0b0f4884f44354ee6fd2bb8b8cf3","unresolved":false,"context_lines":[{"line_number":220,"context_line":""},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"class Task(object):"},{"line_number":223,"context_line":"    _supported_task_type \u003d (\u0027import\u0027, \u0027export\u0027, \u0027clone\u0027)"},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"    _supported_task_status \u003d (\u0027pending\u0027, \u0027success\u0027, \u0027failure\u0027, \u0027processing\u0027)"},{"line_number":226,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2FuhU%3D","line":223,"in_reply_to":"AAAATn%2F%2Fuo0%3D","updated":"2013-10-29 20:23:02.000000000","message":"I like the idea of moving it to conf","commit_id":"7345af61a8add741486111754dfee563b820cf4c"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"acc24d177db36d61d72935cc603b07bfb66640c4","unresolved":false,"context_lines":[{"line_number":220,"context_line":""},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"class Task(object):"},{"line_number":223,"context_line":"    _supported_task_type \u003d (\u0027import\u0027, \u0027export\u0027, \u0027clone\u0027)"},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"    _supported_task_status \u003d (\u0027pending\u0027, \u0027success\u0027, \u0027failure\u0027, \u0027processing\u0027)"},{"line_number":226,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2Fuo0%3D","line":223,"in_reply_to":"AAAATn%2F%2FvPY%3D","updated":"2013-10-29 20:20:37.000000000","message":"Moving this to a CONF, please let me know if that does not make sense. I feel we can reuse that config value inside of a executor.","commit_id":"7345af61a8add741486111754dfee563b820cf4c"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"72e88d3c4f27bc49aead2feec87ef8fe393d78f2","unresolved":false,"context_lines":[{"line_number":248,"context_line":"        return self._status"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"    def run(self, executor):"},{"line_number":251,"context_line":"        # NOTE (flwang) The task status won\u0027t be set here but handled by the"},{"line_number":252,"context_line":"        # executor."},{"line_number":253,"context_line":"        if executor:"},{"line_number":254,"context_line":"            executor.run(self.task_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2FvOo%3D","line":251,"updated":"2013-10-29 17:42:26.000000000","message":"NOTE(flwang):\nsorry about the minor nit","commit_id":"7345af61a8add741486111754dfee563b820cf4c"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"59bb5fc30435b10ac334b9c8f85331f9bdab5098","unresolved":false,"context_lines":[{"line_number":272,"context_line":"        status \u003d \u0027pending\u0027"},{"line_number":273,"context_line":"        input \u003d task[\u0027input\u0027]"},{"line_number":274,"context_line":"        result \u003d None"},{"line_number":275,"context_line":"        owner \u003d context.owner or task[\u0027owner\u0027]"},{"line_number":276,"context_line":"        message \u003d None"},{"line_number":277,"context_line":"        expires_at \u003d None  # NOTE (flwang) Depends on the expire policy"},{"line_number":278,"context_line":"        created_at \u003d timeutils.utcnow()"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2FvM4%3D","line":275,"updated":"2013-10-29 17:44:56.000000000","message":"Presuming that validation is done somewhere prior to this layer?","commit_id":"7345af61a8add741486111754dfee563b820cf4c"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"acc24d177db36d61d72935cc603b07bfb66640c4","unresolved":false,"context_lines":[{"line_number":272,"context_line":"        status \u003d \u0027pending\u0027"},{"line_number":273,"context_line":"        input \u003d task[\u0027input\u0027]"},{"line_number":274,"context_line":"        result \u003d None"},{"line_number":275,"context_line":"        owner \u003d context.owner or task[\u0027owner\u0027]"},{"line_number":276,"context_line":"        message \u003d None"},{"line_number":277,"context_line":"        expires_at \u003d None  # NOTE (flwang) Depends on the expire policy"},{"line_number":278,"context_line":"        created_at \u003d timeutils.utcnow()"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2Fuok%3D","line":275,"in_reply_to":"AAAATn%2F%2FvM4%3D","updated":"2013-10-29 20:20:37.000000000","message":"yeah, now we\u0027r not allowing tasks without owners. So, this should work.","commit_id":"7345af61a8add741486111754dfee563b820cf4c"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"72e88d3c4f27bc49aead2feec87ef8fe393d78f2","unresolved":false,"context_lines":[{"line_number":274,"context_line":"        result \u003d None"},{"line_number":275,"context_line":"        owner \u003d context.owner or task[\u0027owner\u0027]"},{"line_number":276,"context_line":"        message \u003d None"},{"line_number":277,"context_line":"        expires_at \u003d None  # NOTE (flwang) Depends on the expire policy"},{"line_number":278,"context_line":"        created_at \u003d timeutils.utcnow()"},{"line_number":279,"context_line":"        updated_at \u003d created_at"},{"line_number":280,"context_line":"        return Task(task_id, type, status, input, result, owner, message,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2FvOQ%3D","line":277,"updated":"2013-10-29 17:42:26.000000000","message":"same comment on Note format","commit_id":"7345af61a8add741486111754dfee563b820cf4c"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"acc24d177db36d61d72935cc603b07bfb66640c4","unresolved":false,"context_lines":[{"line_number":274,"context_line":"        result \u003d None"},{"line_number":275,"context_line":"        owner \u003d context.owner or task[\u0027owner\u0027]"},{"line_number":276,"context_line":"        message \u003d None"},{"line_number":277,"context_line":"        expires_at \u003d None  # NOTE (flwang) Depends on the expire policy"},{"line_number":278,"context_line":"        created_at \u003d timeutils.utcnow()"},{"line_number":279,"context_line":"        updated_at \u003d created_at"},{"line_number":280,"context_line":"        return Task(task_id, type, status, input, result, owner, message,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2FuoY%3D","line":277,"in_reply_to":"AAAATn%2F%2FvOQ%3D","updated":"2013-10-29 20:20:37.000000000","message":"fixing up.","commit_id":"7345af61a8add741486111754dfee563b820cf4c"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"2b835e9bbf27c4ed12076bdb08cbeccefdcf0276","unresolved":false,"context_lines":[{"line_number":267,"context_line":""},{"line_number":268,"context_line":"    def success(self, result):"},{"line_number":269,"context_line":"        self._status \u003d \u0027success\u0027"},{"line_number":270,"context_line":"        self.result \u003d result"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"    def fail(self, message):"},{"line_number":273,"context_line":"        self._status \u003d \u0027failure\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2FqYU%3D","line":270,"updated":"2013-10-30 18:06:50.000000000","message":"It makes me nervous to set a state here independent of the state in which it previously was in.  If there was DAG of the state machine would it be possible for every single state to jump to the success or processing state?  At a minimum I would like to see the state transitions logged.","commit_id":"336bf23807265f4b8c5480f16d324def9d504345"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"b333a499205b9aeb65168ef142ae3814f43f6e41","unresolved":false,"context_lines":[{"line_number":267,"context_line":""},{"line_number":268,"context_line":"    def success(self, result):"},{"line_number":269,"context_line":"        self._status \u003d \u0027success\u0027"},{"line_number":270,"context_line":"        self.result \u003d result"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"    def fail(self, message):"},{"line_number":273,"context_line":"        self._status \u003d \u0027failure\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2FiEI%3D","line":270,"in_reply_to":"AAAATn%2F%2FqYU%3D","updated":"2013-11-01 21:59:42.000000000","message":"Added a status transition check helper method and some logging around the status transitions as well. Please let me know how you feel about the new PS when you get time. Thanks for bringing this up :-)","commit_id":"336bf23807265f4b8c5480f16d324def9d504345"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"0ac9d6e232638e9dc6728bfd8c0809a2a4e6c410","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        if executor:"},{"line_number":270,"context_line":"            executor.run(self.task_id)"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"    def kill(self, message\u003dNone):"},{"line_number":273,"context_line":"        raise NotImplementedError()"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"    #NOTE(nikhil): This is a explicit setter here to ensure that the Task"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2FotA%3D","line":272,"updated":"2013-10-31 05:02:45.000000000","message":"So seems we need a \"killed\" status IMO.","commit_id":"cff31b020e7c520e9cd2d33ff5cf22ef90797194"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"0637807ed2608bc37532c80eeb71b5bfc5af5c9d","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        if executor:"},{"line_number":270,"context_line":"            executor.run(self.task_id)"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"    def kill(self, message\u003dNone):"},{"line_number":273,"context_line":"        raise NotImplementedError()"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"    #NOTE(nikhil): This is a explicit setter here to ensure that the Task"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2FcyQ%3D","line":272,"in_reply_to":"AAAATn%2F%2FfFU%3D","updated":"2013-11-06 00:41:43.000000000","message":"Ok we can add \u0027killed\u0027 status in future when we really implement this method.","commit_id":"cff31b020e7c520e9cd2d33ff5cf22ef90797194"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"8a2c032d91b7633ab3f40155f6498ce1c8234303","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        if executor:"},{"line_number":270,"context_line":"            executor.run(self.task_id)"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"    def kill(self, message\u003dNone):"},{"line_number":273,"context_line":"        raise NotImplementedError()"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"    #NOTE(nikhil): This is a explicit setter here to ensure that the Task"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2FfFU%3D","line":272,"in_reply_to":"AAAATn%2F%2FgtE%3D","updated":"2013-11-04 22:34:28.000000000","message":"That\u0027s true however, Mark kind of agreed with that we do not need task.kill functionality to begin with and this can come in later patches when the need arises. However, it would be an important feature once \"tasks\" code is being used on a wider scale and people actually want to abandon tasks.\n\nDoes that work with you?","commit_id":"cff31b020e7c520e9cd2d33ff5cf22ef90797194"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"7625a8d3e051b2361d09bd68f6ce8ce9d1ad6571","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        if executor:"},{"line_number":270,"context_line":"            executor.run(self.task_id)"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"    def kill(self, message\u003dNone):"},{"line_number":273,"context_line":"        raise NotImplementedError()"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"    #NOTE(nikhil): This is a explicit setter here to ensure that the Task"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2FgtE%3D","line":272,"in_reply_to":"AAAATn%2F%2FihM%3D","updated":"2013-11-03 15:30:39.000000000","message":"humm, that\u0027s ok. but why we do it in future if we already know it will be 100% needed :) . anyway it\u0027s not a blocker to us I believe.","commit_id":"cff31b020e7c520e9cd2d33ff5cf22ef90797194"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"e4985f421b28777ec7ecd66c6916de037cd53f52","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        if executor:"},{"line_number":270,"context_line":"            executor.run(self.task_id)"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"    def kill(self, message\u003dNone):"},{"line_number":273,"context_line":"        raise NotImplementedError()"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"    #NOTE(nikhil): This is a explicit setter here to ensure that the Task"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2FihM%3D","line":272,"in_reply_to":"AAAATn%2F%2FotA%3D","updated":"2013-11-01 21:46:37.000000000","message":"I feel we should add that status when we start adding functionality for for task kill. What do you think?","commit_id":"cff31b020e7c520e9cd2d33ff5cf22ef90797194"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"0ac9d6e232638e9dc6728bfd8c0809a2a4e6c410","unresolved":false,"context_lines":[{"line_number":275,"context_line":"    #NOTE(nikhil): This is a explicit setter here to ensure that the Task"},{"line_number":276,"context_line":"    # status are handled properly. A pre-process on Task script should call"},{"line_number":277,"context_line":"    # this and set the Task status to processing."},{"line_number":278,"context_line":"    def processing(self):"},{"line_number":279,"context_line":"        new_status \u003d \u0027processing\u0027"},{"line_number":280,"context_line":"        if self.validate_task_status_transition(self.status, new_status):"},{"line_number":281,"context_line":"            self._status \u003d new_status"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2FotE%3D","line":278,"updated":"2013-10-31 05:02:45.000000000","message":"Do you think we\u0027d better call this in above \"run()\" function automatically when script code call \"run()\" interface on the task?","commit_id":"cff31b020e7c520e9cd2d33ff5cf22ef90797194"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"7625a8d3e051b2361d09bd68f6ce8ce9d1ad6571","unresolved":false,"context_lines":[{"line_number":275,"context_line":"    #NOTE(nikhil): This is a explicit setter here to ensure that the Task"},{"line_number":276,"context_line":"    # status are handled properly. A pre-process on Task script should call"},{"line_number":277,"context_line":"    # this and set the Task status to processing."},{"line_number":278,"context_line":"    def processing(self):"},{"line_number":279,"context_line":"        new_status \u003d \u0027processing\u0027"},{"line_number":280,"context_line":"        if self.validate_task_status_transition(self.status, new_status):"},{"line_number":281,"context_line":"            self._status \u003d new_status"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2FgtA%3D","line":278,"in_reply_to":"AAAATn%2F%2FihE%3D","updated":"2013-11-03 15:30:39.000000000","message":"no worries, it\u0027s make sense enough.","commit_id":"cff31b020e7c520e9cd2d33ff5cf22ef90797194"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"e4985f421b28777ec7ecd66c6916de037cd53f52","unresolved":false,"context_lines":[{"line_number":275,"context_line":"    #NOTE(nikhil): This is a explicit setter here to ensure that the Task"},{"line_number":276,"context_line":"    # status are handled properly. A pre-process on Task script should call"},{"line_number":277,"context_line":"    # this and set the Task status to processing."},{"line_number":278,"context_line":"    def processing(self):"},{"line_number":279,"context_line":"        new_status \u003d \u0027processing\u0027"},{"line_number":280,"context_line":"        if self.validate_task_status_transition(self.status, new_status):"},{"line_number":281,"context_line":"            self._status \u003d new_status"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2FihE%3D","line":278,"in_reply_to":"AAAATn%2F%2FotE%3D","updated":"2013-11-01 21:46:37.000000000","message":"I feel like, that this should be called when the script actually starts running as we cannot be sure until then that the task has started processing or not. It might give a wrong idea about what the task scheduling system if it\u0027s stuck.","commit_id":"cff31b020e7c520e9cd2d33ff5cf22ef90797194"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"0ac9d6e232638e9dc6728bfd8c0809a2a4e6c410","unresolved":false,"context_lines":[{"line_number":277,"context_line":"    # this and set the Task status to processing."},{"line_number":278,"context_line":"    def processing(self):"},{"line_number":279,"context_line":"        new_status \u003d \u0027processing\u0027"},{"line_number":280,"context_line":"        if self.validate_task_status_transition(self.status, new_status):"},{"line_number":281,"context_line":"            self._status \u003d new_status"},{"line_number":282,"context_line":"        else:"},{"line_number":283,"context_line":"            raise exception.InvalidTaskStatusTransition("}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2Fouw%3D","line":280,"updated":"2013-10-31 05:02:45.000000000","message":"I prefer extract this code snippet to a reusable class-level helper function, and reuse it at Line #280-285, #289-295, #299-305.","commit_id":"cff31b020e7c520e9cd2d33ff5cf22ef90797194"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"e4985f421b28777ec7ecd66c6916de037cd53f52","unresolved":false,"context_lines":[{"line_number":277,"context_line":"    # this and set the Task status to processing."},{"line_number":278,"context_line":"    def processing(self):"},{"line_number":279,"context_line":"        new_status \u003d \u0027processing\u0027"},{"line_number":280,"context_line":"        if self.validate_task_status_transition(self.status, new_status):"},{"line_number":281,"context_line":"            self._status \u003d new_status"},{"line_number":282,"context_line":"        else:"},{"line_number":283,"context_line":"            raise exception.InvalidTaskStatusTransition("}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2Fig4%3D","line":280,"in_reply_to":"AAAATn%2F%2Fouw%3D","updated":"2013-11-01 21:46:37.000000000","message":"done.","commit_id":"cff31b020e7c520e9cd2d33ff5cf22ef90797194"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"0ac9d6e232638e9dc6728bfd8c0809a2a4e6c410","unresolved":false,"context_lines":[{"line_number":306,"context_line":""},{"line_number":307,"context_line":""},{"line_number":308,"context_line":"class TaskFactory(object):"},{"line_number":309,"context_line":"    def new_task(self, context, task):"},{"line_number":310,"context_line":"        task_id \u003d uuidutils.generate_uuid()"},{"line_number":311,"context_line":"        type \u003d task[\u0027type\u0027]"},{"line_number":312,"context_line":"        status \u003d \u0027pending\u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2Fouo%3D","line":309,"updated":"2013-10-31 05:02:45.000000000","message":"IMO it will be better if we keep consistent for this as other \"new_*\" function for other resource factory: Put each field value to function signature arguments but pass in a dictionary object. For example Line #68.\n\nAnd in function we should check param is valid/dict has the key first then to read it.","commit_id":"cff31b020e7c520e9cd2d33ff5cf22ef90797194"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"e4985f421b28777ec7ecd66c6916de037cd53f52","unresolved":false,"context_lines":[{"line_number":306,"context_line":""},{"line_number":307,"context_line":""},{"line_number":308,"context_line":"class TaskFactory(object):"},{"line_number":309,"context_line":"    def new_task(self, context, task):"},{"line_number":310,"context_line":"        task_id \u003d uuidutils.generate_uuid()"},{"line_number":311,"context_line":"        type \u003d task[\u0027type\u0027]"},{"line_number":312,"context_line":"        status \u003d \u0027pending\u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2FidM%3D","line":309,"in_reply_to":"AAAATn%2F%2Fouo%3D","updated":"2013-11-01 21:46:37.000000000","message":"done","commit_id":"cff31b020e7c520e9cd2d33ff5cf22ef90797194"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"b7bf463f7750529b608430855225791104ea898b","unresolved":false,"context_lines":[{"line_number":254,"context_line":"    def status(self):"},{"line_number":255,"context_line":"        return self._status"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"    def validate_task_status_transition(self, cur_status, new_status):"},{"line_number":258,"context_line":"        valid_transitions \u003d {"},{"line_number":259,"context_line":"            \u0027pending\u0027: [\u0027processing\u0027, \u0027failure\u0027],"},{"line_number":260,"context_line":"            \u0027processing\u0027: [\u0027success\u0027, \u0027failure\u0027],"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAATn%2F%2FQV4%3D","line":257,"updated":"2013-11-12 07:30:21.000000000","message":"I think this method is a bit overkill. It seems like we could just enforce the correct state transitions by protecting status, as you have on line 254-255, and then making the only way to modify status to be by calling the functions you have below. Though I would modify those slightly, see my suggestions inline.","commit_id":"3f1328fac939bf776b6d86d95f6fff6d4926b96e"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"74de84c39291c478e8feff9c204886283f9483e3","unresolved":false,"context_lines":[{"line_number":254,"context_line":"    def status(self):"},{"line_number":255,"context_line":"        return self._status"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"    def validate_task_status_transition(self, cur_status, new_status):"},{"line_number":258,"context_line":"        valid_transitions \u003d {"},{"line_number":259,"context_line":"            \u0027pending\u0027: [\u0027processing\u0027, \u0027failure\u0027],"},{"line_number":260,"context_line":"            \u0027processing\u0027: [\u0027success\u0027, \u0027failure\u0027],"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAATn%2F%2FIZc%3D","line":257,"in_reply_to":"AAAATn%2F%2FNiY%3D","updated":"2013-11-14 02:33:25.000000000","message":"Done.","commit_id":"3f1328fac939bf776b6d86d95f6fff6d4926b96e"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"ef6a69609106414c04555a46c5aa2d2421203514","unresolved":false,"context_lines":[{"line_number":254,"context_line":"    def status(self):"},{"line_number":255,"context_line":"        return self._status"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"    def validate_task_status_transition(self, cur_status, new_status):"},{"line_number":258,"context_line":"        valid_transitions \u003d {"},{"line_number":259,"context_line":"            \u0027pending\u0027: [\u0027processing\u0027, \u0027failure\u0027],"},{"line_number":260,"context_line":"            \u0027processing\u0027: [\u0027success\u0027, \u0027failure\u0027],"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAATn%2F%2FNiY%3D","line":257,"in_reply_to":"AAAATn%2F%2FNqc%3D","updated":"2013-11-12 20:29:51.000000000","message":"I think we could keep this function, but prefix it with \u0027_\u0027 and have it as only an implementation detail, and still change the names of the functions below as I have suggested.","commit_id":"3f1328fac939bf776b6d86d95f6fff6d4926b96e"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"80ae1c22c62b9c485bec7cb7d6f50dac8a54362b","unresolved":false,"context_lines":[{"line_number":254,"context_line":"    def status(self):"},{"line_number":255,"context_line":"        return self._status"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"    def validate_task_status_transition(self, cur_status, new_status):"},{"line_number":258,"context_line":"        valid_transitions \u003d {"},{"line_number":259,"context_line":"            \u0027pending\u0027: [\u0027processing\u0027, \u0027failure\u0027],"},{"line_number":260,"context_line":"            \u0027processing\u0027: [\u0027success\u0027, \u0027failure\u0027],"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAATn%2F%2FNqc%3D","line":257,"in_reply_to":"AAAATn%2F%2FQV4%3D","updated":"2013-11-12 19:31:30.000000000","message":"Mark I respectfully disagree with you here.  I truly like the idea of mapping all possible state transitions in a single place and enforcing them via the same mapping.  In this way you look at a single place and validate ALL state transitions (and log them).  If we have a series of: if this_state \u003d\u003d XXX_STATE it makes it hard to determine what states are legal, but worse it makes it easy to accidentally allow for state transitions which should not be.","commit_id":"3f1328fac939bf776b6d86d95f6fff6d4926b96e"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"b7bf463f7750529b608430855225791104ea898b","unresolved":false,"context_lines":[{"line_number":270,"context_line":"    def run(self, executor):"},{"line_number":271,"context_line":"        # NOTE(flwang): The task status won\u0027t be set here but handled by the"},{"line_number":272,"context_line":"        # executor."},{"line_number":273,"context_line":"        if executor:"},{"line_number":274,"context_line":"            executor.run(self.task_id)"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"    def kill(self, message\u003dNone):"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAATn%2F%2FQUM%3D","line":273,"updated":"2013-11-12 07:30:21.000000000","message":"I\u0027m not sure I understand the idea of a task existing without an executor, or of passing in different executors to a single task.\n\nI think tasks should be instantiated with an appropriate executor.\n\nLet\u0027s figure out where we\u0027re misunderstanding each other in IRC if you get a chance.","commit_id":"3f1328fac939bf776b6d86d95f6fff6d4926b96e"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"74de84c39291c478e8feff9c204886283f9483e3","unresolved":false,"context_lines":[{"line_number":270,"context_line":"    def run(self, executor):"},{"line_number":271,"context_line":"        # NOTE(flwang): The task status won\u0027t be set here but handled by the"},{"line_number":272,"context_line":"        # executor."},{"line_number":273,"context_line":"        if executor:"},{"line_number":274,"context_line":"            executor.run(self.task_id)"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"    def kill(self, message\u003dNone):"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAATn%2F%2FIdc%3D","line":273,"in_reply_to":"AAAATn%2F%2FNqo%3D","updated":"2013-11-14 02:33:25.000000000","message":"As you\u0027d suggested on IRC, will include the change as you have described in the API layer.","commit_id":"3f1328fac939bf776b6d86d95f6fff6d4926b96e"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"386ac055bd3a89bb0ad179127a0caeda938c4c34","unresolved":false,"context_lines":[{"line_number":270,"context_line":"    def run(self, executor):"},{"line_number":271,"context_line":"        # NOTE(flwang): The task status won\u0027t be set here but handled by the"},{"line_number":272,"context_line":"        # executor."},{"line_number":273,"context_line":"        if executor:"},{"line_number":274,"context_line":"            executor.run(self.task_id)"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"    def kill(self, message\u003dNone):"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAATn%2F%2FNqo%3D","line":273,"in_reply_to":"AAAATn%2F%2FQUM%3D","updated":"2013-11-12 19:34:08.000000000","message":"oh ok, so the idea was to have a factory method for getting an executor. something like https://review.openstack.org/#/c/44634/26/glance/api/v2/tasks.py and pass it in only while attempting to run the task.\n\nHowever, I do get your point of synchronous layer executing and initializing the run on the task anyways :) Would definitely like to catch up on IRC to narrow this down a bit..","commit_id":"3f1328fac939bf776b6d86d95f6fff6d4926b96e"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"b7bf463f7750529b608430855225791104ea898b","unresolved":false,"context_lines":[{"line_number":273,"context_line":"        if executor:"},{"line_number":274,"context_line":"            executor.run(self.task_id)"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"    def kill(self, message\u003dNone):"},{"line_number":277,"context_line":"        raise NotImplementedError()"},{"line_number":278,"context_line":""},{"line_number":279,"context_line":"    def _set_task_status(self, new_status):"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAATn%2F%2FQUc%3D","line":276,"updated":"2013-11-12 07:30:21.000000000","message":"I think this function should set the status as well. I\u0027m not sure \u0027killed\u0027 is an acceptable status, but supposing it is, we might do\n\n  def kill(self, message\u003dNone):\n      if self.status in (\u0027success\u0027, \u0027failure\u0027, \u0027killed\u0027):\n          raise Invalid(\u0027Task has already terminated.\u0027)\n      self._status \u003d \u0027killed\u0027\n      self.message \u003d message\n      self.executor.kill(self.task_id)","commit_id":"3f1328fac939bf776b6d86d95f6fff6d4926b96e"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"74de84c39291c478e8feff9c204886283f9483e3","unresolved":false,"context_lines":[{"line_number":273,"context_line":"        if executor:"},{"line_number":274,"context_line":"            executor.run(self.task_id)"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"    def kill(self, message\u003dNone):"},{"line_number":277,"context_line":"        raise NotImplementedError()"},{"line_number":278,"context_line":""},{"line_number":279,"context_line":"    def _set_task_status(self, new_status):"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAATn%2F%2FIZk%3D","line":276,"in_reply_to":"AAAATn%2F%2FQUc%3D","updated":"2013-11-14 02:33:25.000000000","message":"removed","commit_id":"3f1328fac939bf776b6d86d95f6fff6d4926b96e"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"c943f09971778c49c4a2ece7ab0995feb4e342c5","unresolved":false,"context_lines":[{"line_number":292,"context_line":"                cur_status\u003dself.status,"},{"line_number":293,"context_line":"                new_status\u003dnew_status)"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"    #NOTE(nikhil): This is a explicit setter here to ensure that the Task"},{"line_number":296,"context_line":"    # status are handled properly. A pre-process on Task script should call"},{"line_number":297,"context_line":"    # this and set the Task status to processing."},{"line_number":298,"context_line":"    def processing(self):"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAATn%2F%2FNLU%3D","line":295,"updated":"2013-11-13 16:47:42.000000000","message":"I\u0027ll change per what Mark suggested and remove this comment.","commit_id":"3f1328fac939bf776b6d86d95f6fff6d4926b96e"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"b7bf463f7750529b608430855225791104ea898b","unresolved":false,"context_lines":[{"line_number":295,"context_line":"    #NOTE(nikhil): This is a explicit setter here to ensure that the Task"},{"line_number":296,"context_line":"    # status are handled properly. A pre-process on Task script should call"},{"line_number":297,"context_line":"    # this and set the Task status to processing."},{"line_number":298,"context_line":"    def processing(self):"},{"line_number":299,"context_line":"        new_status \u003d \u0027processing\u0027"},{"line_number":300,"context_line":"        self._set_task_status(new_status)"},{"line_number":301,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAATn%2F%2FQVw%3D","line":298,"updated":"2013-11-12 07:30:21.000000000","message":"Per my comment above, I would rewrite this as\n\n  def begin_processing(self):\n      \"\"\"Indicate the task has begun processing.\"\"\"\n      if not self.status \u003d\u003d \u0027pending\u0027:\n          raise Invalid(\u0027Task already began processing\u0027)\n      self._status \u003d \u0027processing\u0027","commit_id":"3f1328fac939bf776b6d86d95f6fff6d4926b96e"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"74de84c39291c478e8feff9c204886283f9483e3","unresolved":false,"context_lines":[{"line_number":295,"context_line":"    #NOTE(nikhil): This is a explicit setter here to ensure that the Task"},{"line_number":296,"context_line":"    # status are handled properly. A pre-process on Task script should call"},{"line_number":297,"context_line":"    # this and set the Task status to processing."},{"line_number":298,"context_line":"    def processing(self):"},{"line_number":299,"context_line":"        new_status \u003d \u0027processing\u0027"},{"line_number":300,"context_line":"        self._set_task_status(new_status)"},{"line_number":301,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAATn%2F%2FIZU%3D","line":298,"in_reply_to":"AAAATn%2F%2FQVw%3D","updated":"2013-11-14 02:33:25.000000000","message":"changed the name","commit_id":"3f1328fac939bf776b6d86d95f6fff6d4926b96e"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"b7bf463f7750529b608430855225791104ea898b","unresolved":false,"context_lines":[{"line_number":299,"context_line":"        new_status \u003d \u0027processing\u0027"},{"line_number":300,"context_line":"        self._set_task_status(new_status)"},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"    def success(self, result):"},{"line_number":303,"context_line":"        new_status \u003d \u0027success\u0027"},{"line_number":304,"context_line":"        self.result \u003d result"},{"line_number":305,"context_line":"        self._set_task_status(new_status)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAATn%2F%2FQVg%3D","line":302,"updated":"2013-11-12 07:30:21.000000000","message":"Similarly here,\n\n  def succeed(self, result):\n      \"\"\"Indicate the task has succeeded with the given result.\"\"\"\n      if not self.status \u003d\u003d \u0027processing\u0027:\n          raise Invalid(\u0027Task has not yet started processing.\u0027)\n      self._status \u003d \u0027success\u0027\n      self.result \u003d result\n\n\nThough I wonder if its really a problem to go straight from pending to success.","commit_id":"3f1328fac939bf776b6d86d95f6fff6d4926b96e"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"74de84c39291c478e8feff9c204886283f9483e3","unresolved":false,"context_lines":[{"line_number":299,"context_line":"        new_status \u003d \u0027processing\u0027"},{"line_number":300,"context_line":"        self._set_task_status(new_status)"},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"    def success(self, result):"},{"line_number":303,"context_line":"        new_status \u003d \u0027success\u0027"},{"line_number":304,"context_line":"        self.result \u003d result"},{"line_number":305,"context_line":"        self._set_task_status(new_status)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAATn%2F%2FIZI%3D","line":302,"in_reply_to":"AAAATn%2F%2FQVg%3D","updated":"2013-11-14 02:33:25.000000000","message":"changed the name and signature","commit_id":"3f1328fac939bf776b6d86d95f6fff6d4926b96e"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"b7bf463f7750529b608430855225791104ea898b","unresolved":false,"context_lines":[{"line_number":304,"context_line":"        self.result \u003d result"},{"line_number":305,"context_line":"        self._set_task_status(new_status)"},{"line_number":306,"context_line":""},{"line_number":307,"context_line":"    def failure(self, message):"},{"line_number":308,"context_line":"        new_status \u003d \u0027failure\u0027"},{"line_number":309,"context_line":"        self.message \u003d message"},{"line_number":310,"context_line":"        self._set_task_status(new_status)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAATn%2F%2FQVU%3D","line":307,"updated":"2013-11-12 07:30:21.000000000","message":"Similarly here,\n\n  def fail(self, message):\n      \"\"\"Indicate the task has failed.\"\"\"\n      if self.status \u003d\u003d \u0027failure\u0027:\n          raise Invalid(\u0027Task already failed.\u0027)\n      self._status \u003d \u0027failure\u0027\n      self.message \u003d message","commit_id":"3f1328fac939bf776b6d86d95f6fff6d4926b96e"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"74de84c39291c478e8feff9c204886283f9483e3","unresolved":false,"context_lines":[{"line_number":304,"context_line":"        self.result \u003d result"},{"line_number":305,"context_line":"        self._set_task_status(new_status)"},{"line_number":306,"context_line":""},{"line_number":307,"context_line":"    def failure(self, message):"},{"line_number":308,"context_line":"        new_status \u003d \u0027failure\u0027"},{"line_number":309,"context_line":"        self.message \u003d message"},{"line_number":310,"context_line":"        self._set_task_status(new_status)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAATn%2F%2FIZE%3D","line":307,"in_reply_to":"AAAATn%2F%2FQVU%3D","updated":"2013-11-14 02:33:25.000000000","message":"changed the name and signature","commit_id":"3f1328fac939bf776b6d86d95f6fff6d4926b96e"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"b7bf463f7750529b608430855225791104ea898b","unresolved":false,"context_lines":[{"line_number":318,"context_line":"        message \u003d None"},{"line_number":319,"context_line":"        created_at \u003d timeutils.utcnow()"},{"line_number":320,"context_line":"        updated_at \u003d created_at"},{"line_number":321,"context_line":"        #TODO(nikhil): ad a config value and generate expires_at here"},{"line_number":322,"context_line":"        expires_at \u003d None"},{"line_number":323,"context_line":"        return Task(task_id,"},{"line_number":324,"context_line":"                    task_type,"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAATn%2F%2FQU4%3D","line":321,"updated":"2013-11-12 07:30:21.000000000","message":"I think expires_at should be set when the task either succeeds or fails, not when it is created.\n\nAlso, it would be better if the config is not accessed directly in the domain logic. Rather, the objects here should have a default expires_after field that is passed in when they are instantiated. The gateway should be responsible for hooking up the domain logic and the config.","commit_id":"3f1328fac939bf776b6d86d95f6fff6d4926b96e"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"74de84c39291c478e8feff9c204886283f9483e3","unresolved":false,"context_lines":[{"line_number":318,"context_line":"        message \u003d None"},{"line_number":319,"context_line":"        created_at \u003d timeutils.utcnow()"},{"line_number":320,"context_line":"        updated_at \u003d created_at"},{"line_number":321,"context_line":"        #TODO(nikhil): ad a config value and generate expires_at here"},{"line_number":322,"context_line":"        expires_at \u003d None"},{"line_number":323,"context_line":"        return Task(task_id,"},{"line_number":324,"context_line":"                    task_type,"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAATn%2F%2FIZA%3D","line":321,"in_reply_to":"AAAATn%2F%2FNfw%3D","updated":"2013-11-14 02:33:25.000000000","message":"Done.","commit_id":"3f1328fac939bf776b6d86d95f6fff6d4926b96e"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"ef6a69609106414c04555a46c5aa2d2421203514","unresolved":false,"context_lines":[{"line_number":318,"context_line":"        message \u003d None"},{"line_number":319,"context_line":"        created_at \u003d timeutils.utcnow()"},{"line_number":320,"context_line":"        updated_at \u003d created_at"},{"line_number":321,"context_line":"        #TODO(nikhil): ad a config value and generate expires_at here"},{"line_number":322,"context_line":"        expires_at \u003d None"},{"line_number":323,"context_line":"        return Task(task_id,"},{"line_number":324,"context_line":"                    task_type,"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAATn%2F%2FNfw%3D","line":321,"in_reply_to":"AAAATn%2F%2FNmI%3D","updated":"2013-11-12 20:29:51.000000000","message":"Yeah I\u0027m not totally sure on that front. It would just be bad if a task that was still validly processing was killed. Maybe we should ask Rosmaita.","commit_id":"3f1328fac939bf776b6d86d95f6fff6d4926b96e"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"a202feff78399ee7788bdf23f2307687d8077055","unresolved":false,"context_lines":[{"line_number":318,"context_line":"        message \u003d None"},{"line_number":319,"context_line":"        created_at \u003d timeutils.utcnow()"},{"line_number":320,"context_line":"        updated_at \u003d created_at"},{"line_number":321,"context_line":"        #TODO(nikhil): ad a config value and generate expires_at here"},{"line_number":322,"context_line":"        expires_at \u003d None"},{"line_number":323,"context_line":"        return Task(task_id,"},{"line_number":324,"context_line":"                    task_type,"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAATn%2F%2FNmI%3D","line":321,"in_reply_to":"AAAATn%2F%2FNp8%3D","updated":"2013-11-12 19:53:39.000000000","message":"Oh forgot to add this line:\n\nwhy only success and fail, I thought tasks lasted for a max amount of time irrespective of whether they succeed or fail. And scripts would check if the running time is less than expiration time, no?","commit_id":"3f1328fac939bf776b6d86d95f6fff6d4926b96e"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"386ac055bd3a89bb0ad179127a0caeda938c4c34","unresolved":false,"context_lines":[{"line_number":318,"context_line":"        message \u003d None"},{"line_number":319,"context_line":"        created_at \u003d timeutils.utcnow()"},{"line_number":320,"context_line":"        updated_at \u003d created_at"},{"line_number":321,"context_line":"        #TODO(nikhil): ad a config value and generate expires_at here"},{"line_number":322,"context_line":"        expires_at \u003d None"},{"line_number":323,"context_line":"        return Task(task_id,"},{"line_number":324,"context_line":"                    task_type,"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAATn%2F%2FNp8%3D","line":321,"in_reply_to":"AAAATn%2F%2FQU4%3D","updated":"2013-11-12 19:34:08.000000000","message":"That makes a lot of sense, thanks for pointing it out. Will make the changes soon.","commit_id":"3f1328fac939bf776b6d86d95f6fff6d4926b96e"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"b09bf46668b3993ce8802bb39c9c309671e9a1b6","unresolved":false,"context_lines":[{"line_number":36,"context_line":"                         \u0027vdi\u0027, \u0027iso\u0027],"},{"line_number":37,"context_line":"                help\u003d_(\"Supported values for the \u0027disk_format\u0027 \""},{"line_number":38,"context_line":"                       \"image attribute\")),"},{"line_number":39,"context_line":"    cfg.ListOpt(\u0027task_types\u0027,"},{"line_number":40,"context_line":"                default\u003d[\u0027import\u0027, \u0027export\u0027, \u0027clone\u0027],"},{"line_number":41,"context_line":"                help\u003d_(\"Supported Task types\"))"},{"line_number":42,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATn%2F%2FIJ4%3D","line":39,"updated":"2013-11-14 04:05:56.000000000","message":"If we plan to validate task_type in api deserializer, IMO we can move this option to there.","commit_id":"d8683ce4afbc68b729c34bfb97148826350efe9f"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"9eae74bf3e61bb17fef916ec86f02567f19b1193","unresolved":false,"context_lines":[{"line_number":36,"context_line":"                         \u0027vdi\u0027, \u0027iso\u0027],"},{"line_number":37,"context_line":"                help\u003d_(\"Supported values for the \u0027disk_format\u0027 \""},{"line_number":38,"context_line":"                       \"image attribute\")),"},{"line_number":39,"context_line":"    cfg.ListOpt(\u0027task_types\u0027,"},{"line_number":40,"context_line":"                default\u003d[\u0027import\u0027, \u0027export\u0027, \u0027clone\u0027],"},{"line_number":41,"context_line":"                help\u003d_(\"Supported Task types\"))"},{"line_number":42,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATn%2F%2FFcQ%3D","line":39,"in_reply_to":"AAAATn%2F%2FIJ4%3D","updated":"2013-11-14 15:57:58.000000000","message":"done","commit_id":"d8683ce4afbc68b729c34bfb97148826350efe9f"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"a564d8690d2d7903fc04611b00f0e39f4ab4bad8","unresolved":false,"context_lines":[{"line_number":227,"context_line":"    _supported_task_status \u003d (\u0027pending\u0027, \u0027processing\u0027, \u0027success\u0027, \u0027failure\u0027)"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"    def __init__(self, task_id, type, status, input, result, owner, message,"},{"line_number":230,"context_line":"                 expires_at, created_at, updated_at):"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"        if status not in self._supported_task_status:"},{"line_number":233,"context_line":"            raise exception.InvalidTaskStatus(status)"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAATn%2F%2FEuY%3D","line":230,"updated":"2013-11-14 19:55:08.000000000","message":"(this comment comes logically after the one on line 289)\n\nWe would need to add in time_to_live here.\n\n  self._time_to_live \u003d time_to_live\n\nThe type should be a datetime.timedelta I suppose.","commit_id":"c2418d8788ce91732a59560198c7c6aa3aa01da3"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"a564d8690d2d7903fc04611b00f0e39f4ab4bad8","unresolved":false,"context_lines":[{"line_number":286,"context_line":"        new_status \u003d \u0027processing\u0027"},{"line_number":287,"context_line":"        self._set_task_status(new_status)"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":"    def succeed(self, result, expires_at):"},{"line_number":290,"context_line":"        new_status \u003d \u0027success\u0027"},{"line_number":291,"context_line":"        self.result \u003d result"},{"line_number":292,"context_line":"        self._set_task_status(new_status)"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAATn%2F%2FEug%3D","line":289,"updated":"2013-11-14 19:55:08.000000000","message":"I think the business logic for determining when a task expires belongs in the Task object itself.\n\nHow about instead of passing expires_at in, we give Task a protected attribute _time_to_live.\n\nThen this function would be more like\n\n  def succeed(self, result):\n      ...\n      self.expires_at \u003d timeutils.utcnow() + self._time_to_live","commit_id":"c2418d8788ce91732a59560198c7c6aa3aa01da3"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"a564d8690d2d7903fc04611b00f0e39f4ab4bad8","unresolved":false,"context_lines":[{"line_number":299,"context_line":"        self.expires_at \u003d expires_at"},{"line_number":300,"context_line":""},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"class TaskFactory(object):"},{"line_number":303,"context_line":"    def new_task(self, context, task_type, task_input, owner):"},{"line_number":304,"context_line":"        task_id \u003d uuidutils.generate_uuid()"},{"line_number":305,"context_line":"        status \u003d \u0027pending\u0027"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAATn%2F%2FEnQ%3D","line":302,"updated":"2013-11-14 19:55:08.000000000","message":"In order to make this work, TaskFactory will need an __init__ method\n\n  def __init__(self, task_time_to_live):\n      self._task_time_to_live \u003d task_time_to_live\n\nAnd this will need to be injected into new tasks that are created.","commit_id":"c2418d8788ce91732a59560198c7c6aa3aa01da3"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"cc0847adc7d4efedf9d8adf93d1071e44c04d7dc","unresolved":false,"context_lines":[{"line_number":42,"context_line":"               default\u003d48,"},{"line_number":43,"context_line":"               help\u003d_(\"Time in hours for which a task lives after, either \""},{"line_number":44,"context_line":"                      \"succeeding or failing\")),"},{"line_number":45,"context_line":"    cfg.ListOpt(\u0027task_types\u0027,"},{"line_number":46,"context_line":"                default\u003d[\u0027import\u0027, \u0027export\u0027, \u0027clone\u0027],"},{"line_number":47,"context_line":"                help\u003d_(\"Supported Task types\")),"},{"line_number":48,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAATn%2F%2B%2FSM%3D","line":45,"updated":"2013-11-16 08:38:50.000000000","message":"I asked for these to come back here as consistency with the disk_ and container_formats above. Thanks, Nikhil!\n\nI\u0027d like to move these out eventually, per https://bugs.launchpad.net/glance/+bug/1250633","commit_id":"b62d0387a261b875a5e62f59b4716815a8807f08"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"da8dbb75607776eb77f5b8e1505acc5181d47c02","unresolved":false,"context_lines":[{"line_number":42,"context_line":"               default\u003d48,"},{"line_number":43,"context_line":"               help\u003d_(\"Time in hours for which a task lives after, either \""},{"line_number":44,"context_line":"                      \"succeeding or failing\")),"},{"line_number":45,"context_line":"    cfg.ListOpt(\u0027task_types\u0027,"},{"line_number":46,"context_line":"                default\u003d[\u0027import\u0027, \u0027export\u0027, \u0027clone\u0027],"},{"line_number":47,"context_line":"                help\u003d_(\"Supported Task types\")),"},{"line_number":48,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAATn%2F%2B42M%3D","line":45,"in_reply_to":"AAAATn%2F%2B%2FSM%3D","updated":"2013-11-18 23:00:15.000000000","message":"Thanks for pointing this out, Mark!","commit_id":"b62d0387a261b875a5e62f59b4716815a8807f08"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"cc0847adc7d4efedf9d8adf93d1071e44c04d7dc","unresolved":false,"context_lines":[{"line_number":256,"context_line":"        self.expires_at \u003d expires_at"},{"line_number":257,"context_line":"        # NOTE(nikhil): We use \u0027_time_to_live\u0027 to determine how long a"},{"line_number":258,"context_line":"        # task should live from the time it succeeds or fails."},{"line_number":259,"context_line":"        self._time_to_live \u003d datetime.timedelta(hours\u003dCONF.task_time_to_live)"},{"line_number":260,"context_line":"        self.created_at \u003d created_at"},{"line_number":261,"context_line":"        self.updated_at \u003d updated_at"},{"line_number":262,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAATn%2F%2B%2FSI%3D","line":259,"updated":"2013-11-16 08:38:50.000000000","message":"This is a sensible compromise for now. Thanks!","commit_id":"b62d0387a261b875a5e62f59b4716815a8807f08"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"da8dbb75607776eb77f5b8e1505acc5181d47c02","unresolved":false,"context_lines":[{"line_number":256,"context_line":"        self.expires_at \u003d expires_at"},{"line_number":257,"context_line":"        # NOTE(nikhil): We use \u0027_time_to_live\u0027 to determine how long a"},{"line_number":258,"context_line":"        # task should live from the time it succeeds or fails."},{"line_number":259,"context_line":"        self._time_to_live \u003d datetime.timedelta(hours\u003dCONF.task_time_to_live)"},{"line_number":260,"context_line":"        self.created_at \u003d created_at"},{"line_number":261,"context_line":"        self.updated_at \u003d updated_at"},{"line_number":262,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAATn%2F%2B42I%3D","line":259,"in_reply_to":"AAAATn%2F%2B%2FSI%3D","updated":"2013-11-18 23:00:15.000000000","message":"Thank you.","commit_id":"b62d0387a261b875a5e62f59b4716815a8807f08"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"cc0847adc7d4efedf9d8adf93d1071e44c04d7dc","unresolved":false,"context_lines":[{"line_number":321,"context_line":""},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"class TaskFactory(object):"},{"line_number":324,"context_line":"    def new_task(self, context, task_type, task_input, owner):"},{"line_number":325,"context_line":"        task_id \u003d uuidutils.generate_uuid()"},{"line_number":326,"context_line":"        status \u003d \u0027pending\u0027"},{"line_number":327,"context_line":"        result \u003d None"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAATn%2F%2B%2FRs%3D","line":324,"updated":"2013-11-16 08:38:50.000000000","message":"I think context is unused and should not be here.","commit_id":"b62d0387a261b875a5e62f59b4716815a8807f08"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"43221b291990e3a379106d9c815a28dee1ccf05b","unresolved":false,"context_lines":[{"line_number":321,"context_line":""},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"class TaskFactory(object):"},{"line_number":324,"context_line":"    def new_task(self, context, task_type, task_input, owner):"},{"line_number":325,"context_line":"        task_id \u003d uuidutils.generate_uuid()"},{"line_number":326,"context_line":"        status \u003d \u0027pending\u0027"},{"line_number":327,"context_line":"        result \u003d None"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAATn%2F%2B9BM%3D","line":324,"in_reply_to":"AAAATn%2F%2B%2ByU%3D","updated":"2013-11-18 06:32:04.000000000","message":"Since you are passing in context to the glance.api.authoriziation.TaskFactory.__init__() and saving it as self.task, you do not need to pass it in on glance.api.authorization.TaskFactory.new_task(). So I still say you should remove it from here.","commit_id":"b62d0387a261b875a5e62f59b4716815a8807f08"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"04f4ee105f167e61175cc3bd33e4b6319f8ab2e7","unresolved":false,"context_lines":[{"line_number":321,"context_line":""},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"class TaskFactory(object):"},{"line_number":324,"context_line":"    def new_task(self, context, task_type, task_input, owner):"},{"line_number":325,"context_line":"        task_id \u003d uuidutils.generate_uuid()"},{"line_number":326,"context_line":"        status \u003d \u0027pending\u0027"},{"line_number":327,"context_line":"        result \u003d None"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAATn%2F%2B%2ByU%3D","line":324,"in_reply_to":"AAAATn%2F%2B%2FRs%3D","updated":"2013-11-16 21:55:21.000000000","message":"Thanks for picking it up Mark.\n\nWe\u0027d removed it initially however, the authorization layer logic is doing checks on context.owner for new_task and this param is just a placeholder for that. If, this is okay with you I\u0027ll add a note here explaining the need.","commit_id":"b62d0387a261b875a5e62f59b4716815a8807f08"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"da8dbb75607776eb77f5b8e1505acc5181d47c02","unresolved":false,"context_lines":[{"line_number":321,"context_line":""},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"class TaskFactory(object):"},{"line_number":324,"context_line":"    def new_task(self, context, task_type, task_input, owner):"},{"line_number":325,"context_line":"        task_id \u003d uuidutils.generate_uuid()"},{"line_number":326,"context_line":"        status \u003d \u0027pending\u0027"},{"line_number":327,"context_line":"        result \u003d None"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAATn%2F%2B414%3D","line":324,"in_reply_to":"AAAATn%2F%2B9BM%3D","updated":"2013-11-18 23:00:15.000000000","message":"Oops, sorry about that. It was a misread and missed it completely, overwhelmed by the number of changes that are going into this MP :(","commit_id":"b62d0387a261b875a5e62f59b4716815a8807f08"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"cc0847adc7d4efedf9d8adf93d1071e44c04d7dc","unresolved":false,"context_lines":[{"line_number":327,"context_line":"        result \u003d None"},{"line_number":328,"context_line":"        message \u003d None"},{"line_number":329,"context_line":"        # Note(nikhil): expires_at would be set on the task, only when it"},{"line_number":330,"context_line":"        # succeeds or fails."},{"line_number":331,"context_line":"        expires_at \u003d None"},{"line_number":332,"context_line":"        created_at \u003d timeutils.utcnow()"},{"line_number":333,"context_line":"        updated_at \u003d created_at"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAATn%2F%2B%2FSE%3D","line":330,"updated":"2013-11-16 08:38:50.000000000","message":"Great.","commit_id":"b62d0387a261b875a5e62f59b4716815a8807f08"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"0901d2474acde729b43995818324e1c153487cd6","unresolved":false,"context_lines":[{"line_number":43,"context_line":"               help\u003d_(\"Time in hours for which a task lives after, either \""},{"line_number":44,"context_line":"                      \"succeeding or failing\")),"},{"line_number":45,"context_line":"    cfg.ListOpt(\u0027task_types\u0027,"},{"line_number":46,"context_line":"                default\u003d[\u0027import\u0027, \u0027export\u0027, \u0027clone\u0027],"},{"line_number":47,"context_line":"                help\u003d_(\"Supported Task types\")),"},{"line_number":48,"context_line":"]"},{"line_number":49,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F%2Bc9g%3D","line":46,"updated":"2013-11-25 22:12:49.000000000","message":"not a big deal, but still dont feel comfortable including tasks we do not actually support :)","commit_id":"fdb4496e792f7f3fb831203bffeab7a736958742"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"1d99ffd1609f6ea72f776157b841333f595ce458","unresolved":false,"context_lines":[{"line_number":43,"context_line":"               help\u003d_(\"Time in hours for which a task lives after, either \""},{"line_number":44,"context_line":"                      \"succeeding or failing\")),"},{"line_number":45,"context_line":"    cfg.ListOpt(\u0027task_types\u0027,"},{"line_number":46,"context_line":"                default\u003d[\u0027import\u0027, \u0027export\u0027, \u0027clone\u0027],"},{"line_number":47,"context_line":"                help\u003d_(\"Supported Task types\")),"},{"line_number":48,"context_line":"]"},{"line_number":49,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F%2BcdM%3D","line":46,"in_reply_to":"AAAATn%2F%2Bc9g%3D","updated":"2013-11-26 00:04:25.000000000","message":"On another note, do we need this config? Why would we allow certain task types to be disabled through config?","commit_id":"fdb4496e792f7f3fb831203bffeab7a736958742"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"fc04c0f2baa1e149b23400f4683910bfd5795d6c","unresolved":false,"context_lines":[{"line_number":43,"context_line":"               help\u003d_(\"Time in hours for which a task lives after, either \""},{"line_number":44,"context_line":"                      \"succeeding or failing\")),"},{"line_number":45,"context_line":"    cfg.ListOpt(\u0027task_types\u0027,"},{"line_number":46,"context_line":"                default\u003d[\u0027import\u0027, \u0027export\u0027, \u0027clone\u0027],"},{"line_number":47,"context_line":"                help\u003d_(\"Supported Task types\")),"},{"line_number":48,"context_line":"]"},{"line_number":49,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F%2Bcjs%3D","line":46,"in_reply_to":"AAAATn%2F%2Bc9g%3D","updated":"2013-11-26 00:25:28.000000000","message":"done and done :-)","commit_id":"fdb4496e792f7f3fb831203bffeab7a736958742"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"fc04c0f2baa1e149b23400f4683910bfd5795d6c","unresolved":false,"context_lines":[{"line_number":293,"context_line":"            log_msg \u003d (_(\"Task status changed from %(cur_status)s to \""},{"line_number":294,"context_line":"                         \"%(new_status)s\" % {\u0027cur_status\u0027: self.status,"},{"line_number":295,"context_line":"                                             \u0027new_status\u0027: new_status}))"},{"line_number":296,"context_line":"            LOG.debug(log_msg)"},{"line_number":297,"context_line":"        else:"},{"line_number":298,"context_line":"            log_msg \u003d (_(\"Task status failed to change from %(cur_status)s \""},{"line_number":299,"context_line":"                         \"to %(new_status)s\") % {\u0027cur_status\u0027: self.status,"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F%2Bcdw%3D","line":296,"updated":"2013-11-26 00:25:28.000000000","message":"changing the log level to info","commit_id":"fdb4496e792f7f3fb831203bffeab7a736958742"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"0901d2474acde729b43995818324e1c153487cd6","unresolved":false,"context_lines":[{"line_number":312,"context_line":"        new_status \u003d \u0027success\u0027"},{"line_number":313,"context_line":"        self.result \u003d result"},{"line_number":314,"context_line":"        self._set_task_status(new_status)"},{"line_number":315,"context_line":"        self.expires_at \u003d timeutils.utcnow() + self._time_to_live"},{"line_number":316,"context_line":""},{"line_number":317,"context_line":"    def fail(self, message):"},{"line_number":318,"context_line":"        new_status \u003d \u0027failure\u0027"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F%2Bc8A%3D","line":315,"updated":"2013-11-25 22:12:49.000000000","message":"should success and failure be at a higher log level than debug? like info?","commit_id":"fdb4496e792f7f3fb831203bffeab7a736958742"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"fc04c0f2baa1e149b23400f4683910bfd5795d6c","unresolved":false,"context_lines":[{"line_number":312,"context_line":"        new_status \u003d \u0027success\u0027"},{"line_number":313,"context_line":"        self.result \u003d result"},{"line_number":314,"context_line":"        self._set_task_status(new_status)"},{"line_number":315,"context_line":"        self.expires_at \u003d timeutils.utcnow() + self._time_to_live"},{"line_number":316,"context_line":""},{"line_number":317,"context_line":"    def fail(self, message):"},{"line_number":318,"context_line":"        new_status \u003d \u0027failure\u0027"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F%2Bcis%3D","line":315,"in_reply_to":"AAAATn%2F%2Bc8A%3D","updated":"2013-11-26 00:25:28.000000000","message":"no, let\u0027s just make everything at Info level as it seems kinda relevant stages of task transition. Good suggestion, though.","commit_id":"fdb4496e792f7f3fb831203bffeab7a736958742"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"0901d2474acde729b43995818324e1c153487cd6","unresolved":false,"context_lines":[{"line_number":318,"context_line":"        new_status \u003d \u0027failure\u0027"},{"line_number":319,"context_line":"        self.message \u003d message"},{"line_number":320,"context_line":"        self._set_task_status(new_status)"},{"line_number":321,"context_line":"        self.expires_at \u003d timeutils.utcnow() + self._time_to_live"},{"line_number":322,"context_line":""},{"line_number":323,"context_line":""},{"line_number":324,"context_line":"class TaskFactory(object):"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F%2Bc7M%3D","line":321,"updated":"2013-11-25 22:12:49.000000000","message":"Why do tasks live for x amount of time even after success and failure? Is this just in db to be marked deleted?","commit_id":"fdb4496e792f7f3fb831203bffeab7a736958742"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"fc04c0f2baa1e149b23400f4683910bfd5795d6c","unresolved":false,"context_lines":[{"line_number":318,"context_line":"        new_status \u003d \u0027failure\u0027"},{"line_number":319,"context_line":"        self.message \u003d message"},{"line_number":320,"context_line":"        self._set_task_status(new_status)"},{"line_number":321,"context_line":"        self.expires_at \u003d timeutils.utcnow() + self._time_to_live"},{"line_number":322,"context_line":""},{"line_number":323,"context_line":""},{"line_number":324,"context_line":"class TaskFactory(object):"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F%2Bchw%3D","line":321,"in_reply_to":"AAAATn%2F%2Bc7M%3D","updated":"2013-11-26 00:25:28.000000000","message":"yeah, tasks are supposed to be seen in the db only for x amount of time after succeeding or failing, and would be marked deleted after that.\n\nThat scrubbing logic would be coming in future.","commit_id":"fdb4496e792f7f3fb831203bffeab7a736958742"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"fc95ad4714315b20fcd6c386703bc637fb5903c7","unresolved":false,"context_lines":[{"line_number":287,"context_line":"    def _set_task_status(self, new_status):"},{"line_number":288,"context_line":"        if self._validate_task_status_transition(self.status, new_status):"},{"line_number":289,"context_line":"            self._status \u003d new_status"},{"line_number":290,"context_line":"            log_msg \u003d (_(\"Task status changed from %(cur_status)s to \""},{"line_number":291,"context_line":"                         \"%(new_status)s\" % {\u0027cur_status\u0027: self.status,"},{"line_number":292,"context_line":"                                             \u0027new_status\u0027: new_status}))"},{"line_number":293,"context_line":"            LOG.info(log_msg)"}],"source_content_type":"text/x-python","patch_set":22,"id":"AAAATn%2F%2Bb5o%3D","line":290,"updated":"2013-11-26 04:38:42.000000000","message":"to make i18n/gettext happy, I prefer:\n\nlog_msg \u003d (_(\"Task status changed from %(cur_status)s to ...\") % {xxx})","commit_id":"a38d9506316e34e5723f4dfa71b609046a03e182"},{"author":{"_account_id":7703,"name":"Venkatesh Sampath","email":"venkatesh.sampath@outlook.com","username":"venkateshsampath"},"change_message_id":"fe677eec9f3fd2b71ac5b295065faba50c2a1da4","unresolved":false,"context_lines":[{"line_number":287,"context_line":"    def _set_task_status(self, new_status):"},{"line_number":288,"context_line":"        if self._validate_task_status_transition(self.status, new_status):"},{"line_number":289,"context_line":"            self._status \u003d new_status"},{"line_number":290,"context_line":"            log_msg \u003d (_(\"Task status changed from %(cur_status)s to \""},{"line_number":291,"context_line":"                         \"%(new_status)s\" % {\u0027cur_status\u0027: self.status,"},{"line_number":292,"context_line":"                                             \u0027new_status\u0027: new_status}))"},{"line_number":293,"context_line":"            LOG.info(log_msg)"}],"source_content_type":"text/x-python","patch_set":22,"id":"AAAATn%2F%2Bb0g%3D","line":290,"in_reply_to":"AAAATn%2F%2Bb5o%3D","updated":"2013-11-26 05:24:38.000000000","message":"thanks Zhi. Will make i18n/gettext happy in the next patch. :)","commit_id":"a38d9506316e34e5723f4dfa71b609046a03e182"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"c788b539ccb39db32016feb375d009312f5ff358","unresolved":false,"context_lines":[{"line_number":38,"context_line":"                         \u0027vdi\u0027, \u0027iso\u0027],"},{"line_number":39,"context_line":"                help\u003d_(\"Supported values for the \u0027disk_format\u0027 \""},{"line_number":40,"context_line":"                       \"image attribute\")),"},{"line_number":41,"context_line":"    cfg.IntOpt(\u0027task_time_to_live\u0027,"},{"line_number":42,"context_line":"               default\u003d48,"},{"line_number":43,"context_line":"               help\u003d_(\"Time in hours for which a task lives after, either \""},{"line_number":44,"context_line":"                      \"succeeding or failing\")),"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAATn%2F%2BZGs%3D","line":41,"updated":"2013-11-26 15:47:34.000000000","message":"minor nit: do we want to add this to etc/glance-api.conf?","commit_id":"a33dbeec1f287b264cda3b50a47a7418e3f04c96"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"2200d09fa141fba33e99ce529daa8a7a5174526b","unresolved":false,"context_lines":[{"line_number":38,"context_line":"                         \u0027vdi\u0027, \u0027iso\u0027],"},{"line_number":39,"context_line":"                help\u003d_(\"Supported values for the \u0027disk_format\u0027 \""},{"line_number":40,"context_line":"                       \"image attribute\")),"},{"line_number":41,"context_line":"    cfg.IntOpt(\u0027task_time_to_live\u0027,"},{"line_number":42,"context_line":"               default\u003d48,"},{"line_number":43,"context_line":"               help\u003d_(\"Time in hours for which a task lives after, either \""},{"line_number":44,"context_line":"                      \"succeeding or failing\")),"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAATn%2F%2BY%2B8%3D","line":41,"in_reply_to":"AAAATn%2F%2BZGs%3D","updated":"2013-11-26 15:59:21.000000000","message":"sure, will add.","commit_id":"a33dbeec1f287b264cda3b50a47a7418e3f04c96"}],"glance/domain/proxy.py":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"0ac9d6e232638e9dc6728bfd8c0809a2a4e6c410","unresolved":false,"context_lines":[{"line_number":161,"context_line":""},{"line_number":162,"context_line":"    def fail(self, message):"},{"line_number":163,"context_line":"        self.base.failure(message)"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"class TaskFactory(object):"},{"line_number":167,"context_line":"    def __init__(self, base, proxy_class\u003dNone, proxy_kwargs\u003dNone):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2Fosg%3D","line":164,"updated":"2013-10-31 05:02:45.000000000","message":"Why not give \"processing()\" here, so I still thinking we need trigger processing-status-marking in Task.run() calls internal automatically. Any thoughts?","commit_id":"cff31b020e7c520e9cd2d33ff5cf22ef90797194"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"e4985f421b28777ec7ecd66c6916de037cd53f52","unresolved":false,"context_lines":[{"line_number":161,"context_line":""},{"line_number":162,"context_line":"    def fail(self, message):"},{"line_number":163,"context_line":"        self.base.failure(message)"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"class TaskFactory(object):"},{"line_number":167,"context_line":"    def __init__(self, base, proxy_class\u003dNone, proxy_kwargs\u003dNone):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2FiZM%3D","line":164,"in_reply_to":"AAAATn%2F%2Fosg%3D","updated":"2013-11-01 21:46:37.000000000","message":"added processing","commit_id":"cff31b020e7c520e9cd2d33ff5cf22ef90797194"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"bcb248739623def30ada18b1aa057c9ef705c6bc","unresolved":false,"context_lines":[{"line_number":134,"context_line":""},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"class Task(object):"},{"line_number":137,"context_line":"    def __init__(self, base, image_repo_proxy_class\u003dNone,"},{"line_number":138,"context_line":"                 image_repo_proxy_kwargs\u003dNone):"},{"line_number":139,"context_line":"        self.base \u003d base"},{"line_number":140,"context_line":"        self.helper \u003d Helper(image_repo_proxy_class, image_repo_proxy_kwargs)"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAATn%2F%2B6DU%3D","line":137,"updated":"2013-11-18 18:02:11.000000000","message":"Oh noes, C\u0026P problem. Fixing it in next PS.","commit_id":"b62d0387a261b875a5e62f59b4716815a8807f08"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"da8dbb75607776eb77f5b8e1505acc5181d47c02","unresolved":false,"context_lines":[{"line_number":134,"context_line":""},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"class Task(object):"},{"line_number":137,"context_line":"    def __init__(self, base, image_repo_proxy_class\u003dNone,"},{"line_number":138,"context_line":"                 image_repo_proxy_kwargs\u003dNone):"},{"line_number":139,"context_line":"        self.base \u003d base"},{"line_number":140,"context_line":"        self.helper \u003d Helper(image_repo_proxy_class, image_repo_proxy_kwargs)"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAATn%2F%2B41M%3D","line":137,"in_reply_to":"AAAATn%2F%2B6DU%3D","updated":"2013-11-18 23:00:15.000000000","message":"Done.","commit_id":"b62d0387a261b875a5e62f59b4716815a8807f08"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"cc0847adc7d4efedf9d8adf93d1071e44c04d7dc","unresolved":false,"context_lines":[{"line_number":168,"context_line":"        self.helper \u003d Helper(proxy_class, proxy_kwargs)"},{"line_number":169,"context_line":"        self.base \u003d base"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    def new_task(self, context, task_type, task_input, owner):"},{"line_number":172,"context_line":"        t \u003d self.base.new_task(context, task_type, task_input, owner)"},{"line_number":173,"context_line":"        return self.helper.proxy(t)"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAATn%2F%2B%2FRc%3D","line":171,"updated":"2013-11-16 08:38:50.000000000","message":"Same comment as glance/domain/__init__.py, context should probably not be here.","commit_id":"b62d0387a261b875a5e62f59b4716815a8807f08"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"da8dbb75607776eb77f5b8e1505acc5181d47c02","unresolved":false,"context_lines":[{"line_number":168,"context_line":"        self.helper \u003d Helper(proxy_class, proxy_kwargs)"},{"line_number":169,"context_line":"        self.base \u003d base"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    def new_task(self, context, task_type, task_input, owner):"},{"line_number":172,"context_line":"        t \u003d self.base.new_task(context, task_type, task_input, owner)"},{"line_number":173,"context_line":"        return self.helper.proxy(t)"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAATn%2F%2B41E%3D","line":171,"in_reply_to":"AAAATn%2F%2B%2ByQ%3D","updated":"2013-11-18 23:00:15.000000000","message":"Done.","commit_id":"b62d0387a261b875a5e62f59b4716815a8807f08"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"04f4ee105f167e61175cc3bd33e4b6319f8ab2e7","unresolved":false,"context_lines":[{"line_number":168,"context_line":"        self.helper \u003d Helper(proxy_class, proxy_kwargs)"},{"line_number":169,"context_line":"        self.base \u003d base"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    def new_task(self, context, task_type, task_input, owner):"},{"line_number":172,"context_line":"        t \u003d self.base.new_task(context, task_type, task_input, owner)"},{"line_number":173,"context_line":"        return self.helper.proxy(t)"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAATn%2F%2B%2ByQ%3D","line":171,"in_reply_to":"AAAATn%2F%2B%2FRc%3D","updated":"2013-11-16 21:55:21.000000000","message":"Added a comment in glance/domain/__init__.py explaining the need.","commit_id":"b62d0387a261b875a5e62f59b4716815a8807f08"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"616eb9b67f02c155f34c11f4cb8633451c0c0f71","unresolved":false,"context_lines":[{"line_number":151,"context_line":"    def run(self, executor):"},{"line_number":152,"context_line":"        raise NotImplementedError()"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    def being_processing(self):"},{"line_number":155,"context_line":"        self.base.begin_processing()"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    def succeed(self, result):"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAATn%2F%2By5c%3D","line":154,"updated":"2013-11-20 03:53:23.000000000","message":"correcting typo here too","commit_id":"995e2d360940b4859bbb06d0d1a228b780f87c67"}],"glance/notifier/__init__.py":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"0ac9d6e232638e9dc6728bfd8c0809a2a4e6c410","unresolved":false,"context_lines":[{"line_number":130,"context_line":"    return {\u0027id\u0027: task.task_id,"},{"line_number":131,"context_line":"            \u0027type\u0027: task.type,"},{"line_number":132,"context_line":"            \u0027status\u0027: task.status,"},{"line_number":133,"context_line":"            \u0027input\u0027: dict(task.input),"},{"line_number":134,"context_line":"            \u0027result\u0027: None,"},{"line_number":135,"context_line":"            \u0027owner\u0027: task.owner,"},{"line_number":136,"context_line":"            \u0027message\u0027: None,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2FosA%3D","line":133,"updated":"2013-10-31 05:02:45.000000000","message":"How about not give \"input\" ? IMO in some cases, probably task \"input\" contains some sensitive data or the content may be long.","commit_id":"cff31b020e7c520e9cd2d33ff5cf22ef90797194"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"e4985f421b28777ec7ecd66c6916de037cd53f52","unresolved":false,"context_lines":[{"line_number":130,"context_line":"    return {\u0027id\u0027: task.task_id,"},{"line_number":131,"context_line":"            \u0027type\u0027: task.type,"},{"line_number":132,"context_line":"            \u0027status\u0027: task.status,"},{"line_number":133,"context_line":"            \u0027input\u0027: dict(task.input),"},{"line_number":134,"context_line":"            \u0027result\u0027: None,"},{"line_number":135,"context_line":"            \u0027owner\u0027: task.owner,"},{"line_number":136,"context_line":"            \u0027message\u0027: None,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2FiZc%3D","line":133,"in_reply_to":"AAAATn%2F%2FosA%3D","updated":"2013-11-01 21:46:37.000000000","message":"done","commit_id":"cff31b020e7c520e9cd2d33ff5cf22ef90797194"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"0ac9d6e232638e9dc6728bfd8c0809a2a4e6c410","unresolved":false,"context_lines":[{"line_number":295,"context_line":"        self.task \u003d task"},{"line_number":296,"context_line":"        self.context \u003d context"},{"line_number":297,"context_line":"        self.notifier \u003d notifier"},{"line_number":298,"context_line":"        super(TaskProxy, self).__init__(task)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2ForY%3D","line":298,"updated":"2013-10-31 05:02:45.000000000","message":"I\u0027m not sure but seems it\u0027s value thing for real cloud deployment if we emit particular message out for \"run()\", \"kill()\", \"processing()\", \"success()\", \"fail()\".","commit_id":"cff31b020e7c520e9cd2d33ff5cf22ef90797194"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"e4985f421b28777ec7ecd66c6916de037cd53f52","unresolved":false,"context_lines":[{"line_number":295,"context_line":"        self.task \u003d task"},{"line_number":296,"context_line":"        self.context \u003d context"},{"line_number":297,"context_line":"        self.notifier \u003d notifier"},{"line_number":298,"context_line":"        super(TaskProxy, self).__init__(task)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2FiZk%3D","line":298,"in_reply_to":"AAAATn%2F%2ForY%3D","updated":"2013-11-01 21:46:37.000000000","message":"done - all 5","commit_id":"cff31b020e7c520e9cd2d33ff5cf22ef90797194"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"616eb9b67f02c155f34c11f4cb8633451c0c0f71","unresolved":false,"context_lines":[{"line_number":309,"context_line":"        self.notifier.info(\u0027task.run\u0027, format_task_notification(self.task))"},{"line_number":310,"context_line":"        return super(TaskProxy, self).run(executor)"},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"    def being_processing(self):"},{"line_number":313,"context_line":"        self.notifier.info(\u0027task.start\u0027, format_task_notification(self.task))"},{"line_number":314,"context_line":"        return super(TaskProxy, self).being_processing()"},{"line_number":315,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAATn%2F%2By6M%3D","line":312,"updated":"2013-11-20 03:53:23.000000000","message":"typo, btw. (being)\n\nchanging it here and in the test.","commit_id":"995e2d360940b4859bbb06d0d1a228b780f87c67"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"4025e001572e14da9f3dbf28cd9fe296880ab06e","unresolved":false,"context_lines":[{"line_number":310,"context_line":"        return super(TaskProxy, self).run(executor)"},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"    def being_processing(self):"},{"line_number":313,"context_line":"        self.notifier.info(\u0027task.start\u0027, format_task_notification(self.task))"},{"line_number":314,"context_line":"        return super(TaskProxy, self).being_processing()"},{"line_number":315,"context_line":""},{"line_number":316,"context_line":"    def succeed(self, result):"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAATn%2F%2B3e8%3D","line":313,"updated":"2013-11-19 07:06:32.000000000","message":"IMO \u0027start\u0027 is a little confused with \u0027run\u0027 to end user, what about change this to \u0027processing\u0027 ?","commit_id":"995e2d360940b4859bbb06d0d1a228b780f87c67"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"616eb9b67f02c155f34c11f4cb8633451c0c0f71","unresolved":false,"context_lines":[{"line_number":310,"context_line":"        return super(TaskProxy, self).run(executor)"},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"    def being_processing(self):"},{"line_number":313,"context_line":"        self.notifier.info(\u0027task.start\u0027, format_task_notification(self.task))"},{"line_number":314,"context_line":"        return super(TaskProxy, self).being_processing()"},{"line_number":315,"context_line":""},{"line_number":316,"context_line":"    def succeed(self, result):"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAATn%2F%2By6g%3D","line":313,"in_reply_to":"AAAATn%2F%2B2l4%3D","updated":"2013-11-20 03:53:23.000000000","message":"Done.","commit_id":"995e2d360940b4859bbb06d0d1a228b780f87c67"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"d586f919ced8a94b9ca7c09c6d9c4632b411c92c","unresolved":false,"context_lines":[{"line_number":310,"context_line":"        return super(TaskProxy, self).run(executor)"},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"    def being_processing(self):"},{"line_number":313,"context_line":"        self.notifier.info(\u0027task.start\u0027, format_task_notification(self.task))"},{"line_number":314,"context_line":"        return super(TaskProxy, self).being_processing()"},{"line_number":315,"context_line":""},{"line_number":316,"context_line":"    def succeed(self, result):"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAATn%2F%2B2l4%3D","line":313,"in_reply_to":"AAAATn%2F%2B3e8%3D","updated":"2013-11-19 11:01:28.000000000","message":"I agree with Zhi!","commit_id":"995e2d360940b4859bbb06d0d1a228b780f87c67"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"616eb9b67f02c155f34c11f4cb8633451c0c0f71","unresolved":false,"context_lines":[{"line_number":311,"context_line":""},{"line_number":312,"context_line":"    def being_processing(self):"},{"line_number":313,"context_line":"        self.notifier.info(\u0027task.start\u0027, format_task_notification(self.task))"},{"line_number":314,"context_line":"        return super(TaskProxy, self).being_processing()"},{"line_number":315,"context_line":""},{"line_number":316,"context_line":"    def succeed(self, result):"},{"line_number":317,"context_line":"        self.notifier.info(\u0027task.success\u0027,"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAATn%2F%2By58%3D","line":314,"updated":"2013-11-20 03:53:23.000000000","message":"correcting typo here too","commit_id":"995e2d360940b4859bbb06d0d1a228b780f87c67"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"0901d2474acde729b43995818324e1c153487cd6","unresolved":false,"context_lines":[{"line_number":127,"context_line":""},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"def format_task_notification(task):"},{"line_number":130,"context_line":"    # NOTE(nikhil): input is not passed to the notifier payload as it may"},{"line_number":131,"context_line":"    # contain sensitive info."},{"line_number":132,"context_line":"    return {\u0027id\u0027: task.task_id,"},{"line_number":133,"context_line":"            \u0027type\u0027: task.type,"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F%2Bc6Y%3D","line":130,"updated":"2013-11-25 22:12:49.000000000","message":"to indicate that this fn strips info should the name be stripped_task_notification ? not a big deal though","commit_id":"fdb4496e792f7f3fb831203bffeab7a736958742"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"fc04c0f2baa1e149b23400f4683910bfd5795d6c","unresolved":false,"context_lines":[{"line_number":127,"context_line":""},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"def format_task_notification(task):"},{"line_number":130,"context_line":"    # NOTE(nikhil): input is not passed to the notifier payload as it may"},{"line_number":131,"context_line":"    # contain sensitive info."},{"line_number":132,"context_line":"    return {\u0027id\u0027: task.task_id,"},{"line_number":133,"context_line":"            \u0027type\u0027: task.type,"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F%2Bcgo%3D","line":130,"in_reply_to":"AAAATn%2F%2Bc6Y%3D","updated":"2013-11-26 00:25:28.000000000","message":"I feel like we should just let it be format_task_notification. Note should suffice us, no?\n\nThe idea was to generate a dict for the notification payload. So, the major component is still formatting, I suppose.","commit_id":"fdb4496e792f7f3fb831203bffeab7a736958742"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"0901d2474acde729b43995818324e1c153487cd6","unresolved":false,"context_lines":[{"line_number":306,"context_line":"        super(TaskProxy, self).__init__(task)"},{"line_number":307,"context_line":""},{"line_number":308,"context_line":"    def run(self, executor):"},{"line_number":309,"context_line":"        self.notifier.info(\u0027task.run\u0027, format_task_notification(self.task))"},{"line_number":310,"context_line":"        return super(TaskProxy, self).run(executor)"},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"    def begin_processing(self):"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F%2Bc5Y%3D","line":309,"updated":"2013-11-25 22:12:49.000000000","message":"You might be planning a separate patch for documentation or it might be just easier to add on the go, either ways just wanted to make sure we keep adding https://github.com/openstack/glance/blob/master/doc/source/notifications.rst","commit_id":"fdb4496e792f7f3fb831203bffeab7a736958742"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"fc04c0f2baa1e149b23400f4683910bfd5795d6c","unresolved":false,"context_lines":[{"line_number":306,"context_line":"        super(TaskProxy, self).__init__(task)"},{"line_number":307,"context_line":""},{"line_number":308,"context_line":"    def run(self, executor):"},{"line_number":309,"context_line":"        self.notifier.info(\u0027task.run\u0027, format_task_notification(self.task))"},{"line_number":310,"context_line":"        return super(TaskProxy, self).run(executor)"},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"    def begin_processing(self):"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAATn%2F%2BchU%3D","line":309,"in_reply_to":"AAAATn%2F%2Bc5Y%3D","updated":"2013-11-26 00:25:28.000000000","message":"I\u0027ll follow up with a documentation patch soon after this. Thanks for keeping check on the docs.","commit_id":"fdb4496e792f7f3fb831203bffeab7a736958742"}],"glance/tests/unit/test_auth.py":[{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"e4334a3726b281cef141e6fc959619043aa94ecf","unresolved":false,"context_lines":[{"line_number":894,"context_line":"        self._test_change(\u0027type\u0027, \u0027fake\u0027)"},{"line_number":895,"context_line":""},{"line_number":896,"context_line":"    def test_change_owner(self):"},{"line_number":897,"context_line":"        self._test_change(\u0027input\u0027, \u0027fake\u0027)"},{"line_number":898,"context_line":""},{"line_number":899,"context_line":""},{"line_number":900,"context_line":"class TestTaskFactoryProxy(utils.BaseTestCase):"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAATn%2F%2BlQw%3D","line":897,"updated":"2013-11-22 20:57:50.000000000","message":"There seem to be a few more immutable attrs that you may as well tests:\n\n320       task_id \u003d _immutable_attr(\u0027base\u0027, \u0027task_id\u0027)\n321\t    type \u003d _immutable_attr(\u0027base\u0027, \u0027type\u0027)\n322\t    status \u003d _immutable_attr(\u0027base\u0027, \u0027status\u0027)\n323\t    input \u003d _immutable_attr(\u0027base\u0027, \u0027input\u0027)\n324\t    owner \u003d _immutable_attr(\u0027base\u0027, \u0027owner\u0027)\n325\t    message \u003d _immutable_attr(\u0027base\u0027, \u0027message\u0027)\n326\t    expires_at \u003d _immutable_attr(\u0027base\u0027, \u0027expires_at\u0027)\n327\t    created_at \u003d _immutable_attr(\u0027base\u0027, \u0027created_at\u0027)\n328\t    updated_at \u003d _immutable_attr(\u0027base\u0027, \u0027updated_at\u0027)","commit_id":"c8d0de8182a0d60c100c759aef7185b7d89abab3"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"995782ef40e796919b5189441cbf95c68a476128","unresolved":false,"context_lines":[{"line_number":894,"context_line":"        self._test_change(\u0027type\u0027, \u0027fake\u0027)"},{"line_number":895,"context_line":""},{"line_number":896,"context_line":"    def test_change_owner(self):"},{"line_number":897,"context_line":"        self._test_change(\u0027input\u0027, \u0027fake\u0027)"},{"line_number":898,"context_line":""},{"line_number":899,"context_line":""},{"line_number":900,"context_line":"class TestTaskFactoryProxy(utils.BaseTestCase):"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAATn%2F%2Bkqk%3D","line":897,"in_reply_to":"AAAATn%2F%2BlQw%3D","updated":"2013-11-23 00:36:08.000000000","message":"Done. Added all 9 attrs to be tested.","commit_id":"c8d0de8182a0d60c100c759aef7185b7d89abab3"}],"glance/tests/unit/test_db.py":[{"author":{"_account_id":8759,"name":"Arnaud Legendre","email":"arnaudleg@gmail.com","username":"arnaud"},"change_message_id":"c32939c441534a91781c5f569b12113a38673d66","unresolved":false,"context_lines":[{"line_number":590,"context_line":"    def test_add_task_with_wrong_type(self):"},{"line_number":591,"context_line":"        request \u003d unit_test_utils.get_fake_request(USER1, TENANT1)"},{"line_number":592,"context_line":"        gateway \u003d unit_test_utils.FakeGateway()"},{"line_number":593,"context_line":"        task_values \u003d {\u0027type\u0027: \u0027fake\u0027, \u0027status\u0027: \u0027pending\u0027,"},{"line_number":594,"context_line":"                       \u0027input\u0027: self.fake_task_input}"},{"line_number":595,"context_line":"        self.assertRaises(exception.InvalidTaskType,"},{"line_number":596,"context_line":"                          self.task_factory.new_task,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2FuaE%3D","line":593,"updated":"2013-10-29 21:16:50.000000000","message":"don\u0027t we want to have a test with wrong status?","commit_id":"6bd576cea2926324dd78f67d309e2da5f9c276b8"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"0e26d6524ad9fb2fd8f0fb07a7a81dcd17da619e","unresolved":false,"context_lines":[{"line_number":590,"context_line":"    def test_add_task_with_wrong_type(self):"},{"line_number":591,"context_line":"        request \u003d unit_test_utils.get_fake_request(USER1, TENANT1)"},{"line_number":592,"context_line":"        gateway \u003d unit_test_utils.FakeGateway()"},{"line_number":593,"context_line":"        task_values \u003d {\u0027type\u0027: \u0027fake\u0027, \u0027status\u0027: \u0027pending\u0027,"},{"line_number":594,"context_line":"                       \u0027input\u0027: self.fake_task_input}"},{"line_number":595,"context_line":"        self.assertRaises(exception.InvalidTaskType,"},{"line_number":596,"context_line":"                          self.task_factory.new_task,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2FuPg%3D","line":593,"in_reply_to":"AAAATn%2F%2FuaE%3D","updated":"2013-10-30 01:22:28.000000000","message":"sure, good catch.","commit_id":"6bd576cea2926324dd78f67d309e2da5f9c276b8"},{"author":{"_account_id":8759,"name":"Arnaud Legendre","email":"arnaudleg@gmail.com","username":"arnaud"},"change_message_id":"c32939c441534a91781c5f569b12113a38673d66","unresolved":false,"context_lines":[{"line_number":598,"context_line":""},{"line_number":599,"context_line":"    def test_save_task(self):"},{"line_number":600,"context_line":"        task \u003d self.task_repo.get(UUID1)"},{"line_number":601,"context_line":"        original_update_time \u003d task.updated_at"},{"line_number":602,"context_line":"        self.task_repo.save(task)"},{"line_number":603,"context_line":"        current_update_time \u003d task.updated_at"},{"line_number":604,"context_line":"        self.assertTrue(current_update_time \u003e original_update_time)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2FuY8%3D","line":601,"updated":"2013-10-29 21:16:50.000000000","message":"should we test the cases where we change the status of the task (from let\u0027s say failure to pending) and then save it. this should not be considered as valid.","commit_id":"6bd576cea2926324dd78f67d309e2da5f9c276b8"},{"author":{"_account_id":8759,"name":"Arnaud Legendre","email":"arnaudleg@gmail.com","username":"arnaud"},"change_message_id":"ac69b8bc36db59b977ce4d7bbc1a6328700d710a","unresolved":false,"context_lines":[{"line_number":598,"context_line":""},{"line_number":599,"context_line":"    def test_save_task(self):"},{"line_number":600,"context_line":"        task \u003d self.task_repo.get(UUID1)"},{"line_number":601,"context_line":"        original_update_time \u003d task.updated_at"},{"line_number":602,"context_line":"        self.task_repo.save(task)"},{"line_number":603,"context_line":"        current_update_time \u003d task.updated_at"},{"line_number":604,"context_line":"        self.assertTrue(current_update_time \u003e original_update_time)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2Ft3w%3D","line":601,"in_reply_to":"AAAATn%2F%2FuPI%3D","updated":"2013-10-30 01:31:44.000000000","message":"Ok sounds good.","commit_id":"6bd576cea2926324dd78f67d309e2da5f9c276b8"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"0e26d6524ad9fb2fd8f0fb07a7a81dcd17da619e","unresolved":false,"context_lines":[{"line_number":598,"context_line":""},{"line_number":599,"context_line":"    def test_save_task(self):"},{"line_number":600,"context_line":"        task \u003d self.task_repo.get(UUID1)"},{"line_number":601,"context_line":"        original_update_time \u003d task.updated_at"},{"line_number":602,"context_line":"        self.task_repo.save(task)"},{"line_number":603,"context_line":"        current_update_time \u003d task.updated_at"},{"line_number":604,"context_line":"        self.assertTrue(current_update_time \u003e original_update_time)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2FuPI%3D","line":601,"in_reply_to":"AAAATn%2F%2FuY8%3D","updated":"2013-10-30 01:22:28.000000000","message":"I\u0027m not sure if we should force such a restriction. Although, I get that we are not restarting tasks so there should be catch around state transitions. May be we should discuss this offline on #openstack-glance as to what would be an ideal approach at this point of time with some other folks from glance involved, what do you say?","commit_id":"6bd576cea2926324dd78f67d309e2da5f9c276b8"}],"glance/tests/unit/test_domain.py":[{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"616eb9b67f02c155f34c11f4cb8633451c0c0f71","unresolved":false,"context_lines":[{"line_number":400,"context_line":"            \u0027\u0027"},{"line_number":401,"context_line":"        )"},{"line_number":402,"context_line":""},{"line_number":403,"context_line":"    def test_being_processing(self):"},{"line_number":404,"context_line":"        self.task.begin_processing()"},{"line_number":405,"context_line":"        self.assertEqual(self.task.status, \u0027processing\u0027)"},{"line_number":406,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAATn%2F%2By5o%3D","line":403,"updated":"2013-11-20 03:53:23.000000000","message":"correcting typo here too","commit_id":"995e2d360940b4859bbb06d0d1a228b780f87c67"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"616eb9b67f02c155f34c11f4cb8633451c0c0f71","unresolved":false,"context_lines":[{"line_number":401,"context_line":"        )"},{"line_number":402,"context_line":""},{"line_number":403,"context_line":"    def test_being_processing(self):"},{"line_number":404,"context_line":"        self.task.begin_processing()"},{"line_number":405,"context_line":"        self.assertEqual(self.task.status, \u0027processing\u0027)"},{"line_number":406,"context_line":""},{"line_number":407,"context_line":"    def test_succeed(self):"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAATn%2F%2By5k%3D","line":404,"updated":"2013-11-20 03:53:23.000000000","message":"correcting typo here too","commit_id":"995e2d360940b4859bbb06d0d1a228b780f87c67"}],"glance/tests/unit/test_domain_proxy.py":[{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"9eae74bf3e61bb17fef916ec86f02567f19b1193","unresolved":false,"context_lines":[{"line_number":12,"context_line":"#    distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT"},{"line_number":13,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":14,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":15,"context_line":"#    under the License."},{"line_number":16,"context_line":"import mock"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from glance.domain import proxy"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATn%2F%2FFcE%3D","line":15,"updated":"2013-11-14 15:57:58.000000000","message":"added a new line here","commit_id":"d8683ce4afbc68b729c34bfb97148826350efe9f"}],"glance/tests/unit/test_notifier.py":[{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"616eb9b67f02c155f34c11f4cb8633451c0c0f71","unresolved":false,"context_lines":[{"line_number":857,"context_line":"        self.assertEqual(output_log[\u0027payload\u0027][\u0027id\u0027], self.task.task_id)"},{"line_number":858,"context_line":""},{"line_number":859,"context_line":"    def test_task_processing_notification(self):"},{"line_number":860,"context_line":"        self.task_proxy.being_processing()"},{"line_number":861,"context_line":"        output_logs \u003d self.notifier.get_logs()"},{"line_number":862,"context_line":"        self.assertEqual(len(output_logs), 1)"},{"line_number":863,"context_line":"        output_log \u003d output_logs[0]"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAATn%2F%2By50%3D","line":860,"updated":"2013-11-20 03:53:23.000000000","message":"correcting typo here too","commit_id":"995e2d360940b4859bbb06d0d1a228b780f87c67"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"616eb9b67f02c155f34c11f4cb8633451c0c0f71","unresolved":false,"context_lines":[{"line_number":862,"context_line":"        self.assertEqual(len(output_logs), 1)"},{"line_number":863,"context_line":"        output_log \u003d output_logs[0]"},{"line_number":864,"context_line":"        self.assertEqual(output_log[\u0027notification_type\u0027], \u0027INFO\u0027)"},{"line_number":865,"context_line":"        self.assertEqual(output_log[\u0027event_type\u0027], \u0027task.start\u0027)"},{"line_number":866,"context_line":"        self.assertEqual(output_log[\u0027payload\u0027][\u0027id\u0027], self.task.task_id)"},{"line_number":867,"context_line":""},{"line_number":868,"context_line":"    def test_task_success_notification(self):"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAATn%2F%2By5Q%3D","line":865,"updated":"2013-11-20 03:53:23.000000000","message":"changed this to task.processing","commit_id":"995e2d360940b4859bbb06d0d1a228b780f87c67"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"616eb9b67f02c155f34c11f4cb8633451c0c0f71","unresolved":false,"context_lines":[{"line_number":866,"context_line":"        self.assertEqual(output_log[\u0027payload\u0027][\u0027id\u0027], self.task.task_id)"},{"line_number":867,"context_line":""},{"line_number":868,"context_line":"    def test_task_success_notification(self):"},{"line_number":869,"context_line":"        self.task_proxy.being_processing()"},{"line_number":870,"context_line":"        self.task_proxy.succeed(result\u003dNone)"},{"line_number":871,"context_line":"        output_logs \u003d self.notifier.get_logs()"},{"line_number":872,"context_line":"        self.assertEqual(len(output_logs), 2)"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAATn%2F%2By5w%3D","line":869,"updated":"2013-11-20 03:53:23.000000000","message":"correcting typo here too","commit_id":"995e2d360940b4859bbb06d0d1a228b780f87c67"}],"glance/tests/unit/test_policy.py":[{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"e72f3acf1797aad7508efee667bcda6a5722465d","unresolved":false,"context_lines":[{"line_number":21,"context_line":"import glance.api.policy"},{"line_number":22,"context_line":"from glance.common import exception"},{"line_number":23,"context_line":"import glance.context"},{"line_number":24,"context_line":"from glance.tests.unit import base"},{"line_number":25,"context_line":"from glance.tests.unit import utils as unit_test_utils"},{"line_number":26,"context_line":"from glance.tests import utils as test_utils"},{"line_number":27,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F%2Fhzk%3D","line":24,"updated":"2013-11-02 05:20:36.000000000","message":"Import seems to be correct. Jenkins intermittently errored out, I guess.","commit_id":"e20cd5c991c065f4d58714694efbd8cd17a5c7f6"}]}
