)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"8ffc575ab15fcff68038cce2502543c955c76077","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Implement extend_volume method to Block Device driver"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch adds the extend_volume method to Block Device driver."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: I6ca7ba4a407ab7d8171fc7d5d6fcb60a29de8f6b"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"9a1a9d01_cc66a629","line":10,"updated":"2015-09-30 11:42:40.000000000","message":"Related blueprint: block-device-driver-minimum-features-set","commit_id":"b08a6f60795552c33bb0e44ae83416b7e1a34f46"},{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"68d2703664612700b1c700e41c1988674a716200","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Implement extend_volume method to Block Device driver"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch adds the extend_volume method to Block Device driver."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Related blueprint: block-device-driver-minimum-features-set"},{"line_number":12,"context_line":"Change-Id: I6ca7ba4a407ab7d8171fc7d5d6fcb60a29de8f6b"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"9a1a9d01_cd33f6f4","line":9,"updated":"2015-09-30 16:06:05.000000000","message":"I think that the body here should be a little more verbose. I understand that this is part of the push to get the minimum features for block device drivers set up so maybe just mentioning that? Just so that you have more than just the title in the body. Thanks!","commit_id":"a2ed77fc850f450cf4836ab8dbef532dd5bf729d"}],"cinder/volume/drivers/block_device.py":[{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"24fd8f40988e0db75ee0981c739f0f8a5546a3eb","unresolved":false,"context_lines":[{"line_number":195,"context_line":"        total_size \u003d self._get_device_size([dev_path])"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"        if total_size[dev_path] \u003c new_size:"},{"line_number":198,"context_line":"            raise exception.CinderException(_(\"No enough free disk space on \""},{"line_number":199,"context_line":"                                              \"%(dev)s for volume %(vol_id)s.\")"},{"line_number":200,"context_line":"                                            % {\u0027dev\u0027: dev_path,"},{"line_number":201,"context_line":"                                               \u0027vol_id\u0027: volume[\u0027id\u0027]})"}],"source_content_type":"text/x-python","patch_set":1,"id":"da20952f_f6ad399c","line":198,"updated":"2015-09-08 13:46:16.000000000","message":"We should clean this message up a little if we can, and you can use the resource tag for the message and get rid of the dict and the matching you have here.\n\nso for example:\n\"Insufficient free space available to extend volume.\", resource\u003dvolume\n\nThat resource tag will give the output of the volume ID for you all formatted properly.  If you think we need the dev_path info you can add that, but I don\u0027t think that\u0027s necessary myself.","commit_id":"c67c8fc2e78c5e781df677c9e79d9545353a166c"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"8ffc575ab15fcff68038cce2502543c955c76077","unresolved":false,"context_lines":[{"line_number":196,"context_line":"        dev_path \u003d self.local_path(volume)"},{"line_number":197,"context_line":"        total_size \u003d self._get_devices_sizes([dev_path])"},{"line_number":198,"context_line":"        # Convert from Megabytes to Gigabytes"},{"line_number":199,"context_line":"        size \u003d total_size[dev_path] \u003e\u003e 10"},{"line_number":200,"context_line":"        if size \u003c new_size:"},{"line_number":201,"context_line":"            msg \u003d _(\"Insufficient free space available to extend volume.\")"},{"line_number":202,"context_line":"            LOG.exception(msg, resource\u003dvolume)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a1a9d01_4c7b76c1","line":199,"updated":"2015-09-30 11:42:40.000000000","message":"Please, use oslo.units here","commit_id":"b08a6f60795552c33bb0e44ae83416b7e1a34f46"},{"author":{"_account_id":14305,"name":"Yuriy Nesenenko","email":"ynesenenko@mirantis.com","username":"yuriy_n"},"change_message_id":"e052d95e714f7001929cf32f1984097a263564ac","unresolved":false,"context_lines":[{"line_number":196,"context_line":"        dev_path \u003d self.local_path(volume)"},{"line_number":197,"context_line":"        total_size \u003d self._get_devices_sizes([dev_path])"},{"line_number":198,"context_line":"        # Convert from Megabytes to Gigabytes"},{"line_number":199,"context_line":"        size \u003d total_size[dev_path] \u003e\u003e 10"},{"line_number":200,"context_line":"        if size \u003c new_size:"},{"line_number":201,"context_line":"            msg \u003d _(\"Insufficient free space available to extend volume.\")"},{"line_number":202,"context_line":"            LOG.exception(msg, resource\u003dvolume)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a1a9d01_ddcdee31","line":199,"in_reply_to":"9a1a9d01_4c7b76c1","updated":"2015-09-30 12:58:59.000000000","message":"I don\u0027t think it\u0027s a good idea to put down here total_size[...] / units.Ki because we convert the size from Megabytes to Gigabytes.","commit_id":"b08a6f60795552c33bb0e44ae83416b7e1a34f46"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"8ffc575ab15fcff68038cce2502543c955c76077","unresolved":false,"context_lines":[{"line_number":199,"context_line":"        size \u003d total_size[dev_path] \u003e\u003e 10"},{"line_number":200,"context_line":"        if size \u003c new_size:"},{"line_number":201,"context_line":"            msg \u003d _(\"Insufficient free space available to extend volume.\")"},{"line_number":202,"context_line":"            LOG.exception(msg, resource\u003dvolume)"},{"line_number":203,"context_line":"            raise exception.CinderException(msg)"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"    # #######  Interface methods for DataPath (Target Driver) ########"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a1a9d01_8c43ce6b","line":202,"updated":"2015-09-30 11:42:40.000000000","message":"LOG.exception \u003d\u003e LOG.error","commit_id":"b08a6f60795552c33bb0e44ae83416b7e1a34f46"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"7067019ab59546e024285fc91600a696ef8bc17b","unresolved":false,"context_lines":[{"line_number":157,"context_line":"                used_devices.add(local_path)"},{"line_number":158,"context_line":"        return used_devices"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    def _get_devices_sizes(self, dev_paths):"},{"line_number":161,"context_line":"        \"\"\"Return dictionary {\u0027device_name\u0027: size_in_mb}\"\"\""},{"line_number":162,"context_line":"        out, _err \u003d self._execute(\u0027blockdev\u0027, \u0027--getsize64\u0027, *dev_paths,"},{"line_number":163,"context_line":"                                  run_as_root\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a1a9d01_638ae465","line":160,"updated":"2015-10-01 03:39:03.000000000","message":"In the future if you\u0027re going to do docstrings for method info you should go all out and do it formally:  \"param: xxxx: yyyy\" etc\n\nAlso I personally don\u0027t like having them for private methods, but none of that has anything to do with your patch.","commit_id":"f124f002ef79645c2986f30ce3e7f0f207fed27a"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"a6fa60420419b16510e039925e2f82d2ec551cde","unresolved":false,"context_lines":[{"line_number":163,"context_line":"                                  run_as_root\u003dTrue)"},{"line_number":164,"context_line":"        dev_sizes \u003d {}"},{"line_number":165,"context_line":"        out \u003d out.split(\u0027\\n\u0027)"},{"line_number":166,"context_line":"        for n, size in enumerate(out[:-1]):"},{"line_number":167,"context_line":"            dev_sizes[dev_paths[n]] \u003d int(size) \u003e\u003e 20"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"        return dev_sizes"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a1a9d01_1f057012","line":166,"updated":"2015-10-01 09:59:20.000000000","message":"IMO, we need to add the comment why do we use enumerate(out[:-1]) here","commit_id":"f124f002ef79645c2986f30ce3e7f0f207fed27a"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"7067019ab59546e024285fc91600a696ef8bc17b","unresolved":false,"context_lines":[{"line_number":163,"context_line":"                                  run_as_root\u003dTrue)"},{"line_number":164,"context_line":"        dev_sizes \u003d {}"},{"line_number":165,"context_line":"        out \u003d out.split(\u0027\\n\u0027)"},{"line_number":166,"context_line":"        for n, size in enumerate(out[:-1]):"},{"line_number":167,"context_line":"            dev_sizes[dev_paths[n]] \u003d int(size) \u003e\u003e 20"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"        return dev_sizes"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a1a9d01_83e0582a","line":166,"updated":"2015-10-01 03:39:03.000000000","message":"seems like kind of a weird method but seems to work :)","commit_id":"f124f002ef79645c2986f30ce3e7f0f207fed27a"},{"author":{"_account_id":14305,"name":"Yuriy Nesenenko","email":"ynesenenko@mirantis.com","username":"yuriy_n"},"change_message_id":"624a080b5e5875dd2dd9135c355ec177e902d02e","unresolved":false,"context_lines":[{"line_number":163,"context_line":"                                  run_as_root\u003dTrue)"},{"line_number":164,"context_line":"        dev_sizes \u003d {}"},{"line_number":165,"context_line":"        out \u003d out.split(\u0027\\n\u0027)"},{"line_number":166,"context_line":"        for n, size in enumerate(out[:-1]):"},{"line_number":167,"context_line":"            dev_sizes[dev_paths[n]] \u003d int(size) \u003e\u003e 20"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"        return dev_sizes"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a1a9d01_bcac929f","line":166,"in_reply_to":"9a1a9d01_83e0582a","updated":"2015-10-01 09:20:30.000000000","message":"Nothing weird.;) This is just the fastest way to divide an integer by 1024**2. As you know 1024\u003d2**10 then 1024**2\u003d2**20. And a right-shift operation is much faster than a division.","commit_id":"f124f002ef79645c2986f30ce3e7f0f207fed27a"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"7067019ab59546e024285fc91600a696ef8bc17b","unresolved":false,"context_lines":[{"line_number":200,"context_line":"        if size \u003c new_size:"},{"line_number":201,"context_line":"            msg \u003d _(\"Insufficient free space available to extend volume.\")"},{"line_number":202,"context_line":"            LOG.error(msg, resource\u003dvolume)"},{"line_number":203,"context_line":"            raise exception.CinderException(msg)"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"    # #######  Interface methods for DataPath (Target Driver) ########"},{"line_number":206,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a1a9d01_43e6c044","line":203,"updated":"2015-10-01 03:39:03.000000000","message":"So this just verifies that the disk is big enough to actually extend to the requested size right? I guess that makes sense based on how this driver works (pick a disk that has enough space and call it good).\n\nI suppose that\u0027s fine.","commit_id":"f124f002ef79645c2986f30ce3e7f0f207fed27a"}]}
