)]}'
{"cinder/tests/unit/test_huawei_drivers.py":[{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"12107b30c345461f53e79352e995bfb4c6af0c94","unresolved":false,"context_lines":[{"line_number":3472,"context_line":"                    \"remote_lun_id\": \u00271\u0027}"},{"line_number":3473,"context_line":"        lun_info \u003d self.driver.create_volume(hyper_volume)"},{"line_number":3474,"context_line":"        self.assertEqual(metadata, lun_info[\u0027metadata\u0027])"},{"line_number":3475,"context_line":""},{"line_number":3476,"context_line":""},{"line_number":3477,"context_line":"class HuaweiConfTestCase(test.TestCase):"},{"line_number":3478,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"bae84128_f6234156","line":3475,"updated":"2016-02-23 13:46:40.000000000","message":"A bug fix is supposed to add a new test case, which ensures the bug would not occur again.","commit_id":"4001a25b048958588cab51c5faf3bff7ef122414"},{"author":{"_account_id":11215,"name":"Vivek Dhayaal","email":"vivekdhayaal@gmail.com","username":"vivekdhayaal"},"change_message_id":"4a8867125e3307dd8d5e5c20dc68bd7d99752314","unresolved":false,"context_lines":[{"line_number":2083,"context_line":"    @mock.patch.object(rest_client.RestClient, \u0027get_lun_info\u0027,"},{"line_number":2084,"context_line":"                       return_value\u003d{\"CAPACITY\": 6291456})"},{"line_number":2085,"context_line":"    @mock.patch.object(rest_client.RestClient, \u0027extend_lun\u0027)"},{"line_number":2086,"context_line":"    def test_extend_volume_size_equal(self, mock_extend, mock_lun_info):"},{"line_number":2087,"context_line":"        self.driver.extend_volume(test_volume, 3)"},{"line_number":2088,"context_line":"        self.assertEqual(0, mock_extend.call_count)"},{"line_number":2089,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9aed3d3a_a77377e6","line":2086,"updated":"2016-02-28 17:17:58.000000000","message":"AS Sheel pointed out, we could just fail when the size-to-extend is not larger than current size and then we would not need this test...","commit_id":"5debe0c51defd2fe40a9249d77d5aeb123f3a8c8"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"1be88213f58e388be2f4691d3dcc6b504d36f6d1","unresolved":false,"context_lines":[{"line_number":2083,"context_line":"    @mock.patch.object(rest_client.RestClient, \u0027get_lun_info\u0027,"},{"line_number":2084,"context_line":"                       return_value\u003d{\"CAPACITY\": 6291456})"},{"line_number":2085,"context_line":"    @mock.patch.object(rest_client.RestClient, \u0027extend_lun\u0027)"},{"line_number":2086,"context_line":"    def test_extend_volume_size_equal(self, mock_extend, mock_lun_info):"},{"line_number":2087,"context_line":"        self.driver.extend_volume(test_volume, 3)"},{"line_number":2088,"context_line":"        self.assertEqual(0, mock_extend.call_count)"},{"line_number":2089,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9aed3d3a_b279eeca","line":2086,"in_reply_to":"9aed3d3a_a77377e6","updated":"2016-02-29 01:51:41.000000000","message":"Thanks Vivek Dhayaal, but I think it should not fail when new size is equal to old size and the following two test cases does not contain the case that size is equal, thanks!","commit_id":"5debe0c51defd2fe40a9249d77d5aeb123f3a8c8"}],"cinder/volume/drivers/huawei/huawei_driver.py":[{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"12107b30c345461f53e79352e995bfb4c6af0c94","unresolved":false,"context_lines":[{"line_number":1410,"context_line":"        \"\"\"Obtain volume repliction targets.\"\"\""},{"line_number":1411,"context_line":"        return self.replica.list_replica_targets(vref)"},{"line_number":1412,"context_line":""},{"line_number":1413,"context_line":"    def get_replication_updates(self, context):"},{"line_number":1414,"context_line":"        # NOTE(jlc): The manager does not do aynthing with these updates."},{"line_number":1415,"context_line":"        # When that is changed, here must be modified as well."},{"line_number":1416,"context_line":"        return []"}],"source_content_type":"text/x-python","patch_set":1,"id":"bae84128_96d6354d","line":1413,"updated":"2016-02-23 13:46:40.000000000","message":"What\u0027s the purpose of adding this method? It seems unrelated.","commit_id":"4001a25b048958588cab51c5faf3bff7ef122414"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"347f3d87d3e8b012765087df5011a673ea7d56fb","unresolved":false,"context_lines":[{"line_number":697,"context_line":"        old_size \u003d int(lun_info.get(\u0027CAPACITY\u0027))"},{"line_number":698,"context_line":"        new_size \u003d int(new_size) * units.Gi / 512"},{"line_number":699,"context_line":""},{"line_number":700,"context_line":"        if new_size \u003d\u003d old_size:"},{"line_number":701,"context_line":"            LOG.info(_LI(\"New size is equal to old size, no need to extend.\"))"},{"line_number":702,"context_line":"            return"},{"line_number":703,"context_line":"        if new_size \u003c old_size:"}],"source_content_type":"text/x-python","patch_set":4,"id":"bae84128_ca80db8d","line":700,"updated":"2016-02-24 10:57:35.000000000","message":"These checks are redundant, see https://github.com/openstack/cinder/blob/master/cinder/volume/api.py#L1199","commit_id":"1fc842e84a6b12d91aafb265457ea3bcd6c06c5b"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"c25dfcc6cd2b7d04dd7559bc5bc1e5776d804f8f","unresolved":false,"context_lines":[{"line_number":697,"context_line":"        old_size \u003d int(lun_info.get(\u0027CAPACITY\u0027))"},{"line_number":698,"context_line":"        new_size \u003d int(new_size) * units.Gi / 512"},{"line_number":699,"context_line":""},{"line_number":700,"context_line":"        if new_size \u003d\u003d old_size:"},{"line_number":701,"context_line":"            LOG.info(_LI(\"New size is equal to old size, no need to extend.\"))"},{"line_number":702,"context_line":"            return"},{"line_number":703,"context_line":"        if new_size \u003c old_size:"}],"source_content_type":"text/x-python","patch_set":4,"id":"bae84128_0a40f105","line":700,"in_reply_to":"bae84128_ca80db8d","updated":"2016-02-24 15:10:10.000000000","message":"Vipin Balachandran, a good point out. I was gonna to explain this in the commit message: We do this change just to prevent that users extend the LUN on the array directly, for example from 1G to 3G, then some time later, they extend the size from 1G to 3G on the Cinder side. This really may occur and we should handle this an check the real size of the LUN.","commit_id":"1fc842e84a6b12d91aafb265457ea3bcd6c06c5b"},{"author":{"_account_id":14865,"name":"Adriano Freires Rosso","email":"adriano.rosso@fit-tecnologia.org.br","username":"adriano_rosso"},"change_message_id":"6e1aada6cf11216c56861314cc9a049467c3c88e","unresolved":false,"context_lines":[{"line_number":700,"context_line":"        if new_size \u003d\u003d old_size:"},{"line_number":701,"context_line":"            LOG.info(_LI(\"New size is equal to old size, no need to extend.\"))"},{"line_number":702,"context_line":"            return"},{"line_number":703,"context_line":"        if new_size \u003c old_size:"},{"line_number":704,"context_line":"            msg \u003d (_(\"New size must be equal or bigger than the old size.\"))"},{"line_number":705,"context_line":"            LOG.error(msg)"},{"line_number":706,"context_line":"            raise exception.VolumeBackendAPIException(data\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9aed3d3a_e058a98c","line":703,"range":{"start_line":703,"start_character":11,"end_line":703,"end_character":30},"updated":"2016-02-29 13:38:00.000000000","message":"Extend requests with \"new_size \u003c old_size\" won\u0027t get to the driver. If you try to do this, the following output is returned by cinder api:\n\ncinder extend d6df0a99-158f-45c3-8523-c08380c1d265 1\n\nERROR: Invalid input received: New size for extend must be greater than current size. (current: 2, extended: 1). (HTTP 400) (Request-ID: req-8a383d4f-acef-4783-8530-74394d2935e5)\n\nSo, I guess this code will never be executed.","commit_id":"5debe0c51defd2fe40a9249d77d5aeb123f3a8c8"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"28b074e60fe6c3ee9e921c6ce9eab89a0f47299a","unresolved":false,"context_lines":[{"line_number":700,"context_line":"        if new_size \u003d\u003d old_size:"},{"line_number":701,"context_line":"            LOG.info(_LI(\"New size is equal to old size, no need to extend.\"))"},{"line_number":702,"context_line":"            return"},{"line_number":703,"context_line":"        if new_size \u003c old_size:"},{"line_number":704,"context_line":"            msg \u003d (_(\"New size must be equal or bigger than the old size.\"))"},{"line_number":705,"context_line":"            LOG.error(msg)"},{"line_number":706,"context_line":"            raise exception.VolumeBackendAPIException(data\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9aed3d3a_fcb2e54a","line":703,"range":{"start_line":703,"start_character":11,"end_line":703,"end_character":30},"in_reply_to":"9aed3d3a_e058a98c","updated":"2016-03-01 03:37:10.000000000","message":"old_size is not the size from the cinder side, but the real size from the array backend side. Users may changed the size directly on the array.","commit_id":"5debe0c51defd2fe40a9249d77d5aeb123f3a8c8"},{"author":{"_account_id":16308,"name":"Sheel Rana","email":"ranasheel2000@gmail.com","username":"sheel.rana"},"change_message_id":"d44177092b7af91d93cea58c95c9d869c9e5f786","unresolved":false,"context_lines":[{"line_number":701,"context_line":"            LOG.info(_LI(\"New size is equal to old size, no need to extend.\"))"},{"line_number":702,"context_line":"            return"},{"line_number":703,"context_line":"        if new_size \u003c old_size:"},{"line_number":704,"context_line":"            msg \u003d (_(\"New size must be equal or bigger than the old size.\"))"},{"line_number":705,"context_line":"            LOG.error(msg)"},{"line_number":706,"context_line":"            raise exception.VolumeBackendAPIException(data\u003dmsg)"},{"line_number":707,"context_line":"        volume_name \u003d huawei_utils.encode_name(volume[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":5,"id":"9aed3d3a_f9d7e9ea","line":704,"range":{"start_line":704,"start_character":22,"end_line":704,"end_character":72},"updated":"2016-02-28 04:56:44.000000000","message":"One query out of curiosity :)\nWhy we want to return gracefully in case new and old sizes are equal, is not it ok to report exception if sizes are equal instead of reporting user that we need equal size for extension.\nIf this is ok, we can keep single check for \u003d\u003d and \u003c.\nPlease confirm.","commit_id":"5debe0c51defd2fe40a9249d77d5aeb123f3a8c8"},{"author":{"_account_id":14305,"name":"Yuriy Nesenenko","email":"ynesenenko@mirantis.com","username":"yuriy_n"},"change_message_id":"350f303e876b5fc513aa96269f40e52660febbe6","unresolved":false,"context_lines":[{"line_number":701,"context_line":"            LOG.info(_LI(\"New size is equal to old size, no need to extend.\"))"},{"line_number":702,"context_line":"            return"},{"line_number":703,"context_line":"        if new_size \u003c old_size:"},{"line_number":704,"context_line":"            msg \u003d (_(\"New size must be equal or bigger than the old size.\"))"},{"line_number":705,"context_line":"            LOG.error(msg)"},{"line_number":706,"context_line":"            raise exception.VolumeBackendAPIException(data\u003dmsg)"},{"line_number":707,"context_line":"        volume_name \u003d huawei_utils.encode_name(volume[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":5,"id":"9aed3d3a_82156f4a","line":704,"range":{"start_line":704,"start_character":22,"end_line":704,"end_character":72},"in_reply_to":"9aed3d3a_6e0f7a88","updated":"2016-02-29 10:14:05.000000000","message":"IMO, the new size must be bigger than the old size otherwise it\u0027s not extension. And msg should be smth like that:\n\nmsg \u003d (_(\"New size must be bigger than %s\"), old_size)","commit_id":"5debe0c51defd2fe40a9249d77d5aeb123f3a8c8"},{"author":{"_account_id":16308,"name":"Sheel Rana","email":"ranasheel2000@gmail.com","username":"sheel.rana"},"change_message_id":"3edd4d31930fa28494d06e2accb0d929c7fcd4fa","unresolved":false,"context_lines":[{"line_number":701,"context_line":"            LOG.info(_LI(\"New size is equal to old size, no need to extend.\"))"},{"line_number":702,"context_line":"            return"},{"line_number":703,"context_line":"        if new_size \u003c old_size:"},{"line_number":704,"context_line":"            msg \u003d (_(\"New size must be equal or bigger than the old size.\"))"},{"line_number":705,"context_line":"            LOG.error(msg)"},{"line_number":706,"context_line":"            raise exception.VolumeBackendAPIException(data\u003dmsg)"},{"line_number":707,"context_line":"        volume_name \u003d huawei_utils.encode_name(volume[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":5,"id":"9aed3d3a_6e0f7a88","line":704,"range":{"start_line":704,"start_character":22,"end_line":704,"end_character":72},"in_reply_to":"9aed3d3a_d24912b9","updated":"2016-02-29 08:36:14.000000000","message":"I am ok with your thinking.\nRemoving -1 if you want to continue with it.\n\nBut logically it seems invalid that \"new size must be equal to old size for extension\".","commit_id":"5debe0c51defd2fe40a9249d77d5aeb123f3a8c8"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"1be88213f58e388be2f4691d3dcc6b504d36f6d1","unresolved":false,"context_lines":[{"line_number":701,"context_line":"            LOG.info(_LI(\"New size is equal to old size, no need to extend.\"))"},{"line_number":702,"context_line":"            return"},{"line_number":703,"context_line":"        if new_size \u003c old_size:"},{"line_number":704,"context_line":"            msg \u003d (_(\"New size must be equal or bigger than the old size.\"))"},{"line_number":705,"context_line":"            LOG.error(msg)"},{"line_number":706,"context_line":"            raise exception.VolumeBackendAPIException(data\u003dmsg)"},{"line_number":707,"context_line":"        volume_name \u003d huawei_utils.encode_name(volume[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":5,"id":"9aed3d3a_d24912b9","line":704,"range":{"start_line":704,"start_character":22,"end_line":704,"end_character":72},"in_reply_to":"9aed3d3a_f9d7e9ea","updated":"2016-02-29 01:51:41.000000000","message":"If new size is equal to old size, I think it\u0027s ok just let it go, and no need for a exception and fails.","commit_id":"5debe0c51defd2fe40a9249d77d5aeb123f3a8c8"}]}
