)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"a6be3e973c75f9b78dcede2f3910629f0a6b3a9c","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Sheepdog: Improve image operations"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch changes SheepdogDriver Class methods to use"},{"line_number":10,"context_line":"SheepdogClient Class methods for detailed Error logs."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"We change the following SheepdogDriver methods."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"1a26ad4f_603fb2d6","line":10,"updated":"2015-10-30 13:16:59.000000000","message":"s/Error/error? Or s/error/Error in line 22.","commit_id":"3bd2f4fbb8b7de87dbbaed47e25e0f3fedc2bab4"}],"cinder/tests/unit/test_sheepdog.py":[{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"1a30237ebd247f82f34a9812e61e2952ead3d994","unresolved":false,"context_lines":[{"line_number":1907,"context_line":"        expected_path \u003d \u0027sheepdog:%s\u0027 % fake_volume.name"},{"line_number":1908,"context_line":""},{"line_number":1909,"context_line":"        ret \u003d self.driver.local_path(fake_volume)"},{"line_number":1910,"context_line":"        self.assertEqual(ret, expected_path)"},{"line_number":1911,"context_line":""},{"line_number":1912,"context_line":"    @mock.patch.object(sheepdog.SheepdogClient, \u0027resize\u0027)"},{"line_number":1913,"context_line":"    @mock.patch.object(sheepdog, \u0027LOG\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_b7e1df9c","line":1910,"updated":"2015-09-02 07:27:02.000000000","message":"Keep the expected value as the first arg.","commit_id":"55ebc7da50e8ec1a16d7780418d6a3a42d03fe8b"}],"cinder/volume/drivers/sheepdog.py":[{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"1a30237ebd247f82f34a9812e61e2952ead3d994","unresolved":false,"context_lines":[{"line_number":381,"context_line":""},{"line_number":382,"context_line":"    def _is_cloneable(self, image_location, image_meta):"},{"line_number":383,"context_line":"        \"\"\"Check the image can be clone or not.\"\"\""},{"line_number":384,"context_line":""},{"line_number":385,"context_line":"        _cloneable \u003d False"},{"line_number":386,"context_line":"        _snapshot \u003d False"},{"line_number":387,"context_line":"        if image_meta[\u0027disk_format\u0027] !\u003d \u0027raw\u0027:"}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_b7b55f32","line":384,"updated":"2015-09-02 07:27:02.000000000","message":"This blank line is no need, please remove it, thanks.","commit_id":"55ebc7da50e8ec1a16d7780418d6a3a42d03fe8b"},{"author":{"_account_id":17151,"name":"chenying","email":"chenyingko@gmail.com","username":"chenying"},"change_message_id":"d1cda42651033ea7c51a2a13bbae5c3a32fd8c71","unresolved":false,"context_lines":[{"line_number":404,"context_line":"        # check whether volume is stored in sheepdog"},{"line_number":405,"context_line":"        (_stdout, _stderr) \u003d self._run_dog(\u0027vdi\u0027, \u0027list\u0027, \u0027-r\u0027, volume_name)"},{"line_number":406,"context_line":"        if _stdout \u003d\u003d \u0027\u0027:"},{"line_number":407,"context_line":"            LOG.debug(\u0027Image %s is not stored in sheepdog\u0027, volume_name)"},{"line_number":408,"context_line":"            return _cloneable, _snapshot"},{"line_number":409,"context_line":""},{"line_number":410,"context_line":"        if GLANCE_SNAPNAME not in _stdout:"}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_0c2f9e3f","line":407,"updated":"2015-09-01 06:04:06.000000000","message":"Add a \u0027.\u0027 to the EOL.","commit_id":"55ebc7da50e8ec1a16d7780418d6a3a42d03fe8b"},{"author":{"_account_id":17151,"name":"chenying","email":"chenyingko@gmail.com","username":"chenying"},"change_message_id":"d1cda42651033ea7c51a2a13bbae5c3a32fd8c71","unresolved":false,"context_lines":[{"line_number":408,"context_line":"            return _cloneable, _snapshot"},{"line_number":409,"context_line":""},{"line_number":410,"context_line":"        if GLANCE_SNAPNAME not in _stdout:"},{"line_number":411,"context_line":"            LOG.debug(\u0027Image %s is not a snapshot volume\u0027, volume_name)"},{"line_number":412,"context_line":"            _cloneable \u003d True"},{"line_number":413,"context_line":"            return _cloneable, _snapshot"},{"line_number":414,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_2c32a2a7","line":411,"updated":"2015-09-01 06:04:06.000000000","message":"Add a \u0027.\u0027 to the EOL.","commit_id":"55ebc7da50e8ec1a16d7780418d6a3a42d03fe8b"},{"author":{"_account_id":17151,"name":"chenying","email":"chenyingko@gmail.com","username":"chenying"},"change_message_id":"d1cda42651033ea7c51a2a13bbae5c3a32fd8c71","unresolved":false,"context_lines":[{"line_number":608,"context_line":"                                          source_vol)"},{"line_number":609,"context_line":"        except exception.SheepdogCmdError:"},{"line_number":610,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":611,"context_line":"                LOG.error(_LE(\u0027Failed to create clone image : %s\u0027),"},{"line_number":612,"context_line":"                          volume.name)"},{"line_number":613,"context_line":""},{"line_number":614,"context_line":"        vol_path \u003d self.local_path(volume)"}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_ac1eb209","line":611,"updated":"2015-09-01 06:04:06.000000000","message":"Add a \u0027.\u0027 to the EOL.","commit_id":"55ebc7da50e8ec1a16d7780418d6a3a42d03fe8b"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"6f77b8794e6a85a25f54cad817238d92012addb4","unresolved":false,"context_lines":[{"line_number":443,"context_line":"            _stderr \u003d e.kwargs[\u0027stderr\u0027]"},{"line_number":444,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":445,"context_line":"                if _stderr.startswith(self.DOG_RESP_CONNECTION_ERROR):"},{"line_number":446,"context_line":"                    LOG.exception(_LE(\u0027Failed to connect sheep daemon. \u0027"},{"line_number":447,"context_line":"                                  \u0027addr: %(addr)s, port: %(port)s\u0027),"},{"line_number":448,"context_line":"                                  {\u0027addr\u0027: self.addr, \u0027port\u0027: self.port})"},{"line_number":449,"context_line":"                elif _stderr.startswith(self.DOG_RESP_GET_NO_NODE_INFO):"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_4bdb617c","line":446,"updated":"2015-09-06 01:20:38.000000000","message":"\"connect\" -\u003e \"connect to\", like line 341.","commit_id":"3af63c692ebb6a4bad7cffc2027fc0078a0ad207"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"db656d88c3dbcdd705fb94820d5f5426b01af33a","unresolved":false,"context_lines":[{"line_number":335,"context_line":"        try:"},{"line_number":336,"context_line":"            (_stdout, _stderr) \u003d self._run_qemu_img(\u0027convert\u0027, *params)"},{"line_number":337,"context_line":"        except exception.SheepdogCmdError as e:"},{"line_number":338,"context_line":"            _stderr \u003d e.kwargs[\u0027stderr\u0027]"},{"line_number":339,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":340,"context_line":"                if self.QEMU_IMG_RESP_CONNECTION_ERROR in _stderr:"},{"line_number":341,"context_line":"                    LOG.error(_LE(\u0027Failed to connect to sheep daemon.\u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a2fa921_58673d25","line":338,"updated":"2015-10-06 20:46:14.000000000","message":"Variable is defined, but not used","commit_id":"70b7da18d2d16b2f476ed570d6987c554b0bfb42"},{"author":{"_account_id":13923,"name":"Teruaki Ishizaki","email":"ishizaki.teruaki@lab.ntt.co.jp","username":"tishizaki"},"change_message_id":"5fe7ae004e882ab19503ffbd4e2097fa63b3afea","unresolved":false,"context_lines":[{"line_number":335,"context_line":"        try:"},{"line_number":336,"context_line":"            (_stdout, _stderr) \u003d self._run_qemu_img(\u0027convert\u0027, *params)"},{"line_number":337,"context_line":"        except exception.SheepdogCmdError as e:"},{"line_number":338,"context_line":"            _stderr \u003d e.kwargs[\u0027stderr\u0027]"},{"line_number":339,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":340,"context_line":"                if self.QEMU_IMG_RESP_CONNECTION_ERROR in _stderr:"},{"line_number":341,"context_line":"                    LOG.error(_LE(\u0027Failed to connect to sheep daemon.\u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a2fa921_4f1ad57e","line":338,"in_reply_to":"7a2fa921_58673d25","updated":"2015-10-08 01:37:53.000000000","message":"The variable \u0027_stderr\u0027 is used in line 340, 344 and 348 to parse stderr.","commit_id":"70b7da18d2d16b2f476ed570d6987c554b0bfb42"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"db656d88c3dbcdd705fb94820d5f5426b01af33a","unresolved":false,"context_lines":[{"line_number":381,"context_line":""},{"line_number":382,"context_line":"    def _is_cloneable(self, image_location, image_meta):"},{"line_number":383,"context_line":"        \"\"\"Check the image can be clone or not.\"\"\""},{"line_number":384,"context_line":"        _cloneable \u003d False"},{"line_number":385,"context_line":"        _snapshot \u003d False"},{"line_number":386,"context_line":"        if image_meta[\u0027disk_format\u0027] !\u003d \u0027raw\u0027:"},{"line_number":387,"context_line":"            LOG.debug(\u0027Image clone requires image format to be \u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a2fa921_d8858dad","line":384,"updated":"2015-10-06 20:46:14.000000000","message":"Why do you use underscore here and below?","commit_id":"70b7da18d2d16b2f476ed570d6987c554b0bfb42"},{"author":{"_account_id":13923,"name":"Teruaki Ishizaki","email":"ishizaki.teruaki@lab.ntt.co.jp","username":"tishizaki"},"change_message_id":"5fe7ae004e882ab19503ffbd4e2097fa63b3afea","unresolved":false,"context_lines":[{"line_number":381,"context_line":""},{"line_number":382,"context_line":"    def _is_cloneable(self, image_location, image_meta):"},{"line_number":383,"context_line":"        \"\"\"Check the image can be clone or not.\"\"\""},{"line_number":384,"context_line":"        _cloneable \u003d False"},{"line_number":385,"context_line":"        _snapshot \u003d False"},{"line_number":386,"context_line":"        if image_meta[\u0027disk_format\u0027] !\u003d \u0027raw\u0027:"},{"line_number":387,"context_line":"            LOG.debug(\u0027Image clone requires image format to be \u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a2fa921_1aa3bd01","line":384,"in_reply_to":"7a2fa921_d8858dad","updated":"2015-10-08 01:37:53.000000000","message":"The reason is that they are local variables.\nOther than that, there is not any particular reason.\n\nSo, is it better to change here?","commit_id":"70b7da18d2d16b2f476ed570d6987c554b0bfb42"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"db656d88c3dbcdd705fb94820d5f5426b01af33a","unresolved":false,"context_lines":[{"line_number":440,"context_line":"        try:"},{"line_number":441,"context_line":"            (_stdout, _stderr) \u003d self._run_dog(\u0027node\u0027, \u0027info\u0027, \u0027-r\u0027)"},{"line_number":442,"context_line":"        except exception.SheepdogCmdError as e:"},{"line_number":443,"context_line":"            _stderr \u003d e.kwargs[\u0027stderr\u0027]"},{"line_number":444,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":445,"context_line":"                if _stderr.startswith(self.DOG_RESP_CONNECTION_ERROR):"},{"line_number":446,"context_line":"                    LOG.exception(_LE(\u0027Failed to connect to sheep daemon. \u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a2fa921_78823996","line":443,"updated":"2015-10-06 20:46:14.000000000","message":"Variable is defined, but not used","commit_id":"70b7da18d2d16b2f476ed570d6987c554b0bfb42"},{"author":{"_account_id":13923,"name":"Teruaki Ishizaki","email":"ishizaki.teruaki@lab.ntt.co.jp","username":"tishizaki"},"change_message_id":"5fe7ae004e882ab19503ffbd4e2097fa63b3afea","unresolved":false,"context_lines":[{"line_number":440,"context_line":"        try:"},{"line_number":441,"context_line":"            (_stdout, _stderr) \u003d self._run_dog(\u0027node\u0027, \u0027info\u0027, \u0027-r\u0027)"},{"line_number":442,"context_line":"        except exception.SheepdogCmdError as e:"},{"line_number":443,"context_line":"            _stderr \u003d e.kwargs[\u0027stderr\u0027]"},{"line_number":444,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":445,"context_line":"                if _stderr.startswith(self.DOG_RESP_CONNECTION_ERROR):"},{"line_number":446,"context_line":"                    LOG.exception(_LE(\u0027Failed to connect to sheep daemon. \u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a2fa921_7a06711e","line":443,"in_reply_to":"7a2fa921_78823996","updated":"2015-10-08 01:37:53.000000000","message":"The variable \u0027_stderr\u0027 is used in line 445 and 449 to parse stderr.","commit_id":"70b7da18d2d16b2f476ed570d6987c554b0bfb42"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"b3f5c779f4eb165c373b41e846a070b0cc6bf1f0","unresolved":false,"context_lines":[{"line_number":37,"context_line":"from cinder import utils"},{"line_number":38,"context_line":"from cinder.volume import driver"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"# snapshot name of glance image"},{"line_number":41,"context_line":"GLANCE_SNAPNAME \u003d \u0027glance-image\u0027"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"LOG \u003d logging.getLogger(__name__)"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa80f949_d1223b01","line":40,"updated":"2015-11-04 19:06:25.000000000","message":"Comments should start with upper-case letter","commit_id":"48137b7535a39a937b169eadf7a82c9f4fdff523"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"b3f5c779f4eb165c373b41e846a070b0cc6bf1f0","unresolved":false,"context_lines":[{"line_number":731,"context_line":"        stats[\u0027QoS_support\u0027] \u003d False"},{"line_number":732,"context_line":""},{"line_number":733,"context_line":"        try:"},{"line_number":734,"context_line":"            (total_gb, used_gb, free_gb) \u003d self.client.get_volume_stats()"},{"line_number":735,"context_line":"            stats[\u0027total_capacity_gb\u0027] \u003d total_gb"},{"line_number":736,"context_line":"            stats[\u0027free_capacity_gb\u0027] \u003d free_gb"},{"line_number":737,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa80f949_11d523b8","line":734,"updated":"2015-11-04 19:06:25.000000000","message":"\u0027used_gb\u0027 variable is not used. Please, rename it to _used_gb","commit_id":"48137b7535a39a937b169eadf7a82c9f4fdff523"},{"author":{"_account_id":13923,"name":"Teruaki Ishizaki","email":"ishizaki.teruaki@lab.ntt.co.jp","username":"tishizaki"},"change_message_id":"fc9e82f16f39c1488be6fc602be6245c05b1b4df","unresolved":false,"context_lines":[{"line_number":731,"context_line":"        stats[\u0027QoS_support\u0027] \u003d False"},{"line_number":732,"context_line":""},{"line_number":733,"context_line":"        try:"},{"line_number":734,"context_line":"            (total_gb, used_gb, free_gb) \u003d self.client.get_volume_stats()"},{"line_number":735,"context_line":"            stats[\u0027total_capacity_gb\u0027] \u003d total_gb"},{"line_number":736,"context_line":"            stats[\u0027free_capacity_gb\u0027] \u003d free_gb"},{"line_number":737,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa80f949_0ddc1711","line":734,"in_reply_to":"fa80f949_11d523b8","updated":"2015-11-05 04:13:17.000000000","message":"I\u0027ll change it.","commit_id":"48137b7535a39a937b169eadf7a82c9f4fdff523"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"b3f5c779f4eb165c373b41e846a070b0cc6bf1f0","unresolved":false,"context_lines":[{"line_number":734,"context_line":"            (total_gb, used_gb, free_gb) \u003d self.client.get_volume_stats()"},{"line_number":735,"context_line":"            stats[\u0027total_capacity_gb\u0027] \u003d total_gb"},{"line_number":736,"context_line":"            stats[\u0027free_capacity_gb\u0027] \u003d free_gb"},{"line_number":737,"context_line":"        except Exception:"},{"line_number":738,"context_line":"            LOG.exception(_LE(\u0027error refreshing volume stats\u0027))"},{"line_number":739,"context_line":""},{"line_number":740,"context_line":"        self._stats \u003d stats"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa80f949_71fd8f39","line":737,"updated":"2015-11-04 19:06:25.000000000","message":"Can we catch more specific exception here?","commit_id":"48137b7535a39a937b169eadf7a82c9f4fdff523"},{"author":{"_account_id":13923,"name":"Teruaki Ishizaki","email":"ishizaki.teruaki@lab.ntt.co.jp","username":"tishizaki"},"change_message_id":"fc9e82f16f39c1488be6fc602be6245c05b1b4df","unresolved":false,"context_lines":[{"line_number":734,"context_line":"            (total_gb, used_gb, free_gb) \u003d self.client.get_volume_stats()"},{"line_number":735,"context_line":"            stats[\u0027total_capacity_gb\u0027] \u003d total_gb"},{"line_number":736,"context_line":"            stats[\u0027free_capacity_gb\u0027] \u003d free_gb"},{"line_number":737,"context_line":"        except Exception:"},{"line_number":738,"context_line":"            LOG.exception(_LE(\u0027error refreshing volume stats\u0027))"},{"line_number":739,"context_line":""},{"line_number":740,"context_line":"        self._stats \u003d stats"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa80f949_b2a8cadc","line":737,"in_reply_to":"fa80f949_71fd8f39","updated":"2015-11-05 04:13:17.000000000","message":"The specific exception is catched in \u0027get_volume_stats\u0027 method of SheepdogClient class.\n\nThis exception message simply works to notify the operator that the error happens for any problems.","commit_id":"48137b7535a39a937b169eadf7a82c9f4fdff523"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"b3f5c779f4eb165c373b41e846a070b0cc6bf1f0","unresolved":false,"context_lines":[{"line_number":735,"context_line":"            stats[\u0027total_capacity_gb\u0027] \u003d total_gb"},{"line_number":736,"context_line":"            stats[\u0027free_capacity_gb\u0027] \u003d free_gb"},{"line_number":737,"context_line":"        except Exception:"},{"line_number":738,"context_line":"            LOG.exception(_LE(\u0027error refreshing volume stats\u0027))"},{"line_number":739,"context_line":""},{"line_number":740,"context_line":"        self._stats \u003d stats"},{"line_number":741,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"fa80f949_f1e89f7e","line":738,"updated":"2015-11-04 19:06:25.000000000","message":"Log message should starts with an upper-case letter","commit_id":"48137b7535a39a937b169eadf7a82c9f4fdff523"},{"author":{"_account_id":10485,"name":"Ankit Agrawal","email":"ankitagrawal8188@gmail.com","username":"ankitagrawal"},"change_message_id":"cf4a8bb44a4bb40707f6495ee005d9864c0f9547","unresolved":false,"context_lines":[{"line_number":338,"context_line":"            _stderr \u003d e.kwargs[\u0027stderr\u0027]"},{"line_number":339,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":340,"context_line":"                if self.QEMU_IMG_RESP_CONNECTION_ERROR in _stderr:"},{"line_number":341,"context_line":"                    LOG.error(_LE(\u0027Failed to connect to sheep daemon.\u0027"},{"line_number":342,"context_line":"                                  \u0027 addr: %(addr)s, port: %(port)s\u0027),"},{"line_number":343,"context_line":"                              {\u0027addr\u0027: self.addr, \u0027port\u0027: self.port})"},{"line_number":344,"context_line":"                elif self.QEMU_IMG_RESP_VDI_NOT_FOUND in _stderr:"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa80f949_9a16f153","line":341,"updated":"2015-11-05 12:05:56.000000000","message":"For multi-line strings space should be added at the end of a line and not at the beginning.\n\nSame comment applies for all the below log messages.","commit_id":"57a46e327cf88e920d03d51adb441fd5592bd86c"},{"author":{"_account_id":10485,"name":"Ankit Agrawal","email":"ankitagrawal8188@gmail.com","username":"ankitagrawal"},"change_message_id":"cf4a8bb44a4bb40707f6495ee005d9864c0f9547","unresolved":false,"context_lines":[{"line_number":400,"context_line":"                      {\u0027image_location\u0027: image_location, \u0027err\u0027: e})"},{"line_number":401,"context_line":"            return _cloneable, _snapshot"},{"line_number":402,"context_line":""},{"line_number":403,"context_line":"        # check whether volume is stored in sheepdog"},{"line_number":404,"context_line":"        (_stdout, _stderr) \u003d self._run_dog(\u0027vdi\u0027, \u0027list\u0027, \u0027-r\u0027, volume_name)"},{"line_number":405,"context_line":"        if _stdout \u003d\u003d \u0027\u0027:"},{"line_number":406,"context_line":"            LOG.debug(\u0027Image %s is not stored in sheepdog.\u0027, volume_name)"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa80f949_3ab10548","line":403,"updated":"2015-11-05 12:05:56.000000000","message":"As pointed by Ivan in previous PS, Comments should start with upper-case letter.","commit_id":"57a46e327cf88e920d03d51adb441fd5592bd86c"},{"author":{"_account_id":10485,"name":"Ankit Agrawal","email":"ankitagrawal8188@gmail.com","username":"ankitagrawal"},"change_message_id":"cf4a8bb44a4bb40707f6495ee005d9864c0f9547","unresolved":false,"context_lines":[{"line_number":412,"context_line":"            return _cloneable, _snapshot"},{"line_number":413,"context_line":""},{"line_number":414,"context_line":"        _cloneable \u003d True"},{"line_number":415,"context_line":"        _snapshot \u003d True"},{"line_number":416,"context_line":"        return _cloneable, _snapshot"},{"line_number":417,"context_line":""},{"line_number":418,"context_line":"    def _parse_location(self, location):"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa80f949_da30f9a0","line":415,"updated":"2015-11-05 12:05:56.000000000","message":"We can remove above two lines by using\n\nreturn True, True","commit_id":"57a46e327cf88e920d03d51adb441fd5592bd86c"},{"author":{"_account_id":13923,"name":"Teruaki Ishizaki","email":"ishizaki.teruaki@lab.ntt.co.jp","username":"tishizaki"},"change_message_id":"fd6a54cdb8a48bf3d4c4b4ca1f029799d8fee691","unresolved":false,"context_lines":[{"line_number":412,"context_line":"            return _cloneable, _snapshot"},{"line_number":413,"context_line":""},{"line_number":414,"context_line":"        _cloneable \u003d True"},{"line_number":415,"context_line":"        _snapshot \u003d True"},{"line_number":416,"context_line":"        return _cloneable, _snapshot"},{"line_number":417,"context_line":""},{"line_number":418,"context_line":"    def _parse_location(self, location):"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa80f949_5c3e25db","line":415,"in_reply_to":"fa80f949_da30f9a0","updated":"2015-11-06 03:33:36.000000000","message":"It is more readable than \u0027return True, True\u0027, so I use variables.","commit_id":"57a46e327cf88e920d03d51adb441fd5592bd86c"},{"author":{"_account_id":10485,"name":"Ankit Agrawal","email":"ankitagrawal8188@gmail.com","username":"ankitagrawal"},"change_message_id":"cf4a8bb44a4bb40707f6495ee005d9864c0f9547","unresolved":false,"context_lines":[{"line_number":418,"context_line":"    def _parse_location(self, location):"},{"line_number":419,"context_line":"        \"\"\"Check Glance and Cinder use the same sheepdog pool or not.\"\"\""},{"line_number":420,"context_line":"        if location is None:"},{"line_number":421,"context_line":"            reason \u003d _(\u0027image_location is NULL.\u0027)"},{"line_number":422,"context_line":"            raise exception.ImageUnacceptable(image_id\u003dlocation, reason\u003dreason)"},{"line_number":423,"context_line":""},{"line_number":424,"context_line":"        prefix \u003d \u0027sheepdog://\u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa80f949_3ae905e7","line":421,"updated":"2015-11-05 12:05:56.000000000","message":"s/ \"image_location\" / \"Image location\"","commit_id":"57a46e327cf88e920d03d51adb441fd5592bd86c"},{"author":{"_account_id":10485,"name":"Ankit Agrawal","email":"ankitagrawal8188@gmail.com","username":"ankitagrawal"},"change_message_id":"cf4a8bb44a4bb40707f6495ee005d9864c0f9547","unresolved":false,"context_lines":[{"line_number":430,"context_line":"        if len(pieces) !\u003d 1:"},{"line_number":431,"context_line":"            reason \u003d _(\u0027Not a sheepdog image.\u0027)"},{"line_number":432,"context_line":"            raise exception.ImageUnacceptable(image_id\u003dlocation, reason\u003dreason)"},{"line_number":433,"context_line":"        if len(pieces[0]) \u003d\u003d 0:"},{"line_number":434,"context_line":"            reason \u003d _(\u0027Blank components.\u0027)"},{"line_number":435,"context_line":"            raise exception.ImageUnacceptable(image_id\u003dlocation, reason\u003dreason)"},{"line_number":436,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"fa80f949_ba909544","line":433,"updated":"2015-11-05 12:05:56.000000000","message":"We can reformat it to,\n\nif not pieces[0]:\n    ....","commit_id":"57a46e327cf88e920d03d51adb441fd5592bd86c"},{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"fcbe76962c44db531f69baa636a8be980473fc15","unresolved":false,"context_lines":[{"line_number":459,"context_line":"            total \u003d float(m.group(1))"},{"line_number":460,"context_line":"            used \u003d float(m.group(2))"},{"line_number":461,"context_line":"            free \u003d float(m.group(3))"},{"line_number":462,"context_line":"        except Exception:"},{"line_number":463,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":464,"context_line":"                LOG.exception(_LE(\u0027Failed to parse stdout of \u0027"},{"line_number":465,"context_line":"                                  \u0027\"dog node list -r\". stdout: %s\u0027), _stdout)"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a8ffd7b_1d9c6d68","line":462,"updated":"2015-12-01 08:32:59.000000000","message":"I think the Exception is too broad. You can catch AttributeError (m is None) and ValueError (float conversion failed).","commit_id":"8d7664630a0092b96db2903105675fb9e3344ac9"},{"author":{"_account_id":10439,"name":"Xi Yang","email":"yang.xi@99cloud.net","username":"phenom"},"change_message_id":"4c98695997ea1055290dc4c709d8efef60f0d1fb","unresolved":false,"context_lines":[{"line_number":676,"context_line":"                    image_service.update(context, image_id, {}, image_file)"},{"line_number":677,"context_line":"        except Exception:"},{"line_number":678,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":679,"context_line":"                msg \u003d _LE(\u0027Failed to copy volume: %(vdiname)s to \u0027"},{"line_number":680,"context_line":"                          \u0027image: %(path)s.\u0027)"},{"line_number":681,"context_line":"                LOG.error(msg, {\u0027vdiname\u0027: volume.name, \u0027path\u0027: tmp})"},{"line_number":682,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"da85f559_5073e54d","line":679,"updated":"2015-11-07 08:41:52.000000000","message":"Seems \u0027_LE\u0027 is not needed here.","commit_id":"8d7664630a0092b96db2903105675fb9e3344ac9"}]}
