)]}'
{"glance/api/authorization.py":[{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"1b12a474064d203fae46b4e3bcf3ebffd6ac7603","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":11,"id":"AAAAS3%2F%2FScw%3D","line":57,"updated":"2013-09-30 21:00:12.000000000","message":"should we be combining this and is_image_mutable ?","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"e086a781b58550f15c2f1406860ae7bfe2ee8d80","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":11,"id":"AAAAS3%2F%2FHXc%3D","line":57,"in_reply_to":"AAAAS3%2F%2FSQo%3D","updated":"2013-10-04 05:05:51.000000000","message":"Based on my understanding, image and task are in different level. So it would be better to keep this separate.","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"8012619257c22b7ab1be9d76b9fc03da9d5d33f1","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":11,"id":"AAAAS3%2F%2FSQo%3D","line":57,"in_reply_to":"AAAAS3%2F%2FScw%3D","updated":"2013-09-30 22:41:05.000000000","message":"I\u0027m not sure Iccha, may be this needs to be discussed in the upcoming sync up meeting. I at this point would like to keep it separate as Image and Tasks are separate entities however, if we end up having similar policies then may be we can merge","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"096385cedf838972322e5de7924613adc03ad986","unresolved":false,"context_lines":[{"line_number":216,"context_line":"        return self.image_member_factory.new_image_member(image, member_id)"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"class TaskFactoryProxy(glance.domain.proxy.TaskFactory):"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"    def __init__(self, task_factory, context):"},{"line_number":222,"context_line":"        self.task_factory \u003d task_factory"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAS3%2F%2FRmw%3D","line":219,"updated":"2013-10-01 03:44:15.000000000","message":"TBH, I personal like the way of PS11 at here. It\u0027s more clear.","commit_id":"5b2ed3c50159f9cd2b74006320432f354f1d5e52"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"b55d68f48f514eafa6bb2ca855daf4df7588ebbf","unresolved":false,"context_lines":[{"line_number":216,"context_line":"        return self.image_member_factory.new_image_member(image, member_id)"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"class TaskFactoryProxy(glance.domain.proxy.TaskFactory):"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"    def __init__(self, task_factory, context):"},{"line_number":222,"context_line":"        self.task_factory \u003d task_factory"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAS3%2F%2FHzE%3D","line":219,"in_reply_to":"AAAAS3%2F%2FRmw%3D","updated":"2013-10-03 22:38:37.000000000","message":"We ran into some issue at some point however, will try to revert it to PS11 style.","commit_id":"5b2ed3c50159f9cd2b74006320432f354f1d5e52"}],"glance/api/policy.py":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"c46151d220dcfd9c6316e94c7814475f20e42853","unresolved":false,"context_lines":[{"line_number":352,"context_line":"        self.policy \u003d policy"},{"line_number":353,"context_line":"        super(TaskProxy, self).__init__(task)"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"    def kill(self):"},{"line_number":356,"context_line":"        self.policy.enforce(self.context, \u0027delete_task\u0027, {})"},{"line_number":357,"context_line":"        return self.task.kill()"},{"line_number":358,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FUrc%3D","line":355,"updated":"2013-09-30 09:03:42.000000000","message":"do you think need a \u0027run_task\u0027 policy also?","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"ceed34e96fbc11b7506af2dc507f3755633c2861","unresolved":false,"context_lines":[{"line_number":352,"context_line":"        self.policy \u003d policy"},{"line_number":353,"context_line":"        super(TaskProxy, self).__init__(task)"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"    def kill(self):"},{"line_number":356,"context_line":"        self.policy.enforce(self.context, \u0027delete_task\u0027, {})"},{"line_number":357,"context_line":"        return self.task.kill()"},{"line_number":358,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FRmo%3D","line":355,"in_reply_to":"AAAAS3%2F%2FTAs%3D","updated":"2013-10-01 03:38:10.000000000","message":"make sense, thanks for explain.","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"8222c2d043faadcf38935d19d95cf28a85a39fff","unresolved":false,"context_lines":[{"line_number":352,"context_line":"        self.policy \u003d policy"},{"line_number":353,"context_line":"        super(TaskProxy, self).__init__(task)"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"    def kill(self):"},{"line_number":356,"context_line":"        self.policy.enforce(self.context, \u0027delete_task\u0027, {})"},{"line_number":357,"context_line":"        return self.task.kill()"},{"line_number":358,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FTAs%3D","line":355,"in_reply_to":"AAAAS3%2F%2FUrc%3D","updated":"2013-09-30 17:20:55.000000000","message":"I feel that run is kind of more implicit in the sense that if add works then run should work. kill on the other hand behaves like delete. What do you think?","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"e086a781b58550f15c2f1406860ae7bfe2ee8d80","unresolved":false,"context_lines":[{"line_number":352,"context_line":"        self.policy \u003d policy"},{"line_number":353,"context_line":"        super(TaskProxy, self).__init__(task)"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"    def kill(self):"},{"line_number":356,"context_line":"        self.policy.enforce(self.context, \u0027delete_task\u0027, {})"},{"line_number":357,"context_line":"        return self.task.kill()"},{"line_number":358,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FHXM%3D","line":355,"in_reply_to":"AAAAS3%2F%2FUrc%3D","updated":"2013-10-04 05:05:51.000000000","message":"Just like nikhil\u0027s clarification, based on current design/implement, task will be run immediately, so we assume the \u0027add_task\u0027 policy is equal as \"run\".","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"1b12a474064d203fae46b4e3bcf3ebffd6ac7603","unresolved":false,"context_lines":[{"line_number":396,"context_line":"        proxy_kwargs \u003d {\u0027context\u0027: self.context, \u0027policy\u0027: self.policy}"},{"line_number":397,"context_line":"        super(TaskFactoryProxy, self).__init__(task_factory,"},{"line_number":398,"context_line":"                                               proxy_class\u003dTaskProxy,"},{"line_number":399,"context_line":"                                               proxy_kwargs\u003dproxy_kwargs)"},{"line_number":400,"context_line":""},{"line_number":401,"context_line":"    def new_task(self, req, task, gateway):"},{"line_number":402,"context_line":"        return super(TaskFactoryProxy, self).new_task(req, task, gateway)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FSU0%3D","line":399,"updated":"2013-09-30 21:00:12.000000000","message":"Do we need this Proxy in this later? What does this add?","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"aa4c633a3868fe9a52b3898828dcff4751162fee","unresolved":false,"context_lines":[{"line_number":396,"context_line":"        proxy_kwargs \u003d {\u0027context\u0027: self.context, \u0027policy\u0027: self.policy}"},{"line_number":397,"context_line":"        super(TaskFactoryProxy, self).__init__(task_factory,"},{"line_number":398,"context_line":"                                               proxy_class\u003dTaskProxy,"},{"line_number":399,"context_line":"                                               proxy_kwargs\u003dproxy_kwargs)"},{"line_number":400,"context_line":""},{"line_number":401,"context_line":"    def new_task(self, req, task, gateway):"},{"line_number":402,"context_line":"        return super(TaskFactoryProxy, self).new_task(req, task, gateway)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FID4%3D","line":399,"in_reply_to":"AAAAS3%2F%2FRmU%3D","updated":"2013-10-03 22:29:26.000000000","message":"You got that right Zhi, we are calling in  new_task method on TaskFactoryProxy essentially from v2/tasks.py create method and not the direct TaskFactory.new_task. Hope that answers your question Iccha!","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"ceed34e96fbc11b7506af2dc507f3755633c2861","unresolved":false,"context_lines":[{"line_number":396,"context_line":"        proxy_kwargs \u003d {\u0027context\u0027: self.context, \u0027policy\u0027: self.policy}"},{"line_number":397,"context_line":"        super(TaskFactoryProxy, self).__init__(task_factory,"},{"line_number":398,"context_line":"                                               proxy_class\u003dTaskProxy,"},{"line_number":399,"context_line":"                                               proxy_kwargs\u003dproxy_kwargs)"},{"line_number":400,"context_line":""},{"line_number":401,"context_line":"    def new_task(self, req, task, gateway):"},{"line_number":402,"context_line":"        return super(TaskFactoryProxy, self).new_task(req, task, gateway)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FRmU%3D","line":399,"in_reply_to":"AAAAS3%2F%2FSU0%3D","updated":"2013-10-01 03:38:10.000000000","message":"Seems like you just want to make domain stack complete, nikhil right?","commit_id":"348cf628284733115a322f166dd52316d8951830"}],"glance/api/v2/tasks.py":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"c46151d220dcfd9c6316e94c7814475f20e42853","unresolved":false,"context_lines":[{"line_number":158,"context_line":"                msg \u003d \"Attribute \\\u0027%s\\\u0027 is read-only.\" % key"},{"line_number":159,"context_line":"                raise webob.exc.HTTPForbidden(explanation\u003dunicode(msg))"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    def _validate_create_body(self, body):"},{"line_number":162,"context_line":"        \"\"\"Validate the body of task creating request\"\"\""},{"line_number":163,"context_line":"        if \u0027type\u0027 not in body:"},{"line_number":164,"context_line":"            msg \u003d _(\"task type is required\")"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FUoc%3D","line":161,"updated":"2013-09-30 09:03:42.000000000","message":"Unused function? Seem below Line109 need call it.","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"1b12a474064d203fae46b4e3bcf3ebffd6ac7603","unresolved":false,"context_lines":[{"line_number":167,"context_line":"            msg \u003d _(\"task input is required\")"},{"line_number":168,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dunicode(msg))"},{"line_number":169,"context_line":"        task_type \u003d body[\u0027type\u0027]"},{"line_number":170,"context_line":"        if task_type \u003d\u003d \u0027import\u0027:"},{"line_number":171,"context_line":"            pass"},{"line_number":172,"context_line":"        if task_type \u003d\u003d \u0027export\u0027:"},{"line_number":173,"context_line":"            pass"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FSVs%3D","line":170,"updated":"2013-09-30 21:00:12.000000000","message":"pass. I guess you will fill this in soon. Just a reminder","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"c46151d220dcfd9c6316e94c7814475f20e42853","unresolved":false,"context_lines":[{"line_number":168,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dunicode(msg))"},{"line_number":169,"context_line":"        task_type \u003d body[\u0027type\u0027]"},{"line_number":170,"context_line":"        if task_type \u003d\u003d \u0027import\u0027:"},{"line_number":171,"context_line":"            pass"},{"line_number":172,"context_line":"        if task_type \u003d\u003d \u0027export\u0027:"},{"line_number":173,"context_line":"            pass"},{"line_number":174,"context_line":"        if task_type \u003d\u003d \u0027clone\u0027:"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FUk4%3D","line":171,"updated":"2013-09-30 09:03:42.000000000","message":"IF we are sure \u0027import\u0027 job handler just only one implementation is glance.domain.async.import_executor.TaskImportExecutor, that means we designed async-task as just allow a job can have only one executor implementation, than IMO we\u0027d better do the same checking like glance/domain/async/import_executor.py:L62 (this PS) at here, to make sure the \u0027input\u0027 is correct.\n\nbut if we allow one job can be executed by multiple executor implementation then I think we can remove this checking function, since we don\u0027t know every handler\u0027s requirement for \u0027input\u0027 argument.\n\nSo I\u0027d like know what\u0027s the async-task\u0027s design on this point.","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"e086a781b58550f15c2f1406860ae7bfe2ee8d80","unresolved":false,"context_lines":[{"line_number":168,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dunicode(msg))"},{"line_number":169,"context_line":"        task_type \u003d body[\u0027type\u0027]"},{"line_number":170,"context_line":"        if task_type \u003d\u003d \u0027import\u0027:"},{"line_number":171,"context_line":"            pass"},{"line_number":172,"context_line":"        if task_type \u003d\u003d \u0027export\u0027:"},{"line_number":173,"context_line":"            pass"},{"line_number":174,"context_line":"        if task_type \u003d\u003d \u0027clone\u0027:"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FHWc%3D","line":171,"in_reply_to":"AAAAS3%2F%2FRno%3D","updated":"2013-10-04 05:05:51.000000000","message":"Let me give more background. There are two items we need to sync up. \n\n1. Currently, do we need to support \u0027export\u0027, \u0027clone\u0027 in somewhere to avoid make the unit tests too specific to find some potential issues.\n\n2. For the parameters validation, what should be the focus from the REST API level.\n\nI have mentioned them in the previous sysc up meeting with nikhil.","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"ceed34e96fbc11b7506af2dc507f3755633c2861","unresolved":false,"context_lines":[{"line_number":168,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dunicode(msg))"},{"line_number":169,"context_line":"        task_type \u003d body[\u0027type\u0027]"},{"line_number":170,"context_line":"        if task_type \u003d\u003d \u0027import\u0027:"},{"line_number":171,"context_line":"            pass"},{"line_number":172,"context_line":"        if task_type \u003d\u003d \u0027export\u0027:"},{"line_number":173,"context_line":"            pass"},{"line_number":174,"context_line":"        if task_type \u003d\u003d \u0027clone\u0027:"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FRno%3D","line":171,"in_reply_to":"AAAAS3%2F%2FSPk%3D","updated":"2013-10-01 03:38:10.000000000","message":"Cool","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"8012619257c22b7ab1be9d76b9fc03da9d5d33f1","unresolved":false,"context_lines":[{"line_number":168,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dunicode(msg))"},{"line_number":169,"context_line":"        task_type \u003d body[\u0027type\u0027]"},{"line_number":170,"context_line":"        if task_type \u003d\u003d \u0027import\u0027:"},{"line_number":171,"context_line":"            pass"},{"line_number":172,"context_line":"        if task_type \u003d\u003d \u0027export\u0027:"},{"line_number":173,"context_line":"            pass"},{"line_number":174,"context_line":"        if task_type \u003d\u003d \u0027clone\u0027:"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FSPk%3D","line":171,"in_reply_to":"AAAAS3%2F%2FUk4%3D","updated":"2013-09-30 22:41:05.000000000","message":"Excellent point Zhi, I wanted to follow up with all the folks sometime soon. May be we should bring this point up in the upcoming sync up meeting.","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"169de1a2de71a9b1651df28d282dcb203a7fb8de","unresolved":false,"context_lines":[{"line_number":290,"context_line":"    \"status\": {"},{"line_number":291,"context_line":"        \"description\": _(\"The current status of this task\"),"},{"line_number":292,"context_line":"        \"enum\": ["},{"line_number":293,"context_line":"            \"pending\","},{"line_number":294,"context_line":"            \"processing\","},{"line_number":295,"context_line":"            \"success\","},{"line_number":296,"context_line":"            \"failure\""}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAS3%2F%2FGeo%3D","line":293,"updated":"2013-10-04 11:50:51.000000000","message":"Great fix.","commit_id":"ba3cd104a86e46b75e4a5d0bb643efbfd75d23b8"}],"glance/async/eventlet_executor.py":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"313ab7784ed1c12ef132f536b42b4bfb7d6c0303","unresolved":false,"context_lines":[{"line_number":27,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"task_type_opts \u003d ["},{"line_number":30,"context_line":"    cfg.ListOpt(\u0027valid_tasks_type\u0027,"},{"line_number":31,"context_line":"                default\u003d["},{"line_number":32,"context_line":"                    \u0027import\u0027,"},{"line_number":33,"context_line":"                ],"}],"source_content_type":"text/x-python","patch_set":25,"id":"AAAATn%2F%2FxBU%3D","line":30,"updated":"2013-10-29 11:34:33.000000000","message":"Do you think it\u0027s a necessary thing to us: move the task \"input\" value validation function to particular script main class (for example \"image_import_script.ImageImporter\") or particular script implementation (such as \"image_import_script.import_filesystem_to_filesystem.ImportScript\") from api controller?","commit_id":"bda4184f725cefc2d437617afb3e9783fb6a5484"}],"glance/common/scripts/image_import/import_filesystem_to_filesystem.py":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"313ab7784ed1c12ef132f536b42b4bfb7d6c0303","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        self.set_image_data(image, uri)"},{"line_number":42,"context_line":"        image_repo \u003d self.gateway.get_repo(self.context)"},{"line_number":43,"context_line":"        image_id \u003d image.image_id"},{"line_number":44,"context_line":"        image \u003d image_repo.get(image_id)"},{"line_number":45,"context_line":"        image_repo.save(image)"},{"line_number":46,"context_line":"        return image_id"},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"AAAATn%2F%2Fw%2FE%3D","line":44,"updated":"2013-10-29 11:34:33.000000000","message":"we\u0027d better reflactoring here code stuff, there are two places to do self.gateway.get_repo() and saving new image.","commit_id":"bda4184f725cefc2d437617afb3e9783fb6a5484"}],"glance/common/scripts/image_import/main.py":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"313ab7784ed1c12ef132f536b42b4bfb7d6c0303","unresolved":false,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":"task_type_opts \u003d ["},{"line_number":32,"context_line":"    cfg.StrOpt(\u0027import_task_script\u0027,"},{"line_number":33,"context_line":"               default\u003d\u0027glance.common.scripts.image_import.\u0027"},{"line_number":34,"context_line":"                       \u0027import_filesystem_to_filesystem.ImportScript\u0027,"},{"line_number":35,"context_line":"               help\u003d_(\u0027Import task executor script to load\u0027))"},{"line_number":36,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":25,"id":"AAAATn%2F%2FxOk%3D","line":33,"updated":"2013-10-29 11:34:33.000000000","message":"So do you plan only allow using one import implementation one time? Says, in this case, only allow glance import file based image from remote to local file store? if the user request import, for example, a rbd based image from remote then he need reconfigure glance (change this option) and restart service firstly? thanks.","commit_id":"bda4184f725cefc2d437617afb3e9783fb6a5484"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"313ab7784ed1c12ef132f536b42b4bfb7d6c0303","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def load_script(self, context):"},{"line_number":54,"context_line":"            script_class \u003d CONF.import_task_script"},{"line_number":55,"context_line":"            script \u003d importutils.import_object(script_class,"},{"line_number":56,"context_line":"                                               self.gateway,"},{"line_number":57,"context_line":"                                               context)"},{"line_number":58,"context_line":"            return script"}],"source_content_type":"text/x-python","patch_set":25,"id":"AAAATn%2F%2FxAw%3D","line":55,"updated":"2013-10-29 11:34:33.000000000","message":"btw, not sure import_object() method will never return None?","commit_id":"bda4184f725cefc2d437617afb3e9783fb6a5484"}],"glance/db/__init__.py":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"c46151d220dcfd9c6316e94c7814475f20e42853","unresolved":false,"context_lines":[{"line_number":341,"context_line":"        for db_api_task in db_api_tasks:"},{"line_number":342,"context_line":"            task \u003d self._format_task_from_db(db_api_task)"},{"line_number":343,"context_line":"            tasks.append(task)"},{"line_number":344,"context_line":"        return tasks"},{"line_number":345,"context_line":""},{"line_number":346,"context_line":"    def save(self, task):"},{"line_number":347,"context_line":"        task_values \u003d self._format_task_to_db(task)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FU4M%3D","line":344,"updated":"2013-09-30 09:03:42.000000000","message":"return [self._format_task_from_db(db_api_task) for db_api_task in db_api_tasks]\n\nmore terse?","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":7703,"name":"Venkatesh Sampath","email":"venkatesh.sampath@outlook.com","username":"venkateshsampath"},"change_message_id":"eda35d30dd001be0df16c90d6e431d888b615a1c","unresolved":false,"context_lines":[{"line_number":341,"context_line":"        for db_api_task in db_api_tasks:"},{"line_number":342,"context_line":"            task \u003d self._format_task_from_db(db_api_task)"},{"line_number":343,"context_line":"            tasks.append(task)"},{"line_number":344,"context_line":"        return tasks"},{"line_number":345,"context_line":""},{"line_number":346,"context_line":"    def save(self, task):"},{"line_number":347,"context_line":"        task_values \u003d self._format_task_to_db(task)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FSTE%3D","line":344,"in_reply_to":"AAAAS3%2F%2FU4M%3D","updated":"2013-10-03 20:37:41.000000000","message":"you are right Zhi. Will use the list comprehension.","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"c46151d220dcfd9c6316e94c7814475f20e42853","unresolved":false,"context_lines":[{"line_number":359,"context_line":""},{"line_number":360,"context_line":"    def add(self, task):"},{"line_number":361,"context_line":"        task_values \u003d self._format_task_to_db(task)"},{"line_number":362,"context_line":"        task_values[\u0027updated_at\u0027] \u003d task.updated_at"},{"line_number":363,"context_line":"        new_values \u003d self.db_api.task_create(self.context, task_values)"},{"line_number":364,"context_line":"        task.created_at \u003d new_values[\u0027created_at\u0027]"},{"line_number":365,"context_line":"        task.updated_at \u003d new_values[\u0027updated_at\u0027]"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FU34%3D","line":362,"updated":"2013-09-30 09:03:42.000000000","message":"_format_task_to_db() already copied \u0027updated_at\u0027 field to dict. why we need this assignment again?","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":7703,"name":"Venkatesh Sampath","email":"venkatesh.sampath@outlook.com","username":"venkateshsampath"},"change_message_id":"eda35d30dd001be0df16c90d6e431d888b615a1c","unresolved":false,"context_lines":[{"line_number":359,"context_line":""},{"line_number":360,"context_line":"    def add(self, task):"},{"line_number":361,"context_line":"        task_values \u003d self._format_task_to_db(task)"},{"line_number":362,"context_line":"        task_values[\u0027updated_at\u0027] \u003d task.updated_at"},{"line_number":363,"context_line":"        new_values \u003d self.db_api.task_create(self.context, task_values)"},{"line_number":364,"context_line":"        task.created_at \u003d new_values[\u0027created_at\u0027]"},{"line_number":365,"context_line":"        task.updated_at \u003d new_values[\u0027updated_at\u0027]"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FSRM%3D","line":362,"in_reply_to":"AAAAS3%2F%2FU34%3D","updated":"2013-10-03 20:37:41.000000000","message":"You are right Zhi. I removed it.","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"096385cedf838972322e5de7924613adc03ad986","unresolved":false,"context_lines":[{"line_number":330,"context_line":"        except (exception.NotFound, exception.Forbidden):"},{"line_number":331,"context_line":"            raise exception.NotFound()"},{"line_number":332,"context_line":"        task \u003d self._format_task_from_db(db_api_task)"},{"line_number":333,"context_line":"        return task"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"    def list(self, marker\u003dNone, limit\u003dNone, sort_key\u003d\u0027created_at\u0027,"},{"line_number":336,"context_line":"             sort_dir\u003d\u0027desc\u0027, filters\u003dNone):"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAS3%2F%2FRn0%3D","line":333,"updated":"2013-10-01 03:44:15.000000000","message":"why we need \u0027task\u0027, a temp variable here? sorry I really do not wish to nitpick.","commit_id":"5b2ed3c50159f9cd2b74006320432f354f1d5e52"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"b55d68f48f514eafa6bb2ca855daf4df7588ebbf","unresolved":false,"context_lines":[{"line_number":330,"context_line":"        except (exception.NotFound, exception.Forbidden):"},{"line_number":331,"context_line":"            raise exception.NotFound()"},{"line_number":332,"context_line":"        task \u003d self._format_task_from_db(db_api_task)"},{"line_number":333,"context_line":"        return task"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"    def list(self, marker\u003dNone, limit\u003dNone, sort_key\u003d\u0027created_at\u0027,"},{"line_number":336,"context_line":"             sort_dir\u003d\u0027desc\u0027, filters\u003dNone):"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAS3%2F%2FHy4%3D","line":333,"in_reply_to":"AAAAS3%2F%2FRn0%3D","updated":"2013-10-03 22:38:37.000000000","message":"Will do, thanks for catching this","commit_id":"5b2ed3c50159f9cd2b74006320432f354f1d5e52"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"169de1a2de71a9b1651df28d282dcb203a7fb8de","unresolved":false,"context_lines":[{"line_number":339,"context_line":"                                                limit\u003dlimit,"},{"line_number":340,"context_line":"                                                sort_key\u003dsort_key,"},{"line_number":341,"context_line":"                                                sort_dir\u003dsort_dir)"},{"line_number":342,"context_line":"        tasks \u003d [self._format_task_from_db(task) for task in db_api_tasks]"},{"line_number":343,"context_line":"        return tasks"},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"    def save(self, task):"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAS3%2F%2FGnM%3D","line":342,"updated":"2013-10-04 11:50:51.000000000","message":"remove \u0027tasks\u0027 temp variable please also.\n\n\"return [self._format_task_from_db(db_api_task) for db_api_task in db_api_tasks]\"","commit_id":"ba3cd104a86e46b75e4a5d0bb643efbfd75d23b8"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"5a7f1d7b53c40689297e4a37cda12f0757d08820","unresolved":false,"context_lines":[{"line_number":325,"context_line":"    def get(self, task_id):"},{"line_number":326,"context_line":"        try:"},{"line_number":327,"context_line":"            db_api_task \u003d self.db_api.task_get(self.context, task_id)"},{"line_number":328,"context_line":"            if not db_api_task:"},{"line_number":329,"context_line":"                raise exception.NotFound()"},{"line_number":330,"context_line":"        except (exception.NotFound, exception.Forbidden):"},{"line_number":331,"context_line":"            raise exception.NotFound()"}],"source_content_type":"text/x-python","patch_set":21,"id":"AAAATH%2F%2Fl7g%3D","line":328,"updated":"2013-10-14 02:51:36.000000000","message":"We don\u0027t need this two lines for notfound checking since at https://review.openstack.org/#/c/51294/1/glance/db/sqlalchemy/api.py task_get() we promise raise exception.NotFound out.","commit_id":"a8c0826d265907d73fc0c72df9684d56c3e95f6e"}],"glance/db/sqlalchemy/api.py":[{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"1b12a474064d203fae46b4e3bcf3ebffd6ac7603","unresolved":false,"context_lines":[{"line_number":423,"context_line":"    return False"},{"line_number":424,"context_line":""},{"line_number":425,"context_line":""},{"line_number":426,"context_line":"def is_task_visible(context, task):"},{"line_number":427,"context_line":"    \"\"\"Return True if the task is visible in this context.\"\"\""},{"line_number":428,"context_line":"    # Is admin \u003d\u003d task visible"},{"line_number":429,"context_line":"    if context.is_admin:"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FSUU%3D","line":426,"updated":"2013-09-30 21:00:12.000000000","message":"should this be the responsibility of this layer?","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":7703,"name":"Venkatesh Sampath","email":"venkatesh.sampath@outlook.com","username":"venkateshsampath"},"change_message_id":"eda35d30dd001be0df16c90d6e431d888b615a1c","unresolved":false,"context_lines":[{"line_number":423,"context_line":"    return False"},{"line_number":424,"context_line":""},{"line_number":425,"context_line":""},{"line_number":426,"context_line":"def is_task_visible(context, task):"},{"line_number":427,"context_line":"    \"\"\"Return True if the task is visible in this context.\"\"\""},{"line_number":428,"context_line":"    # Is admin \u003d\u003d task visible"},{"line_number":429,"context_line":"    if context.is_admin:"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FSM0%3D","line":426,"in_reply_to":"AAAAS3%2F%2FSUU%3D","updated":"2013-10-03 20:37:41.000000000","message":"I think this method is only used by one of the internal method, _task_get. Ideally this should be a private method. Will change it to be private","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"c46151d220dcfd9c6316e94c7814475f20e42853","unresolved":false,"context_lines":[{"line_number":1146,"context_line":"    return _task_format(task_ref)"},{"line_number":1147,"context_line":""},{"line_number":1148,"context_line":""},{"line_number":1149,"context_line":"def task_get(context, task_id, session\u003dNone):"},{"line_number":1150,"context_line":"    \"\"\"Fetch a task entity by id\"\"\""},{"line_number":1151,"context_line":"    task_ref \u003d _task_get(context, task_id, session\u003dsession)"},{"line_number":1152,"context_line":"    return _task_format(task_ref)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FU5E%3D","line":1149,"updated":"2013-09-30 09:03:42.000000000","message":"It will be better if we expose \u0027force_show_deleted\u003dFalse\u0027 at this level also? just like simple driver did.","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"e086a781b58550f15c2f1406860ae7bfe2ee8d80","unresolved":false,"context_lines":[{"line_number":1146,"context_line":"    return _task_format(task_ref)"},{"line_number":1147,"context_line":""},{"line_number":1148,"context_line":""},{"line_number":1149,"context_line":"def task_get(context, task_id, session\u003dNone):"},{"line_number":1150,"context_line":"    \"\"\"Fetch a task entity by id\"\"\""},{"line_number":1151,"context_line":"    task_ref \u003d _task_get(context, task_id, session\u003dsession)"},{"line_number":1152,"context_line":"    return _task_format(task_ref)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FHVs%3D","line":1149,"in_reply_to":"AAAAS3%2F%2FS%2Fc%3D","updated":"2013-10-04 05:05:51.000000000","message":"Let\u0027s discuss it on the meeting.","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"8222c2d043faadcf38935d19d95cf28a85a39fff","unresolved":false,"context_lines":[{"line_number":1146,"context_line":"    return _task_format(task_ref)"},{"line_number":1147,"context_line":""},{"line_number":1148,"context_line":""},{"line_number":1149,"context_line":"def task_get(context, task_id, session\u003dNone):"},{"line_number":1150,"context_line":"    \"\"\"Fetch a task entity by id\"\"\""},{"line_number":1151,"context_line":"    task_ref \u003d _task_get(context, task_id, session\u003dsession)"},{"line_number":1152,"context_line":"    return _task_format(task_ref)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FS%2Fc%3D","line":1149,"in_reply_to":"AAAAS3%2F%2FU5E%3D","updated":"2013-09-30 17:20:55.000000000","message":"I believe we would go to the route of hard deletes for tasks","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"c46151d220dcfd9c6316e94c7814475f20e42853","unresolved":false,"context_lines":[{"line_number":1247,"context_line":"    \"\"\"Apply supplied dictionary of values to a task object.\"\"\""},{"line_number":1248,"context_line":"    _drop_protected_attrs(models.Task, values)"},{"line_number":1249,"context_line":"    values[\"deleted\"] \u003d False"},{"line_number":1250,"context_line":"    task_ref.update(values)"},{"line_number":1251,"context_line":"    task_ref.save(session\u003dsession)"},{"line_number":1252,"context_line":"    return task_ref"},{"line_number":1253,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FU5o%3D","line":1250,"updated":"2013-09-30 09:03:42.000000000","message":"Need update \u0027updated_at\u0027 field also? Or do it in model base?\n\nOr current code somewhere already could update this?","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"6b3da6b63253842957ad07af2c135adfdfbdc9cb","unresolved":false,"context_lines":[{"line_number":1247,"context_line":"    \"\"\"Apply supplied dictionary of values to a task object.\"\"\""},{"line_number":1248,"context_line":"    _drop_protected_attrs(models.Task, values)"},{"line_number":1249,"context_line":"    values[\"deleted\"] \u003d False"},{"line_number":1250,"context_line":"    task_ref.update(values)"},{"line_number":1251,"context_line":"    task_ref.save(session\u003dsession)"},{"line_number":1252,"context_line":"    return task_ref"},{"line_number":1253,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FH44%3D","line":1250,"in_reply_to":"AAAAS3%2F%2FSSA%3D","updated":"2013-10-04 09:33:07.000000000","message":"Thanks for explaining.","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":7703,"name":"Venkatesh Sampath","email":"venkatesh.sampath@outlook.com","username":"venkateshsampath"},"change_message_id":"eda35d30dd001be0df16c90d6e431d888b615a1c","unresolved":false,"context_lines":[{"line_number":1247,"context_line":"    \"\"\"Apply supplied dictionary of values to a task object.\"\"\""},{"line_number":1248,"context_line":"    _drop_protected_attrs(models.Task, values)"},{"line_number":1249,"context_line":"    values[\"deleted\"] \u003d False"},{"line_number":1250,"context_line":"    task_ref.update(values)"},{"line_number":1251,"context_line":"    task_ref.save(session\u003dsession)"},{"line_number":1252,"context_line":"    return task_ref"},{"line_number":1253,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FSSA%3D","line":1250,"in_reply_to":"AAAAS3%2F%2FU5o%3D","updated":"2013-10-03 20:37:41.000000000","message":"Hi Zhi,\n\nI think it get updated through the models.Base\n/glance/db/sqlalchemy/models.py: line:71","commit_id":"348cf628284733115a322f166dd52316d8951830"}],"glance/db/sqlalchemy/models.py":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"c46151d220dcfd9c6316e94c7814475f20e42853","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        self.deleted_at \u003d timeutils.utcnow()"},{"line_number":88,"context_line":"        self.save(session\u003dsession)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    def update(self, values):"},{"line_number":91,"context_line":"        \"\"\"dict.update() behaviour.\"\"\""},{"line_number":92,"context_line":"        for k, v in values.iteritems():"},{"line_number":93,"context_line":"            self[k] \u003d v"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FU4w%3D","line":90,"updated":"2013-09-30 09:03:42.000000000","message":"Do you think we should update \u0027update_at\u0027 at here? IMO it\u0027s more common.","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"6b3da6b63253842957ad07af2c135adfdfbdc9cb","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        self.deleted_at \u003d timeutils.utcnow()"},{"line_number":88,"context_line":"        self.save(session\u003dsession)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    def update(self, values):"},{"line_number":91,"context_line":"        \"\"\"dict.update() behaviour.\"\"\""},{"line_number":92,"context_line":"        for k, v in values.iteritems():"},{"line_number":93,"context_line":"            self[k] \u003d v"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FH4w%3D","line":90,"in_reply_to":"AAAAS3%2F%2FSRw%3D","updated":"2013-10-04 09:33:07.000000000","message":"Thanks for explaining Venkatesh!","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":7703,"name":"Venkatesh Sampath","email":"venkatesh.sampath@outlook.com","username":"venkateshsampath"},"change_message_id":"eda35d30dd001be0df16c90d6e431d888b615a1c","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        self.deleted_at \u003d timeutils.utcnow()"},{"line_number":88,"context_line":"        self.save(session\u003dsession)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    def update(self, values):"},{"line_number":91,"context_line":"        \"\"\"dict.update() behaviour.\"\"\""},{"line_number":92,"context_line":"        for k, v in values.iteritems():"},{"line_number":93,"context_line":"            self[k] \u003d v"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FSRw%3D","line":90,"in_reply_to":"AAAAS3%2F%2FU4w%3D","updated":"2013-10-03 20:37:41.000000000","message":"Hi Zhi,\n\nThe updated_at is updated through the following line: 71\n    updated_at \u003d Column(DateTime, default\u003dtimeutils.utcnow,\n                        nullable\u003dFalse, onupdate\u003dtimeutils.utcnow)\nChecked the openstack.common.db.models, there too it uses a similar approach.","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"f149cb301b5d4c293aafcbee8a0e9867be38c4b9","unresolved":false,"context_lines":[{"line_number":21,"context_line":"\"\"\""},{"line_number":22,"context_line":"import json"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"import json"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"from sqlalchemy import Column, Integer, String, BigInteger"},{"line_number":27,"context_line":"from sqlalchemy.ext.compiler import compiles"}],"source_content_type":"text/x-python","patch_set":22,"id":"AAAATH%2F%2FW7w%3D","line":24,"updated":"2013-10-17 11:20:59.000000000","message":"useless change to this file.","commit_id":"22043016d1eccfe23ea4fa1388dab549b60110a1"}],"glance/domain/__init__.py":[{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"1b12a474064d203fae46b4e3bcf3ebffd6ac7603","unresolved":false,"context_lines":[{"line_number":226,"context_line":"        if type not in (\u0027import\u0027, \u0027export\u0027, \u0027clone\u0027):"},{"line_number":227,"context_line":"            raise exception.InvalidTaskType(type)"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"        if status not in (\u0027pending\u0027, \u0027success\u0027, \u0027failure\u0027, \u0027processing\u0027):"},{"line_number":230,"context_line":"            raise exception.InvalidTaskStatus(status)"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"        self.task_id \u003d task_id"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FSbI%3D","line":229,"updated":"2013-09-30 21:00:12.000000000","message":"do you want to define this list separately as accepted_status\nsame thing for type?","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"aa4c633a3868fe9a52b3898828dcff4751162fee","unresolved":false,"context_lines":[{"line_number":226,"context_line":"        if type not in (\u0027import\u0027, \u0027export\u0027, \u0027clone\u0027):"},{"line_number":227,"context_line":"            raise exception.InvalidTaskType(type)"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"        if status not in (\u0027pending\u0027, \u0027success\u0027, \u0027failure\u0027, \u0027processing\u0027):"},{"line_number":230,"context_line":"            raise exception.InvalidTaskStatus(status)"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"        self.task_id \u003d task_id"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FH%2Bc%3D","line":229,"in_reply_to":"AAAAS3%2F%2FSbI%3D","updated":"2013-10-03 22:29:26.000000000","message":"This seems like a more generic issue we may have in glance. However, we should try to talk about this at one of our glance sync up meetings.","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"c46151d220dcfd9c6316e94c7814475f20e42853","unresolved":false,"context_lines":[{"line_number":249,"context_line":"        # NOTE (flwang) The task status won\u0027t be set here but handled by the"},{"line_number":250,"context_line":"        # executor."},{"line_number":251,"context_line":"        if self._executor:"},{"line_number":252,"context_line":"            self._executor.run(self)"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"    def kill(self, message\u003dNone):"},{"line_number":255,"context_line":"        raise NotImplementedError()"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FUmk%3D","line":252,"updated":"2013-09-30 09:03:42.000000000","message":"should pass task_proxy in but an un-proxied \u0027self\u0027 object IMO.","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"aa4c633a3868fe9a52b3898828dcff4751162fee","unresolved":false,"context_lines":[{"line_number":249,"context_line":"        # NOTE (flwang) The task status won\u0027t be set here but handled by the"},{"line_number":250,"context_line":"        # executor."},{"line_number":251,"context_line":"        if self._executor:"},{"line_number":252,"context_line":"            self._executor.run(self)"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"    def kill(self, message\u003dNone):"},{"line_number":255,"context_line":"        raise NotImplementedError()"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FH9E%3D","line":252,"in_reply_to":"AAAAS3%2F%2FS%2B4%3D","updated":"2013-10-03 22:29:26.000000000","message":"I believe, the way run works is changed now. Hope you like it better as well.","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"8222c2d043faadcf38935d19d95cf28a85a39fff","unresolved":false,"context_lines":[{"line_number":249,"context_line":"        # NOTE (flwang) The task status won\u0027t be set here but handled by the"},{"line_number":250,"context_line":"        # executor."},{"line_number":251,"context_line":"        if self._executor:"},{"line_number":252,"context_line":"            self._executor.run(self)"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"    def kill(self, message\u003dNone):"},{"line_number":255,"context_line":"        raise NotImplementedError()"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FS%2B4%3D","line":252,"in_reply_to":"AAAAS3%2F%2FUmk%3D","updated":"2013-09-30 17:20:55.000000000","message":"ya, not sure what we should do at this point. We should discuss this more here or in glance channel. (Was hoping that someone would bring it up)","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"c46151d220dcfd9c6316e94c7814475f20e42853","unresolved":false,"context_lines":[{"line_number":254,"context_line":"    def kill(self, message\u003dNone):"},{"line_number":255,"context_line":"        raise NotImplementedError()"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"    def complete(self, result):"},{"line_number":258,"context_line":"        self._status \u003d \u0027success\u0027"},{"line_number":259,"context_line":"        self.result \u003d result"},{"line_number":260,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FU0k%3D","line":257,"updated":"2013-09-30 09:03:42.000000000","message":"IMO:\n\n1. change this function name from \u0027complete\u0027 to \u0027success\u0027.\n\nOR\n\n2. remove \u0027fail\u0027 function and keep \u0027complete\u0027 only, then add a \u0027status\u0027 to this function and adding code to make sure \u0027status\u0027 only in [\u0027success\u0027, \u0027failure\u0027] list.","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"e086a781b58550f15c2f1406860ae7bfe2ee8d80","unresolved":false,"context_lines":[{"line_number":254,"context_line":"    def kill(self, message\u003dNone):"},{"line_number":255,"context_line":"        raise NotImplementedError()"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"    def complete(self, result):"},{"line_number":258,"context_line":"        self._status \u003d \u0027success\u0027"},{"line_number":259,"context_line":"        self.result \u003d result"},{"line_number":260,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FHU4%3D","line":257,"in_reply_to":"AAAAS3%2F%2FIPc%3D","updated":"2013-10-04 05:05:51.000000000","message":"Make sense.","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"6b3da6b63253842957ad07af2c135adfdfbdc9cb","unresolved":false,"context_lines":[{"line_number":254,"context_line":"    def kill(self, message\u003dNone):"},{"line_number":255,"context_line":"        raise NotImplementedError()"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"    def complete(self, result):"},{"line_number":258,"context_line":"        self._status \u003d \u0027success\u0027"},{"line_number":259,"context_line":"        self.result \u003d result"},{"line_number":260,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FH2g%3D","line":257,"in_reply_to":"AAAAS3%2F%2FIPc%3D","updated":"2013-10-04 09:33:07.000000000","message":"cool","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"8222c2d043faadcf38935d19d95cf28a85a39fff","unresolved":false,"context_lines":[{"line_number":254,"context_line":"    def kill(self, message\u003dNone):"},{"line_number":255,"context_line":"        raise NotImplementedError()"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"    def complete(self, result):"},{"line_number":258,"context_line":"        self._status \u003d \u0027success\u0027"},{"line_number":259,"context_line":"        self.result \u003d result"},{"line_number":260,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FS%2Bs%3D","line":257,"in_reply_to":"AAAAS3%2F%2FU0k%3D","updated":"2013-09-30 17:20:55.000000000","message":"+1","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":7703,"name":"Venkatesh Sampath","email":"venkatesh.sampath@outlook.com","username":"venkateshsampath"},"change_message_id":"eda35d30dd001be0df16c90d6e431d888b615a1c","unresolved":false,"context_lines":[{"line_number":254,"context_line":"    def kill(self, message\u003dNone):"},{"line_number":255,"context_line":"        raise NotImplementedError()"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"    def complete(self, result):"},{"line_number":258,"context_line":"        self._status \u003d \u0027success\u0027"},{"line_number":259,"context_line":"        self.result \u003d result"},{"line_number":260,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FIPc%3D","line":257,"in_reply_to":"AAAAS3%2F%2FU0k%3D","updated":"2013-10-03 20:37:41.000000000","message":"this method has been changed to \u0027success\u0027","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"1b12a474064d203fae46b4e3bcf3ebffd6ac7603","unresolved":false,"context_lines":[{"line_number":264,"context_line":""},{"line_number":265,"context_line":""},{"line_number":266,"context_line":"class TaskFactory(object):"},{"line_number":267,"context_line":"    def _get_executor(self, request, task_dict, gateway):"},{"line_number":268,"context_line":"        return TaskExecutorFactory().new_task_executor(request, task_dict,"},{"line_number":269,"context_line":"                                                       gateway)"},{"line_number":270,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FSaM%3D","line":267,"updated":"2013-09-30 21:00:12.000000000","message":"should this be _create_executor?","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"aa4c633a3868fe9a52b3898828dcff4751162fee","unresolved":false,"context_lines":[{"line_number":264,"context_line":""},{"line_number":265,"context_line":""},{"line_number":266,"context_line":"class TaskFactory(object):"},{"line_number":267,"context_line":"    def _get_executor(self, request, task_dict, gateway):"},{"line_number":268,"context_line":"        return TaskExecutorFactory().new_task_executor(request, task_dict,"},{"line_number":269,"context_line":"                                                       gateway)"},{"line_number":270,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FH8g%3D","line":267,"in_reply_to":"AAAAS3%2F%2FIPI%3D","updated":"2013-10-03 22:29:26.000000000","message":"Yeah, what you said makes sense Iccha however, we\u0027d to refactor some code to make it adhere more with domain layer logic. Now, the executor is created outside of Task and is passed it in.","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":7703,"name":"Venkatesh Sampath","email":"venkatesh.sampath@outlook.com","username":"venkateshsampath"},"change_message_id":"eda35d30dd001be0df16c90d6e431d888b615a1c","unresolved":false,"context_lines":[{"line_number":264,"context_line":""},{"line_number":265,"context_line":""},{"line_number":266,"context_line":"class TaskFactory(object):"},{"line_number":267,"context_line":"    def _get_executor(self, request, task_dict, gateway):"},{"line_number":268,"context_line":"        return TaskExecutorFactory().new_task_executor(request, task_dict,"},{"line_number":269,"context_line":"                                                       gateway)"},{"line_number":270,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FIPI%3D","line":267,"in_reply_to":"AAAAS3%2F%2FSaM%3D","updated":"2013-10-03 20:37:41.000000000","message":"we have removed this method. plz refer our latest patch for the refactored changes.","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"c46151d220dcfd9c6316e94c7814475f20e42853","unresolved":false,"context_lines":[{"line_number":266,"context_line":"class TaskFactory(object):"},{"line_number":267,"context_line":"    def _get_executor(self, request, task_dict, gateway):"},{"line_number":268,"context_line":"        return TaskExecutorFactory().new_task_executor(request, task_dict,"},{"line_number":269,"context_line":"                                                       gateway)"},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"    def new_task(self, request, task_dict, gateway):"},{"line_number":272,"context_line":"        if request is None:"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FUy8%3D","line":269,"updated":"2013-09-30 09:03:42.000000000","message":"I\u0027m not sure why we need a secondary factory for executor? IMO we can just do it on this level, that say move Line 292,293 to here. Anything I missed?","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"6b3da6b63253842957ad07af2c135adfdfbdc9cb","unresolved":false,"context_lines":[{"line_number":266,"context_line":"class TaskFactory(object):"},{"line_number":267,"context_line":"    def _get_executor(self, request, task_dict, gateway):"},{"line_number":268,"context_line":"        return TaskExecutorFactory().new_task_executor(request, task_dict,"},{"line_number":269,"context_line":"                                                       gateway)"},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"    def new_task(self, request, task_dict, gateway):"},{"line_number":272,"context_line":"        if request is None:"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FG04%3D","line":269,"in_reply_to":"AAAAS3%2F%2FH8U%3D","updated":"2013-10-04 09:33:07.000000000","message":"Yes, make it adhere more with domain layer logic and create executor outside of Task and pass it in is a better way to me.","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"aa4c633a3868fe9a52b3898828dcff4751162fee","unresolved":false,"context_lines":[{"line_number":266,"context_line":"class TaskFactory(object):"},{"line_number":267,"context_line":"    def _get_executor(self, request, task_dict, gateway):"},{"line_number":268,"context_line":"        return TaskExecutorFactory().new_task_executor(request, task_dict,"},{"line_number":269,"context_line":"                                                       gateway)"},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"    def new_task(self, request, task_dict, gateway):"},{"line_number":272,"context_line":"        if request is None:"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FH8U%3D","line":269,"in_reply_to":"AAAAS3%2F%2FUy8%3D","updated":"2013-10-03 22:29:26.000000000","message":"Good point Zhi, however with some changes in the new patch hope it looks better.","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"c46151d220dcfd9c6316e94c7814475f20e42853","unresolved":false,"context_lines":[{"line_number":268,"context_line":"        return TaskExecutorFactory().new_task_executor(request, task_dict,"},{"line_number":269,"context_line":"                                                       gateway)"},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"    def new_task(self, request, task_dict, gateway):"},{"line_number":272,"context_line":"        if request is None:"},{"line_number":273,"context_line":"            raise ValueError(\u0027request can not be None\u0027)"},{"line_number":274,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FU3E%3D","line":271,"updated":"2013-09-30 09:03:42.000000000","message":"do you think using keyword arguments is better then an explicit dict argument \u0027task_dict\u0027 for caller code?","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"6b3da6b63253842957ad07af2c135adfdfbdc9cb","unresolved":false,"context_lines":[{"line_number":268,"context_line":"        return TaskExecutorFactory().new_task_executor(request, task_dict,"},{"line_number":269,"context_line":"                                                       gateway)"},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"    def new_task(self, request, task_dict, gateway):"},{"line_number":272,"context_line":"        if request is None:"},{"line_number":273,"context_line":"            raise ValueError(\u0027request can not be None\u0027)"},{"line_number":274,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FG0o%3D","line":271,"in_reply_to":"AAAAS3%2F%2FH54%3D","updated":"2013-10-04 09:33:07.000000000","message":"OK, will see that.","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"aa4c633a3868fe9a52b3898828dcff4751162fee","unresolved":false,"context_lines":[{"line_number":268,"context_line":"        return TaskExecutorFactory().new_task_executor(request, task_dict,"},{"line_number":269,"context_line":"                                                       gateway)"},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"    def new_task(self, request, task_dict, gateway):"},{"line_number":272,"context_line":"        if request is None:"},{"line_number":273,"context_line":"            raise ValueError(\u0027request can not be None\u0027)"},{"line_number":274,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FH54%3D","line":271,"in_reply_to":"AAAAS3%2F%2FS%2BI%3D","updated":"2013-10-03 22:29:26.000000000","message":"I think we\u0027r passing down the task body entirely from the RequestDeserializer. The only splitting that we do is basically, getting the task input and task type. Some validation discussion on them would help resolve this issue I guess.","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"8222c2d043faadcf38935d19d95cf28a85a39fff","unresolved":false,"context_lines":[{"line_number":268,"context_line":"        return TaskExecutorFactory().new_task_executor(request, task_dict,"},{"line_number":269,"context_line":"                                                       gateway)"},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"    def new_task(self, request, task_dict, gateway):"},{"line_number":272,"context_line":"        if request is None:"},{"line_number":273,"context_line":"            raise ValueError(\u0027request can not be None\u0027)"},{"line_number":274,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FS%2BI%3D","line":271,"in_reply_to":"AAAAS3%2F%2FU3E%3D","updated":"2013-09-30 17:20:55.000000000","message":"Let me think about this more. Marking it here so that I do not forget about it.","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"1b12a474064d203fae46b4e3bcf3ebffd6ac7603","unresolved":false,"context_lines":[{"line_number":270,"context_line":""},{"line_number":271,"context_line":"    def new_task(self, request, task_dict, gateway):"},{"line_number":272,"context_line":"        if request is None:"},{"line_number":273,"context_line":"            raise ValueError(\u0027request can not be None\u0027)"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"        task_id \u003d uuidutils.generate_uuid()"},{"line_number":276,"context_line":"        type \u003d task_dict[\u0027type\u0027]"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FSaA%3D","line":273,"updated":"2013-09-30 21:00:12.000000000","message":"cannot?","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"1b12a474064d203fae46b4e3bcf3ebffd6ac7603","unresolved":false,"context_lines":[{"line_number":273,"context_line":"            raise ValueError(\u0027request can not be None\u0027)"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"        task_id \u003d uuidutils.generate_uuid()"},{"line_number":276,"context_line":"        type \u003d task_dict[\u0027type\u0027]"},{"line_number":277,"context_line":"        status \u003d \u0027pending\u0027"},{"line_number":278,"context_line":"        input \u003d task_dict[\u0027input\u0027]"},{"line_number":279,"context_line":"        result \u003d None"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FSZ0%3D","line":276,"updated":"2013-09-30 21:00:12.000000000","message":"get? what if type dict doesnt have type?","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"aa4c633a3868fe9a52b3898828dcff4751162fee","unresolved":false,"context_lines":[{"line_number":273,"context_line":"            raise ValueError(\u0027request can not be None\u0027)"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"        task_id \u003d uuidutils.generate_uuid()"},{"line_number":276,"context_line":"        type \u003d task_dict[\u0027type\u0027]"},{"line_number":277,"context_line":"        status \u003d \u0027pending\u0027"},{"line_number":278,"context_line":"        input \u003d task_dict[\u0027input\u0027]"},{"line_number":279,"context_line":"        result \u003d None"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FH5E%3D","line":276,"in_reply_to":"AAAAS3%2F%2FSDI%3D","updated":"2013-10-03 22:29:26.000000000","message":"I think the Iccha\u0027s question is still valid, would be resolved after the validation discussion.","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"8012619257c22b7ab1be9d76b9fc03da9d5d33f1","unresolved":false,"context_lines":[{"line_number":273,"context_line":"            raise ValueError(\u0027request can not be None\u0027)"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"        task_id \u003d uuidutils.generate_uuid()"},{"line_number":276,"context_line":"        type \u003d task_dict[\u0027type\u0027]"},{"line_number":277,"context_line":"        status \u003d \u0027pending\u0027"},{"line_number":278,"context_line":"        input \u003d task_dict[\u0027input\u0027]"},{"line_number":279,"context_line":"        result \u003d None"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FSDI%3D","line":276,"in_reply_to":"AAAAS3%2F%2FSZ0%3D","updated":"2013-09-30 22:41:05.000000000","message":"I think the input is being validated before the Controller is called and then this is passed in.","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"1b12a474064d203fae46b4e3bcf3ebffd6ac7603","unresolved":false,"context_lines":[{"line_number":275,"context_line":"        task_id \u003d uuidutils.generate_uuid()"},{"line_number":276,"context_line":"        type \u003d task_dict[\u0027type\u0027]"},{"line_number":277,"context_line":"        status \u003d \u0027pending\u0027"},{"line_number":278,"context_line":"        input \u003d task_dict[\u0027input\u0027]"},{"line_number":279,"context_line":"        result \u003d None"},{"line_number":280,"context_line":"        owner \u003d request.context.owner or task_dict[\u0027owner\u0027]"},{"line_number":281,"context_line":"        message \u003d None"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FSZk%3D","line":278,"updated":"2013-09-30 21:00:12.000000000","message":"same as above","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"e086a781b58550f15c2f1406860ae7bfe2ee8d80","unresolved":false,"context_lines":[{"line_number":275,"context_line":"        task_id \u003d uuidutils.generate_uuid()"},{"line_number":276,"context_line":"        type \u003d task_dict[\u0027type\u0027]"},{"line_number":277,"context_line":"        status \u003d \u0027pending\u0027"},{"line_number":278,"context_line":"        input \u003d task_dict[\u0027input\u0027]"},{"line_number":279,"context_line":"        result \u003d None"},{"line_number":280,"context_line":"        owner \u003d request.context.owner or task_dict[\u0027owner\u0027]"},{"line_number":281,"context_line":"        message \u003d None"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FHUk%3D","line":278,"in_reply_to":"AAAAS3%2F%2FSZk%3D","updated":"2013-10-04 05:05:51.000000000","message":"type and input are very basic/important attributes of task, so they will be checked before running into here.","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"c46151d220dcfd9c6316e94c7814475f20e42853","unresolved":false,"context_lines":[{"line_number":284,"context_line":"        updated_at \u003d created_at"},{"line_number":285,"context_line":"        executor \u003d self._get_executor(request, task_dict, gateway)"},{"line_number":286,"context_line":"        return Task(task_id, type, status, input, result, owner, message,"},{"line_number":287,"context_line":"                    expires_at, created_at, updated_at, executor)"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"class TaskExecutorFactory(object):"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FUzQ%3D","line":287,"updated":"2013-09-30 09:03:42.000000000","message":"TBH, I have some thoughts at here. For keep more flexibility when we adding more task type to glance in future, do you think it will better if we not only produce one fixed Task object type in this factory? On current implementation, the executor could be produced to different type by TaskExecutorFactory, currently we implemented TaskImportExecutor as following, and it can contains its particular logic for \u0027import\u0027 job. But for Task object, we can only produce one fixed Task object, that means for different job we can just only have one task abstraction, it\u0027s not a good signal IMO, for example, if in future we implement a new executor in \u0027async\u0027 namespace and it need task support a \u0027suspend\u0027 (or something else) status (api level will know that methods can be used), then base on above Task implementation, first Line226 and 299 need to change, and second we probably need add two function called \u0027suspend\u0027 and \u0027resume\u0027, and most important thing is that we can only mix all logic of different exector/job to one Task abstraction entry. And for such handling we can only add \u0027if-else\u0027 checking to ask Task go different logic for different exector implementation. That\u0027s really a bad taste for OOA/OOP. So I prefer we extract Task abstraction also like executor, different TaskExecutor using different Task abstraction (and above one can be used as a base class). Any thoughts?","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"aa4c633a3868fe9a52b3898828dcff4751162fee","unresolved":false,"context_lines":[{"line_number":284,"context_line":"        updated_at \u003d created_at"},{"line_number":285,"context_line":"        executor \u003d self._get_executor(request, task_dict, gateway)"},{"line_number":286,"context_line":"        return Task(task_id, type, status, input, result, owner, message,"},{"line_number":287,"context_line":"                    expires_at, created_at, updated_at, executor)"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"class TaskExecutorFactory(object):"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FH4Y%3D","line":287,"in_reply_to":"AAAAS3%2F%2FSDE%3D","updated":"2013-10-03 22:29:26.000000000","message":"So, we\u0027ve changed the executor to be independent of the task. Hope that answers your question or partly at least! Please let me know your thoughts if you still feel like have separate methods within the TaskFactory, Iccha. I\u0027m aware of your more recent comments so, will comment on them to avoid confusion.","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"8012619257c22b7ab1be9d76b9fc03da9d5d33f1","unresolved":false,"context_lines":[{"line_number":284,"context_line":"        updated_at \u003d created_at"},{"line_number":285,"context_line":"        executor \u003d self._get_executor(request, task_dict, gateway)"},{"line_number":286,"context_line":"        return Task(task_id, type, status, input, result, owner, message,"},{"line_number":287,"context_line":"                    expires_at, created_at, updated_at, executor)"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"class TaskExecutorFactory(object):"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FSDE%3D","line":287,"in_reply_to":"AAAAS3%2F%2FSW8%3D","updated":"2013-09-30 22:41:05.000000000","message":"Ah that sounds cool, let me think about the consequences...","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"1b12a474064d203fae46b4e3bcf3ebffd6ac7603","unresolved":false,"context_lines":[{"line_number":284,"context_line":"        updated_at \u003d created_at"},{"line_number":285,"context_line":"        executor \u003d self._get_executor(request, task_dict, gateway)"},{"line_number":286,"context_line":"        return Task(task_id, type, status, input, result, owner, message,"},{"line_number":287,"context_line":"                    expires_at, created_at, updated_at, executor)"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"class TaskExecutorFactory(object):"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FSW8%3D","line":287,"in_reply_to":"AAAAS3%2F%2FUzQ%3D","updated":"2013-09-30 21:00:12.000000000","message":"I think see some of what zhi is talking about. If I had to translate it to words this is what I would envision it looking like:\nTask Factory\n- new import task\n- new export task\nTask\n- having all base properties\nsub classes Import Task, Export Task\nand the init fns of these assigned executor.\n\nOfcourse on refinement we can come up with a more polished oo model","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"0030caafda802e699fae1f174e64394cc68dc954","unresolved":false,"context_lines":[{"line_number":278,"context_line":"        expires_at \u003d None  # NOTE (flwang) Depends on the expire policy"},{"line_number":279,"context_line":"        created_at \u003d timeutils.utcnow()"},{"line_number":280,"context_line":"        updated_at \u003d created_at"},{"line_number":281,"context_line":"        return Task(task_id, type, status, input, result, owner, message,"},{"line_number":282,"context_line":"                    expires_at, created_at, updated_at)"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAS3%2F%2FKj4%3D","line":281,"updated":"2013-10-03 04:39:16.000000000","message":"After more thinking, I still don\u0027t like believe we can using one Task abstraction for all executors, either for current and in future. I think the property abstraction of the Task is ok that means bottom Task db model can be fixed, but the status and behavior probably need to evolve, that say new \u0027type\u0027 or \u0027status\u0027 value will be added and new member function will be added too to the Task for particular Executor.\n\nI have one draft idea is that maybe we can create/get Task object form Executor object, and it will inherit from above Task class, then other layer such as policy can hook those common methods as architecture needed.\n\nSeems we need/can discuss this in such sync meeting if you like. I hope that.","commit_id":"62bd7b15acf7abc5bd8283605f369b10890b8cd9"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"3a020f54eedc7d565942079ad1d2b74fe6ee7662","unresolved":false,"context_lines":[{"line_number":278,"context_line":"        expires_at \u003d None  # NOTE (flwang) Depends on the expire policy"},{"line_number":279,"context_line":"        created_at \u003d timeutils.utcnow()"},{"line_number":280,"context_line":"        updated_at \u003d created_at"},{"line_number":281,"context_line":"        return Task(task_id, type, status, input, result, owner, message,"},{"line_number":282,"context_line":"                    expires_at, created_at, updated_at)"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAS3%2F%2FGyQ%3D","line":281,"in_reply_to":"AAAAS3%2F%2FJY8%3D","updated":"2013-10-04 09:49:11.000000000","message":"Thank you all.","commit_id":"62bd7b15acf7abc5bd8283605f369b10890b8cd9"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"0c9b48488c912ff9199b45a2b4d11e4f72f8acc0","unresolved":false,"context_lines":[{"line_number":278,"context_line":"        expires_at \u003d None  # NOTE (flwang) Depends on the expire policy"},{"line_number":279,"context_line":"        created_at \u003d timeutils.utcnow()"},{"line_number":280,"context_line":"        updated_at \u003d created_at"},{"line_number":281,"context_line":"        return Task(task_id, type, status, input, result, owner, message,"},{"line_number":282,"context_line":"                    expires_at, created_at, updated_at)"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAS3%2F%2FJY8%3D","line":281,"in_reply_to":"AAAAS3%2F%2FKj4%3D","updated":"2013-10-04 09:07:17.000000000","message":"Seems it\u0027s a redesign, need more discussion.","commit_id":"62bd7b15acf7abc5bd8283605f369b10890b8cd9"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"9cf698524d8d0ed4cc10f488b5f20680e47f7f4b","unresolved":false,"context_lines":[{"line_number":278,"context_line":"        expires_at \u003d None  # NOTE (flwang) Depends on the expire policy"},{"line_number":279,"context_line":"        created_at \u003d timeutils.utcnow()"},{"line_number":280,"context_line":"        updated_at \u003d created_at"},{"line_number":281,"context_line":"        return Task(task_id, type, status, input, result, owner, message,"},{"line_number":282,"context_line":"                    expires_at, created_at, updated_at)"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAS3%2F%2FHx8%3D","line":281,"in_reply_to":"AAAAS3%2F%2FKj4%3D","updated":"2013-10-03 22:44:09.000000000","message":"Yeah, thanks for all the details on your opinion. Will post this in the discussion meeting item for tomorrow.","commit_id":"62bd7b15acf7abc5bd8283605f369b10890b8cd9"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"0030caafda802e699fae1f174e64394cc68dc954","unresolved":false,"context_lines":[{"line_number":283,"context_line":""},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"class TaskExecutorFactory(object):"},{"line_number":286,"context_line":"    def new_task_executor(self, context, task_dict, gateway):"},{"line_number":287,"context_line":"        if task_dict[\u0027type\u0027] \u003d\u003d \u0027import\u0027:"},{"line_number":288,"context_line":"            return import_executor.TaskImportExecutor(context, gateway)"},{"line_number":289,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAS3%2F%2FKjk%3D","line":286,"updated":"2013-10-03 04:39:16.000000000","message":"For this I have the same idea (as I mentioned in PS11), we should allow one type task can be proceed more then one executor, cloud admin should have chance to configure it in glance-api.conf (and setup.cfg for it as an official (or 3rd) plug-in), that say we can/should give executor factory an abstraction also, for this point I just want to make glance-task function more flexible. Maybe you have same plan in mind which I just don\u0027t know right?","commit_id":"62bd7b15acf7abc5bd8283605f369b10890b8cd9"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"3a020f54eedc7d565942079ad1d2b74fe6ee7662","unresolved":false,"context_lines":[{"line_number":283,"context_line":""},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"class TaskExecutorFactory(object):"},{"line_number":286,"context_line":"    def new_task_executor(self, context, task_dict, gateway):"},{"line_number":287,"context_line":"        if task_dict[\u0027type\u0027] \u003d\u003d \u0027import\u0027:"},{"line_number":288,"context_line":"            return import_executor.TaskImportExecutor(context, gateway)"},{"line_number":289,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAS3%2F%2FGxw%3D","line":286,"in_reply_to":"AAAAS3%2F%2FHxo%3D","updated":"2013-10-04 09:49:11.000000000","message":"Correct, the fixed interface is needed absolutely.","commit_id":"62bd7b15acf7abc5bd8283605f369b10890b8cd9"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"3a020f54eedc7d565942079ad1d2b74fe6ee7662","unresolved":false,"context_lines":[{"line_number":283,"context_line":""},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"class TaskExecutorFactory(object):"},{"line_number":286,"context_line":"    def new_task_executor(self, context, task_dict, gateway):"},{"line_number":287,"context_line":"        if task_dict[\u0027type\u0027] \u003d\u003d \u0027import\u0027:"},{"line_number":288,"context_line":"            return import_executor.TaskImportExecutor(context, gateway)"},{"line_number":289,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAS3%2F%2FGxo%3D","line":286,"in_reply_to":"AAAAS3%2F%2FJZk%3D","updated":"2013-10-04 09:49:11.000000000","message":"Cool","commit_id":"62bd7b15acf7abc5bd8283605f369b10890b8cd9"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"9cf698524d8d0ed4cc10f488b5f20680e47f7f4b","unresolved":false,"context_lines":[{"line_number":283,"context_line":""},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"class TaskExecutorFactory(object):"},{"line_number":286,"context_line":"    def new_task_executor(self, context, task_dict, gateway):"},{"line_number":287,"context_line":"        if task_dict[\u0027type\u0027] \u003d\u003d \u0027import\u0027:"},{"line_number":288,"context_line":"            return import_executor.TaskImportExecutor(context, gateway)"},{"line_number":289,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAS3%2F%2FHxo%3D","line":286,"in_reply_to":"AAAAS3%2F%2FKjk%3D","updated":"2013-10-03 22:44:09.000000000","message":"That totally made sense! However, I feel we might want to move slow on how our executors would work. With the current interface it might not help. However once we get a idea in the sync up meeting about how the executor looks, it might help, I hope.","commit_id":"62bd7b15acf7abc5bd8283605f369b10890b8cd9"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"0c9b48488c912ff9199b45a2b4d11e4f72f8acc0","unresolved":false,"context_lines":[{"line_number":283,"context_line":""},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"class TaskExecutorFactory(object):"},{"line_number":286,"context_line":"    def new_task_executor(self, context, task_dict, gateway):"},{"line_number":287,"context_line":"        if task_dict[\u0027type\u0027] \u003d\u003d \u0027import\u0027:"},{"line_number":288,"context_line":"            return import_executor.TaskImportExecutor(context, gateway)"},{"line_number":289,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAS3%2F%2FJZk%3D","line":286,"in_reply_to":"AAAAS3%2F%2FKjk%3D","updated":"2013-10-04 09:07:17.000000000","message":"we\u0027re trying to leverage stevedore but we have a little bit concern about the maintenance of it. Still in discussing.","commit_id":"62bd7b15acf7abc5bd8283605f369b10890b8cd9"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"f149cb301b5d4c293aafcbee8a0e9867be38c4b9","unresolved":false,"context_lines":[{"line_number":292,"context_line":"class TaskExecutorFactory(object):"},{"line_number":293,"context_line":"    def new_task_executor(self, context, gateway):"},{"line_number":294,"context_line":"        task_executor \u003d CONF.task_executor_type"},{"line_number":295,"context_line":"        return importutils.import_object(task_executor, context, gateway)"}],"source_content_type":"text/x-python","patch_set":22,"id":"AAAATH%2F%2FWjE%3D","line":295,"updated":"2013-10-17 11:20:59.000000000","message":"1. I still consider organize executor plugin by function-level angle is better then this execution-approach angle, if you interested in my opinion you can check draft idea from my recent comments at https://review.openstack.org/#/c/46117/21/glance/domain/async/import_executor.py . And also I agree it\u0027s worth thing if we prepare some execution-approach base classes for plugin class mix in, for instance a particular executor plugin class can inherit from TaskEventletExecutor and get some common function for execution its job on local by eventlet.thread (and we can implement a taskflow base class later).\n2. IMO except execution, input validation function can be added to executor level also. probably other functions are applicable also.\n3. can we leverage stevedore?","commit_id":"22043016d1eccfe23ea4fa1388dab549b60110a1"}],"glance/domain/async/__init__.py":[{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"1b12a474064d203fae46b4e3bcf3ebffd6ac7603","unresolved":false,"context_lines":[{"line_number":17,"context_line":"class TaskExecutorInterface(object):"},{"line_number":18,"context_line":"    def __init__(self, request, gateway\u003dNone):"},{"line_number":19,"context_line":"        self.request \u003d request"},{"line_number":20,"context_line":"        self.gateway \u003d gateway"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"    def run(self, task):"},{"line_number":23,"context_line":"        raise NotImplementedError(\"This is meant to be an abstract class\")"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FSWc%3D","line":20,"updated":"2013-09-30 21:00:12.000000000","message":"having this along here, seems kinda out of place. Or maybe I do not understand its purpose completely.","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"ceed34e96fbc11b7506af2dc507f3755633c2861","unresolved":false,"context_lines":[{"line_number":17,"context_line":"class TaskExecutorInterface(object):"},{"line_number":18,"context_line":"    def __init__(self, request, gateway\u003dNone):"},{"line_number":19,"context_line":"        self.request \u003d request"},{"line_number":20,"context_line":"        self.gateway \u003d gateway"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"    def run(self, task):"},{"line_number":23,"context_line":"        raise NotImplementedError(\"This is meant to be an abstract class\")"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FRqs%3D","line":20,"in_reply_to":"AAAAS3%2F%2FSCs%3D","updated":"2013-10-01 03:38:10.000000000","message":"And I think we need do None checking for gateway since the executor just using it directly as it is available. So if client pass a None gateway value in we need instance one.","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"8012619257c22b7ab1be9d76b9fc03da9d5d33f1","unresolved":false,"context_lines":[{"line_number":17,"context_line":"class TaskExecutorInterface(object):"},{"line_number":18,"context_line":"    def __init__(self, request, gateway\u003dNone):"},{"line_number":19,"context_line":"        self.request \u003d request"},{"line_number":20,"context_line":"        self.gateway \u003d gateway"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"    def run(self, task):"},{"line_number":23,"context_line":"        raise NotImplementedError(\"This is meant to be an abstract class\")"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FSCs%3D","line":20,"in_reply_to":"AAAAS3%2F%2FSWc%3D","updated":"2013-09-30 22:41:05.000000000","message":"We need to pass in the gateway to the exec, and the implementing executors do not need to set this property in the resp classes. If we do not need to pass in we\u0027d do it before this instantiation, I believe.","commit_id":"348cf628284733115a322f166dd52316d8951830"}],"glance/domain/async/import_executor.py":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"c46151d220dcfd9c6316e94c7814475f20e42853","unresolved":false,"context_lines":[{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def check_valid_location(self, input):"},{"line_number":92,"context_line":"        uri \u003d input.get(\u0027import_from\u0027, None)"},{"line_number":93,"context_line":"        if not uri or not uri.startswith(\u0027file://\u0027):"},{"line_number":94,"context_line":"            raise exception.BadStoreUri(_(\u0027Invalid location: %s\u0027) % uri)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"        return uri"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FUv4%3D","line":93,"updated":"2013-09-30 09:03:42.000000000","message":"So this implementation should be called \u0027TaskFilesStoredImageImportExecutor\u0027 or something like that IMO TBH. At lest it should be wrote to doc (glance doc and class doc).","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"aa4c633a3868fe9a52b3898828dcff4751162fee","unresolved":false,"context_lines":[{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def check_valid_location(self, input):"},{"line_number":92,"context_line":"        uri \u003d input.get(\u0027import_from\u0027, None)"},{"line_number":93,"context_line":"        if not uri or not uri.startswith(\u0027file://\u0027):"},{"line_number":94,"context_line":"            raise exception.BadStoreUri(_(\u0027Invalid location: %s\u0027) % uri)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"        return uri"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FH0w%3D","line":93,"in_reply_to":"AAAAS3%2F%2FUv4%3D","updated":"2013-10-03 22:29:26.000000000","message":"Will do that Zhi","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"c46151d220dcfd9c6316e94c7814475f20e42853","unresolved":false,"context_lines":[{"line_number":100,"context_line":"            image.set_data(image_data)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def set_task_status(self, task):"},{"line_number":103,"context_line":"        task._status \u003d \u0027processing\u0027"},{"line_number":104,"context_line":"        task_repo \u003d self.gateway.get_db_task_repo(self.request.context)"},{"line_number":105,"context_line":"        task_repo.save(task)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FUsQ%3D","line":103,"updated":"2013-09-30 09:03:42.000000000","message":"humm..I don\u0027t like we break the Task\u0027s abstraction, do you think it will be better if we add a setter to Task object? we can give a checking into it to make sure interface\u0027s caller is the executor to prevent other client code try to change _status crucial variable.\n\nMy reason here is that in future we will put more executor implementation to this namespace, but I really don\u0027t think it\u0027s a good way those executor all need know Task\u0027s detail realization.","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"6b3da6b63253842957ad07af2c135adfdfbdc9cb","unresolved":false,"context_lines":[{"line_number":100,"context_line":"            image.set_data(image_data)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def set_task_status(self, task):"},{"line_number":103,"context_line":"        task._status \u003d \u0027processing\u0027"},{"line_number":104,"context_line":"        task_repo \u003d self.gateway.get_db_task_repo(self.request.context)"},{"line_number":105,"context_line":"        task_repo.save(task)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FG0U%3D","line":103,"in_reply_to":"AAAAS3%2F%2FH2U%3D","updated":"2013-10-04 09:33:07.000000000","message":"That\u0027s cool, will check it asap.","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":7703,"name":"Venkatesh Sampath","email":"venkatesh.sampath@outlook.com","username":"venkateshsampath"},"change_message_id":"48e781739a8b11fe52616c4dcf3302f2df884090","unresolved":false,"context_lines":[{"line_number":100,"context_line":"            image.set_data(image_data)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def set_task_status(self, task):"},{"line_number":103,"context_line":"        task._status \u003d \u0027processing\u0027"},{"line_number":104,"context_line":"        task_repo \u003d self.gateway.get_db_task_repo(self.request.context)"},{"line_number":105,"context_line":"        task_repo.save(task)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FH2U%3D","line":103,"in_reply_to":"AAAAS3%2F%2FIg4%3D","updated":"2013-10-03 22:29:55.000000000","message":"Hi Zhi, in the latest check-in we realized we do not have to set the status directly from the executor, instead invoke the task.success() method for updating the status. This change is in our latest patch set.","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":7703,"name":"Venkatesh Sampath","email":"venkatesh.sampath@outlook.com","username":"venkateshsampath"},"change_message_id":"eda35d30dd001be0df16c90d6e431d888b615a1c","unresolved":false,"context_lines":[{"line_number":100,"context_line":"            image.set_data(image_data)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def set_task_status(self, task):"},{"line_number":103,"context_line":"        task._status \u003d \u0027processing\u0027"},{"line_number":104,"context_line":"        task_repo \u003d self.gateway.get_db_task_repo(self.request.context)"},{"line_number":105,"context_line":"        task_repo.save(task)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FIg4%3D","line":103,"in_reply_to":"AAAAS3%2F%2FUsQ%3D","updated":"2013-10-03 20:37:41.000000000","message":"Hi Zhi,\nI have introduced a setter to Task object. But regarding the checking of if caller is executor, just wanted to have a discussion with you before I go ahead and do it.","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"c46151d220dcfd9c6316e94c7814475f20e42853","unresolved":false,"context_lines":[{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def set_task_status(self, task):"},{"line_number":103,"context_line":"        task._status \u003d \u0027processing\u0027"},{"line_number":104,"context_line":"        task_repo \u003d self.gateway.get_db_task_repo(self.request.context)"},{"line_number":105,"context_line":"        task_repo.save(task)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FUps%3D","line":104,"updated":"2013-09-30 09:03:42.000000000","message":"Sorry i\u0027m confused why we need using db level repo directly here, why not just using get_task_repo()?","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"6b3da6b63253842957ad07af2c135adfdfbdc9cb","unresolved":false,"context_lines":[{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def set_task_status(self, task):"},{"line_number":103,"context_line":"        task._status \u003d \u0027processing\u0027"},{"line_number":104,"context_line":"        task_repo \u003d self.gateway.get_db_task_repo(self.request.context)"},{"line_number":105,"context_line":"        task_repo.save(task)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FH38%3D","line":104,"in_reply_to":"AAAAS3%2F%2FIl4%3D","updated":"2013-10-04 09:33:07.000000000","message":"Already saw it in your later PS, thanks for you sync it with me at here.","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":7703,"name":"Venkatesh Sampath","email":"venkatesh.sampath@outlook.com","username":"venkateshsampath"},"change_message_id":"eda35d30dd001be0df16c90d6e431d888b615a1c","unresolved":false,"context_lines":[{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def set_task_status(self, task):"},{"line_number":103,"context_line":"        task._status \u003d \u0027processing\u0027"},{"line_number":104,"context_line":"        task_repo \u003d self.gateway.get_db_task_repo(self.request.context)"},{"line_number":105,"context_line":"        task_repo.save(task)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FIl4%3D","line":104,"in_reply_to":"AAAAS3%2F%2FUps%3D","updated":"2013-10-03 20:37:41.000000000","message":"Hi Zhi, we had this method temporarily to get the test cases fixed. Now we no more use db level repo and are using get_task_repo().","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"096385cedf838972322e5de7924613adc03ad986","unresolved":false,"context_lines":[{"line_number":110,"context_line":"    def set_task_status(self, task):"},{"line_number":111,"context_line":"        task._status \u003d \u0027success\u0027"},{"line_number":112,"context_line":"        task_repo \u003d self.gateway.get_db_task_repo(self.request.context)"},{"line_number":113,"context_line":"        task_repo.save(task)"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAS3%2F%2FRrU%3D","line":113,"updated":"2013-10-01 03:44:15.000000000","message":"TBH i still have my concerns at here which i mentioned in https://review.openstack.org/#/c/46117/11/glance/domain/async/import_executor.py","commit_id":"5b2ed3c50159f9cd2b74006320432f354f1d5e52"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"b55d68f48f514eafa6bb2ca855daf4df7588ebbf","unresolved":false,"context_lines":[{"line_number":110,"context_line":"    def set_task_status(self, task):"},{"line_number":111,"context_line":"        task._status \u003d \u0027success\u0027"},{"line_number":112,"context_line":"        task_repo \u003d self.gateway.get_db_task_repo(self.request.context)"},{"line_number":113,"context_line":"        task_repo.save(task)"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAS3%2F%2FHyo%3D","line":113,"in_reply_to":"AAAAS3%2F%2FRrU%3D","updated":"2013-10-03 22:38:37.000000000","message":"fixed this","commit_id":"5b2ed3c50159f9cd2b74006320432f354f1d5e52"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"0030caafda802e699fae1f174e64394cc68dc954","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    def run(self, task_id):"},{"line_number":54,"context_line":"        msg \u003d _(\"Running task \u0027%(task_id)s\u0027\") % {\u0027task_id\u0027: task_id}"},{"line_number":55,"context_line":"        LOG.info(msg)"},{"line_number":56,"context_line":"        eventlet.spawn_n(self.execute, task_id)"},{"line_number":57,"context_line":"        self.set_task_status(task_id)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def unpack_task_input(self, task):"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAS3%2F%2FKjg%3D","line":56,"updated":"2013-10-03 04:39:16.000000000","message":"In future such executor can make this via rpc call to ask a separated glance-worker do this job. I just want to say allow more then one executor for one task type is very useful.\n\nmy thoughts wrote in https://review.openstack.org/#/c/46117/16/glance/domain/__init__.py","commit_id":"62bd7b15acf7abc5bd8283605f369b10890b8cd9"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"9cf698524d8d0ed4cc10f488b5f20680e47f7f4b","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    def run(self, task_id):"},{"line_number":54,"context_line":"        msg \u003d _(\"Running task \u0027%(task_id)s\u0027\") % {\u0027task_id\u0027: task_id}"},{"line_number":55,"context_line":"        LOG.info(msg)"},{"line_number":56,"context_line":"        eventlet.spawn_n(self.execute, task_id)"},{"line_number":57,"context_line":"        self.set_task_status(task_id)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def unpack_task_input(self, task):"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAS3%2F%2FHxg%3D","line":56,"in_reply_to":"AAAAS3%2F%2FKjg%3D","updated":"2013-10-03 22:44:09.000000000","message":"Cool, thanks for catching on multiple places.","commit_id":"62bd7b15acf7abc5bd8283605f369b10890b8cd9"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"169de1a2de71a9b1651df28d282dcb203a7fb8de","unresolved":false,"context_lines":[{"line_number":41,"context_line":"            image \u003d image_repo.get(image_id)"},{"line_number":42,"context_line":"            image_repo.save(image)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"            task.success(result\u003dimage_id)"},{"line_number":45,"context_line":"        except Exception as e:"},{"line_number":46,"context_line":"            #TODO: need to bring back save_and_reraise_exception"},{"line_number":47,"context_line":"            # with excutils.save_and_reraise_exception():"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAS3%2F%2FGkQ%3D","line":44,"updated":"2013-10-04 11:50:51.000000000","message":"Could someone please give me a complete task status transition diagram?\n\n(And when I posting above question, I\u0027m thinking that should the task status transition be different for different task type with/or different executor? just my quick question here, I know it\u0027s complicated)","commit_id":"ba3cd104a86e46b75e4a5d0bb643efbfd75d23b8"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"169de1a2de71a9b1651df28d282dcb203a7fb8de","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"            task.success(result\u003dimage_id)"},{"line_number":45,"context_line":"        except Exception as e:"},{"line_number":46,"context_line":"            #TODO: need to bring back save_and_reraise_exception"},{"line_number":47,"context_line":"            # with excutils.save_and_reraise_exception():"},{"line_number":48,"context_line":"            err_msg \u003d unicode(type(e)) + \u0027: \u0027 + unicode(e)"},{"line_number":49,"context_line":"            LOG.exception(err_msg)"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAS3%2F%2FGlE%3D","line":46,"updated":"2013-10-04 11:50:51.000000000","message":"I don\u0027t think we need raise exception to upper layer (using such way like \u0027save_and_reraise_exception()\u0027) since we have  save the error as a message to the task object/record. Correct me if I\u0027m wrong.","commit_id":"ba3cd104a86e46b75e4a5d0bb643efbfd75d23b8"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"169de1a2de71a9b1651df28d282dcb203a7fb8de","unresolved":false,"context_lines":[{"line_number":55,"context_line":"    def run(self, task_id):"},{"line_number":56,"context_line":"        msg \u003d _(\"Running task \u0027%(task_id)s\u0027\") % {\u0027task_id\u0027: task_id}"},{"line_number":57,"context_line":"        LOG.info(msg)"},{"line_number":58,"context_line":"        eventlet.spawn_n(self.execute, task_id)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def unpack_task_input(self, task):"},{"line_number":61,"context_line":"        task_input \u003d task.input"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAS3%2F%2FGis%3D","line":58,"updated":"2013-10-04 11:50:51.000000000","message":"We need set task status to \u0027processing\u0027 before this IMO. And the code comments also said this: https://review.openstack.org/#/c/46117/19/glance/domain/__init__.py Line248\n\nOr I miss something?","commit_id":"ba3cd104a86e46b75e4a5d0bb643efbfd75d23b8"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"169de1a2de71a9b1651df28d282dcb203a7fb8de","unresolved":false,"context_lines":[{"line_number":71,"context_line":"    def check_valid_location(self, input):"},{"line_number":72,"context_line":"        uri \u003d input.get(\u0027import_from\u0027, None)"},{"line_number":73,"context_line":"        if not uri or not uri.startswith(\u0027file:///\u0027):"},{"line_number":74,"context_line":"            raise exception.BadStoreUri(_(\u0027Invalid location: %s\u0027) % uri)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        return uri[7:]"},{"line_number":77,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAS3%2F%2FGh8%3D","line":74,"updated":"2013-10-04 11:50:51.000000000","message":"So I still consider we should change the class name to \"FileStoredImageImportTaskExecutor\"","commit_id":"ba3cd104a86e46b75e4a5d0bb643efbfd75d23b8"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"a7573e31b0551a62567a73c0ae206802861c9a9e","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    def load_script(self):"},{"line_number":29,"context_line":"        script_class \u003d \u0027glance.common.scripts.\u0027 \\"},{"line_number":30,"context_line":"                       \u0027import_filesystem_to_filesystem.ImportScript\u0027"},{"line_number":31,"context_line":"        script \u003d importutils.import_object(script_class,"},{"line_number":32,"context_line":"                                           self.gateway,"},{"line_number":33,"context_line":"                                           self.context)"},{"line_number":34,"context_line":"        return script"}],"source_content_type":"text/x-python","patch_set":21,"id":"AAAATH%2F%2F5dk%3D","line":31,"updated":"2013-10-08 12:02:07.000000000","message":"humm, I have two questions:\n\n1. Why we not using stevedore? It\u0027s more easy for end user (and plugins vendor/developer), clear for configurations and a lot of projects using it (it\u0027s a trend in OS). We have plan on this part right? I just don\u0027t know that.\n\n2. I consider we really need a common plugin-loading code for async-task plugins.\n\n3. I also consider we\u0027d better adding plugin mechanism on executor level but not for a particular executor level (in this case it\u0027s \u0027import\u0027 executor), since in future we can smooth support more task class, and just need add a new plugin, for example \u0027indexing\u0027 async task.This is also related with my \u0027multi-executor\u0027 thought: in glance-api.conf we allow admin configure a list like this:\n\nasync_task_executors \u003d file_stored_image_import:file_stored_image_import_task_executor, indexing:image_indexing_task_executor\n\n\u0027file_based_image_import_task_executor\u0027 and \u0027image_indexing_task_executor\u0027 has been configured in \u0027glance/setup.cfg\u0027.\n\nIn this case, probable you need also give a second-level plugin for a particular executor for reduce its complexity, just like what you did at here for \u0027TaskImportExecutor\u0027. So furthermore, \u0027multi-executor\u0027 also means a type of task such as \u0027import\u0027 can be processed by one executor of a particular list, for example as following, since this structure can help executor (vendor/developer) separate handling logic:\n\nasync_task_executors \u003d import:[file_stored_image_import_task_executor, http_stored_image_import_task_executor, rbd_stored_image_import_task_executor], indexing:[qcow2_image_indexing_task_executor,raw_image_indexing_task_executor]\n\nIn above example, each executor has a \u0027applicable()\u0027 interface, and task_executor_factory will call this method for each executor in their order for a particular type of task, and if an executor can handle this task then stop trying for the rest within the list.\n\nI\u0027d like talk with you in irc to share my thoughts on this (and discuss of cause) if you like/think it\u0027s necessary.","commit_id":"a8c0826d265907d73fc0c72df9684d56c3e95f6e"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"c519961d4a2804f5f34f358e64eeb11f4f107d30","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    def load_script(self):"},{"line_number":29,"context_line":"        script_class \u003d \u0027glance.common.scripts.\u0027 \\"},{"line_number":30,"context_line":"                       \u0027import_filesystem_to_filesystem.ImportScript\u0027"},{"line_number":31,"context_line":"        script \u003d importutils.import_object(script_class,"},{"line_number":32,"context_line":"                                           self.gateway,"},{"line_number":33,"context_line":"                                           self.context)"},{"line_number":34,"context_line":"        return script"}],"source_content_type":"text/x-python","patch_set":21,"id":"AAAATH%2F%2F4TQ%3D","line":31,"in_reply_to":"AAAATH%2F%2F43o%3D","updated":"2013-10-08 15:13:13.000000000","message":"I\u0027m OK for your proposal #1, and I have some thoughts around part #2:\n\nI still consider we need add a option to glance-api to allow admin configure the combination of \u0027task_type\u0027 and \u0027executor_driver_type\u0027. In your case, you need always assume the executor class could be confirmed by the image location\u0027s schema such as \u0027file\u0027 or \u0027swift\u0027, but for such task in future, it will not work, for example: in future I like to add \u0027indexing\u0027 task to glance, then probably i need use image type like \u0027raw\u0027, \u0027qcow2\u0027 (just like my example in above comments) to get executor but a schema. And if you agree this then probably your point #1 can be simplified also, just add those executor records to \u0027entry_points\u0027 section. So any thoughts around point #3 within my above comments?","commit_id":"a8c0826d265907d73fc0c72df9684d56c3e95f6e"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"e27d19cc9a0eea4499c73b155119f84a6495260b","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    def load_script(self):"},{"line_number":29,"context_line":"        script_class \u003d \u0027glance.common.scripts.\u0027 \\"},{"line_number":30,"context_line":"                       \u0027import_filesystem_to_filesystem.ImportScript\u0027"},{"line_number":31,"context_line":"        script \u003d importutils.import_object(script_class,"},{"line_number":32,"context_line":"                                           self.gateway,"},{"line_number":33,"context_line":"                                           self.context)"},{"line_number":34,"context_line":"        return script"}],"source_content_type":"text/x-python","patch_set":21,"id":"AAAATH%2F%2F43o%3D","line":31,"in_reply_to":"AAAATH%2F%2F5dk%3D","updated":"2013-10-08 13:15:52.000000000","message":"How about the below way to leverage stevedore? Any comments is welcome.\n\n1. setup.cfg\n[import]\n\nfile\u003dglance.domain.async.importer.filesystem_importer\n\nswift\u003dglance.domain.async.importer.swift_importer\n\n[export]\n\nfile\u003dglance.domain.async.exporter.filesystem_exporter\n\nswift\u003dglance.domain.async.exporter.swift_exporter\n\n2. \ntask_type is one of import, export or clone.\nexecutor_driver_type can be extracted from input.import_from or input.export_to by reading the scheme, such as file, swift, cinder, etc.\n\ndef get_executor(task_type, executor_driver_type):\n    mgr \u003d driver.DriverManager(task_type,\n                               executor_driver_type,\n                               invoke_on_load\u003dTrue)\n    return mgr.driver","commit_id":"a8c0826d265907d73fc0c72df9684d56c3e95f6e"}],"glance/domain/proxy.py":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"c46151d220dcfd9c6316e94c7814475f20e42853","unresolved":false,"context_lines":[{"line_number":151,"context_line":"    updated_at \u003d _proxy(\u0027base\u0027, \u0027updated_at\u0027)"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"    def run(self, task_proxy):"},{"line_number":154,"context_line":"        self.base.run(self)"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    def kill(self):"},{"line_number":157,"context_line":"        raise NotImplementedError()"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FUmQ%3D","line":154,"updated":"2013-09-30 09:03:42.000000000","message":"same comment like glance/domain/__init__.py I wrote. we should pass task_proxy in but an un-proxied \u0027self\u0027 object.","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"aa4c633a3868fe9a52b3898828dcff4751162fee","unresolved":false,"context_lines":[{"line_number":151,"context_line":"    updated_at \u003d _proxy(\u0027base\u0027, \u0027updated_at\u0027)"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"    def run(self, task_proxy):"},{"line_number":154,"context_line":"        self.base.run(self)"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    def kill(self):"},{"line_number":157,"context_line":"        raise NotImplementedError()"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FH0s%3D","line":154,"in_reply_to":"AAAAS3%2F%2FUmQ%3D","updated":"2013-10-03 22:29:26.000000000","message":"this is fixed now, Zhi","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"096385cedf838972322e5de7924613adc03ad986","unresolved":false,"context_lines":[{"line_number":151,"context_line":"    updated_at \u003d _proxy(\u0027base\u0027, \u0027updated_at\u0027)"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"    def run(self, task_proxy):"},{"line_number":154,"context_line":"        self.base.run(self)"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    def kill(self):"},{"line_number":157,"context_line":"        raise NotImplementedError()"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAS3%2F%2FRro%3D","line":154,"updated":"2013-10-01 03:44:15.000000000","message":"Humm, as I mentioned in PS11, I still think we should pass task_proxy in but an un-proxied \u0027self\u0027 object. Or can you explain why you like pass \u0027self\u0027 in?","commit_id":"5b2ed3c50159f9cd2b74006320432f354f1d5e52"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"b55d68f48f514eafa6bb2ca855daf4df7588ebbf","unresolved":false,"context_lines":[{"line_number":151,"context_line":"    updated_at \u003d _proxy(\u0027base\u0027, \u0027updated_at\u0027)"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"    def run(self, task_proxy):"},{"line_number":154,"context_line":"        self.base.run(self)"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    def kill(self):"},{"line_number":157,"context_line":"        raise NotImplementedError()"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAS3%2F%2FHyg%3D","line":154,"in_reply_to":"AAAAS3%2F%2FRro%3D","updated":"2013-10-03 22:38:37.000000000","message":"I hope that the current way (PS17) feels better.","commit_id":"5b2ed3c50159f9cd2b74006320432f354f1d5e52"}],"glance/gateway.py":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"0030caafda802e699fae1f174e64394cc68dc954","unresolved":false,"context_lines":[{"line_number":107,"context_line":"            notifier_task_repo, context)"},{"line_number":108,"context_line":"        return authorized_task_repo"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def get_db_task_repo(self, context):"},{"line_number":111,"context_line":"        return glance.db.TaskRepo(context, self.db_api)"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    def get_task_executor_factory(self, context, task_dict, gateway):"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAS3%2F%2FKkI%3D","line":110,"updated":"2013-10-03 04:39:16.000000000","message":"Cool, we don\u0027t need it now.","commit_id":"62bd7b15acf7abc5bd8283605f369b10890b8cd9"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"9cf698524d8d0ed4cc10f488b5f20680e47f7f4b","unresolved":false,"context_lines":[{"line_number":107,"context_line":"            notifier_task_repo, context)"},{"line_number":108,"context_line":"        return authorized_task_repo"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def get_db_task_repo(self, context):"},{"line_number":111,"context_line":"        return glance.db.TaskRepo(context, self.db_api)"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    def get_task_executor_factory(self, context, task_dict, gateway):"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAS3%2F%2FHxI%3D","line":110,"in_reply_to":"AAAAS3%2F%2FKkI%3D","updated":"2013-10-03 22:44:09.000000000","message":"will fix this, thanks.","commit_id":"62bd7b15acf7abc5bd8283605f369b10890b8cd9"}],"glance/notifier/__init__.py":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"c46151d220dcfd9c6316e94c7814475f20e42853","unresolved":false,"context_lines":[{"line_number":281,"context_line":"        self.notifier.info(\u0027task.create\u0027, format_task_notification(task))"},{"line_number":282,"context_line":"        return super(TaskRepoProxy, self).add(task)"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"    def save(self, task):"},{"line_number":285,"context_line":"        return super(TaskRepoProxy, self).save(task)"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FUt8%3D","line":284,"updated":"2013-09-30 09:03:42.000000000","message":"seems it\u0027s a useless hook? we need emit \u0027task.update\u0027 message right?\n\nAnd we have plan to provide other notifications for other actions right? when we landing async-task feature stuff in.","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"6b3da6b63253842957ad07af2c135adfdfbdc9cb","unresolved":false,"context_lines":[{"line_number":281,"context_line":"        self.notifier.info(\u0027task.create\u0027, format_task_notification(task))"},{"line_number":282,"context_line":"        return super(TaskRepoProxy, self).add(task)"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"    def save(self, task):"},{"line_number":285,"context_line":"        return super(TaskRepoProxy, self).save(task)"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FG0c%3D","line":284,"in_reply_to":"AAAAS3%2F%2FH0k%3D","updated":"2013-10-04 09:33:07.000000000","message":"OK, thanks.","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"aa4c633a3868fe9a52b3898828dcff4751162fee","unresolved":false,"context_lines":[{"line_number":281,"context_line":"        self.notifier.info(\u0027task.create\u0027, format_task_notification(task))"},{"line_number":282,"context_line":"        return super(TaskRepoProxy, self).add(task)"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"    def save(self, task):"},{"line_number":285,"context_line":"        return super(TaskRepoProxy, self).save(task)"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAS3%2F%2FH0k%3D","line":284,"in_reply_to":"AAAAS3%2F%2FUt8%3D","updated":"2013-10-03 22:29:26.000000000","message":"OK, thanks for bringing this up Zhi, I\u0027m marking this as a part of discussion","commit_id":"348cf628284733115a322f166dd52316d8951830"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"096385cedf838972322e5de7924613adc03ad986","unresolved":false,"context_lines":[{"line_number":280,"context_line":"    def add(self, task):"},{"line_number":281,"context_line":"        self.notifier.info(\u0027task.create\u0027, format_task_notification(task))"},{"line_number":282,"context_line":"        return super(TaskRepoProxy, self).add(task)"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"class TaskFactoryProxy(glance.domain.proxy.TaskFactory):"},{"line_number":286,"context_line":"    def __init__(self, factory, context, notifier):"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAS3%2F%2FRsE%3D","line":283,"updated":"2013-10-01 03:44:15.000000000","message":"Why we not need hook save() for \u0027task.update\u0027  emitting?","commit_id":"5b2ed3c50159f9cd2b74006320432f354f1d5e52"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"b55d68f48f514eafa6bb2ca855daf4df7588ebbf","unresolved":false,"context_lines":[{"line_number":280,"context_line":"    def add(self, task):"},{"line_number":281,"context_line":"        self.notifier.info(\u0027task.create\u0027, format_task_notification(task))"},{"line_number":282,"context_line":"        return super(TaskRepoProxy, self).add(task)"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"class TaskFactoryProxy(glance.domain.proxy.TaskFactory):"},{"line_number":286,"context_line":"    def __init__(self, factory, context, notifier):"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAS3%2F%2FHyU%3D","line":283,"in_reply_to":"AAAAS3%2F%2FRsE%3D","updated":"2013-10-03 22:38:37.000000000","message":"Marked it for discussion tomorrow. Thanks for persistently catching this.","commit_id":"5b2ed3c50159f9cd2b74006320432f354f1d5e52"}]}
