)]}'
{"zun/compute/manager.py":[{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"fa76315a482d4f8bd9d0f83e306c644d464ca326","unresolved":false,"context_lines":[{"line_number":1195,"context_line":"                    container_list \u003d [container_uuid]"},{"line_number":1196,"context_line":"                    capsule.volumes_info[volume_id] \u003d container_list"},{"line_number":1197,"context_line":""},{"line_number":1198,"context_line":"        capsule.status \u003d consts.PENDING"},{"line_number":1199,"context_line":"        capsule.save(context)"},{"line_number":1200,"context_line":""},{"line_number":1201,"context_line":"    def capsule_delete(self, context, capsule):"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_0729c636","line":1198,"range":{"start_line":1198,"start_character":32,"end_line":1198,"end_character":39},"updated":"2018-05-09 02:53:24.000000000","message":"Just to make sure. Did you intend to change this?","commit_id":"cbad0053cfbfa22e676d39de718154fcdec3e88c"},{"author":{"_account_id":22076,"name":"Kevin Zhao","email":"kevin.zhao@linaro.org","username":"KevinZhao"},"change_message_id":"b32c21acc75751cbf794f109effb00e1164b34ad","unresolved":false,"context_lines":[{"line_number":1195,"context_line":"                    container_list \u003d [container_uuid]"},{"line_number":1196,"context_line":"                    capsule.volumes_info[volume_id] \u003d container_list"},{"line_number":1197,"context_line":""},{"line_number":1198,"context_line":"        capsule.status \u003d consts.PENDING"},{"line_number":1199,"context_line":"        capsule.save(context)"},{"line_number":1200,"context_line":""},{"line_number":1201,"context_line":"    def capsule_delete(self, context, capsule):"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_bbe26b2e","line":1198,"range":{"start_line":1198,"start_character":32,"end_line":1198,"end_character":39},"in_reply_to":"5f7c97a3_0729c636","updated":"2018-05-09 08:21:31.000000000","message":"Sorry, I have a logical mistake.\nActually here for capsule, running a update status is better.","commit_id":"cbad0053cfbfa22e676d39de718154fcdec3e88c"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"4052591ed40d2afbd7f257c3489048436d505806","unresolved":false,"context_lines":[{"line_number":1109,"context_line":"                capsule.status \u003d consts.PENDING"},{"line_number":1110,"context_line":""},{"line_number":1111,"context_line":"            capsule.save(ctx)"},{"line_number":1112,"context_line":""},{"line_number":1113,"context_line":"            if capsule.host !\u003d container.host:"},{"line_number":1114,"context_line":"                capsule.host \u003d container.host"},{"line_number":1115,"context_line":"                capsule.save(ctx)"}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_7dbbb971","line":1112,"updated":"2018-05-17 15:59:09.000000000","message":"@Kevin,\n\nIt looks the logic of compiling capsule\u0027s status can be encapsulated and re-used. Therefore, see if you can do the following or similar refactoring:\n\n    def sync_capsule_status(self, ctx):\n        LOG.debug(\u0027Start syncing capsule states.\u0027)\n        capsules \u003d objects.Capsule.list(ctx)\n        for capsule in capsules:\n            capsule.status \u003d self._get_capsule_status(capsule)\n            capsule.save(ctx)\n\n    def _get_capsule_status(self, capsule):\n        ...","commit_id":"d10eaf507c813c0ad13048d9ac20ba075e6994f4"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"4052591ed40d2afbd7f257c3489048436d505806","unresolved":false,"context_lines":[{"line_number":1123,"context_line":"                                    requested_volumes, limits)"},{"line_number":1124,"context_line":""},{"line_number":1125,"context_line":"        utils.spawn_n(do_capsule_create)"},{"line_number":1126,"context_line":"        self.sync_capsule_status(context)"},{"line_number":1127,"context_line":""},{"line_number":1128,"context_line":"    def _do_capsule_create(self, context, capsule,"},{"line_number":1129,"context_line":"                           requested_networks\u003dNone,"}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_dda9ad24","line":1126,"range":{"start_line":1126,"start_character":13,"end_line":1126,"end_character":32},"updated":"2018-05-17 15:59:09.000000000","message":"Not sure why we need a sync in here.","commit_id":"d10eaf507c813c0ad13048d9ac20ba075e6994f4"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"4052591ed40d2afbd7f257c3489048436d505806","unresolved":false,"context_lines":[{"line_number":1196,"context_line":"                    container_list \u003d [container_uuid]"},{"line_number":1197,"context_line":"                    capsule.volumes_info[volume_id] \u003d container_list"},{"line_number":1198,"context_line":""},{"line_number":1199,"context_line":"        self.sync_container_state(context)"},{"line_number":1200,"context_line":"        capsule.save(context)"},{"line_number":1201,"context_line":""},{"line_number":1202,"context_line":"    def capsule_delete(self, context, capsule):"}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_bd663129","line":1199,"range":{"start_line":1199,"start_character":13,"end_line":1199,"end_character":33},"updated":"2018-05-17 15:59:09.000000000","message":"After the refactoring as I commented above, here can be re-written as:\n\n  capsule.status \u003d self._get_capsule_status(capsule)","commit_id":"d10eaf507c813c0ad13048d9ac20ba075e6994f4"}]}
