)]}'
{"smaug/services/protection/protection_plugins/image/image_backup_plugin.py":[{"author":{"_account_id":13070,"name":"Eran Gampel","email":"eran@gampel.net","username":"Gampel"},"change_message_id":"79048346a8789f4f4e6201e3a01c048b75dc50f7","unresolved":false,"context_lines":[{"line_number":91,"context_line":"                sleep(30)"},{"line_number":92,"context_line":"                image_info \u003d glance_client.images.get(image_id)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"            image_data \u003d glance_client.images.data(image_id)"},{"line_number":95,"context_line":"            # TODO(hurong): support retry if failed"},{"line_number":96,"context_line":"            bank_section.create_object(\"data\", value\u003dimage_data)"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"            resource_definition["},{"line_number":99,"context_line":"                \"status\"] \u003d constants.ProtectionStatus.AVAILABLE"}],"source_content_type":"text/x-python","patch_set":2,"id":"da0c15f0_a2ba6921","line":96,"range":{"start_line":94,"start_character":12,"end_line":96,"end_character":64},"updated":"2016-03-28 06:53:30.000000000","message":"I think that you will have to split this object into chunks\n\nI think that you could reuse the implementation in the dragon project _imagecopy(...)\n\nhttps://github.com/os-cloud-storage/openstack-workload-disaster-recovery/blob/e4d35645c53a4a41a9b1a158f6f0d49ab9eb8fd2/dragon/workload_policy/actions/plugins/instance_image_action.py","commit_id":"434e3f691ae73c99a940a5134e90fe3114f7ed38"},{"author":{"_account_id":19346,"name":"yinwei","email":"yinweiishere@icloud.com","username":"yinwei"},"change_message_id":"4c49182ade81523fcb39e0db0f4674e202ab6fb1","unresolved":false,"context_lines":[{"line_number":91,"context_line":"                sleep(30)"},{"line_number":92,"context_line":"                image_info \u003d glance_client.images.get(image_id)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"            image_data \u003d glance_client.images.data(image_id)"},{"line_number":95,"context_line":"            # TODO(hurong): support retry if failed"},{"line_number":96,"context_line":"            bank_section.create_object(\"data\", value\u003dimage_data)"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"            resource_definition["},{"line_number":99,"context_line":"                \"status\"] \u003d constants.ProtectionStatus.AVAILABLE"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba0121b8_3cc15d2f","line":96,"range":{"start_line":94,"start_character":12,"end_line":96,"end_character":64},"in_reply_to":"da0c15f0_a2ba6921","updated":"2016-03-30 08:34:14.000000000","message":"Yes, double checked the code, I think the we missed chunking image to swift client here.\nBeyond chunking, to enhance upload performance, we could use SLO support of swift: upload multiple chunks on parallel, until all chunks uploaded, put a manifest there.  And the whole image could be retrieved as one object with ranges described in the manifest.","commit_id":"434e3f691ae73c99a940a5134e90fe3114f7ed38"}],"smaug/services/protection/protection_plugins/image/image_plugin_cinder_schemas.py":[{"author":{"_account_id":13070,"name":"Eran Gampel","email":"eran@gampel.net","username":"Gampel"},"change_message_id":"1f0b73cb44b1fe8ad6c94c281d21479017f2cc1e","unresolved":false,"context_lines":[{"line_number":38,"context_line":"}"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"# TODO(hurong)"},{"line_number":41,"context_line":"SAVED_INFO_SCHEMA \u003d {"},{"line_number":42,"context_line":"    \"title\": \"Image Protection Saved Info\","},{"line_number":43,"context_line":"    \"type\": \"object\","},{"line_number":44,"context_line":"    \"properties\": {},"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa0719c6_4c2fdba0","line":41,"range":{"start_line":41,"start_character":0,"end_line":41,"end_character":17},"updated":"2016-03-24 06:44:21.000000000","message":"I think that we could add more metadata about the image \nBut it can be done in another patch","commit_id":"7f1eb70d5a572e876e8f347dfbb90293c5bfb651"}],"smaug/services/protection/protection_plugins/image/image_plugin_schemas.py":[{"author":{"_account_id":2023,"name":"Saggi Mizrahi","email":"ficoos+osreview@gmail.com","username":"ficoos"},"change_message_id":"de988f13d170493bd7579ce8cea1a2c5e337f448","unresolved":false,"context_lines":[{"line_number":34,"context_line":"            \"description\": \"The name of the restore image\","},{"line_number":35,"context_line":"        },"},{"line_number":36,"context_line":"    },"},{"line_number":37,"context_line":"    \"required\": [\"restore_name\"]"},{"line_number":38,"context_line":"}"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"# TODO(hurong)"}],"source_content_type":"text/x-python","patch_set":4,"id":"dab17558_643e7e8d","line":37,"range":{"start_line":37,"start_character":4,"end_line":37,"end_character":32},"updated":"2016-05-10 12:09:11.000000000","message":"Can\u0027t this be empty and just be the backup name?","commit_id":"9fcb7b26f37668bc9c4f62341ae666c132b20d0a"},{"author":{"_account_id":20791,"name":"WeAreFormalGroup","email":"2546506173@qq.com","username":"hurong"},"change_message_id":"3ac74540f1d268abdea5e6d652eba6a2d966f69d","unresolved":false,"context_lines":[{"line_number":34,"context_line":"            \"description\": \"The name of the restore image\","},{"line_number":35,"context_line":"        },"},{"line_number":36,"context_line":"    },"},{"line_number":37,"context_line":"    \"required\": [\"restore_name\"]"},{"line_number":38,"context_line":"}"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"# TODO(hurong)"}],"source_content_type":"text/x-python","patch_set":4,"id":"dab17558_60c28554","line":37,"range":{"start_line":37,"start_character":4,"end_line":37,"end_character":32},"in_reply_to":"dab17558_643e7e8d","updated":"2016-05-12 11:34:30.000000000","message":"OK, I will change to backup name, your suggestion sounds better than my.","commit_id":"9fcb7b26f37668bc9c4f62341ae666c132b20d0a"},{"author":{"_account_id":2023,"name":"Saggi Mizrahi","email":"ficoos+osreview@gmail.com","username":"ficoos"},"change_message_id":"de988f13d170493bd7579ce8cea1a2c5e337f448","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    \"type\": \"object\","},{"line_number":44,"context_line":"    \"properties\": {"},{"line_number":45,"context_line":"        \"image_metadata\": {"},{"line_number":46,"context_line":"            \"type\": \"object\","},{"line_number":47,"context_line":"            \"title\": \"Image Metadata\","},{"line_number":48,"context_line":"            \"description\": \"To save disk_format and container_format\","},{"line_number":49,"context_line":"        }"}],"source_content_type":"text/x-python","patch_set":4,"id":"dab17558_e471ce77","line":46,"range":{"start_line":46,"start_character":12,"end_line":46,"end_character":29},"updated":"2016-05-10 12:09:11.000000000","message":"This is too generic and we will not be able to create appropriate UI elements for this. Can\u0027t there be more specific fields we can expose?","commit_id":"9fcb7b26f37668bc9c4f62341ae666c132b20d0a"},{"author":{"_account_id":20791,"name":"WeAreFormalGroup","email":"2546506173@qq.com","username":"hurong"},"change_message_id":"3ac74540f1d268abdea5e6d652eba6a2d966f69d","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    \"type\": \"object\","},{"line_number":44,"context_line":"    \"properties\": {"},{"line_number":45,"context_line":"        \"image_metadata\": {"},{"line_number":46,"context_line":"            \"type\": \"object\","},{"line_number":47,"context_line":"            \"title\": \"Image Metadata\","},{"line_number":48,"context_line":"            \"description\": \"To save disk_format and container_format\","},{"line_number":49,"context_line":"        }"}],"source_content_type":"text/x-python","patch_set":4,"id":"dab17558_8d92794a","line":46,"range":{"start_line":46,"start_character":12,"end_line":46,"end_character":29},"in_reply_to":"dab17558_e471ce77","updated":"2016-05-12 11:34:30.000000000","message":"Should we change it to: \n\n\"type\": \"image\"? Is it OK?","commit_id":"9fcb7b26f37668bc9c4f62341ae666c132b20d0a"}],"smaug/services/protection/protection_plugins/image/image_protection_plugin.py":[{"author":{"_account_id":17151,"name":"chenying","email":"chenyingko@gmail.com","username":"chenying"},"change_message_id":"463518dad4744111777a2187f9cf04719bd97488","unresolved":false,"context_lines":[{"line_number":56,"context_line":"    def _glance_client(self, cntxt):"},{"line_number":57,"context_line":"        return ClientFactory.create_client(\"glance\", cntxt)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def create_backup(self, cntxt, checkpoint, **kwargs):"},{"line_number":60,"context_line":"        resource_node \u003d kwargs.get(\"node\")"},{"line_number":61,"context_line":"        image_id \u003d resource_node.value.id"},{"line_number":62,"context_line":"        bank_section \u003d checkpoint.get_resource_bank_section(image_id)"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba0121b8_6772e012","line":59,"range":{"start_line":59,"start_character":8,"end_line":59,"end_character":21},"updated":"2016-03-31 07:08:26.000000000","message":"IMO, we could add some debug logs to the protect execution function.","commit_id":"c0394088eb69c937d98cf545b70a8da2779987e3"},{"author":{"_account_id":13070,"name":"Eran Gampel","email":"eran@gampel.net","username":"Gampel"},"change_message_id":"22e0b2dc7dd382ce88a9adb60612df1054760f26","unresolved":false,"context_lines":[{"line_number":93,"context_line":"                sleep(30)"},{"line_number":94,"context_line":"                image_info \u003d glance_client.images.get(image_id)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"            image_data \u003d glance_client.images.data(image_id)"},{"line_number":97,"context_line":"            # TODO(hurong): support retry if failed"},{"line_number":98,"context_line":"            bank_section.create_object(\"data\", value\u003dimage_data)"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"            # TODO(hurong):"},{"line_number":101,"context_line":"            bank_section.update_object(\"metadata\", resource_definition)"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba0121b8_3a9660f0","line":98,"range":{"start_line":96,"start_character":12,"end_line":98,"end_character":64},"updated":"2016-03-30 14:57:50.000000000","message":"Please see my last comment about chunking","commit_id":"c0394088eb69c937d98cf545b70a8da2779987e3"},{"author":{"_account_id":17151,"name":"chenying","email":"chenyingko@gmail.com","username":"chenying"},"change_message_id":"463518dad4744111777a2187f9cf04719bd97488","unresolved":false,"context_lines":[{"line_number":106,"context_line":"            # update resource_definition backup_status"},{"line_number":107,"context_line":"            bank_section.update_object(\"status\","},{"line_number":108,"context_line":"                                       constants.ProtectionStatus.ERROR)"},{"line_number":109,"context_line":"            raise exception.CreateBackupFailed(reason\u003derr,"},{"line_number":110,"context_line":"                                               resource_id\u003dimage_id)"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    def restore_backup(self, cntxt, checkpoint, **kwargs):"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba0121b8_47b23c95","line":109,"range":{"start_line":109,"start_character":28,"end_line":109,"end_character":46},"updated":"2016-03-31 07:08:26.000000000","message":"consider adding a parameter resource_type here. We can know the resource is a volume or image from the excception messages.","commit_id":"c0394088eb69c937d98cf545b70a8da2779987e3"},{"author":{"_account_id":17151,"name":"chenying","email":"chenyingko@gmail.com","username":"chenying"},"change_message_id":"463518dad4744111777a2187f9cf04719bd97488","unresolved":false,"context_lines":[{"line_number":113,"context_line":"        # TODO(hurong):"},{"line_number":114,"context_line":"        pass"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    def delete_backup(self, cntxt, checkpoint, **kwargs):"},{"line_number":117,"context_line":"        resource_node \u003d kwargs.get(\"node\")"},{"line_number":118,"context_line":"        image_id \u003d resource_node.value.id"},{"line_number":119,"context_line":"        bank_section \u003d checkpoint.get_resource_bank_section(image_id)"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba0121b8_e7cc30bd","line":116,"range":{"start_line":116,"start_character":8,"end_line":116,"end_character":21},"updated":"2016-03-31 07:08:26.000000000","message":"Why not like create_backup function? use greenpool.spawn_n to execute delete_backup function.","commit_id":"c0394088eb69c937d98cf545b70a8da2779987e3"},{"author":{"_account_id":17151,"name":"chenying","email":"chenyingko@gmail.com","username":"chenying"},"change_message_id":"463518dad4744111777a2187f9cf04719bd97488","unresolved":false,"context_lines":[{"line_number":118,"context_line":"        image_id \u003d resource_node.value.id"},{"line_number":119,"context_line":"        bank_section \u003d checkpoint.get_resource_bank_section(image_id)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        bank_section.update_object(\"status\","},{"line_number":122,"context_line":"                                   constants.ProtectionStatus.DELETING)"},{"line_number":123,"context_line":"        try:"},{"line_number":124,"context_line":"            bank_section.delete_object(\"data\")"},{"line_number":125,"context_line":"            bank_section.delete_object(\"metadata\")"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba0121b8_e7b270e4","line":122,"range":{"start_line":121,"start_character":7,"end_line":122,"end_character":71},"updated":"2016-03-31 07:08:26.000000000","message":"Why not the try-except handling include this calling? update_object function maybe fail and raise a exception.","commit_id":"c0394088eb69c937d98cf545b70a8da2779987e3"},{"author":{"_account_id":2023,"name":"Saggi Mizrahi","email":"ficoos+osreview@gmail.com","username":"ficoos"},"change_message_id":"de988f13d170493bd7579ce8cea1a2c5e337f448","unresolved":false,"context_lines":[{"line_number":75,"context_line":"    def create_backup(self, cntxt, checkpoint, **kwargs):"},{"line_number":76,"context_line":"        resource_node \u003d kwargs.get(\"node\")"},{"line_number":77,"context_line":"        image_id \u003d resource_node.value.id"},{"line_number":78,"context_line":"        bank_section \u003d checkpoint.get_resource_bank_section(image_id)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        resource_definition \u003d {\"resource_id\": image_id}"},{"line_number":81,"context_line":"        glance_client \u003d self._glance_client(cntxt)"}],"source_content_type":"text/x-python","patch_set":4,"id":"dab17558_e41f0e06","line":78,"range":{"start_line":78,"start_character":23,"end_line":78,"end_character":69},"updated":"2016-05-10 12:09:11.000000000","message":"Aren\u0027t we getting this from the context?","commit_id":"9fcb7b26f37668bc9c4f62341ae666c132b20d0a"},{"author":{"_account_id":20791,"name":"WeAreFormalGroup","email":"2546506173@qq.com","username":"hurong"},"change_message_id":"3ac74540f1d268abdea5e6d652eba6a2d966f69d","unresolved":false,"context_lines":[{"line_number":75,"context_line":"    def create_backup(self, cntxt, checkpoint, **kwargs):"},{"line_number":76,"context_line":"        resource_node \u003d kwargs.get(\"node\")"},{"line_number":77,"context_line":"        image_id \u003d resource_node.value.id"},{"line_number":78,"context_line":"        bank_section \u003d checkpoint.get_resource_bank_section(image_id)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        resource_definition \u003d {\"resource_id\": image_id}"},{"line_number":81,"context_line":"        glance_client \u003d self._glance_client(cntxt)"}],"source_content_type":"text/x-python","patch_set":4,"id":"dab17558_572bc494","line":78,"range":{"start_line":78,"start_character":23,"end_line":78,"end_character":69},"in_reply_to":"dab17558_e41f0e06","updated":"2016-05-12 11:34:30.000000000","message":"Each of resource","commit_id":"9fcb7b26f37668bc9c4f62341ae666c132b20d0a"},{"author":{"_account_id":20791,"name":"WeAreFormalGroup","email":"2546506173@qq.com","username":"hurong"},"change_message_id":"3ac74540f1d268abdea5e6d652eba6a2d966f69d","unresolved":false,"context_lines":[{"line_number":75,"context_line":"    def create_backup(self, cntxt, checkpoint, **kwargs):"},{"line_number":76,"context_line":"        resource_node \u003d kwargs.get(\"node\")"},{"line_number":77,"context_line":"        image_id \u003d resource_node.value.id"},{"line_number":78,"context_line":"        bank_section \u003d checkpoint.get_resource_bank_section(image_id)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        resource_definition \u003d {\"resource_id\": image_id}"},{"line_number":81,"context_line":"        glance_client \u003d self._glance_client(cntxt)"}],"source_content_type":"text/x-python","patch_set":4,"id":"dab17558_cff0c269","line":78,"range":{"start_line":78,"start_character":23,"end_line":78,"end_character":69},"in_reply_to":"dab17558_e41f0e06","updated":"2016-05-12 11:34:30.000000000","message":"One resource has one resource id, and then we will assign a bank_section by using context to pass in.","commit_id":"9fcb7b26f37668bc9c4f62341ae666c132b20d0a"},{"author":{"_account_id":2023,"name":"Saggi Mizrahi","email":"ficoos+osreview@gmail.com","username":"ficoos"},"change_message_id":"de988f13d170493bd7579ce8cea1a2c5e337f448","unresolved":false,"context_lines":[{"line_number":111,"context_line":"            image_info \u003d glance_client.images.get(image_id)"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"            # TODO(hurong): config retry_attempts"},{"line_number":114,"context_line":"            retry_attempts \u003d 10"},{"line_number":115,"context_line":"            while image_info.status !\u003d \"active\" and retry_attempts !\u003d 0:"},{"line_number":116,"context_line":"                sleep(60)"},{"line_number":117,"context_line":"                image_info \u003d glance_client.images.get(image_id)"},{"line_number":118,"context_line":"                retry_attempts -\u003d 1"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"            if retry_attempts \u003d\u003d 0:"},{"line_number":121,"context_line":"                raise Exception"}],"source_content_type":"text/x-python","patch_set":4,"id":"dab17558_e47b8e26","line":118,"range":{"start_line":114,"start_character":11,"end_line":118,"end_character":35},"updated":"2016-05-10 12:09:11.000000000","message":"Isn\u0027t there something in oslo for that?","commit_id":"9fcb7b26f37668bc9c4f62341ae666c132b20d0a"},{"author":{"_account_id":20791,"name":"WeAreFormalGroup","email":"2546506173@qq.com","username":"hurong"},"change_message_id":"3ac74540f1d268abdea5e6d652eba6a2d966f69d","unresolved":false,"context_lines":[{"line_number":111,"context_line":"            image_info \u003d glance_client.images.get(image_id)"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"            # TODO(hurong): config retry_attempts"},{"line_number":114,"context_line":"            retry_attempts \u003d 10"},{"line_number":115,"context_line":"            while image_info.status !\u003d \"active\" and retry_attempts !\u003d 0:"},{"line_number":116,"context_line":"                sleep(60)"},{"line_number":117,"context_line":"                image_info \u003d glance_client.images.get(image_id)"},{"line_number":118,"context_line":"                retry_attempts -\u003d 1"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"            if retry_attempts \u003d\u003d 0:"},{"line_number":121,"context_line":"                raise Exception"}],"source_content_type":"text/x-python","patch_set":4,"id":"dab17558_2f5cee49","line":118,"range":{"start_line":114,"start_character":11,"end_line":118,"end_character":35},"in_reply_to":"dab17558_e47b8e26","updated":"2016-05-12 11:34:30.000000000","message":"I use it, because I see the others python programing use it.\n\nWhat do you mean? Isn\u0027t there are this function?","commit_id":"9fcb7b26f37668bc9c4f62341ae666c132b20d0a"},{"author":{"_account_id":2023,"name":"Saggi Mizrahi","email":"ficoos+osreview@gmail.com","username":"ficoos"},"change_message_id":"de988f13d170493bd7579ce8cea1a2c5e337f448","unresolved":false,"context_lines":[{"line_number":135,"context_line":"                chunks +\u003d 1"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"            # update resource_definition backup_status"},{"line_number":138,"context_line":"            bank_section.update_object(\"status\","},{"line_number":139,"context_line":"                                       constants.ProtectionStatus.AVAILABLE)"},{"line_number":140,"context_line":"            LOG.info(_(\"finish backup image, image_id: %s.\"), image_id)"},{"line_number":141,"context_line":"        except Exception as err:"},{"line_number":142,"context_line":"            # update resource_definition backup_status"}],"source_content_type":"text/x-python","patch_set":4,"id":"dab17558_c4fc8a74","line":139,"range":{"start_line":138,"start_character":0,"end_line":139,"end_character":76},"updated":"2016-05-10 12:09:11.000000000","message":"Don\u0027t you need to put something in the bank so in case you fail you know how to recover\\clean up?","commit_id":"9fcb7b26f37668bc9c4f62341ae666c132b20d0a"},{"author":{"_account_id":20791,"name":"WeAreFormalGroup","email":"2546506173@qq.com","username":"hurong"},"change_message_id":"3ac74540f1d268abdea5e6d652eba6a2d966f69d","unresolved":false,"context_lines":[{"line_number":135,"context_line":"                chunks +\u003d 1"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"            # update resource_definition backup_status"},{"line_number":138,"context_line":"            bank_section.update_object(\"status\","},{"line_number":139,"context_line":"                                       constants.ProtectionStatus.AVAILABLE)"},{"line_number":140,"context_line":"            LOG.info(_(\"finish backup image, image_id: %s.\"), image_id)"},{"line_number":141,"context_line":"        except Exception as err:"},{"line_number":142,"context_line":"            # update resource_definition backup_status"}],"source_content_type":"text/x-python","patch_set":4,"id":"dab17558_20e51d08","line":139,"range":{"start_line":138,"start_character":0,"end_line":139,"end_character":76},"in_reply_to":"dab17558_c4fc8a74","updated":"2016-05-12 11:34:30.000000000","message":"We put the status imformation in constants.py so that we can use them for anyway, no only put them in bank for denoting.","commit_id":"9fcb7b26f37668bc9c4f62341ae666c132b20d0a"}]}
