)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"5f238fc6cc12ac235f320284284f99ed20d01dd4","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Tintri Cinder Volume driver"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Implements: blueprint tintri-cinder-driver"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"* Volume Create/Delete"},{"line_number":12,"context_line":"* Volume Attach/Detach"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"7a016987_18b0d2dc","line":9,"updated":"2015-05-27 14:37:03.000000000","message":"Move this to the end.\nhttps://wiki.openstack.org/wiki/GitCommitMessages#Summary_of_Git_commit_message_structure","commit_id":"24716301c7ae7282e5f1fb2b7b974d86d7815b6b"},{"author":{"_account_id":5149,"name":"Sean Chen","email":"xuchenx@gmail.com","username":"opencompute"},"change_message_id":"b5ab7edc9e4282e35ade0b2dca49618cfe492e57","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Tintri Cinder Volume driver"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Implements: blueprint tintri-cinder-driver"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"* Volume Create/Delete"},{"line_number":12,"context_line":"* Volume Attach/Detach"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"7a016987_6577123c","line":9,"in_reply_to":"7a016987_18b0d2dc","updated":"2015-05-27 16:35:30.000000000","message":"Done","commit_id":"24716301c7ae7282e5f1fb2b7b974d86d7815b6b"}],"cinder/tests/unit/test_tintri.py":[{"author":{"_account_id":14428,"name":"Bharat Kumar Kobagana","email":"bharath.kobagana@gmail.com","username":"bharatkk"},"change_message_id":"379611e119b52902988d265f41ab822a47e004f0","unresolved":false,"context_lines":[{"line_number":148,"context_line":"    def test_create_volume_from_snapshot(self):"},{"line_number":149,"context_line":"        self.assertEqual(self._driver.create_volume_from_snapshot("},{"line_number":150,"context_line":"                         FakeVolume(), FakeSnapshot()),"},{"line_number":151,"context_line":"                         {\u0027provider_location\u0027: self._provider_location})"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"    def test_create_cloned_volume(self):"},{"line_number":154,"context_line":"        self.assertEqual(self._driver.create_cloned_volume(FakeVolume(),"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a016987_026d5bcb","line":151,"updated":"2015-05-23 05:18:42.000000000","message":"Please change the order of parameters, this should be (expected, actual).","commit_id":"3c6b73df61aacd78d9438d2abe465fb9897e44dc"},{"author":{"_account_id":14428,"name":"Bharat Kumar Kobagana","email":"bharath.kobagana@gmail.com","username":"bharatkk"},"change_message_id":"379611e119b52902988d265f41ab822a47e004f0","unresolved":false,"context_lines":[{"line_number":153,"context_line":"    def test_create_cloned_volume(self):"},{"line_number":154,"context_line":"        self.assertEqual(self._driver.create_cloned_volume(FakeVolume(),"},{"line_number":155,"context_line":"                                                           FakeVolume()),"},{"line_number":156,"context_line":"                         {\u0027provider_location\u0027: self._provider_location})"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    def test_clone_image(self):"},{"line_number":159,"context_line":"        self.assertEqual(self._driver.clone_image("}],"source_content_type":"text/x-python","patch_set":2,"id":"7a016987_227a9788","line":156,"updated":"2015-05-23 05:18:42.000000000","message":"Same as above.","commit_id":"3c6b73df61aacd78d9438d2abe465fb9897e44dc"},{"author":{"_account_id":14428,"name":"Bharat Kumar Kobagana","email":"bharath.kobagana@gmail.com","username":"bharatkk"},"change_message_id":"379611e119b52902988d265f41ab822a47e004f0","unresolved":false,"context_lines":[{"line_number":159,"context_line":"        self.assertEqual(self._driver.clone_image("},{"line_number":160,"context_line":"                         None, FakeVolume(), \u0027image-name\u0027, FakeImage(), None),"},{"line_number":161,"context_line":"                         ({\u0027provider_location\u0027: self._provider_location,"},{"line_number":162,"context_line":"                           \u0027bootable\u0027: True}, True))"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a016987_e26fdfc1","line":162,"updated":"2015-05-23 05:18:42.000000000","message":"Same as above.","commit_id":"3c6b73df61aacd78d9438d2abe465fb9897e44dc"},{"author":{"_account_id":14428,"name":"Bharat Kumar Kobagana","email":"bharath.kobagana@gmail.com","username":"bharatkk"},"change_message_id":"b6e01e3a678bfea29cfd96bded3cd1bdefaeb0d2","unresolved":false,"context_lines":[{"line_number":15,"context_line":"Volume driver test for Tintri storage."},{"line_number":16,"context_line":"\"\"\""},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from mox3 import mox"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from oslo_log import log as logging"},{"line_number":21,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7a016987_938f5f74","line":18,"updated":"2015-05-23 17:48:18.000000000","message":"As per below blueprint we need to use mock instead of mox in unit tests.\n\nhttps://blueprints.launchpad.net/cinder/+spec/mox-to-mock-conversion","commit_id":"9f9541eb956abe440bc0e65b29fd01441df92b98"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"767d0640d1eec1990a4ad3afea623b06a8d13440","unresolved":false,"context_lines":[{"line_number":15,"context_line":"Volume driver test for Tintri storage."},{"line_number":16,"context_line":"\"\"\""},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from mox3 import mox"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from oslo_log import log as logging"},{"line_number":21,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"7a016987_3502bab5","line":18,"updated":"2015-05-25 17:43:54.000000000","message":"Unit tests should use mock, not mox any more.","commit_id":"3cb0f9aaff71d55bead5e4a7b98854b181862cee"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"767d0640d1eec1990a4ad3afea623b06a8d13440","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        self.fake_stubs()"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    def create_configuration(self):"},{"line_number":79,"context_line":"        configuration \u003d mox.MockObject(conf.Configuration)"},{"line_number":80,"context_line":"        configuration.append_config_values(mox.IgnoreArg())"},{"line_number":81,"context_line":"        configuration.nfs_mount_point_base \u003d \u0027/mnt/test\u0027"},{"line_number":82,"context_line":"        configuration.nfs_mount_options \u003d None"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a016987_95296e3a","line":79,"updated":"2015-05-25 17:43:54.000000000","message":"Please use mock.","commit_id":"3cb0f9aaff71d55bead5e4a7b98854b181862cee"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"357d941228015d3a2196a3916b25ab02627572fc","unresolved":false,"context_lines":[{"line_number":26,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"class FakeVolume(object):"},{"line_number":30,"context_line":"    def __init__(self):"},{"line_number":31,"context_line":"        self.id \u003d \u0027volume-id\u0027"},{"line_number":32,"context_line":"        self.name \u003d \u0027volume-name\u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a016987_6ac4b65e","line":29,"updated":"2015-05-26 14:28:56.000000000","message":"You should use the fake_volume versionedobject - tests/unit/fake_volume.py  You can custom your object as necessary, see  https://github.com/openstack/cinder/blob/master/cinder/tests/unit/objects/test_snapshot.py#L68 as an example.","commit_id":"cc82c460d146c6e6030f3d65339d5f9398d91d4a"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"357d941228015d3a2196a3916b25ab02627572fc","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        self.__dict__[key] \u003d val"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"class FakeSnapshot(object):"},{"line_number":44,"context_line":"    def __init__(self):"},{"line_number":45,"context_line":"        self.id \u003d \u0027snapshot-id\u0027"},{"line_number":46,"context_line":"        self.name \u003d \u0027snapshot-name\u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a016987_cf397cda","line":43,"updated":"2015-05-26 14:28:56.000000000","message":"You should use the fake_snapshot versionedobject - tests/unit/fake_snapshot.py.","commit_id":"cc82c460d146c6e6030f3d65339d5f9398d91d4a"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"d85082502beefbfd05fc568bf3d0d7c5f3e871ff","unresolved":false,"context_lines":[{"line_number":118,"context_line":"        snapshot \u003d fake_snapshot.fake_snapshot_obj(self.context)"},{"line_number":119,"context_line":"        volume \u003d fake_volume.fake_volume_obj(self.context)"},{"line_number":120,"context_line":"        snapshot.volume \u003d volume"},{"line_number":121,"context_line":"        self._driver.create_snapshot(snapshot)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def test_delete_snapshot(self):"},{"line_number":124,"context_line":"        snapshot \u003d fake_snapshot.fake_snapshot_obj(self.context)"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a016987_4faddae7","line":121,"updated":"2015-06-01 04:15:48.000000000","message":"Please add a test case for create snapshot failure.","commit_id":"17750b7984bf1186cccd080eaf295841618ca44a"},{"author":{"_account_id":5149,"name":"Sean Chen","email":"xuchenx@gmail.com","username":"opencompute"},"change_message_id":"3e5bdd1730b518a9e62cf48b4ebdb885ddd1833c","unresolved":false,"context_lines":[{"line_number":118,"context_line":"        snapshot \u003d fake_snapshot.fake_snapshot_obj(self.context)"},{"line_number":119,"context_line":"        volume \u003d fake_volume.fake_volume_obj(self.context)"},{"line_number":120,"context_line":"        snapshot.volume \u003d volume"},{"line_number":121,"context_line":"        self._driver.create_snapshot(snapshot)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def test_delete_snapshot(self):"},{"line_number":124,"context_line":"        snapshot \u003d fake_snapshot.fake_snapshot_obj(self.context)"}],"source_content_type":"text/x-python","patch_set":11,"id":"5afe65bd_b9afc77c","line":121,"in_reply_to":"7a016987_4faddae7","updated":"2015-06-01 17:13:16.000000000","message":"Done","commit_id":"17750b7984bf1186cccd080eaf295841618ca44a"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"119be6838c03c9b8631e3a0d51c2140cc3d6541b","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        snapshot.volume \u003d volume"},{"line_number":121,"context_line":"        self._driver.create_snapshot(snapshot)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def test_delete_snapshot(self):"},{"line_number":124,"context_line":"        snapshot \u003d fake_snapshot.fake_snapshot_obj(self.context)"},{"line_number":125,"context_line":"        self._driver.delete_snapshot(snapshot)"},{"line_number":126,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"7a016987_be9a4612","line":123,"updated":"2015-05-31 22:37:30.000000000","message":"I believe you should make your unit tests more detail, i.e. make sure the correct REST-API is called with the correct arguments.  These tests just call a faked out Client that just passes, which IMHO does not do much.","commit_id":"17750b7984bf1186cccd080eaf295841618ca44a"},{"author":{"_account_id":5149,"name":"Sean Chen","email":"xuchenx@gmail.com","username":"opencompute"},"change_message_id":"3e5bdd1730b518a9e62cf48b4ebdb885ddd1833c","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        snapshot.volume \u003d volume"},{"line_number":121,"context_line":"        self._driver.create_snapshot(snapshot)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def test_delete_snapshot(self):"},{"line_number":124,"context_line":"        snapshot \u003d fake_snapshot.fake_snapshot_obj(self.context)"},{"line_number":125,"context_line":"        self._driver.delete_snapshot(snapshot)"},{"line_number":126,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"5afe65bd_99b40bd2","line":123,"in_reply_to":"7a016987_8fa6320d","updated":"2015-06-01 17:13:16.000000000","message":"Done","commit_id":"17750b7984bf1186cccd080eaf295841618ca44a"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"d85082502beefbfd05fc568bf3d0d7c5f3e871ff","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        snapshot.volume \u003d volume"},{"line_number":121,"context_line":"        self._driver.create_snapshot(snapshot)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def test_delete_snapshot(self):"},{"line_number":124,"context_line":"        snapshot \u003d fake_snapshot.fake_snapshot_obj(self.context)"},{"line_number":125,"context_line":"        self._driver.delete_snapshot(snapshot)"},{"line_number":126,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"7a016987_8fa6320d","line":123,"in_reply_to":"7a016987_be9a4612","updated":"2015-06-01 04:15:48.000000000","message":"Good point. There should be a negative test case for delete snapshot failure too.","commit_id":"17750b7984bf1186cccd080eaf295841618ca44a"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"d85082502beefbfd05fc568bf3d0d7c5f3e871ff","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        volume \u003d fake_volume.fake_volume_obj(self.context)"},{"line_number":130,"context_line":"        self.assertEqual({\u0027provider_location\u0027: self._provider_location},"},{"line_number":131,"context_line":"                         self._driver.create_volume_from_snapshot("},{"line_number":132,"context_line":"                         volume, snapshot))"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    def test_create_cloned_volume(self):"},{"line_number":135,"context_line":"        volume \u003d fake_volume.fake_volume_obj(self.context)"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a016987_8f7d126f","line":132,"updated":"2015-06-01 04:15:48.000000000","message":"Suggest that you add negative test cases for create volume from snapshot, create cloned volume, and clone image.","commit_id":"17750b7984bf1186cccd080eaf295841618ca44a"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"ccd6bf03fa186c0917101eaa2b91c9cefe2cf4fd","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        volume \u003d fake_volume.fake_volume_obj(self.context)"},{"line_number":130,"context_line":"        self.assertEqual({\u0027provider_location\u0027: self._provider_location},"},{"line_number":131,"context_line":"                         self._driver.create_volume_from_snapshot("},{"line_number":132,"context_line":"                         volume, snapshot))"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    def test_create_cloned_volume(self):"},{"line_number":135,"context_line":"        volume \u003d fake_volume.fake_volume_obj(self.context)"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a016987_8febcf12","line":132,"in_reply_to":"7a016987_8f7d126f","updated":"2015-06-01 07:56:56.000000000","message":"@Sean Chen,\nI had similar suggestions in patch set #10 and they were ignored without even commenting. If you feel that it doesn\u0027t make any sense to add/improve unit tests, please reply to the comment.","commit_id":"17750b7984bf1186cccd080eaf295841618ca44a"},{"author":{"_account_id":5149,"name":"Sean Chen","email":"xuchenx@gmail.com","username":"opencompute"},"change_message_id":"3e5bdd1730b518a9e62cf48b4ebdb885ddd1833c","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        volume \u003d fake_volume.fake_volume_obj(self.context)"},{"line_number":130,"context_line":"        self.assertEqual({\u0027provider_location\u0027: self._provider_location},"},{"line_number":131,"context_line":"                         self._driver.create_volume_from_snapshot("},{"line_number":132,"context_line":"                         volume, snapshot))"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    def test_create_cloned_volume(self):"},{"line_number":135,"context_line":"        volume \u003d fake_volume.fake_volume_obj(self.context)"}],"source_content_type":"text/x-python","patch_set":11,"id":"5afe65bd_59c7b345","line":132,"in_reply_to":"7a016987_8f7d126f","updated":"2015-06-01 17:13:16.000000000","message":"Done","commit_id":"17750b7984bf1186cccd080eaf295841618ca44a"},{"author":{"_account_id":5149,"name":"Sean Chen","email":"xuchenx@gmail.com","username":"opencompute"},"change_message_id":"3e5bdd1730b518a9e62cf48b4ebdb885ddd1833c","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        volume \u003d fake_volume.fake_volume_obj(self.context)"},{"line_number":130,"context_line":"        self.assertEqual({\u0027provider_location\u0027: self._provider_location},"},{"line_number":131,"context_line":"                         self._driver.create_volume_from_snapshot("},{"line_number":132,"context_line":"                         volume, snapshot))"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    def test_create_cloned_volume(self):"},{"line_number":135,"context_line":"        volume \u003d fake_volume.fake_volume_obj(self.context)"}],"source_content_type":"text/x-python","patch_set":11,"id":"5afe65bd_f9dc1f1a","line":132,"in_reply_to":"7a016987_8febcf12","updated":"2015-06-01 17:13:16.000000000","message":"Done","commit_id":"17750b7984bf1186cccd080eaf295841618ca44a"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"d71eeabd91162159dbb4749f9d278ed409e549db","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        return True"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    @mock.patch.object(TClient, \u0027create_snapshot\u0027, mock.Mock())"},{"line_number":107,"context_line":"    def test_create_snapshot(self):"},{"line_number":108,"context_line":"        snapshot \u003d fake_snapshot.fake_snapshot_obj(self.context)"},{"line_number":109,"context_line":"        volume \u003d fake_volume.fake_volume_obj(self.context)"},{"line_number":110,"context_line":"        snapshot.volume \u003d volume"}],"source_content_type":"text/x-python","patch_set":15,"id":"3afb71cf_1668daf4","line":107,"updated":"2015-06-05 06:00:12.000000000","message":"This was Thang\u0027s comment in patch set 11:\n\" i.e. make sure the correct REST-API is called with the correct arguments. These tests just call a faked out Client that just passes, which IMHO does not do much.\"\n\nI belive Xing also had the same comment. Unfortunately this was not addressed.","commit_id":"5467e73fb449da0a03e6f8a5a4bfde6ee9f6dbd5"}],"cinder/volume/drivers/tintri.py":[{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"91171e00533c0e5a19a8d56019c4cabce9da0cb5","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    VERSION \u003d \u00271.0.0\u0027"},{"line_number":63,"context_line":"    REQUIRED_OPTIONS \u003d [\u0027tintri_server_hostname\u0027, \u0027tintri_server_password\u0027]"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    # modify /usr/share/cinder/rootwrap/volume.filters to allow touch and mv"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    def __init__(self, *args, **kwargs):"},{"line_number":68,"context_line":"        self._execute \u003d None"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a016987_ff977c37","line":65,"updated":"2015-05-23 04:26:21.000000000","message":"Not sure why this comment is here.  Which line of code does it apply to?","commit_id":"1a12456f81725505a541e326ba12e5cdbc724673"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"91171e00533c0e5a19a8d56019c4cabce9da0cb5","unresolved":false,"context_lines":[{"line_number":92,"context_line":"        \"\"\""},{"line_number":93,"context_line":"        return volume[\u0027provider_location\u0027]"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    def create_snapshot(self, snapshot):"},{"line_number":96,"context_line":"        \"\"\"Creates a snapshot.\"\"\""},{"line_number":97,"context_line":"        self._create_volume_snapshot(snapshot[\u0027volume_name\u0027],"},{"line_number":98,"context_line":"                                     snapshot[\u0027name\u0027],"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a016987_5fa7b0a6","line":95,"updated":"2015-05-23 04:26:21.000000000","message":"Since snapshot here is a versionedobject, you can just snapshot.volume_name, snapshot.name, etc.  It will save you from refactoring in the future when cinder is completely switched over to use oslo_versionedobjects.  But it is up to you here.  In the future , driver maintainers will have to switch it to versionedobjects themselves.","commit_id":"1a12456f81725505a541e326ba12e5cdbc724673"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"91171e00533c0e5a19a8d56019c4cabce9da0cb5","unresolved":false,"context_lines":[{"line_number":99,"context_line":"                                     snapshot[\u0027volume_id\u0027],"},{"line_number":100,"context_line":"                                     vm_name\u003dsnapshot[\u0027display_name\u0027])"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def delete_snapshot(self, snapshot):"},{"line_number":103,"context_line":"        \"\"\"Deletes a snapshot.\"\"\""},{"line_number":104,"context_line":"        with Client(self._hostname, self._username, self._password) as c:"},{"line_number":105,"context_line":"            snapshot_id \u003d c.get_snapshot(snapshot.name)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a016987_3fb994cc","line":102,"updated":"2015-05-23 04:26:21.000000000","message":"Ditto","commit_id":"1a12456f81725505a541e326ba12e5cdbc724673"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"91171e00533c0e5a19a8d56019c4cabce9da0cb5","unresolved":false,"context_lines":[{"line_number":491,"context_line":"    def _check_nfs_path(self, image_location):"},{"line_number":492,"context_line":"        \"\"\"Checks if the nfs path format is matched."},{"line_number":493,"context_line":""},{"line_number":494,"context_line":"            WebNFS url format with relative-path is supported."},{"line_number":495,"context_line":"            Accepting all characters in path-names and checking"},{"line_number":496,"context_line":"            against the mounted shares which will contain only"},{"line_number":497,"context_line":"            allowed path segments. Returns connection and dir details."}],"source_content_type":"text/x-python","patch_set":1,"id":"7a016987_5fec50ba","line":494,"updated":"2015-05-23 04:26:21.000000000","message":"The indentation is off.  It should line up with the \"\"\" (4 spaces back) - http://docs.openstack.org/developer/hacking/#docstrings.","commit_id":"1a12456f81725505a541e326ba12e5cdbc724673"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"91171e00533c0e5a19a8d56019c4cabce9da0cb5","unresolved":false,"context_lines":[{"line_number":529,"context_line":"    def _get_image_nfs_url(self, image_location):"},{"line_number":530,"context_line":"        \"\"\"Gets direct url for nfs backend."},{"line_number":531,"context_line":""},{"line_number":532,"context_line":"             It creates direct url from image_location"},{"line_number":533,"context_line":"             which is a tuple with direct_url and locations."},{"line_number":534,"context_line":"             Returns url with nfs scheme if nfs store"},{"line_number":535,"context_line":"             else returns url. It needs to be verified"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a016987_3f2e34fb","line":532,"updated":"2015-05-23 04:26:21.000000000","message":"Ditto","commit_id":"1a12456f81725505a541e326ba12e5cdbc724673"},{"author":{"_account_id":14428,"name":"Bharat Kumar Kobagana","email":"bharath.kobagana@gmail.com","username":"bharatkk"},"change_message_id":"379611e119b52902988d265f41ab822a47e004f0","unresolved":false,"context_lines":[{"line_number":248,"context_line":"    def _get_volume_path(self, nfs_share, volume_name):"},{"line_number":249,"context_line":"        \"\"\"Gets volume path (local fs path) for given volume name on given nfs"},{"line_number":250,"context_line":"        share."},{"line_number":251,"context_line":"        \"\"\""},{"line_number":252,"context_line":"        return os.path.join(self._get_mount_point_for_share(nfs_share),"},{"line_number":253,"context_line":"                            volume_name)"},{"line_number":254,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7a016987_a26687ea","line":251,"updated":"2015-05-23 05:18:42.000000000","message":"A multi line docstring has a one-line summary, less than 80 characters.\n\n\nhttp://docs.openstack.org/developer/hacking/#docstrings\nhttps://review.openstack.org/184820","commit_id":"3c6b73df61aacd78d9438d2abe465fb9897e44dc"},{"author":{"_account_id":1207,"name":"Duncan Thomas","email":"duncan.thomas@gmail.com","username":"duncan-thomas"},"change_message_id":"091bdcabb3e5e2f9a1d0991564743fd6f3047f3d","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        self._create_volume_snapshot(snapshot.volume_name,"},{"line_number":96,"context_line":"                                     snapshot.name,"},{"line_number":97,"context_line":"                                     snapshot.volume_id,"},{"line_number":98,"context_line":"                                     vm_name\u003dsnapshot.display_name)"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    def delete_snapshot(self, snapshot):"},{"line_number":101,"context_line":"        \"\"\"Deletes a snapshot.\"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"7a016987_7d45d440","line":98,"updated":"2015-05-23 07:30:45.000000000","message":"Note that snapshot.display_name can be None, and can be non-unique - is that something your backend handles ok?","commit_id":"6249363ae5419251b1910d7e944117f64bd89beb"},{"author":{"_account_id":5149,"name":"Sean Chen","email":"xuchenx@gmail.com","username":"opencompute"},"change_message_id":"d98170f8e3b4808a05266db49664f197760603b5","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        self._create_volume_snapshot(snapshot.volume_name,"},{"line_number":96,"context_line":"                                     snapshot.name,"},{"line_number":97,"context_line":"                                     snapshot.volume_id,"},{"line_number":98,"context_line":"                                     vm_name\u003dsnapshot.display_name)"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    def delete_snapshot(self, snapshot):"},{"line_number":101,"context_line":"        \"\"\"Deletes a snapshot.\"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"7a016987_7843a2af","line":98,"in_reply_to":"7a016987_7d45d440","updated":"2015-05-23 16:18:41.000000000","message":"in create_snapshot, we use vm_name or volume_name if vm_name is None, and it doesn\u0027t have to be unique.","commit_id":"6249363ae5419251b1910d7e944117f64bd89beb"},{"author":{"_account_id":1207,"name":"Duncan Thomas","email":"duncan.thomas@gmail.com","username":"duncan-thomas"},"change_message_id":"091bdcabb3e5e2f9a1d0991564743fd6f3047f3d","unresolved":false,"context_lines":[{"line_number":316,"context_line":"    def _clone_image_snapshot(self, snapshot_id, dst, share):"},{"line_number":317,"context_line":"        \"\"\"Clones volume from image snapshot.\"\"\""},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"        def _do_clone():"},{"line_number":320,"context_line":"            dir \u003d self._get_mount_point_for_share(share)"},{"line_number":321,"context_line":"            file_path \u003d \u0027%s/%s\u0027 % (dir, dst)"},{"line_number":322,"context_line":"            if not os.path.exists(file_path):"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a016987_dd6ba8b5","line":319,"updated":"2015-05-23 07:30:45.000000000","message":"What is the benefit of defining a function then immediately calling it? Am I missing something?","commit_id":"6249363ae5419251b1910d7e944117f64bd89beb"},{"author":{"_account_id":5149,"name":"Sean Chen","email":"xuchenx@gmail.com","username":"opencompute"},"change_message_id":"d98170f8e3b4808a05266db49664f197760603b5","unresolved":false,"context_lines":[{"line_number":316,"context_line":"    def _clone_image_snapshot(self, snapshot_id, dst, share):"},{"line_number":317,"context_line":"        \"\"\"Clones volume from image snapshot.\"\"\""},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"        def _do_clone():"},{"line_number":320,"context_line":"            dir \u003d self._get_mount_point_for_share(share)"},{"line_number":321,"context_line":"            file_path \u003d \u0027%s/%s\u0027 % (dir, dst)"},{"line_number":322,"context_line":"            if not os.path.exists(file_path):"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a016987_f88432d3","line":319,"in_reply_to":"7a016987_dd6ba8b5","updated":"2015-05-23 16:18:41.000000000","message":"It was put here for potential @utils.synchronized declaration in the future, I will remove it for now.","commit_id":"6249363ae5419251b1910d7e944117f64bd89beb"},{"author":{"_account_id":14428,"name":"Bharat Kumar Kobagana","email":"bharath.kobagana@gmail.com","username":"bharatkk"},"change_message_id":"b6e01e3a678bfea29cfd96bded3cd1bdefaeb0d2","unresolved":false,"context_lines":[{"line_number":304,"context_line":"            return _do_snapshot()"},{"line_number":305,"context_line":"        except Exception as e:"},{"line_number":306,"context_line":"            LOG.warning(_LW(\u0027Exception while creating image %(image_id)s\u0027"},{"line_number":307,"context_line":"                            \u0027 snapshot. Exception: %(exc)s\u0027),"},{"line_number":308,"context_line":"                        {\u0027image_id\u0027: image_id, \u0027exc\u0027: e})"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"    def _find_image_snapshot(self, image_id):"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a016987_73ebc3dc","line":307,"updated":"2015-05-23 17:48:18.000000000","message":"Multi line string should not start with a space.\n\nPlease move this starting space to the end of first line of the message.","commit_id":"9f9541eb956abe440bc0e65b29fd01441df92b98"},{"author":{"_account_id":14428,"name":"Bharat Kumar Kobagana","email":"bharath.kobagana@gmail.com","username":"bharatkk"},"change_message_id":"b6e01e3a678bfea29cfd96bded3cd1bdefaeb0d2","unresolved":false,"context_lines":[{"line_number":379,"context_line":"                post_clone \u003d self._post_clone_image(volume)"},{"line_number":380,"context_line":"        except Exception as e:"},{"line_number":381,"context_line":"            LOG.info(_LI(\u0027Image cloning unsuccessful for image\u0027"},{"line_number":382,"context_line":"                         \u0027 %(image_id)s. Message: %(msg)s\u0027),"},{"line_number":383,"context_line":"                     {\u0027image_id\u0027: image_id, \u0027msg\u0027: e})"},{"line_number":384,"context_line":"            vol_path \u003d self.local_path(volume)"},{"line_number":385,"context_line":"            volume[\u0027provider_location\u0027] \u003d None"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a016987_53bd67d6","line":382,"updated":"2015-05-23 17:48:18.000000000","message":"Same as above.","commit_id":"9f9541eb956abe440bc0e65b29fd01441df92b98"},{"author":{"_account_id":14428,"name":"Bharat Kumar Kobagana","email":"bharath.kobagana@gmail.com","username":"bharatkk"},"change_message_id":"b6e01e3a678bfea29cfd96bded3cd1bdefaeb0d2","unresolved":false,"context_lines":[{"line_number":408,"context_line":"                    break"},{"line_number":409,"context_line":"                except Exception:"},{"line_number":410,"context_line":"                    LOG.warning(_LW(\u0027Unexpected exception during\u0027"},{"line_number":411,"context_line":"                                    \u0027 image cloning in share %s\u0027), share)"},{"line_number":412,"context_line":"        return cloned"},{"line_number":413,"context_line":""},{"line_number":414,"context_line":"    def _direct_clone(self, volume, image_location, image_id, image_name):"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a016987_33c0ab4f","line":411,"updated":"2015-05-23 17:48:18.000000000","message":"Same as above.","commit_id":"9f9541eb956abe440bc0e65b29fd01441df92b98"},{"author":{"_account_id":14428,"name":"Bharat Kumar Kobagana","email":"bharath.kobagana@gmail.com","username":"bharatkk"},"change_message_id":"b6e01e3a678bfea29cfd96bded3cd1bdefaeb0d2","unresolved":false,"context_lines":[{"line_number":701,"context_line":"            raise exception.VolumeDriverException(msg)"},{"line_number":702,"context_line":""},{"line_number":703,"context_line":"        if int(r.json()[\u0027filteredTotal\u0027]) \u003d\u003d 0:"},{"line_number":704,"context_line":"            return None"},{"line_number":705,"context_line":"        else:"},{"line_number":706,"context_line":"            return r.json()[\u0027items\u0027][0][\u0027uuid\u0027][\u0027uuid\u0027]"},{"line_number":707,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7a016987_73fd03b0","line":704,"updated":"2015-05-23 17:48:18.000000000","message":"No need to return None, just the \"return\" statement will automatically return None value.","commit_id":"9f9541eb956abe440bc0e65b29fd01441df92b98"},{"author":{"_account_id":14428,"name":"Bharat Kumar Kobagana","email":"bharath.kobagana@gmail.com","username":"bharatkk"},"change_message_id":"b6e01e3a678bfea29cfd96bded3cd1bdefaeb0d2","unresolved":false,"context_lines":[{"line_number":702,"context_line":""},{"line_number":703,"context_line":"        if int(r.json()[\u0027filteredTotal\u0027]) \u003d\u003d 0:"},{"line_number":704,"context_line":"            return None"},{"line_number":705,"context_line":"        else:"},{"line_number":706,"context_line":"            return r.json()[\u0027items\u0027][0][\u0027uuid\u0027][\u0027uuid\u0027]"},{"line_number":707,"context_line":""},{"line_number":708,"context_line":"    def delete_snapshot(self, snapshot_uuid):"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a016987_532fa73e","line":705,"updated":"2015-05-23 17:48:18.000000000","message":"No need ot else statement here.","commit_id":"9f9541eb956abe440bc0e65b29fd01441df92b98"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"767d0640d1eec1990a4ad3afea623b06a8d13440","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2015 Tintri.  All rights reserved."},{"line_number":2,"context_line":"# Copyright (c) 2012 NetApp, Inc.  All rights reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":5,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a016987_75dcb274","line":2,"updated":"2015-05-25 17:43:54.000000000","message":"Do you really want to keep the NetApp copyright?","commit_id":"3cb0f9aaff71d55bead5e4a7b98854b181862cee"},{"author":{"_account_id":14377,"name":"Apoorva","email":"apps.desh@gmail.com","username":"apoorvad"},"change_message_id":"8b4a6de0e455a50ce161c480212e12644539675d","unresolved":false,"context_lines":[{"line_number":647,"context_line":"                   \u0027password\u0027: password,"},{"line_number":648,"context_line":"                   \u0027typeId\u0027: \u0027com.tintri.api.rest.vcommon.dto.rbac.\u0027"},{"line_number":649,"context_line":"                             \u0027RestApiCredentials\u0027}"},{"line_number":650,"context_line":"        url \u003d self.api_url + \u0027/v310/session/login\u0027"},{"line_number":651,"context_line":""},{"line_number":652,"context_line":"        r \u003d requests.post(url, data\u003djson.dumps(payload),"},{"line_number":653,"context_line":"                          headers\u003dheaders, verify\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a016987_9ad4fdbd","line":650,"updated":"2015-05-25 17:20:08.000000000","message":"Configurable API version ?","commit_id":"3cb0f9aaff71d55bead5e4a7b98854b181862cee"},{"author":{"_account_id":14377,"name":"Apoorva","email":"apps.desh@gmail.com","username":"apoorvad"},"change_message_id":"8b4a6de0e455a50ce161c480212e12644539675d","unresolved":false,"context_lines":[{"line_number":654,"context_line":""},{"line_number":655,"context_line":"        # if HTTP Response is not 200 then raise an exception"},{"line_number":656,"context_line":"        if r.status_code !\u003d 200:"},{"line_number":657,"context_line":"            pass"},{"line_number":658,"context_line":""},{"line_number":659,"context_line":"        return r.cookies[\u0027JSESSIONID\u0027]"},{"line_number":660,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"7a016987_ba58d98b","line":657,"updated":"2015-05-25 17:20:08.000000000","message":"As per the comment, this should raise an exception.","commit_id":"3cb0f9aaff71d55bead5e4a7b98854b181862cee"},{"author":{"_account_id":14377,"name":"Apoorva","email":"apps.desh@gmail.com","username":"apoorvad"},"change_message_id":"8b4a6de0e455a50ce161c480212e12644539675d","unresolved":false,"context_lines":[{"line_number":682,"context_line":"                   \u0027snapshotCreator\u0027: \u0027Cinder\u0027"},{"line_number":683,"context_line":"                   }"},{"line_number":684,"context_line":""},{"line_number":685,"context_line":"        payload \u003d \u0027/v310/cinder/snapshot\u0027"},{"line_number":686,"context_line":"        r \u003d self.post(payload, request)"},{"line_number":687,"context_line":"        if r.status_code !\u003d 200:"},{"line_number":688,"context_line":"            msg \u003d _(\u0027Failed to create snapshot for volume %s.\u0027) % volume_path"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a016987_3ae4e9aa","line":685,"updated":"2015-05-25 17:20:08.000000000","message":"Configurable API version ?","commit_id":"3cb0f9aaff71d55bead5e4a7b98854b181862cee"},{"author":{"_account_id":14377,"name":"Apoorva","email":"apps.desh@gmail.com","username":"apoorvad"},"change_message_id":"8b4a6de0e455a50ce161c480212e12644539675d","unresolved":false,"context_lines":[{"line_number":694,"context_line":"        # Gets a volume snapshot"},{"line_number":695,"context_line":"        filter \u003d {\u0027vmUuid\u0027: volume_name}"},{"line_number":696,"context_line":""},{"line_number":697,"context_line":"        payload \u003d \u0027/v310/snapshot\u0027"},{"line_number":698,"context_line":"        r \u003d self.get_query(payload, filter)"},{"line_number":699,"context_line":"        if r.status_code !\u003d 200:"},{"line_number":700,"context_line":"            msg \u003d _(\u0027Failed to get snapshot for volume %s.\u0027) % volume_name"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a016987_5afe8539","line":697,"updated":"2015-05-25 17:20:08.000000000","message":"ditto","commit_id":"3cb0f9aaff71d55bead5e4a7b98854b181862cee"},{"author":{"_account_id":14377,"name":"Apoorva","email":"apps.desh@gmail.com","username":"apoorvad"},"change_message_id":"8b4a6de0e455a50ce161c480212e12644539675d","unresolved":false,"context_lines":[{"line_number":705,"context_line":""},{"line_number":706,"context_line":"    def delete_snapshot(self, snapshot_uuid):"},{"line_number":707,"context_line":"        # Deletes a snapshot"},{"line_number":708,"context_line":"        url \u003d \u0027/v310/snapshot/\u0027"},{"line_number":709,"context_line":"        r \u003d self.delete(url + snapshot_uuid)"},{"line_number":710,"context_line":"        if r.status_code !\u003d 200 and r.status_code !\u003d 204:"},{"line_number":711,"context_line":"            msg \u003d _(\u0027Failed to delete snapshot %s.\u0027) % snapshot_uuid"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a016987_9aa2bd4a","line":708,"updated":"2015-05-25 17:20:08.000000000","message":"ditto","commit_id":"3cb0f9aaff71d55bead5e4a7b98854b181862cee"},{"author":{"_account_id":14377,"name":"Apoorva","email":"apps.desh@gmail.com","username":"apoorvad"},"change_message_id":"8b4a6de0e455a50ce161c480212e12644539675d","unresolved":false,"context_lines":[{"line_number":713,"context_line":""},{"line_number":714,"context_line":"    def clone_volume(self, snapshot_uuid, volume_path):"},{"line_number":715,"context_line":"        # Clones a volume from snapshot"},{"line_number":716,"context_line":"        request \u003d {\u0027typeId\u0027: \u0027com.tintri.api.rest.v310.dto.domain.beans.\u0027"},{"line_number":717,"context_line":"                             \u0027cinder.CinderCloneSpec\u0027,"},{"line_number":718,"context_line":"                   \u0027destinationPaths\u0027:"},{"line_number":719,"context_line":"                       [Client._remove_prefix(volume_path, tintri_path)],"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a016987_5a8565ab","line":716,"updated":"2015-05-25 17:20:08.000000000","message":"ditto","commit_id":"3cb0f9aaff71d55bead5e4a7b98854b181862cee"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"357d941228015d3a2196a3916b25ab02627572fc","unresolved":false,"context_lines":[{"line_number":589,"context_line":"            export_path \u003d share.split(\u0027:\u0027)[1]"},{"line_number":590,"context_line":"        else:"},{"line_number":591,"context_line":"            raise exception.InvalidInput("},{"line_number":592,"context_line":"                \u0027A volume ID or share was not specified.\u0027)"},{"line_number":593,"context_line":"        return host_ip, export_path"},{"line_number":594,"context_line":""},{"line_number":595,"context_line":"    def _get_local_path(self, volume_id\u003dNone, share\u003dNone):"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a016987_0ae662e8","line":592,"updated":"2015-05-26 14:28:56.000000000","message":"Should this be exception.InvalidInput(reason\u003d_(\u0027A volume ID or share was not specified.\u0027))?","commit_id":"cc82c460d146c6e6030f3d65339d5f9398d91d4a"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"357d941228015d3a2196a3916b25ab02627572fc","unresolved":false,"context_lines":[{"line_number":605,"context_line":"            local_path \u003d self._get_mount_point_for_share(share)"},{"line_number":606,"context_line":"        else:"},{"line_number":607,"context_line":"            raise exception.InvalidInput("},{"line_number":608,"context_line":"                \u0027A volume ID or share was not specified.\u0027)"},{"line_number":609,"context_line":"        return local_path"},{"line_number":610,"context_line":""},{"line_number":611,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"7a016987_eaeae6ab","line":608,"updated":"2015-05-26 14:28:56.000000000","message":"Ditto","commit_id":"cc82c460d146c6e6030f3d65339d5f9398d91d4a"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"5f238fc6cc12ac235f320284284f99ed20d01dd4","unresolved":false,"context_lines":[{"line_number":50,"context_line":"               help\u003d\u0027User name for the storage system\u0027),"},{"line_number":51,"context_line":"    cfg.StrOpt(\u0027tintri_server_password\u0027,"},{"line_number":52,"context_line":"               default\u003dNone,"},{"line_number":53,"context_line":"               help\u003d\u0027Password for the storage system\u0027),"},{"line_number":54,"context_line":"]"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a016987_2b50d609","line":53,"updated":"2015-05-27 14:37:03.000000000","message":"secret\u003dTrue should be added for password.","commit_id":"24716301c7ae7282e5f1fb2b7b974d86d7815b6b"},{"author":{"_account_id":5149,"name":"Sean Chen","email":"xuchenx@gmail.com","username":"opencompute"},"change_message_id":"b5ab7edc9e4282e35ade0b2dca49618cfe492e57","unresolved":false,"context_lines":[{"line_number":50,"context_line":"               help\u003d\u0027User name for the storage system\u0027),"},{"line_number":51,"context_line":"    cfg.StrOpt(\u0027tintri_server_password\u0027,"},{"line_number":52,"context_line":"               default\u003dNone,"},{"line_number":53,"context_line":"               help\u003d\u0027Password for the storage system\u0027),"},{"line_number":54,"context_line":"]"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a016987_a5b62af7","line":53,"in_reply_to":"7a016987_2b50d609","updated":"2015-05-27 16:35:30.000000000","message":"Done","commit_id":"24716301c7ae7282e5f1fb2b7b974d86d7815b6b"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"5f238fc6cc12ac235f320284284f99ed20d01dd4","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        super(TintriDriver, self).do_setup(context)"},{"line_number":76,"context_line":"        self._context \u003d context"},{"line_number":77,"context_line":"        self._check_ops(self.REQUIRED_OPTIONS, self.configuration)"},{"line_number":78,"context_line":"        self._hostname \u003d getattr(self.configuration, \u0027tintri_server_hostname\u0027)"},{"line_number":79,"context_line":"        self._username \u003d getattr(self.configuration, \u0027tintri_server_username\u0027,"},{"line_number":80,"context_line":"                                 CONF.tintri_server_username)"},{"line_number":81,"context_line":"        self._password \u003d getattr(self.configuration, \u0027tintri_server_password\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a016987_eb0e3e8b","line":78,"updated":"2015-05-27 14:37:03.000000000","message":"I think you can use self.configuration.tintri_server_hostname instead of getattr.","commit_id":"24716301c7ae7282e5f1fb2b7b974d86d7815b6b"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"cdca0e4dfb882a23a0030a3e6cf31a3eb2484647","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        super(TintriDriver, self).do_setup(context)"},{"line_number":76,"context_line":"        self._context \u003d context"},{"line_number":77,"context_line":"        self._check_ops(self.REQUIRED_OPTIONS, self.configuration)"},{"line_number":78,"context_line":"        self._hostname \u003d getattr(self.configuration, \u0027tintri_server_hostname\u0027)"},{"line_number":79,"context_line":"        self._username \u003d getattr(self.configuration, \u0027tintri_server_username\u0027,"},{"line_number":80,"context_line":"                                 CONF.tintri_server_username)"},{"line_number":81,"context_line":"        self._password \u003d getattr(self.configuration, \u0027tintri_server_password\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a016987_a9d38737","line":78,"in_reply_to":"7a016987_c5dc8648","updated":"2015-05-28 11:45:46.000000000","message":"See line 57 and line 72. Does it mean than self.configuration.tintri_server_username is same as CONF.tintri_server_username?","commit_id":"24716301c7ae7282e5f1fb2b7b974d86d7815b6b"},{"author":{"_account_id":5149,"name":"Sean Chen","email":"xuchenx@gmail.com","username":"opencompute"},"change_message_id":"b5ab7edc9e4282e35ade0b2dca49618cfe492e57","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        super(TintriDriver, self).do_setup(context)"},{"line_number":76,"context_line":"        self._context \u003d context"},{"line_number":77,"context_line":"        self._check_ops(self.REQUIRED_OPTIONS, self.configuration)"},{"line_number":78,"context_line":"        self._hostname \u003d getattr(self.configuration, \u0027tintri_server_hostname\u0027)"},{"line_number":79,"context_line":"        self._username \u003d getattr(self.configuration, \u0027tintri_server_username\u0027,"},{"line_number":80,"context_line":"                                 CONF.tintri_server_username)"},{"line_number":81,"context_line":"        self._password \u003d getattr(self.configuration, \u0027tintri_server_password\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a016987_c5dc8648","line":78,"in_reply_to":"7a016987_eb0e3e8b","updated":"2015-05-27 16:35:30.000000000","message":"getattr has default argument.","commit_id":"24716301c7ae7282e5f1fb2b7b974d86d7815b6b"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"5f238fc6cc12ac235f320284284f99ed20d01dd4","unresolved":false,"context_lines":[{"line_number":80,"context_line":"                                 CONF.tintri_server_username)"},{"line_number":81,"context_line":"        self._password \u003d getattr(self.configuration, \u0027tintri_server_password\u0027)"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def check_for_setup_error(self):"},{"line_number":84,"context_line":"        \"\"\"Returns an error if prerequisites aren\u0027t met.\"\"\""},{"line_number":85,"context_line":"        super(TintriDriver, self).check_for_setup_error()"},{"line_number":86,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"7a016987_6b724e13","line":83,"updated":"2015-05-27 14:37:03.000000000","message":"You can remove this method.","commit_id":"24716301c7ae7282e5f1fb2b7b974d86d7815b6b"},{"author":{"_account_id":5149,"name":"Sean Chen","email":"xuchenx@gmail.com","username":"opencompute"},"change_message_id":"b5ab7edc9e4282e35ade0b2dca49618cfe492e57","unresolved":false,"context_lines":[{"line_number":80,"context_line":"                                 CONF.tintri_server_username)"},{"line_number":81,"context_line":"        self._password \u003d getattr(self.configuration, \u0027tintri_server_password\u0027)"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def check_for_setup_error(self):"},{"line_number":84,"context_line":"        \"\"\"Returns an error if prerequisites aren\u0027t met.\"\"\""},{"line_number":85,"context_line":"        super(TintriDriver, self).check_for_setup_error()"},{"line_number":86,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"7a016987_6546f222","line":83,"in_reply_to":"7a016987_6b724e13","updated":"2015-05-27 16:35:30.000000000","message":"Done","commit_id":"24716301c7ae7282e5f1fb2b7b974d86d7815b6b"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"5f238fc6cc12ac235f320284284f99ed20d01dd4","unresolved":false,"context_lines":[{"line_number":99,"context_line":"                                     snapshot.volume_id,"},{"line_number":100,"context_line":"                                     vm_name\u003dsnapshot.display_name)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def delete_snapshot(self, snapshot):"},{"line_number":103,"context_line":"        \"\"\"Deletes a snapshot.\"\"\""},{"line_number":104,"context_line":"        with Client(self._hostname, self._username, self._password) as c:"},{"line_number":105,"context_line":"            snapshot_id \u003d c.get_snapshot(snapshot.name)"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a016987_2e15849a","line":102,"updated":"2015-05-27 14:37:03.000000000","message":"Do we need to override delete_volume also?","commit_id":"24716301c7ae7282e5f1fb2b7b974d86d7815b6b"},{"author":{"_account_id":5149,"name":"Sean Chen","email":"xuchenx@gmail.com","username":"opencompute"},"change_message_id":"b5ab7edc9e4282e35ade0b2dca49618cfe492e57","unresolved":false,"context_lines":[{"line_number":99,"context_line":"                                     snapshot.volume_id,"},{"line_number":100,"context_line":"                                     vm_name\u003dsnapshot.display_name)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def delete_snapshot(self, snapshot):"},{"line_number":103,"context_line":"        \"\"\"Deletes a snapshot.\"\"\""},{"line_number":104,"context_line":"        with Client(self._hostname, self._username, self._password) as c:"},{"line_number":105,"context_line":"            snapshot_id \u003d c.get_snapshot(snapshot.name)"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a016987_c5b36609","line":102,"in_reply_to":"7a016987_2e15849a","updated":"2015-05-27 16:35:30.000000000","message":"no, delete_volume simple deletes the file.","commit_id":"24716301c7ae7282e5f1fb2b7b974d86d7815b6b"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"5f238fc6cc12ac235f320284284f99ed20d01dd4","unresolved":false,"context_lines":[{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def delete_snapshot(self, snapshot):"},{"line_number":103,"context_line":"        \"\"\"Deletes a snapshot.\"\"\""},{"line_number":104,"context_line":"        with Client(self._hostname, self._username, self._password) as c:"},{"line_number":105,"context_line":"            snapshot_id \u003d c.get_snapshot(snapshot.name)"},{"line_number":106,"context_line":"            if snapshot_id:"},{"line_number":107,"context_line":"                c.delete_snapshot(snapshot_id)"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a016987_8b934afa","line":104,"updated":"2015-05-27 14:37:03.000000000","message":"Will this create a client object for every API request?","commit_id":"24716301c7ae7282e5f1fb2b7b974d86d7815b6b"},{"author":{"_account_id":5149,"name":"Sean Chen","email":"xuchenx@gmail.com","username":"opencompute"},"change_message_id":"b5ab7edc9e4282e35ade0b2dca49618cfe492e57","unresolved":false,"context_lines":[{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def delete_snapshot(self, snapshot):"},{"line_number":103,"context_line":"        \"\"\"Deletes a snapshot.\"\"\""},{"line_number":104,"context_line":"        with Client(self._hostname, self._username, self._password) as c:"},{"line_number":105,"context_line":"            snapshot_id \u003d c.get_snapshot(snapshot.name)"},{"line_number":106,"context_line":"            if snapshot_id:"},{"line_number":107,"context_line":"                c.delete_snapshot(snapshot_id)"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a016987_c5aa4685","line":104,"in_reply_to":"7a016987_8b934afa","updated":"2015-05-27 16:35:30.000000000","message":"yes.","commit_id":"24716301c7ae7282e5f1fb2b7b974d86d7815b6b"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"cdca0e4dfb882a23a0030a3e6cf31a3eb2484647","unresolved":false,"context_lines":[{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def delete_snapshot(self, snapshot):"},{"line_number":103,"context_line":"        \"\"\"Deletes a snapshot.\"\"\""},{"line_number":104,"context_line":"        with Client(self._hostname, self._username, self._password) as c:"},{"line_number":105,"context_line":"            snapshot_id \u003d c.get_snapshot(snapshot.name)"},{"line_number":106,"context_line":"            if snapshot_id:"},{"line_number":107,"context_line":"                c.delete_snapshot(snapshot_id)"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a016987_c9ec83f5","line":104,"in_reply_to":"7a016987_c5aa4685","updated":"2015-05-28 11:45:46.000000000","message":"What is the problem in using the same client object again?","commit_id":"24716301c7ae7282e5f1fb2b7b974d86d7815b6b"},{"author":{"_account_id":5149,"name":"Sean Chen","email":"xuchenx@gmail.com","username":"opencompute"},"change_message_id":"64c58f712181021f43417e36d1930e12aca12e05","unresolved":false,"context_lines":[{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def delete_snapshot(self, snapshot):"},{"line_number":103,"context_line":"        \"\"\"Deletes a snapshot.\"\"\""},{"line_number":104,"context_line":"        with Client(self._hostname, self._username, self._password) as c:"},{"line_number":105,"context_line":"            snapshot_id \u003d c.get_snapshot(snapshot.name)"},{"line_number":106,"context_line":"            if snapshot_id:"},{"line_number":107,"context_line":"                c.delete_snapshot(snapshot_id)"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a016987_5c1e0571","line":104,"in_reply_to":"7a016987_c9ec83f5","updated":"2015-05-28 16:49:28.000000000","message":"We will introduce an improved rest client in the future.","commit_id":"24716301c7ae7282e5f1fb2b7b974d86d7815b6b"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"5f238fc6cc12ac235f320284284f99ed20d01dd4","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                with excutils.save_and_reraise_exception():"},{"line_number":141,"context_line":"                    LOG.error(_LE(\"Resizing %s failed. Cleaning volume.\"),"},{"line_number":142,"context_line":"                              volume.name)"},{"line_number":143,"context_line":"                    self._execute(\u0027rm\u0027, path, run_as_root\u003drun_as_root)"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"        return {\u0027provider_location\u0027: volume[\u0027provider_location\u0027]}"},{"line_number":146,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"7a016987_2ebfc461","line":143,"updated":"2015-05-27 14:37:03.000000000","message":"Can we call _delete_file here?","commit_id":"24716301c7ae7282e5f1fb2b7b974d86d7815b6b"},{"author":{"_account_id":5149,"name":"Sean Chen","email":"xuchenx@gmail.com","username":"opencompute"},"change_message_id":"b5ab7edc9e4282e35ade0b2dca49618cfe492e57","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                with excutils.save_and_reraise_exception():"},{"line_number":141,"context_line":"                    LOG.error(_LE(\"Resizing %s failed. Cleaning volume.\"),"},{"line_number":142,"context_line":"                              volume.name)"},{"line_number":143,"context_line":"                    self._execute(\u0027rm\u0027, path, run_as_root\u003drun_as_root)"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"        return {\u0027provider_location\u0027: volume[\u0027provider_location\u0027]}"},{"line_number":146,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"7a016987_a5ad0a9d","line":143,"in_reply_to":"7a016987_2ebfc461","updated":"2015-05-27 16:35:30.000000000","message":"Done","commit_id":"24716301c7ae7282e5f1fb2b7b974d86d7815b6b"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"5f238fc6cc12ac235f320284284f99ed20d01dd4","unresolved":false,"context_lines":[{"line_number":157,"context_line":"                    msg \u003d _(\u0027Failed to get snapshot for \u0027"},{"line_number":158,"context_line":"                            \u0027volume %s.\u0027) % volume_name"},{"line_number":159,"context_line":"                    raise exception.VolumeDriverException(msg)"},{"line_number":160,"context_line":"                time.sleep(1)"},{"line_number":161,"context_line":"                snapshot_id \u003d c.get_snapshot(volume_name)"},{"line_number":162,"context_line":"            c.clone_volume(snapshot_id, clone_path)"},{"line_number":163,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"7a016987_29ca1ea2","line":160,"updated":"2015-05-27 14:37:03.000000000","message":"There is a timout here which is 5s. Do we need to make it configurable?","commit_id":"24716301c7ae7282e5f1fb2b7b974d86d7815b6b"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"5f238fc6cc12ac235f320284284f99ed20d01dd4","unresolved":false,"context_lines":[{"line_number":180,"context_line":"            source \u003d os.path.join(source_path, source_file)"},{"line_number":181,"context_line":"            target \u003d os.path.join(local_path, clone_name)"},{"line_number":182,"context_line":"            self._move_file(source, target)"},{"line_number":183,"context_line":"            self._execute(\u0027rm\u0027, \u0027-rf\u0027, source_path,"},{"line_number":184,"context_line":"                          run_as_root\u003dself._execute_as_root)"},{"line_number":185,"context_line":"        else:"},{"line_number":186,"context_line":"            raise exception.CinderException("}],"source_content_type":"text/x-python","patch_set":7,"id":"7a016987_8e9358fa","line":183,"updated":"2015-05-27 14:37:03.000000000","message":"Can we call _delete_file here?","commit_id":"24716301c7ae7282e5f1fb2b7b974d86d7815b6b"},{"author":{"_account_id":5149,"name":"Sean Chen","email":"xuchenx@gmail.com","username":"opencompute"},"change_message_id":"b5ab7edc9e4282e35ade0b2dca49618cfe492e57","unresolved":false,"context_lines":[{"line_number":180,"context_line":"            source \u003d os.path.join(source_path, source_file)"},{"line_number":181,"context_line":"            target \u003d os.path.join(local_path, clone_name)"},{"line_number":182,"context_line":"            self._move_file(source, target)"},{"line_number":183,"context_line":"            self._execute(\u0027rm\u0027, \u0027-rf\u0027, source_path,"},{"line_number":184,"context_line":"                          run_as_root\u003dself._execute_as_root)"},{"line_number":185,"context_line":"        else:"},{"line_number":186,"context_line":"            raise exception.CinderException("}],"source_content_type":"text/x-python","patch_set":7,"id":"7a016987_259a3a6f","line":183,"in_reply_to":"7a016987_8e9358fa","updated":"2015-05-27 16:35:30.000000000","message":"no, this removes a directory.","commit_id":"24716301c7ae7282e5f1fb2b7b974d86d7815b6b"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"ab363a39defd557f1c18c6219c16da8f856f94d6","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        path \u003d self.local_path(volume)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        self._set_rw_permissions(path)"},{"line_number":131,"context_line":"        if vol_size !\u003d snap_size:"},{"line_number":132,"context_line":"            try:"},{"line_number":133,"context_line":"                self.extend_volume(volume, vol_size)"},{"line_number":134,"context_line":"            except Exception:"}],"source_content_type":"text/x-python","patch_set":10,"id":"7a016987_34380e3d","line":131,"updated":"2015-05-28 11:45:23.000000000","message":"Is there any unit test for this case?","commit_id":"8b762bd59e0f863d8515f78c14b744392f92008c"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"ab363a39defd557f1c18c6219c16da8f856f94d6","unresolved":false,"context_lines":[{"line_number":148,"context_line":"            retry \u003d 0"},{"line_number":149,"context_line":"            while not snapshot_id:"},{"line_number":150,"context_line":"                retry +\u003d 1"},{"line_number":151,"context_line":"                if retry \u003e 5:"},{"line_number":152,"context_line":"                    msg \u003d _(\u0027Failed to get snapshot for \u0027"},{"line_number":153,"context_line":"                            \u0027volume %s.\u0027) % volume_name"},{"line_number":154,"context_line":"                    raise exception.VolumeDriverException(msg)"}],"source_content_type":"text/x-python","patch_set":10,"id":"7a016987_b4a87e78","line":151,"updated":"2015-05-28 11:45:23.000000000","message":"I couldn\u0027t find any unit test for this case. You may have to add more test cases to cover various error conditions and special cases.","commit_id":"8b762bd59e0f863d8515f78c14b744392f92008c"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"ab363a39defd557f1c18c6219c16da8f856f94d6","unresolved":false,"context_lines":[{"line_number":149,"context_line":"            while not snapshot_id:"},{"line_number":150,"context_line":"                retry +\u003d 1"},{"line_number":151,"context_line":"                if retry \u003e 5:"},{"line_number":152,"context_line":"                    msg \u003d _(\u0027Failed to get snapshot for \u0027"},{"line_number":153,"context_line":"                            \u0027volume %s.\u0027) % volume_name"},{"line_number":154,"context_line":"                    raise exception.VolumeDriverException(msg)"},{"line_number":155,"context_line":"                time.sleep(1)"}],"source_content_type":"text/x-python","patch_set":10,"id":"7a016987_54826a01","line":152,"updated":"2015-05-28 11:45:23.000000000","message":"Why it is not logged?","commit_id":"8b762bd59e0f863d8515f78c14b744392f92008c"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"b64f055d7a4829dd896dc089af367e2779e45eb9","unresolved":false,"context_lines":[{"line_number":467,"context_line":""},{"line_number":468,"context_line":"    def _resize_image_file(self, path, new_size):"},{"line_number":469,"context_line":"        \"\"\"Resizes the image file on share to new size.\"\"\""},{"line_number":470,"context_line":"        LOG.debug(\u0027Checking file for resize\u0027)"},{"line_number":471,"context_line":"        if self._is_file_size_equal(path, new_size):"},{"line_number":472,"context_line":"            return"},{"line_number":473,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":12,"id":"5afe65bd_d220074c","line":470,"updated":"2015-06-02 06:11:13.000000000","message":"Please add a period \".\" at the end of the sentence.","commit_id":"5b8f7c565e92c5ccdbabb506434aad41434b5b98"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"4ac1f49a624f2812717a81e108979410effb280d","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        for op in required_ops:"},{"line_number":108,"context_line":"            if not getattr(configuration, op):"},{"line_number":109,"context_line":"                msg \u003d _(\u0027Configuration value %s is not set.\u0027) % op"},{"line_number":110,"context_line":"                raise exception.InvalidInput(reason\u003dmsg)"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    def _create_volume_snapshot(self, volume_name, snapshot_name, volume_id,"},{"line_number":113,"context_line":"                                share\u003dNone, vm_name\u003dNone):"}],"source_content_type":"text/x-python","patch_set":14,"id":"5afe65bd_39f96081","line":110,"updated":"2015-06-02 19:48:07.000000000","message":"Should use exception.InvalidConfigurationValue()  (value\u003dNone).","commit_id":"9e652de8d196a811de946a653cca3a5fbe28b9ae"},{"author":{"_account_id":5149,"name":"Sean Chen","email":"xuchenx@gmail.com","username":"opencompute"},"change_message_id":"34be08235128df6f6d10476239183e3f1f49ee41","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        for op in required_ops:"},{"line_number":108,"context_line":"            if not getattr(configuration, op):"},{"line_number":109,"context_line":"                msg \u003d _(\u0027Configuration value %s is not set.\u0027) % op"},{"line_number":110,"context_line":"                raise exception.InvalidInput(reason\u003dmsg)"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    def _create_volume_snapshot(self, volume_name, snapshot_name, volume_id,"},{"line_number":113,"context_line":"                                share\u003dNone, vm_name\u003dNone):"}],"source_content_type":"text/x-python","patch_set":14,"id":"5afe65bd_6f0ca694","line":110,"in_reply_to":"5afe65bd_39f96081","updated":"2015-06-02 20:24:51.000000000","message":"Done","commit_id":"9e652de8d196a811de946a653cca3a5fbe28b9ae"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"4ac1f49a624f2812717a81e108979410effb280d","unresolved":false,"context_lines":[{"line_number":112,"context_line":"    def _create_volume_snapshot(self, volume_name, snapshot_name, volume_id,"},{"line_number":113,"context_line":"                                share\u003dNone, vm_name\u003dNone):"},{"line_number":114,"context_line":"        \"\"\"Creates a volume snapshot.\"\"\""},{"line_number":115,"context_line":"        (host, path) \u003d self._get_export_ip_path(volume_id, share)"},{"line_number":116,"context_line":"        volume_path \u003d \u0027%s/%s\u0027 % (path, volume_name)"},{"line_number":117,"context_line":"        with Client(self._hostname, self._username, self._password) as c:"},{"line_number":118,"context_line":"            return c.create_snapshot(volume_path, snapshot_name, vm_name)"}],"source_content_type":"text/x-python","patch_set":14,"id":"5afe65bd_f903c8b6","line":115,"updated":"2015-06-02 19:48:07.000000000","message":"Generally, \"host\" should be \"_host\" here to indicate it\u0027s unused.","commit_id":"9e652de8d196a811de946a653cca3a5fbe28b9ae"},{"author":{"_account_id":5149,"name":"Sean Chen","email":"xuchenx@gmail.com","username":"opencompute"},"change_message_id":"34be08235128df6f6d10476239183e3f1f49ee41","unresolved":false,"context_lines":[{"line_number":112,"context_line":"    def _create_volume_snapshot(self, volume_name, snapshot_name, volume_id,"},{"line_number":113,"context_line":"                                share\u003dNone, vm_name\u003dNone):"},{"line_number":114,"context_line":"        \"\"\"Creates a volume snapshot.\"\"\""},{"line_number":115,"context_line":"        (host, path) \u003d self._get_export_ip_path(volume_id, share)"},{"line_number":116,"context_line":"        volume_path \u003d \u0027%s/%s\u0027 % (path, volume_name)"},{"line_number":117,"context_line":"        with Client(self._hostname, self._username, self._password) as c:"},{"line_number":118,"context_line":"            return c.create_snapshot(volume_path, snapshot_name, vm_name)"}],"source_content_type":"text/x-python","patch_set":14,"id":"5afe65bd_4f11eaab","line":115,"in_reply_to":"5afe65bd_f903c8b6","updated":"2015-06-02 20:24:51.000000000","message":"Done","commit_id":"9e652de8d196a811de946a653cca3a5fbe28b9ae"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"4ac1f49a624f2812717a81e108979410effb280d","unresolved":false,"context_lines":[{"line_number":340,"context_line":"    def _move_file(self, source_path, dest_path):"},{"line_number":341,"context_line":"        \"\"\"Moves source to destination.\"\"\""},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"        @utils.synchronized(dest_path, external\u003dTrue)"},{"line_number":344,"context_line":"        def _do_move(src, dst):"},{"line_number":345,"context_line":"            if os.path.exists(dst):"},{"line_number":346,"context_line":"                LOG.warning(_LW(\"Destination %s already exists.\"), dst)"}],"source_content_type":"text/x-python","patch_set":14,"id":"5afe65bd_79b6b88b","line":343,"updated":"2015-06-02 19:48:07.000000000","message":"dest_path probably shouldn\u0027t be used as the name of the lock file.  Is this on purpose?","commit_id":"9e652de8d196a811de946a653cca3a5fbe28b9ae"},{"author":{"_account_id":5149,"name":"Sean Chen","email":"xuchenx@gmail.com","username":"opencompute"},"change_message_id":"34be08235128df6f6d10476239183e3f1f49ee41","unresolved":false,"context_lines":[{"line_number":340,"context_line":"    def _move_file(self, source_path, dest_path):"},{"line_number":341,"context_line":"        \"\"\"Moves source to destination.\"\"\""},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"        @utils.synchronized(dest_path, external\u003dTrue)"},{"line_number":344,"context_line":"        def _do_move(src, dst):"},{"line_number":345,"context_line":"            if os.path.exists(dst):"},{"line_number":346,"context_line":"                LOG.warning(_LW(\"Destination %s already exists.\"), dst)"}],"source_content_type":"text/x-python","patch_set":14,"id":"5afe65bd_af605e36","line":343,"in_reply_to":"5afe65bd_79b6b88b","updated":"2015-06-02 20:24:51.000000000","message":"dest_path will be used as the name of synchronized semaphore, not a lock file.","commit_id":"9e652de8d196a811de946a653cca3a5fbe28b9ae"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"4ac1f49a624f2812717a81e108979410effb280d","unresolved":false,"context_lines":[{"line_number":601,"context_line":"        return local_path"},{"line_number":602,"context_line":""},{"line_number":603,"context_line":""},{"line_number":604,"context_line":"class Client(object):"},{"line_number":605,"context_line":"    \"\"\"REST client for Tintri\"\"\""},{"line_number":606,"context_line":""},{"line_number":607,"context_line":"    def __init__(self, hostname, username, password):"}],"source_content_type":"text/x-python","patch_set":14,"id":"5afe65bd_99ccd436","line":604,"updated":"2015-06-02 19:48:07.000000000","message":"Please name this something more specific like TintriClient.","commit_id":"9e652de8d196a811de946a653cca3a5fbe28b9ae"},{"author":{"_account_id":5149,"name":"Sean Chen","email":"xuchenx@gmail.com","username":"opencompute"},"change_message_id":"34be08235128df6f6d10476239183e3f1f49ee41","unresolved":false,"context_lines":[{"line_number":601,"context_line":"        return local_path"},{"line_number":602,"context_line":""},{"line_number":603,"context_line":""},{"line_number":604,"context_line":"class Client(object):"},{"line_number":605,"context_line":"    \"\"\"REST client for Tintri\"\"\""},{"line_number":606,"context_line":""},{"line_number":607,"context_line":"    def __init__(self, hostname, username, password):"}],"source_content_type":"text/x-python","patch_set":14,"id":"5afe65bd_8f65a246","line":604,"in_reply_to":"5afe65bd_99ccd436","updated":"2015-06-02 20:24:51.000000000","message":"Done","commit_id":"9e652de8d196a811de946a653cca3a5fbe28b9ae"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"4ac1f49a624f2812717a81e108979410effb280d","unresolved":false,"context_lines":[{"line_number":674,"context_line":"            return volume_path"},{"line_number":675,"context_line":""},{"line_number":676,"context_line":"    def create_snapshot(self, volume_path, volume_name, vm_name):"},{"line_number":677,"context_line":"        # Creates a volume snapshot"},{"line_number":678,"context_line":"        request \u003d {\u0027typeId\u0027: \u0027com.tintri.api.rest.\u0027 + api_version +"},{"line_number":679,"context_line":"                             \u0027.dto.domain.beans.cinder.CinderSnapshotSpec\u0027,"},{"line_number":680,"context_line":"                   \u0027file\u0027: Client._remove_prefix(volume_path, tintri_path),"}],"source_content_type":"text/x-python","patch_set":14,"id":"5afe65bd_19d904f4","line":677,"updated":"2015-06-02 19:48:07.000000000","message":"Should use docstring format for this comment.","commit_id":"9e652de8d196a811de946a653cca3a5fbe28b9ae"},{"author":{"_account_id":5149,"name":"Sean Chen","email":"xuchenx@gmail.com","username":"opencompute"},"change_message_id":"34be08235128df6f6d10476239183e3f1f49ee41","unresolved":false,"context_lines":[{"line_number":674,"context_line":"            return volume_path"},{"line_number":675,"context_line":""},{"line_number":676,"context_line":"    def create_snapshot(self, volume_path, volume_name, vm_name):"},{"line_number":677,"context_line":"        # Creates a volume snapshot"},{"line_number":678,"context_line":"        request \u003d {\u0027typeId\u0027: \u0027com.tintri.api.rest.\u0027 + api_version +"},{"line_number":679,"context_line":"                             \u0027.dto.domain.beans.cinder.CinderSnapshotSpec\u0027,"},{"line_number":680,"context_line":"                   \u0027file\u0027: Client._remove_prefix(volume_path, tintri_path),"}],"source_content_type":"text/x-python","patch_set":14,"id":"5afe65bd_6f5a6685","line":677,"in_reply_to":"5afe65bd_19d904f4","updated":"2015-06-02 20:24:51.000000000","message":"Done","commit_id":"9e652de8d196a811de946a653cca3a5fbe28b9ae"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"4ac1f49a624f2812717a81e108979410effb280d","unresolved":false,"context_lines":[{"line_number":694,"context_line":"        return r.json()[0]"},{"line_number":695,"context_line":""},{"line_number":696,"context_line":"    def get_snapshot(self, volume_name):"},{"line_number":697,"context_line":"        # Gets a volume snapshot"},{"line_number":698,"context_line":"        filter \u003d {\u0027vmUuid\u0027: volume_name}"},{"line_number":699,"context_line":""},{"line_number":700,"context_line":"        payload \u003d \u0027/\u0027 + api_version + \u0027/snapshot\u0027"}],"source_content_type":"text/x-python","patch_set":14,"id":"5afe65bd_f9e508a8","line":697,"updated":"2015-06-02 19:48:07.000000000","message":"Should use docstring format for this comment.","commit_id":"9e652de8d196a811de946a653cca3a5fbe28b9ae"},{"author":{"_account_id":5149,"name":"Sean Chen","email":"xuchenx@gmail.com","username":"opencompute"},"change_message_id":"34be08235128df6f6d10476239183e3f1f49ee41","unresolved":false,"context_lines":[{"line_number":694,"context_line":"        return r.json()[0]"},{"line_number":695,"context_line":""},{"line_number":696,"context_line":"    def get_snapshot(self, volume_name):"},{"line_number":697,"context_line":"        # Gets a volume snapshot"},{"line_number":698,"context_line":"        filter \u003d {\u0027vmUuid\u0027: volume_name}"},{"line_number":699,"context_line":""},{"line_number":700,"context_line":"        payload \u003d \u0027/\u0027 + api_version + \u0027/snapshot\u0027"}],"source_content_type":"text/x-python","patch_set":14,"id":"5afe65bd_2f558e4f","line":697,"in_reply_to":"5afe65bd_f9e508a8","updated":"2015-06-02 20:24:51.000000000","message":"Done","commit_id":"9e652de8d196a811de946a653cca3a5fbe28b9ae"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"4ac1f49a624f2812717a81e108979410effb280d","unresolved":false,"context_lines":[{"line_number":707,"context_line":"            return r.json()[\u0027items\u0027][0][\u0027uuid\u0027][\u0027uuid\u0027]"},{"line_number":708,"context_line":""},{"line_number":709,"context_line":"    def delete_snapshot(self, snapshot_uuid):"},{"line_number":710,"context_line":"        # Deletes a snapshot"},{"line_number":711,"context_line":"        url \u003d \u0027/\u0027 + api_version + \u0027/snapshot/\u0027"},{"line_number":712,"context_line":"        self.delete(url + snapshot_uuid)"},{"line_number":713,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"5afe65bd_d9e24c9f","line":710,"updated":"2015-06-02 19:48:07.000000000","message":"Should use docstring format for this comment.","commit_id":"9e652de8d196a811de946a653cca3a5fbe28b9ae"},{"author":{"_account_id":5149,"name":"Sean Chen","email":"xuchenx@gmail.com","username":"opencompute"},"change_message_id":"34be08235128df6f6d10476239183e3f1f49ee41","unresolved":false,"context_lines":[{"line_number":707,"context_line":"            return r.json()[\u0027items\u0027][0][\u0027uuid\u0027][\u0027uuid\u0027]"},{"line_number":708,"context_line":""},{"line_number":709,"context_line":"    def delete_snapshot(self, snapshot_uuid):"},{"line_number":710,"context_line":"        # Deletes a snapshot"},{"line_number":711,"context_line":"        url \u003d \u0027/\u0027 + api_version + \u0027/snapshot/\u0027"},{"line_number":712,"context_line":"        self.delete(url + snapshot_uuid)"},{"line_number":713,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"5afe65bd_cf4b9aaf","line":710,"in_reply_to":"5afe65bd_d9e24c9f","updated":"2015-06-02 20:24:51.000000000","message":"Done","commit_id":"9e652de8d196a811de946a653cca3a5fbe28b9ae"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"4ac1f49a624f2812717a81e108979410effb280d","unresolved":false,"context_lines":[{"line_number":712,"context_line":"        self.delete(url + snapshot_uuid)"},{"line_number":713,"context_line":""},{"line_number":714,"context_line":"    def clone_volume(self, snapshot_uuid, volume_path):"},{"line_number":715,"context_line":"        # Clones a volume from snapshot"},{"line_number":716,"context_line":"        request \u003d {\u0027typeId\u0027: \u0027com.tintri.api.rest.\u0027 + api_version +"},{"line_number":717,"context_line":"                             \u0027.dto.domain.beans.cinder.CinderCloneSpec\u0027,"},{"line_number":718,"context_line":"                   \u0027destinationPaths\u0027:"}],"source_content_type":"text/x-python","patch_set":14,"id":"5afe65bd_b9ee7089","line":715,"updated":"2015-06-02 19:48:07.000000000","message":"Should use docstring format for this comment.","commit_id":"9e652de8d196a811de946a653cca3a5fbe28b9ae"},{"author":{"_account_id":5149,"name":"Sean Chen","email":"xuchenx@gmail.com","username":"opencompute"},"change_message_id":"34be08235128df6f6d10476239183e3f1f49ee41","unresolved":false,"context_lines":[{"line_number":712,"context_line":"        self.delete(url + snapshot_uuid)"},{"line_number":713,"context_line":""},{"line_number":714,"context_line":"    def clone_volume(self, snapshot_uuid, volume_path):"},{"line_number":715,"context_line":"        # Clones a volume from snapshot"},{"line_number":716,"context_line":"        request \u003d {\u0027typeId\u0027: \u0027com.tintri.api.rest.\u0027 + api_version +"},{"line_number":717,"context_line":"                             \u0027.dto.domain.beans.cinder.CinderCloneSpec\u0027,"},{"line_number":718,"context_line":"                   \u0027destinationPaths\u0027:"}],"source_content_type":"text/x-python","patch_set":14,"id":"5afe65bd_8fcc8236","line":715,"in_reply_to":"5afe65bd_b9ee7089","updated":"2015-06-02 20:24:51.000000000","message":"Done","commit_id":"9e652de8d196a811de946a653cca3a5fbe28b9ae"}]}
