)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"98f824817ac502256cab7b7f3efda2ed4459e116","unresolved":false,"context_lines":[{"line_number":10,"context_line":"in huawei driver. But in the driver API:\"When calculating the size, round"},{"line_number":11,"context_line":"up to the next GB.\" This patch fixes it by returning the ceiling of volume"},{"line_number":12,"context_line":"size."},{"line_number":13,"context_line":"https://github.com/openstack/cinder/blob/master/cinder/volume/driver.py#L1814"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I6ccbc096ecd1d0723204c2caca4684ec63baafbd"},{"line_number":16,"context_line":"Closes-Bug: #1587421"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9abb7d3a_229edcb8","line":13,"updated":"2016-06-01 18:48:48.000000000","message":"I think you should remove this because the line number corresponding to the driver API documentation will change.","commit_id":"6969a69820d58653e0eb6e598033873fd20dfa1d"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"1afc005df5768a0bc2185de90d6eafb52ac05056","unresolved":false,"context_lines":[{"line_number":10,"context_line":"in huawei driver. But in the driver API:\"When calculating the size, round"},{"line_number":11,"context_line":"up to the next GB.\" This patch fixes it by returning the ceiling of volume"},{"line_number":12,"context_line":"size."},{"line_number":13,"context_line":"https://github.com/openstack/cinder/blob/master/cinder/volume/driver.py"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I6ccbc096ecd1d0723204c2caca4684ec63baafbd"},{"line_number":16,"context_line":"Closes-Bug: #1587421"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9abb7d3a_33757563","line":13,"updated":"2016-06-02 07:16:59.000000000","message":"Please remove this line completely if you post one more patch.","commit_id":"26f04f75dbb72ffaf569647210e46db913f377e6"},{"author":{"_account_id":20146,"name":"yuyafei","email":"yu.yafei@foxmail.com","username":"yuyafei"},"change_message_id":"6dfa165ca01146a0a8b85d9fbba3dec2a272e853","unresolved":false,"context_lines":[{"line_number":10,"context_line":"in huawei driver. But in the driver API:\"When calculating the size, round"},{"line_number":11,"context_line":"up to the next GB.\" This patch fixes it by returning the ceiling of volume"},{"line_number":12,"context_line":"size."},{"line_number":13,"context_line":"https://github.com/openstack/cinder/blob/master/cinder/volume/driver.py"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I6ccbc096ecd1d0723204c2caca4684ec63baafbd"},{"line_number":16,"context_line":"Closes-Bug: #1587421"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9abb7d3a_d3b509ed","line":13,"in_reply_to":"9abb7d3a_33757563","updated":"2016-06-02 07:20:38.000000000","message":"Done","commit_id":"26f04f75dbb72ffaf569647210e46db913f377e6"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"2e5d6dda2edd96deb10687ae78b7452dc0294b43","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Huawei driver should return ceiling of volume size"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The function manage_existing_get_size returns the floor of volume"},{"line_number":10,"context_line":"size in huawei driver. But in the driver API:\"When calculating the"},{"line_number":11,"context_line":"size, round up to the next GB.\" This patch fixes it by returning"},{"line_number":12,"context_line":"the ceiling of volume size."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"7aa08908_fe245460","line":10,"range":{"start_line":10,"start_character":23,"end_line":10,"end_character":45},"updated":"2016-06-09 09:02:05.000000000","message":"nit: Maybe be a little bit more verbose: \"But in the ManageableVD method it\u0027s implementing the docstring states:\"","commit_id":"f79dfe25519ec3d3690b82664e1436c630a9c7f7"}],"cinder/tests/unit/test_huawei_drivers.py":[{"author":{"_account_id":18737,"name":"KongWei","email":"kong.wei2@zte.com.cn","username":"kongwei"},"change_message_id":"958845116760e023e5890d18dc95b47658950c2e","unresolved":false,"context_lines":[{"line_number":2456,"context_line":"    @ddt.data({\u0027source-id\u0027: \u0027ID1\u0027}, {\u0027source-name\u0027: \u0027LUN1\u0027},"},{"line_number":2457,"context_line":"              {\u0027source-name\u0027: \u0027LUN1\u0027, \u0027source-id\u0027: \u0027ID1\u0027})"},{"line_number":2458,"context_line":"    @mock.patch.object(rest_client.RestClient, \u0027get_lun_info\u0027,"},{"line_number":2459,"context_line":"                       return_value\u003d{\u0027CAPACITY\u0027: 3097152})"},{"line_number":2460,"context_line":"    @mock.patch.object(rest_client.RestClient, \u0027get_lun_id_by_name\u0027,"},{"line_number":2461,"context_line":"                       return_value\u003d\u0027ID1\u0027)"},{"line_number":2462,"context_line":"    def test_manage_existing_get_size_success(self, mock_get_lun_id_by_name,"}],"source_content_type":"text/x-python","patch_set":3,"id":"7aa08908_e5030a0c","line":2459,"updated":"2016-06-05 14:11:26.000000000","message":"Magic number?","commit_id":"be034e07786e3b6385a9ffabd32411acf12366e5"},{"author":{"_account_id":20146,"name":"yuyafei","email":"yu.yafei@foxmail.com","username":"yuyafei"},"change_message_id":"a5e9466e0ee979faaee1b87bb050b6b3920cbd4e","unresolved":false,"context_lines":[{"line_number":2456,"context_line":"    @ddt.data({\u0027source-id\u0027: \u0027ID1\u0027}, {\u0027source-name\u0027: \u0027LUN1\u0027},"},{"line_number":2457,"context_line":"              {\u0027source-name\u0027: \u0027LUN1\u0027, \u0027source-id\u0027: \u0027ID1\u0027})"},{"line_number":2458,"context_line":"    @mock.patch.object(rest_client.RestClient, \u0027get_lun_info\u0027,"},{"line_number":2459,"context_line":"                       return_value\u003d{\u0027CAPACITY\u0027: 3097152})"},{"line_number":2460,"context_line":"    @mock.patch.object(rest_client.RestClient, \u0027get_lun_id_by_name\u0027,"},{"line_number":2461,"context_line":"                       return_value\u003d\u0027ID1\u0027)"},{"line_number":2462,"context_line":"    def test_manage_existing_get_size_success(self, mock_get_lun_id_by_name,"}],"source_content_type":"text/x-python","patch_set":3,"id":"7aa08908_b6adba8a","line":2459,"in_reply_to":"7aa08908_e5030a0c","updated":"2016-06-06 01:10:41.000000000","message":"Thank you for your attention.\nIn huawei driver, 2097150 is 1GB, 3097152 is a volume size which between 1GB and 2GB.","commit_id":"be034e07786e3b6385a9ffabd32411acf12366e5"}],"cinder/volume/drivers/huawei/huawei_driver.py":[{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"98f824817ac502256cab7b7f3efda2ed4459e116","unresolved":false,"context_lines":[{"line_number":1369,"context_line":"    def manage_existing_get_size(self, volume, external_ref):"},{"line_number":1370,"context_line":"        \"\"\"Get the size of the existing volume.\"\"\""},{"line_number":1371,"context_line":"        lun_info \u003d self._get_lun_info_by_ref(external_ref)"},{"line_number":1372,"context_line":"        size \u003d float(lun_info.get(\u0027CAPACITY\u0027)) / constants.CAPACITY_UNIT"},{"line_number":1373,"context_line":"        return int(math.ceil(size))"},{"line_number":1374,"context_line":""},{"line_number":1375,"context_line":"    def _check_snapshot_valid_for_manage(self, snapshot_info, external_ref):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9abb7d3a_c2bef0ac","line":1372,"range":{"start_line":1372,"start_character":15,"end_line":1372,"end_character":20},"updated":"2016-06-01 18:48:48.000000000","message":"float is not needed, constants.CAPACITY_UNIT is a float.","commit_id":"6969a69820d58653e0eb6e598033873fd20dfa1d"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"6fb03f29946b8af28abebab74a60a9c69331cd2e","unresolved":false,"context_lines":[{"line_number":1369,"context_line":"    def manage_existing_get_size(self, volume, external_ref):"},{"line_number":1370,"context_line":"        \"\"\"Get the size of the existing volume.\"\"\""},{"line_number":1371,"context_line":"        lun_info \u003d self._get_lun_info_by_ref(external_ref)"},{"line_number":1372,"context_line":"        size \u003d int(math.ceil(lun_info.get(\u0027CAPACITY\u0027) /"},{"line_number":1373,"context_line":"                             constants.CAPACITY_UNIT))"},{"line_number":1374,"context_line":"        return size"},{"line_number":1375,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7aa08908_775c1019","line":1372,"range":{"start_line":1372,"start_character":29,"end_line":1372,"end_character":53},"updated":"2016-06-09 05:18:10.000000000","message":"Looks like we need to cast it to float, else the division will result in floor (in python 2).","commit_id":"f79dfe25519ec3d3690b82664e1436c630a9c7f7"},{"author":{"_account_id":16883,"name":"huyang","email":"huyang1@huawei.com","username":"huyang"},"change_message_id":"a79c4e678aefa4923f71eb94199f7a302500e436","unresolved":false,"context_lines":[{"line_number":1369,"context_line":"    def manage_existing_get_size(self, volume, external_ref):"},{"line_number":1370,"context_line":"        \"\"\"Get the size of the existing volume.\"\"\""},{"line_number":1371,"context_line":"        lun_info \u003d self._get_lun_info_by_ref(external_ref)"},{"line_number":1372,"context_line":"        size \u003d int(math.ceil(lun_info.get(\u0027CAPACITY\u0027) /"},{"line_number":1373,"context_line":"                             constants.CAPACITY_UNIT))"},{"line_number":1374,"context_line":"        return size"},{"line_number":1375,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7aa08908_d32ab18f","line":1372,"range":{"start_line":1372,"start_character":8,"end_line":1372,"end_character":12},"updated":"2016-06-12 07:25:55.000000000","message":"Why delete the exception when remainder \u003e 0? Maybe occur error.","commit_id":"f79dfe25519ec3d3690b82664e1436c630a9c7f7"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"2e5d6dda2edd96deb10687ae78b7452dc0294b43","unresolved":false,"context_lines":[{"line_number":1369,"context_line":"    def manage_existing_get_size(self, volume, external_ref):"},{"line_number":1370,"context_line":"        \"\"\"Get the size of the existing volume.\"\"\""},{"line_number":1371,"context_line":"        lun_info \u003d self._get_lun_info_by_ref(external_ref)"},{"line_number":1372,"context_line":"        size \u003d int(math.ceil(lun_info.get(\u0027CAPACITY\u0027) /"},{"line_number":1373,"context_line":"                             constants.CAPACITY_UNIT))"},{"line_number":1374,"context_line":"        return size"},{"line_number":1375,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7aa08908_4305cf43","line":1372,"range":{"start_line":1372,"start_character":29,"end_line":1372,"end_character":53},"in_reply_to":"7aa08908_0f8130fb","updated":"2016-06-09 09:02:05.000000000","message":"I agree, there\u0027s no need for a cast to float.","commit_id":"f79dfe25519ec3d3690b82664e1436c630a9c7f7"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"fc5057f896926f9025d367a8da09b2ddb8c267fe","unresolved":false,"context_lines":[{"line_number":1369,"context_line":"    def manage_existing_get_size(self, volume, external_ref):"},{"line_number":1370,"context_line":"        \"\"\"Get the size of the existing volume.\"\"\""},{"line_number":1371,"context_line":"        lun_info \u003d self._get_lun_info_by_ref(external_ref)"},{"line_number":1372,"context_line":"        size \u003d int(math.ceil(lun_info.get(\u0027CAPACITY\u0027) /"},{"line_number":1373,"context_line":"                             constants.CAPACITY_UNIT))"},{"line_number":1374,"context_line":"        return size"},{"line_number":1375,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7aa08908_0eac8b34","line":1372,"range":{"start_line":1372,"start_character":29,"end_line":1372,"end_character":53},"in_reply_to":"7aa08908_0f8130fb","updated":"2016-06-09 10:01:56.000000000","message":"Sorry, I totally missed that. You have lot of patches for fixing manage_existing_get_size :)\n\nAnd I got confused with the values in your unit test. Do we need to change the value in the unit test to float?","commit_id":"f79dfe25519ec3d3690b82664e1436c630a9c7f7"},{"author":{"_account_id":1207,"name":"Duncan Thomas","email":"duncan.thomas@gmail.com","username":"duncan-thomas"},"change_message_id":"d9fccc8cfe2e89f88c5b8731c8e4e91582b22e8b","unresolved":false,"context_lines":[{"line_number":1369,"context_line":"    def manage_existing_get_size(self, volume, external_ref):"},{"line_number":1370,"context_line":"        \"\"\"Get the size of the existing volume.\"\"\""},{"line_number":1371,"context_line":"        lun_info \u003d self._get_lun_info_by_ref(external_ref)"},{"line_number":1372,"context_line":"        size \u003d int(math.ceil(lun_info.get(\u0027CAPACITY\u0027) /"},{"line_number":1373,"context_line":"                             constants.CAPACITY_UNIT))"},{"line_number":1374,"context_line":"        return size"},{"line_number":1375,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3aaa91ec_62a1fb93","line":1372,"range":{"start_line":1372,"start_character":8,"end_line":1372,"end_character":12},"in_reply_to":"7aa08908_399e3363","updated":"2016-06-26 19:06:56.000000000","message":"The block device will be of the real size of the lun, only the quota and display size is wrong. This is true of all drivers.","commit_id":"f79dfe25519ec3d3690b82664e1436c630a9c7f7"},{"author":{"_account_id":20146,"name":"yuyafei","email":"yu.yafei@foxmail.com","username":"yuyafei"},"change_message_id":"7d5feb6993a5e649ddc4ea1c70d4504d13a886c1","unresolved":false,"context_lines":[{"line_number":1369,"context_line":"    def manage_existing_get_size(self, volume, external_ref):"},{"line_number":1370,"context_line":"        \"\"\"Get the size of the existing volume.\"\"\""},{"line_number":1371,"context_line":"        lun_info \u003d self._get_lun_info_by_ref(external_ref)"},{"line_number":1372,"context_line":"        size \u003d int(math.ceil(lun_info.get(\u0027CAPACITY\u0027) /"},{"line_number":1373,"context_line":"                             constants.CAPACITY_UNIT))"},{"line_number":1374,"context_line":"        return size"},{"line_number":1375,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7aa08908_0f8130fb","line":1372,"range":{"start_line":1372,"start_character":29,"end_line":1372,"end_character":53},"in_reply_to":"7aa08908_775c1019","updated":"2016-06-09 07:12:11.000000000","message":"As you said in set1:float is not needed, constants.CAPACITY_UNIT is a float.","commit_id":"f79dfe25519ec3d3690b82664e1436c630a9c7f7"},{"author":{"_account_id":16883,"name":"huyang","email":"huyang1@huawei.com","username":"huyang"},"change_message_id":"e4d50a31f6c4eb74ba81f1533a0c720d36b916a5","unresolved":false,"context_lines":[{"line_number":1369,"context_line":"    def manage_existing_get_size(self, volume, external_ref):"},{"line_number":1370,"context_line":"        \"\"\"Get the size of the existing volume.\"\"\""},{"line_number":1371,"context_line":"        lun_info \u003d self._get_lun_info_by_ref(external_ref)"},{"line_number":1372,"context_line":"        size \u003d int(math.ceil(lun_info.get(\u0027CAPACITY\u0027) /"},{"line_number":1373,"context_line":"                             constants.CAPACITY_UNIT))"},{"line_number":1374,"context_line":"        return size"},{"line_number":1375,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7aa08908_d9372fe1","line":1372,"range":{"start_line":1372,"start_character":8,"end_line":1372,"end_character":12},"in_reply_to":"7aa08908_ce184678","updated":"2016-06-14 07:20:31.000000000","message":"If the lun size is 0.5G on array, then we using \"ceil\" import the the lun as 1G on OpenStack. User on OpenStack can see the volume as 1GB, then write 1GB file to the volume, IO error occur?","commit_id":"f79dfe25519ec3d3690b82664e1436c630a9c7f7"},{"author":{"_account_id":20146,"name":"yuyafei","email":"yu.yafei@foxmail.com","username":"yuyafei"},"change_message_id":"75e504a41d057340dcf07d2a97a0b5319b0b3bde","unresolved":false,"context_lines":[{"line_number":1369,"context_line":"    def manage_existing_get_size(self, volume, external_ref):"},{"line_number":1370,"context_line":"        \"\"\"Get the size of the existing volume.\"\"\""},{"line_number":1371,"context_line":"        lun_info \u003d self._get_lun_info_by_ref(external_ref)"},{"line_number":1372,"context_line":"        size \u003d int(math.ceil(lun_info.get(\u0027CAPACITY\u0027) /"},{"line_number":1373,"context_line":"                             constants.CAPACITY_UNIT))"},{"line_number":1374,"context_line":"        return size"},{"line_number":1375,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7aa08908_ce184678","line":1372,"range":{"start_line":1372,"start_character":8,"end_line":1372,"end_character":12},"in_reply_to":"7aa08908_d32ab18f","updated":"2016-06-12 07:32:29.000000000","message":"Thank you.\nIn pre code, if the volume to be managed is between 0G and 1G, the size would be 0G in python 2. But now we get the ceiling of size, 0G could not happen.","commit_id":"f79dfe25519ec3d3690b82664e1436c630a9c7f7"},{"author":{"_account_id":20146,"name":"yuyafei","email":"yu.yafei@foxmail.com","username":"yuyafei"},"change_message_id":"9dd3c272c25a59caad9c01179b4840911abb3412","unresolved":false,"context_lines":[{"line_number":1369,"context_line":"    def manage_existing_get_size(self, volume, external_ref):"},{"line_number":1370,"context_line":"        \"\"\"Get the size of the existing volume.\"\"\""},{"line_number":1371,"context_line":"        lun_info \u003d self._get_lun_info_by_ref(external_ref)"},{"line_number":1372,"context_line":"        size \u003d int(math.ceil(lun_info.get(\u0027CAPACITY\u0027) /"},{"line_number":1373,"context_line":"                             constants.CAPACITY_UNIT))"},{"line_number":1374,"context_line":"        return size"},{"line_number":1375,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7aa08908_399e3363","line":1372,"range":{"start_line":1372,"start_character":8,"end_line":1372,"end_character":12},"in_reply_to":"7aa08908_d9372fe1","updated":"2016-06-16 11:04:10.000000000","message":"Thank you.\nIn the driver API: \"When calculating the size, round up to the next GB.\" See https://github.com/openstack/cinder/blob/master/cinder/volume/driver.py#L1819. \nI think huawei driver should be consistent with the driver api.","commit_id":"f79dfe25519ec3d3690b82664e1436c630a9c7f7"}]}
