)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":17405,"name":"Jacob Gregor","email":"jgregor@us.ibm.com","username":"jgregor"},"change_message_id":"7ca043153e7423bc515563ffe3e1a9f7c115b190","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This patch introduces Coho Data volume driver along with unit tests."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Implements: blueprint coho-cinder-driver"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I06a66d10add9132d0f3afca054d68094ddfb4da0"},{"line_number":14,"context_line":"Signed-off-by: Bardia Keyoumarsi \u003cbardia.keyoumarsi@cohodata.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"ba8a016a_cc9d7c67","line":12,"updated":"2015-11-18 14:41:08.000000000","message":"We should add a DocImpact tag here since we are adding config options in coho.py.","commit_id":"dc5271f9afbf7eb5a5d9089cc7bfafad9a8197e8"},{"author":{"_account_id":18448,"name":"Bardia Keyoumarsi","email":"bardia.keyoumarsi@cohodata.com","username":"bkeyoumarsi"},"change_message_id":"a5f81059bffd67c7540563da1d37f2632390268b","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This patch introduces Coho Data volume driver along with unit tests."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Implements: blueprint coho-cinder-driver"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I06a66d10add9132d0f3afca054d68094ddfb4da0"},{"line_number":14,"context_line":"Signed-off-by: Bardia Keyoumarsi \u003cbardia.keyoumarsi@cohodata.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"ba8a016a_e95c994c","line":12,"in_reply_to":"ba8a016a_cc9d7c67","updated":"2015-11-19 22:00:47.000000000","message":"Done","commit_id":"dc5271f9afbf7eb5a5d9089cc7bfafad9a8197e8"}],"cinder/exception.py":[{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"35f16221b56f8d2a5796d22db36aa1ab29c7d70b","unresolved":false,"context_lines":[{"line_number":1021,"context_line":""},{"line_number":1022,"context_line":"# Coho drivers"},{"line_number":1023,"context_line":""},{"line_number":1024,"context_line":""},{"line_number":1025,"context_line":"class CohoException(VolumeDriverException):"},{"line_number":1026,"context_line":"    message \u003d _(\"Coho Data Cinder driver failure: %(reason)s\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a8ffd7b_84e26a9e","line":1024,"updated":"2015-11-24 16:41:09.000000000","message":"Please remove empty lines 1023-1024.","commit_id":"544af43cdc4832ab7ce9b53896f31d5927886fe3"},{"author":{"_account_id":18448,"name":"Bardia Keyoumarsi","email":"bardia.keyoumarsi@cohodata.com","username":"bkeyoumarsi"},"change_message_id":"a73f7a1b44c4e675430abebcf7344202d170905b","unresolved":false,"context_lines":[{"line_number":1021,"context_line":""},{"line_number":1022,"context_line":"# Coho drivers"},{"line_number":1023,"context_line":""},{"line_number":1024,"context_line":""},{"line_number":1025,"context_line":"class CohoException(VolumeDriverException):"},{"line_number":1026,"context_line":"    message \u003d _(\"Coho Data Cinder driver failure: %(reason)s\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a8ffd7b_0e944789","line":1024,"in_reply_to":"9a8ffd7b_84e26a9e","updated":"2015-11-24 19:46:31.000000000","message":"Done","commit_id":"544af43cdc4832ab7ce9b53896f31d5927886fe3"}],"cinder/tests/unit/test_coho.py":[{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"c152299f6ceeb4db50dafb012b532bab47d85ea3","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        mock_os_path_exists.assert_has_calls("},{"line_number":125,"context_line":"            [mock.call(self.configuration.coho_shares_config)])"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    def test_setup_faile_when_nfs_client_is_not_installed(self):"},{"line_number":128,"context_line":"        \"\"\"do_setup should throw error if nfs client is not installed.\"\"\""},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        drv \u003d coho.CohoDriver(configuration\u003dself.configuration)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_a5baa621","line":127,"updated":"2015-11-18 04:36:00.000000000","message":"s/faile/fail/","commit_id":"dc5271f9afbf7eb5a5d9089cc7bfafad9a8197e8"},{"author":{"_account_id":18448,"name":"Bardia Keyoumarsi","email":"bardia.keyoumarsi@cohodata.com","username":"bkeyoumarsi"},"change_message_id":"a5f81059bffd67c7540563da1d37f2632390268b","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        mock_os_path_exists.assert_has_calls("},{"line_number":125,"context_line":"            [mock.call(self.configuration.coho_shares_config)])"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    def test_setup_faile_when_nfs_client_is_not_installed(self):"},{"line_number":128,"context_line":"        \"\"\"do_setup should throw error if nfs client is not installed.\"\"\""},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        drv \u003d coho.CohoDriver(configuration\u003dself.configuration)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_494da598","line":127,"in_reply_to":"ba8a016a_a5baa621","updated":"2015-11-19 22:00:47.000000000","message":"Done","commit_id":"dc5271f9afbf7eb5a5d9089cc7bfafad9a8197e8"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"c152299f6ceeb4db50dafb012b532bab47d85ea3","unresolved":false,"context_lines":[{"line_number":252,"context_line":"            [mock.call(VOLUME)])"},{"line_number":253,"context_line":"        mock_execute.assert_has_calls("},{"line_number":254,"context_line":"            [mock.call(\u0027truncate\u0027, \u0027-s\u0027, \u0027512G\u0027, LOCAL_PATH, run_as_root\u003dTrue)])"},{"line_number":255,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_85868263","line":255,"updated":"2015-11-18 04:36:00.000000000","message":"Please add a few more failure path tests.","commit_id":"dc5271f9afbf7eb5a5d9089cc7bfafad9a8197e8"},{"author":{"_account_id":18448,"name":"Bardia Keyoumarsi","email":"bardia.keyoumarsi@cohodata.com","username":"bkeyoumarsi"},"change_message_id":"18cfb3733a4760d1ce8f3ebb3199779cd422108e","unresolved":false,"context_lines":[{"line_number":252,"context_line":"            [mock.call(VOLUME)])"},{"line_number":253,"context_line":"        mock_execute.assert_has_calls("},{"line_number":254,"context_line":"            [mock.call(\u0027truncate\u0027, \u0027-s\u0027, \u0027512G\u0027, LOCAL_PATH, run_as_root\u003dTrue)])"},{"line_number":255,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_557be8bd","line":255,"in_reply_to":"ba8a016a_2cf4e558","updated":"2015-11-20 04:57:29.000000000","message":"Thank you for the clarification. I will include coverage in the next patch.","commit_id":"dc5271f9afbf7eb5a5d9089cc7bfafad9a8197e8"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"3eb1fbd44bedc12f6e7c7719cb5d9c5bbf1fdafe","unresolved":false,"context_lines":[{"line_number":252,"context_line":"            [mock.call(VOLUME)])"},{"line_number":253,"context_line":"        mock_execute.assert_has_calls("},{"line_number":254,"context_line":"            [mock.call(\u0027truncate\u0027, \u0027-s\u0027, \u0027512G\u0027, LOCAL_PATH, run_as_root\u003dTrue)])"},{"line_number":255,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_2cf4e558","line":255,"in_reply_to":"ba8a016a_69f4295a","updated":"2015-11-20 02:56:36.000000000","message":"My point being, your current unit test coverage is less than 50%, so it would be nice to get a little more coverage.\n\nLooking a little closer at that now, it does look like most paths through the driver class itself are being covered. There is very little, if any, coverage on the additional code within your source. Anything that can be done to increase that coverage would be great.","commit_id":"dc5271f9afbf7eb5a5d9089cc7bfafad9a8197e8"},{"author":{"_account_id":18448,"name":"Bardia Keyoumarsi","email":"bardia.keyoumarsi@cohodata.com","username":"bkeyoumarsi"},"change_message_id":"a5f81059bffd67c7540563da1d37f2632390268b","unresolved":false,"context_lines":[{"line_number":252,"context_line":"            [mock.call(VOLUME)])"},{"line_number":253,"context_line":"        mock_execute.assert_has_calls("},{"line_number":254,"context_line":"            [mock.call(\u0027truncate\u0027, \u0027-s\u0027, \u0027512G\u0027, LOCAL_PATH, run_as_root\u003dTrue)])"},{"line_number":255,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_69f4295a","line":255,"in_reply_to":"ba8a016a_85868263","updated":"2015-11-19 22:00:47.000000000","message":"I think that the tests included are covering the driver functions sufficiently. If any of the driver functions are raising exceptions I\u0027m making sure failure tests are included for them. \n\nCould you please elaborate on what you mean by your suggestion?","commit_id":"dc5271f9afbf7eb5a5d9089cc7bfafad9a8197e8"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"fa7163e73bed3ac313a1aeb636dd7199dead0bef","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        self.configuration.nfs_oversub_ratio \u003d 1.0"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def test_setup_failure_when_rpc_port_unconfigured(self):"},{"line_number":106,"context_line":"        \"\"\"raise exception if coho_rpc_port is not configured.\"\"\""},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"        self.configuration.coho_rpc_port \u003d None"},{"line_number":109,"context_line":"        drv \u003d coho.CohoDriver(configuration\u003dself.configuration)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_c633cdf4","line":106,"updated":"2015-11-28 13:45:08.000000000","message":"s/raise/Raise. Should change the first letter to capital.","commit_id":"c1df5cf89c727777547e60ee7f80522da239d001"},{"author":{"_account_id":18448,"name":"Bardia Keyoumarsi","email":"bardia.keyoumarsi@cohodata.com","username":"bkeyoumarsi"},"change_message_id":"226fda6a218e7db12ac1c12ff714e4d4066cf021","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        self.configuration.nfs_oversub_ratio \u003d 1.0"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def test_setup_failure_when_rpc_port_unconfigured(self):"},{"line_number":106,"context_line":"        \"\"\"raise exception if coho_rpc_port is not configured.\"\"\""},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"        self.configuration.coho_rpc_port \u003d None"},{"line_number":109,"context_line":"        drv \u003d coho.CohoDriver(configuration\u003dself.configuration)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_f57d476d","line":106,"in_reply_to":"9a8ffd7b_c633cdf4","updated":"2015-11-30 03:03:36.000000000","message":"Done","commit_id":"c1df5cf89c727777547e60ee7f80522da239d001"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"fa7163e73bed3ac313a1aeb636dd7199dead0bef","unresolved":false,"context_lines":[{"line_number":119,"context_line":"        self.assertTrue(nfs.NfsDriver.do_setup.called)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def test_setup_failure_when_coho_rpc_port_is_invalid(self):"},{"line_number":122,"context_line":"        \"\"\"raise exception if coho_rpc_port is an invalid port number\"\"\""},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"        self.configuration.coho_rpc_port \u003d 99999"},{"line_number":125,"context_line":"        drv \u003d coho.CohoDriver(configuration\u003dself.configuration)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_e62e118b","line":122,"updated":"2015-11-28 13:45:08.000000000","message":"Should change the first letter to capital.","commit_id":"c1df5cf89c727777547e60ee7f80522da239d001"},{"author":{"_account_id":18448,"name":"Bardia Keyoumarsi","email":"bardia.keyoumarsi@cohodata.com","username":"bkeyoumarsi"},"change_message_id":"226fda6a218e7db12ac1c12ff714e4d4066cf021","unresolved":false,"context_lines":[{"line_number":119,"context_line":"        self.assertTrue(nfs.NfsDriver.do_setup.called)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def test_setup_failure_when_coho_rpc_port_is_invalid(self):"},{"line_number":122,"context_line":"        \"\"\"raise exception if coho_rpc_port is an invalid port number\"\"\""},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"        self.configuration.coho_rpc_port \u003d 99999"},{"line_number":125,"context_line":"        drv \u003d coho.CohoDriver(configuration\u003dself.configuration)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_95995bc6","line":122,"in_reply_to":"9a8ffd7b_e62e118b","updated":"2015-11-30 03:03:36.000000000","message":"Done","commit_id":"c1df5cf89c727777547e60ee7f80522da239d001"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"fa7163e73bed3ac313a1aeb636dd7199dead0bef","unresolved":false,"context_lines":[{"line_number":135,"context_line":"        self.assertTrue(nfs.NfsDriver.do_setup.called)"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    def test_create_snapshot(self):"},{"line_number":138,"context_line":"        \"\"\"should create snapshot\"\"\""},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"        drv \u003d coho.CohoDriver(configuration\u003dself.configuration)"},{"line_number":141,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_8650650c","line":138,"updated":"2015-11-28 13:45:08.000000000","message":"Should change the first letter to capital.","commit_id":"c1df5cf89c727777547e60ee7f80522da239d001"},{"author":{"_account_id":18448,"name":"Bardia Keyoumarsi","email":"bardia.keyoumarsi@cohodata.com","username":"bkeyoumarsi"},"change_message_id":"226fda6a218e7db12ac1c12ff714e4d4066cf021","unresolved":false,"context_lines":[{"line_number":135,"context_line":"        self.assertTrue(nfs.NfsDriver.do_setup.called)"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    def test_create_snapshot(self):"},{"line_number":138,"context_line":"        \"\"\"should create snapshot\"\"\""},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"        drv \u003d coho.CohoDriver(configuration\u003dself.configuration)"},{"line_number":141,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_b5949f8a","line":138,"in_reply_to":"9a8ffd7b_8650650c","updated":"2015-11-30 03:03:36.000000000","message":"Done","commit_id":"c1df5cf89c727777547e60ee7f80522da239d001"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"ca3d5f5879df9cc92007b1f9db5e90f433d3078c","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2015 Coho Data, Inc."},{"line_number":2,"context_line":"# 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"},{"line_number":6,"context_line":"#    a copy of the License at"},{"line_number":7,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a8ffd7b_7438d4ee","line":4,"updated":"2015-12-02 19:30:26.000000000","message":"Extremely trivial nit, but if you do another update can you increase the indent of this first line to line up with the lines below? Otherwise not a big deal.","commit_id":"124f1bcea650e77de5a7aa29f1b4f24bb89d9609"},{"author":{"_account_id":18448,"name":"Bardia Keyoumarsi","email":"bardia.keyoumarsi@cohodata.com","username":"bkeyoumarsi"},"change_message_id":"688adb7eb73c2877e41fc5596dee7e3e8f437875","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2015 Coho Data, Inc."},{"line_number":2,"context_line":"# 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"},{"line_number":6,"context_line":"#    a copy of the License at"},{"line_number":7,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a8ffd7b_3d00d601","line":4,"in_reply_to":"9a8ffd7b_7438d4ee","updated":"2015-12-02 23:37:30.000000000","message":"Done","commit_id":"124f1bcea650e77de5a7aa29f1b4f24bb89d9609"}],"cinder/volume/drivers/coho.py":[{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"c152299f6ceeb4db50dafb012b532bab47d85ea3","unresolved":false,"context_lines":[{"line_number":87,"context_line":"    except ImportError:"},{"line_number":88,"context_line":"        uid \u003d gid \u003d 0"},{"line_number":89,"context_line":"    import time"},{"line_number":90,"context_line":"    return make_auth_unix(int(time.time()-unix_epoch()), \\"},{"line_number":91,"context_line":"              socket.gethostname(), uid, gid, [])"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"class Client:"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_65d11e57","line":90,"updated":"2015-11-18 04:36:00.000000000","message":"\\ not needed here, please remove.","commit_id":"dc5271f9afbf7eb5a5d9089cc7bfafad9a8197e8"},{"author":{"_account_id":18448,"name":"Bardia Keyoumarsi","email":"bardia.keyoumarsi@cohodata.com","username":"bkeyoumarsi"},"change_message_id":"a5f81059bffd67c7540563da1d37f2632390268b","unresolved":false,"context_lines":[{"line_number":87,"context_line":"    except ImportError:"},{"line_number":88,"context_line":"        uid \u003d gid \u003d 0"},{"line_number":89,"context_line":"    import time"},{"line_number":90,"context_line":"    return make_auth_unix(int(time.time()-unix_epoch()), \\"},{"line_number":91,"context_line":"              socket.gethostname(), uid, gid, [])"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"class Client:"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_49bfe560","line":90,"in_reply_to":"ba8a016a_65d11e57","updated":"2015-11-19 22:00:47.000000000","message":"Done","commit_id":"dc5271f9afbf7eb5a5d9089cc7bfafad9a8197e8"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"c152299f6ceeb4db50dafb012b532bab47d85ea3","unresolved":false,"context_lines":[{"line_number":193,"context_line":"            if stat \u003d\u003d RPC_MISMATCH:"},{"line_number":194,"context_line":"                low \u003d self.unpacker.unpack_uint()"},{"line_number":195,"context_line":"                high \u003d self.unpacker.unpack_uint()"},{"line_number":196,"context_line":"                raise RuntimeError, \\"},{"line_number":197,"context_line":"                  \u0027MSG_DENIED: RPC_MISMATCH: %r\u0027 % ((low, high),)"},{"line_number":198,"context_line":"            if stat \u003d\u003d AUTH_ERROR:"},{"line_number":199,"context_line":"                stat \u003d self.unpacker.unpack_uint()"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_e5218e4e","line":196,"updated":"2015-11-18 04:36:00.000000000","message":"Don\u0027t use \\ for line continuation.\n\nAll of these could avoid it if you do a more typical:\n\nraise RunTimeError(xx)\n\nAlso, all strings returned in an exception should be wrapped in the _() translation marker.","commit_id":"dc5271f9afbf7eb5a5d9089cc7bfafad9a8197e8"},{"author":{"_account_id":18448,"name":"Bardia Keyoumarsi","email":"bardia.keyoumarsi@cohodata.com","username":"bkeyoumarsi"},"change_message_id":"a5f81059bffd67c7540563da1d37f2632390268b","unresolved":false,"context_lines":[{"line_number":193,"context_line":"            if stat \u003d\u003d RPC_MISMATCH:"},{"line_number":194,"context_line":"                low \u003d self.unpacker.unpack_uint()"},{"line_number":195,"context_line":"                high \u003d self.unpacker.unpack_uint()"},{"line_number":196,"context_line":"                raise RuntimeError, \\"},{"line_number":197,"context_line":"                  \u0027MSG_DENIED: RPC_MISMATCH: %r\u0027 % ((low, high),)"},{"line_number":198,"context_line":"            if stat \u003d\u003d AUTH_ERROR:"},{"line_number":199,"context_line":"                stat \u003d self.unpacker.unpack_uint()"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_8992adf4","line":196,"in_reply_to":"ba8a016a_e5218e4e","updated":"2015-11-19 22:00:47.000000000","message":"Done","commit_id":"dc5271f9afbf7eb5a5d9089cc7bfafad9a8197e8"},{"author":{"_account_id":14377,"name":"Apoorva","email":"apps.desh@gmail.com","username":"apoorvad"},"change_message_id":"9ab98948037b9a330386deb3931eadedecb05719","unresolved":false,"context_lines":[{"line_number":311,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":312,"context_line":""},{"line_number":313,"context_line":"coho_opts \u003d ["},{"line_number":314,"context_line":"    cfg.StrOpt(\u0027coho_shares_config\u0027,"},{"line_number":315,"context_line":"               default\u003d\u0027/etc/cinder/coho_shares\u0027,"},{"line_number":316,"context_line":"               help\u003d\u0027File with the list of available Coho NFS shares\u0027),"},{"line_number":317,"context_line":"    cfg.IntOpt(\u0027coho_rpc_port\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_4a7b627b","line":314,"updated":"2015-11-19 18:07:31.000000000","message":"nfs_shares_config is an existing config option in cinder.conf. Consider reusing it.","commit_id":"dc5271f9afbf7eb5a5d9089cc7bfafad9a8197e8"},{"author":{"_account_id":18448,"name":"Bardia Keyoumarsi","email":"bardia.keyoumarsi@cohodata.com","username":"bkeyoumarsi"},"change_message_id":"a5f81059bffd67c7540563da1d37f2632390268b","unresolved":false,"context_lines":[{"line_number":311,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":312,"context_line":""},{"line_number":313,"context_line":"coho_opts \u003d ["},{"line_number":314,"context_line":"    cfg.StrOpt(\u0027coho_shares_config\u0027,"},{"line_number":315,"context_line":"               default\u003d\u0027/etc/cinder/coho_shares\u0027,"},{"line_number":316,"context_line":"               help\u003d\u0027File with the list of available Coho NFS shares\u0027),"},{"line_number":317,"context_line":"    cfg.IntOpt(\u0027coho_rpc_port\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_e9f7b9d0","line":314,"in_reply_to":"ba8a016a_2e46277b","updated":"2015-11-19 22:00:47.000000000","message":"Thank you Apoorva. I did not think of it that way. This will actually make things easier during do_setup.\n\nI will remove the coho_shares_config option and revert to using nfs_shares_config it in patch 2.","commit_id":"dc5271f9afbf7eb5a5d9089cc7bfafad9a8197e8"},{"author":{"_account_id":18448,"name":"Bardia Keyoumarsi","email":"bardia.keyoumarsi@cohodata.com","username":"bkeyoumarsi"},"change_message_id":"905002d23f303fa588092ae3da147e04788a54ed","unresolved":false,"context_lines":[{"line_number":311,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":312,"context_line":""},{"line_number":313,"context_line":"coho_opts \u003d ["},{"line_number":314,"context_line":"    cfg.StrOpt(\u0027coho_shares_config\u0027,"},{"line_number":315,"context_line":"               default\u003d\u0027/etc/cinder/coho_shares\u0027,"},{"line_number":316,"context_line":"               help\u003d\u0027File with the list of available Coho NFS shares\u0027),"},{"line_number":317,"context_line":"    cfg.IntOpt(\u0027coho_rpc_port\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_5a532917","line":314,"in_reply_to":"ba8a016a_4a7b627b","updated":"2015-11-19 19:48:59.000000000","message":"Yes we are aware of that. We decided to use our own share config file so that clients can have the ability to setup their system with both the Coho driver and the generic NFS driver.","commit_id":"dc5271f9afbf7eb5a5d9089cc7bfafad9a8197e8"},{"author":{"_account_id":14377,"name":"Apoorva","email":"apps.desh@gmail.com","username":"apoorvad"},"change_message_id":"6e5fe75616e83461217f82f371feeee51ed93981","unresolved":false,"context_lines":[{"line_number":311,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":312,"context_line":""},{"line_number":313,"context_line":"coho_opts \u003d ["},{"line_number":314,"context_line":"    cfg.StrOpt(\u0027coho_shares_config\u0027,"},{"line_number":315,"context_line":"               default\u003d\u0027/etc/cinder/coho_shares\u0027,"},{"line_number":316,"context_line":"               help\u003d\u0027File with the list of available Coho NFS shares\u0027),"},{"line_number":317,"context_line":"    cfg.IntOpt(\u0027coho_rpc_port\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_2e46277b","line":314,"in_reply_to":"ba8a016a_5a532917","updated":"2015-11-19 21:37:55.000000000","message":"You can still do that even with reusing config options.\n\nSomething similar to following in cinder.conf\n\nenabled_backends\u003dcoho1,nfs1\n\n\n[coho1]\nnfs_shares_config\u003dnfs_shares1\nvolume_driver\u003dcinder.volume.drivers.coho\nvolume_backend_name\u003dcoho\n\n[nfs1]\nnfs_shares_config\u003dnfs_shares2\nvolume_driver\u003dcinder.volume.drivers.nfs.NfsDriver\nvolume_backend_name\u003dNFS","commit_id":"dc5271f9afbf7eb5a5d9089cc7bfafad9a8197e8"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"c152299f6ceeb4db50dafb012b532bab47d85ea3","unresolved":false,"context_lines":[{"line_number":319,"context_line":"               help\u003d\u0027RPC port to connect to Coha Data MicroArray\u0027),"},{"line_number":320,"context_line":"    cfg.BoolOpt(\u0027coho_sparsed_volumes\u0027,"},{"line_number":321,"context_line":"                default\u003dTrue,"},{"line_number":322,"context_line":"                help\u003d(\u0027Create volumes as sparsed files which take no space.\u0027"},{"line_number":323,"context_line":"                      \u0027If set to False volume is created as regular file.\u0027"},{"line_number":324,"context_line":"                      \u0027In such case volume creation takes a lot of time.\u0027)),"},{"line_number":325,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_05e4d20a","line":322,"updated":"2015-11-18 04:36:00.000000000","message":"Need space at the end of the strings on this and the next line so the final string doesn\u0027t run together.","commit_id":"dc5271f9afbf7eb5a5d9089cc7bfafad9a8197e8"},{"author":{"_account_id":18448,"name":"Bardia Keyoumarsi","email":"bardia.keyoumarsi@cohodata.com","username":"bkeyoumarsi"},"change_message_id":"a5f81059bffd67c7540563da1d37f2632390268b","unresolved":false,"context_lines":[{"line_number":319,"context_line":"               help\u003d\u0027RPC port to connect to Coha Data MicroArray\u0027),"},{"line_number":320,"context_line":"    cfg.BoolOpt(\u0027coho_sparsed_volumes\u0027,"},{"line_number":321,"context_line":"                default\u003dTrue,"},{"line_number":322,"context_line":"                help\u003d(\u0027Create volumes as sparsed files which take no space.\u0027"},{"line_number":323,"context_line":"                      \u0027If set to False volume is created as regular file.\u0027"},{"line_number":324,"context_line":"                      \u0027In such case volume creation takes a lot of time.\u0027)),"},{"line_number":325,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_e987b9b2","line":322,"in_reply_to":"ba8a016a_05e4d20a","updated":"2015-11-19 22:00:47.000000000","message":"Done","commit_id":"dc5271f9afbf7eb5a5d9089cc7bfafad9a8197e8"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"c152299f6ceeb4db50dafb012b532bab47d85ea3","unresolved":false,"context_lines":[{"line_number":336,"context_line":"    \"\"\""},{"line_number":337,"context_line":"    driver_prefix \u003d \u0027coho\u0027"},{"line_number":338,"context_line":"    volume_backend_name \u003d \u0027Coho_Data\u0027"},{"line_number":339,"context_line":"    VERSION \u003d VERSION"},{"line_number":340,"context_line":""},{"line_number":341,"context_line":"    \"\"\" We have to overload this attribute of RemoteFSDriver because"},{"line_number":342,"context_line":"    unfortunately the base method doesn\u0027t accept exports of the form:"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_85be82d2","line":339,"updated":"2015-11-18 04:36:00.000000000","message":"This doesn\u0027t look right.","commit_id":"dc5271f9afbf7eb5a5d9089cc7bfafad9a8197e8"},{"author":{"_account_id":18448,"name":"Bardia Keyoumarsi","email":"bardia.keyoumarsi@cohodata.com","username":"bkeyoumarsi"},"change_message_id":"a5f81059bffd67c7540563da1d37f2632390268b","unresolved":false,"context_lines":[{"line_number":336,"context_line":"    \"\"\""},{"line_number":337,"context_line":"    driver_prefix \u003d \u0027coho\u0027"},{"line_number":338,"context_line":"    volume_backend_name \u003d \u0027Coho_Data\u0027"},{"line_number":339,"context_line":"    VERSION \u003d VERSION"},{"line_number":340,"context_line":""},{"line_number":341,"context_line":"    \"\"\" We have to overload this attribute of RemoteFSDriver because"},{"line_number":342,"context_line":"    unfortunately the base method doesn\u0027t accept exports of the form:"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_699bc918","line":339,"in_reply_to":"ba8a016a_85be82d2","updated":"2015-11-19 22:00:47.000000000","message":"Done","commit_id":"dc5271f9afbf7eb5a5d9089cc7bfafad9a8197e8"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"c152299f6ceeb4db50dafb012b532bab47d85ea3","unresolved":false,"context_lines":[{"line_number":338,"context_line":"    volume_backend_name \u003d \u0027Coho_Data\u0027"},{"line_number":339,"context_line":"    VERSION \u003d VERSION"},{"line_number":340,"context_line":""},{"line_number":341,"context_line":"    \"\"\" We have to overload this attribute of RemoteFSDriver because"},{"line_number":342,"context_line":"    unfortunately the base method doesn\u0027t accept exports of the form:"},{"line_number":343,"context_line":""},{"line_number":344,"context_line":"      \u003caddress\u003e:/"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_25b556ed","line":341,"updated":"2015-11-18 04:36:00.000000000","message":"Don\u0027t use docstring here, just normal comment format.","commit_id":"dc5271f9afbf7eb5a5d9089cc7bfafad9a8197e8"},{"author":{"_account_id":18448,"name":"Bardia Keyoumarsi","email":"bardia.keyoumarsi@cohodata.com","username":"bkeyoumarsi"},"change_message_id":"a5f81059bffd67c7540563da1d37f2632390268b","unresolved":false,"context_lines":[{"line_number":338,"context_line":"    volume_backend_name \u003d \u0027Coho_Data\u0027"},{"line_number":339,"context_line":"    VERSION \u003d VERSION"},{"line_number":340,"context_line":""},{"line_number":341,"context_line":"    \"\"\" We have to overload this attribute of RemoteFSDriver because"},{"line_number":342,"context_line":"    unfortunately the base method doesn\u0027t accept exports of the form:"},{"line_number":343,"context_line":""},{"line_number":344,"context_line":"      \u003caddress\u003e:/"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_29a14146","line":341,"in_reply_to":"ba8a016a_25b556ed","updated":"2015-11-19 22:00:47.000000000","message":"Done","commit_id":"dc5271f9afbf7eb5a5d9089cc7bfafad9a8197e8"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"c152299f6ceeb4db50dafb012b532bab47d85ea3","unresolved":false,"context_lines":[{"line_number":370,"context_line":"        config \u003d self.configuration.coho_shares_config"},{"line_number":371,"context_line":"        if not config:"},{"line_number":372,"context_line":"            msg \u003d (_(\"There\u0027s no Coho shares config file configured (%s)\") %"},{"line_number":373,"context_line":"                   \u0027coho_shares_config\u0027)"},{"line_number":374,"context_line":"            LOG.warn(msg)"},{"line_number":375,"context_line":"            raise CohoException(msg)"},{"line_number":376,"context_line":"        if not os.path.exists(config):"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_85a522b6","line":373,"updated":"2015-11-18 04:36:00.000000000","message":"Don\u0027t perform string formatting on constant values. Just define the string.","commit_id":"dc5271f9afbf7eb5a5d9089cc7bfafad9a8197e8"},{"author":{"_account_id":18448,"name":"Bardia Keyoumarsi","email":"bardia.keyoumarsi@cohodata.com","username":"bkeyoumarsi"},"change_message_id":"a5f81059bffd67c7540563da1d37f2632390268b","unresolved":false,"context_lines":[{"line_number":370,"context_line":"        config \u003d self.configuration.coho_shares_config"},{"line_number":371,"context_line":"        if not config:"},{"line_number":372,"context_line":"            msg \u003d (_(\"There\u0027s no Coho shares config file configured (%s)\") %"},{"line_number":373,"context_line":"                   \u0027coho_shares_config\u0027)"},{"line_number":374,"context_line":"            LOG.warn(msg)"},{"line_number":375,"context_line":"            raise CohoException(msg)"},{"line_number":376,"context_line":"        if not os.path.exists(config):"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_29b86174","line":373,"in_reply_to":"ba8a016a_85a522b6","updated":"2015-11-19 22:00:47.000000000","message":"Done","commit_id":"dc5271f9afbf7eb5a5d9089cc7bfafad9a8197e8"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"c152299f6ceeb4db50dafb012b532bab47d85ea3","unresolved":false,"context_lines":[{"line_number":371,"context_line":"        if not config:"},{"line_number":372,"context_line":"            msg \u003d (_(\"There\u0027s no Coho shares config file configured (%s)\") %"},{"line_number":373,"context_line":"                   \u0027coho_shares_config\u0027)"},{"line_number":374,"context_line":"            LOG.warn(msg)"},{"line_number":375,"context_line":"            raise CohoException(msg)"},{"line_number":376,"context_line":"        if not os.path.exists(config):"},{"line_number":377,"context_line":"            msg \u003d (_(\"Coho shares config file at %(config)s doesn\u0027t exist\") %"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_e5966e4b","line":374,"updated":"2015-11-18 04:36:00.000000000","message":"LOG.warn is deprecated. Please change to LOG.warning.","commit_id":"dc5271f9afbf7eb5a5d9089cc7bfafad9a8197e8"},{"author":{"_account_id":18448,"name":"Bardia Keyoumarsi","email":"bardia.keyoumarsi@cohodata.com","username":"bkeyoumarsi"},"change_message_id":"a5f81059bffd67c7540563da1d37f2632390268b","unresolved":false,"context_lines":[{"line_number":371,"context_line":"        if not config:"},{"line_number":372,"context_line":"            msg \u003d (_(\"There\u0027s no Coho shares config file configured (%s)\") %"},{"line_number":373,"context_line":"                   \u0027coho_shares_config\u0027)"},{"line_number":374,"context_line":"            LOG.warn(msg)"},{"line_number":375,"context_line":"            raise CohoException(msg)"},{"line_number":376,"context_line":"        if not os.path.exists(config):"},{"line_number":377,"context_line":"            msg \u003d (_(\"Coho shares config file at %(config)s doesn\u0027t exist\") %"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_a9a4514a","line":374,"in_reply_to":"ba8a016a_e5966e4b","updated":"2015-11-19 22:00:47.000000000","message":"Done","commit_id":"dc5271f9afbf7eb5a5d9089cc7bfafad9a8197e8"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"c152299f6ceeb4db50dafb012b532bab47d85ea3","unresolved":false,"context_lines":[{"line_number":389,"context_line":"                          run_as_root\u003dFalse)"},{"line_number":390,"context_line":"        except OSError as exc:"},{"line_number":391,"context_line":"            if exc.errno \u003d\u003d errno.ENOENT:"},{"line_number":392,"context_line":"                msg \u003d _(\u0027%s is not installed\u0027) % package"},{"line_number":393,"context_line":"                raise CohoException(msg)"},{"line_number":394,"context_line":"            else:"},{"line_number":395,"context_line":"                raise"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_65903e44","line":392,"updated":"2015-11-18 04:36:00.000000000","message":"Any package requirements should probably be validated in setup.","commit_id":"dc5271f9afbf7eb5a5d9089cc7bfafad9a8197e8"},{"author":{"_account_id":18448,"name":"Bardia Keyoumarsi","email":"bardia.keyoumarsi@cohodata.com","username":"bkeyoumarsi"},"change_message_id":"905002d23f303fa588092ae3da147e04788a54ed","unresolved":false,"context_lines":[{"line_number":389,"context_line":"                          run_as_root\u003dFalse)"},{"line_number":390,"context_line":"        except OSError as exc:"},{"line_number":391,"context_line":"            if exc.errno \u003d\u003d errno.ENOENT:"},{"line_number":392,"context_line":"                msg \u003d _(\u0027%s is not installed\u0027) % package"},{"line_number":393,"context_line":"                raise CohoException(msg)"},{"line_number":394,"context_line":"            else:"},{"line_number":395,"context_line":"                raise"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_b706231a","line":392,"in_reply_to":"ba8a016a_65903e44","updated":"2015-11-19 19:48:59.000000000","message":"You mean the setup documentation? Isn\u0027t any validation supposed to happen in the do_setup fcn of the driver?","commit_id":"dc5271f9afbf7eb5a5d9089cc7bfafad9a8197e8"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"f2437bc823e7c07b520f3f9d692b13c4842ec8cd","unresolved":false,"context_lines":[{"line_number":389,"context_line":"                          run_as_root\u003dFalse)"},{"line_number":390,"context_line":"        except OSError as exc:"},{"line_number":391,"context_line":"            if exc.errno \u003d\u003d errno.ENOENT:"},{"line_number":392,"context_line":"                msg \u003d _(\u0027%s is not installed\u0027) % package"},{"line_number":393,"context_line":"                raise CohoException(msg)"},{"line_number":394,"context_line":"            else:"},{"line_number":395,"context_line":"                raise"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_1aea8174","line":392,"in_reply_to":"ba8a016a_b706231a","updated":"2015-11-19 19:59:56.000000000","message":"Oh, you\u0027re right. This is OK here.","commit_id":"dc5271f9afbf7eb5a5d9089cc7bfafad9a8197e8"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"c152299f6ceeb4db50dafb012b532bab47d85ea3","unresolved":false,"context_lines":[{"line_number":395,"context_line":"                raise"},{"line_number":396,"context_line":""},{"line_number":397,"context_line":"    def _do_clone_volume(self, volume, src):"},{"line_number":398,"context_line":"        \"\"\"Create a volume on given remote share with the same contents"},{"line_number":399,"context_line":"        as the specified source"},{"line_number":400,"context_line":"        \"\"\""},{"line_number":401,"context_line":"        volume_path \u003d self.local_path(volume)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_05a0528f","line":398,"updated":"2015-11-18 04:36:00.000000000","message":"Please use docstring format for these comments.\n\nhttp://docs.openstack.org/developer/hacking/#docstrings","commit_id":"dc5271f9afbf7eb5a5d9089cc7bfafad9a8197e8"},{"author":{"_account_id":18448,"name":"Bardia Keyoumarsi","email":"bardia.keyoumarsi@cohodata.com","username":"bkeyoumarsi"},"change_message_id":"a5f81059bffd67c7540563da1d37f2632390268b","unresolved":false,"context_lines":[{"line_number":395,"context_line":"                raise"},{"line_number":396,"context_line":""},{"line_number":397,"context_line":"    def _do_clone_volume(self, volume, src):"},{"line_number":398,"context_line":"        \"\"\"Create a volume on given remote share with the same contents"},{"line_number":399,"context_line":"        as the specified source"},{"line_number":400,"context_line":"        \"\"\""},{"line_number":401,"context_line":"        volume_path \u003d self.local_path(volume)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_e97579ca","line":398,"in_reply_to":"ba8a016a_05a0528f","updated":"2015-11-19 22:00:47.000000000","message":"Done","commit_id":"dc5271f9afbf7eb5a5d9089cc7bfafad9a8197e8"},{"author":{"_account_id":14377,"name":"Apoorva","email":"apps.desh@gmail.com","username":"apoorvad"},"change_message_id":"9ab98948037b9a330386deb3931eadedecb05719","unresolved":false,"context_lines":[{"line_number":458,"context_line":"        _stats \u003d super(CohoDriver, self).get_volume_stats(refresh)"},{"line_number":459,"context_line":"        _stats[\"vendor_name\"] \u003d \u0027Coho Data\u0027"},{"line_number":460,"context_line":"        _stats[\"driver_version\"] \u003d self.VERSION"},{"line_number":461,"context_line":"        _stats[\"storage_protocol\"] \u003d \u0027NFS\u0027"},{"line_number":462,"context_line":""},{"line_number":463,"context_line":"        return _stats"},{"line_number":464,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_cae432ad","line":461,"updated":"2015-11-19 18:07:31.000000000","message":"_stats[\"volume_backend_name\"] \u003d self.volume_backend_name","commit_id":"dc5271f9afbf7eb5a5d9089cc7bfafad9a8197e8"},{"author":{"_account_id":18448,"name":"Bardia Keyoumarsi","email":"bardia.keyoumarsi@cohodata.com","username":"bkeyoumarsi"},"change_message_id":"a5f81059bffd67c7540563da1d37f2632390268b","unresolved":false,"context_lines":[{"line_number":458,"context_line":"        _stats \u003d super(CohoDriver, self).get_volume_stats(refresh)"},{"line_number":459,"context_line":"        _stats[\"vendor_name\"] \u003d \u0027Coho Data\u0027"},{"line_number":460,"context_line":"        _stats[\"driver_version\"] \u003d self.VERSION"},{"line_number":461,"context_line":"        _stats[\"storage_protocol\"] \u003d \u0027NFS\u0027"},{"line_number":462,"context_line":""},{"line_number":463,"context_line":"        return _stats"},{"line_number":464,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_69d98956","line":461,"in_reply_to":"ba8a016a_cae432ad","updated":"2015-11-19 22:00:47.000000000","message":"Thanks.","commit_id":"dc5271f9afbf7eb5a5d9089cc7bfafad9a8197e8"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"c152299f6ceeb4db50dafb012b532bab47d85ea3","unresolved":false,"context_lines":[{"line_number":466,"context_line":"# Coho Driver Exceptions"},{"line_number":467,"context_line":"#"},{"line_number":468,"context_line":""},{"line_number":469,"context_line":"class CohoException(exception.VolumeDriverException):"},{"line_number":470,"context_line":"    message \u003d _(\"Unknown NFS exception\")"},{"line_number":471,"context_line":""},{"line_number":472,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_e57d0e1d","line":469,"updated":"2015-11-18 04:36:00.000000000","message":"This should be added to exceptions.py.","commit_id":"dc5271f9afbf7eb5a5d9089cc7bfafad9a8197e8"},{"author":{"_account_id":18448,"name":"Bardia Keyoumarsi","email":"bardia.keyoumarsi@cohodata.com","username":"bkeyoumarsi"},"change_message_id":"a5f81059bffd67c7540563da1d37f2632390268b","unresolved":false,"context_lines":[{"line_number":466,"context_line":"# Coho Driver Exceptions"},{"line_number":467,"context_line":"#"},{"line_number":468,"context_line":""},{"line_number":469,"context_line":"class CohoException(exception.VolumeDriverException):"},{"line_number":470,"context_line":"    message \u003d _(\"Unknown NFS exception\")"},{"line_number":471,"context_line":""},{"line_number":472,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_a9ebf1da","line":469,"in_reply_to":"ba8a016a_ca80b28d","updated":"2015-11-19 22:00:47.000000000","message":"I will be including this in the exceptions.py","commit_id":"dc5271f9afbf7eb5a5d9089cc7bfafad9a8197e8"},{"author":{"_account_id":14377,"name":"Apoorva","email":"apps.desh@gmail.com","username":"apoorvad"},"change_message_id":"9ab98948037b9a330386deb3931eadedecb05719","unresolved":false,"context_lines":[{"line_number":466,"context_line":"# Coho Driver Exceptions"},{"line_number":467,"context_line":"#"},{"line_number":468,"context_line":""},{"line_number":469,"context_line":"class CohoException(exception.VolumeDriverException):"},{"line_number":470,"context_line":"    message \u003d _(\"Unknown NFS exception\")"},{"line_number":471,"context_line":""},{"line_number":472,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_ca80b28d","line":469,"in_reply_to":"ba8a016a_e57d0e1d","updated":"2015-11-19 18:07:31.000000000","message":"Or maybe just use VolumeDriverException","commit_id":"dc5271f9afbf7eb5a5d9089cc7bfafad9a8197e8"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"35f16221b56f8d2a5796d22db36aa1ab29c7d70b","unresolved":false,"context_lines":[{"line_number":309,"context_line":"        if not config:"},{"line_number":310,"context_line":"            msg \u003d _(\"Coho rpc port is not configured\")"},{"line_number":311,"context_line":"            LOG.warning(msg)"},{"line_number":312,"context_line":"            raise exception.CohoException(msg)"},{"line_number":313,"context_line":"        if config \u003c 1 or config \u003e 65535:"},{"line_number":314,"context_line":"            msg \u003d (_(\"Invalid port number %(config)s for Coho rpc port\") %"},{"line_number":315,"context_line":"                   {\u0027config\u0027: config})"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a8ffd7b_a4252ec3","line":312,"updated":"2015-11-24 16:41:09.000000000","message":"exception.CohoException(reason\u003dmsg)","commit_id":"544af43cdc4832ab7ce9b53896f31d5927886fe3"},{"author":{"_account_id":18448,"name":"Bardia Keyoumarsi","email":"bardia.keyoumarsi@cohodata.com","username":"bkeyoumarsi"},"change_message_id":"a73f7a1b44c4e675430abebcf7344202d170905b","unresolved":false,"context_lines":[{"line_number":309,"context_line":"        if not config:"},{"line_number":310,"context_line":"            msg \u003d _(\"Coho rpc port is not configured\")"},{"line_number":311,"context_line":"            LOG.warning(msg)"},{"line_number":312,"context_line":"            raise exception.CohoException(msg)"},{"line_number":313,"context_line":"        if config \u003c 1 or config \u003e 65535:"},{"line_number":314,"context_line":"            msg \u003d (_(\"Invalid port number %(config)s for Coho rpc port\") %"},{"line_number":315,"context_line":"                   {\u0027config\u0027: config})"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a8ffd7b_ceb63f3d","line":312,"in_reply_to":"9a8ffd7b_a4252ec3","updated":"2015-11-24 19:46:31.000000000","message":"I have changed the CohoException to %(message)s so now it should print proper message.","commit_id":"544af43cdc4832ab7ce9b53896f31d5927886fe3"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"35f16221b56f8d2a5796d22db36aa1ab29c7d70b","unresolved":false,"context_lines":[{"line_number":314,"context_line":"            msg \u003d (_(\"Invalid port number %(config)s for Coho rpc port\") %"},{"line_number":315,"context_line":"                   {\u0027config\u0027: config})"},{"line_number":316,"context_line":"            LOG.warning(msg)"},{"line_number":317,"context_line":"            raise exception.CohoException(msg)"},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"    def _do_clone_volume(self, volume, src):"},{"line_number":320,"context_line":"        \"\"\"Clone volume to source."}],"source_content_type":"text/x-python","patch_set":4,"id":"9a8ffd7b_24313e0c","line":317,"updated":"2015-11-24 16:41:09.000000000","message":"exception.CohoException(reason\u003dmsg)","commit_id":"544af43cdc4832ab7ce9b53896f31d5927886fe3"},{"author":{"_account_id":18448,"name":"Bardia Keyoumarsi","email":"bardia.keyoumarsi@cohodata.com","username":"bkeyoumarsi"},"change_message_id":"a73f7a1b44c4e675430abebcf7344202d170905b","unresolved":false,"context_lines":[{"line_number":314,"context_line":"            msg \u003d (_(\"Invalid port number %(config)s for Coho rpc port\") %"},{"line_number":315,"context_line":"                   {\u0027config\u0027: config})"},{"line_number":316,"context_line":"            LOG.warning(msg)"},{"line_number":317,"context_line":"            raise exception.CohoException(msg)"},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"    def _do_clone_volume(self, volume, src):"},{"line_number":320,"context_line":"        \"\"\"Clone volume to source."}],"source_content_type":"text/x-python","patch_set":4,"id":"9a8ffd7b_0ead27e9","line":317,"in_reply_to":"9a8ffd7b_24313e0c","updated":"2015-11-24 19:46:31.000000000","message":"I have changed the CohoException to %(message)s so now it should print proper message.","commit_id":"544af43cdc4832ab7ce9b53896f31d5927886fe3"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"35f16221b56f8d2a5796d22db36aa1ab29c7d70b","unresolved":false,"context_lines":[{"line_number":330,"context_line":""},{"line_number":331,"context_line":"    def _get_volume_location(self, volume_id):"},{"line_number":332,"context_line":"        \"\"\"Returns provider location for given volume.\"\"\""},{"line_number":333,"context_line":"        volume \u003d self.db.volume_get(self._context, volume_id)"},{"line_number":334,"context_line":"        addr, path \u003d volume.provider_location.split(\":\")"},{"line_number":335,"context_line":"        return addr, path"},{"line_number":336,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a8ffd7b_67b9882e","line":333,"updated":"2015-11-24 16:41:09.000000000","message":"The driver should not directly access db, but since volume is not passed in create_snapshot and delete_snapshot, I\u0027m not sure how to get volume without making a db call. Please add a note about this here.","commit_id":"544af43cdc4832ab7ce9b53896f31d5927886fe3"},{"author":{"_account_id":18448,"name":"Bardia Keyoumarsi","email":"bardia.keyoumarsi@cohodata.com","username":"bkeyoumarsi"},"change_message_id":"e2d4ca971e5adf4585d38555181b68a43fa463e8","unresolved":false,"context_lines":[{"line_number":330,"context_line":""},{"line_number":331,"context_line":"    def _get_volume_location(self, volume_id):"},{"line_number":332,"context_line":"        \"\"\"Returns provider location for given volume.\"\"\""},{"line_number":333,"context_line":"        volume \u003d self.db.volume_get(self._context, volume_id)"},{"line_number":334,"context_line":"        addr, path \u003d volume.provider_location.split(\":\")"},{"line_number":335,"context_line":"        return addr, path"},{"line_number":336,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a8ffd7b_f6470d49","line":333,"in_reply_to":"9a8ffd7b_37b27c95","updated":"2015-11-26 00:51:29.000000000","message":"Done","commit_id":"544af43cdc4832ab7ce9b53896f31d5927886fe3"},{"author":{"_account_id":18448,"name":"Bardia Keyoumarsi","email":"bardia.keyoumarsi@cohodata.com","username":"bkeyoumarsi"},"change_message_id":"a73f7a1b44c4e675430abebcf7344202d170905b","unresolved":false,"context_lines":[{"line_number":330,"context_line":""},{"line_number":331,"context_line":"    def _get_volume_location(self, volume_id):"},{"line_number":332,"context_line":"        \"\"\"Returns provider location for given volume.\"\"\""},{"line_number":333,"context_line":"        volume \u003d self.db.volume_get(self._context, volume_id)"},{"line_number":334,"context_line":"        addr, path \u003d volume.provider_location.split(\":\")"},{"line_number":335,"context_line":"        return addr, path"},{"line_number":336,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a8ffd7b_8e527712","line":333,"in_reply_to":"9a8ffd7b_67b9882e","updated":"2015-11-24 19:46:31.000000000","message":"In general the advice is that the driver should not make any \"state changes\" (https://wiki.openstack.org/wiki/Cinder/how-to-contribute-a-driver). This operation is only reading volume info from the db. Other drivers also perform the operation above to read volume info from db.","commit_id":"544af43cdc4832ab7ce9b53896f31d5927886fe3"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"d14ead8297b4b7ac11e4e51587bab1591c8baed9","unresolved":false,"context_lines":[{"line_number":330,"context_line":""},{"line_number":331,"context_line":"    def _get_volume_location(self, volume_id):"},{"line_number":332,"context_line":"        \"\"\"Returns provider location for given volume.\"\"\""},{"line_number":333,"context_line":"        volume \u003d self.db.volume_get(self._context, volume_id)"},{"line_number":334,"context_line":"        addr, path \u003d volume.provider_location.split(\":\")"},{"line_number":335,"context_line":"        return addr, path"},{"line_number":336,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a8ffd7b_37b27c95","line":333,"in_reply_to":"9a8ffd7b_8e527712","updated":"2015-11-25 20:31:06.000000000","message":"Even reading from db is not recommended for a driver. We have been making changes in the manager so that info can be passed on to the driver and driver doesn\u0027t have to read from db.\n\nI agree that there are still quite a few places in the code where driver is directly reading from db, and in your case, volume is not passed in create_snapshot so you have to read it from db.  So I suggest that you add a note here.  Changing the create_snapshot interface will be affecting everyone so I won\u0027t recommend changing that.\n\nI\u0027ll update the wiki to state that even reading from db is not recommended for a driver unless if there is no other way around.","commit_id":"544af43cdc4832ab7ce9b53896f31d5927886fe3"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"fa7163e73bed3ac313a1aeb636dd7199dead0bef","unresolved":false,"context_lines":[{"line_number":382,"context_line":"        self._extend_file_sparse(volume_path, new_size)"},{"line_number":383,"context_line":""},{"line_number":384,"context_line":"    def get_volume_stats(self, refresh):"},{"line_number":385,"context_line":"        \"\"\"Pass in CohoData information in volume stats\"\"\""},{"line_number":386,"context_line":"        _stats \u003d super(CohoDriver, self).get_volume_stats(refresh)"},{"line_number":387,"context_line":"        _stats[\"vendor_name\"] \u003d \u0027Coho Data\u0027"},{"line_number":388,"context_line":"        _stats[\"driver_version\"] \u003d VERSION"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_6b142a4c","line":385,"updated":"2015-11-28 13:45:08.000000000","message":"Add a \".\" at the EOL please.","commit_id":"c1df5cf89c727777547e60ee7f80522da239d001"},{"author":{"_account_id":18448,"name":"Bardia Keyoumarsi","email":"bardia.keyoumarsi@cohodata.com","username":"bkeyoumarsi"},"change_message_id":"226fda6a218e7db12ac1c12ff714e4d4066cf021","unresolved":false,"context_lines":[{"line_number":382,"context_line":"        self._extend_file_sparse(volume_path, new_size)"},{"line_number":383,"context_line":""},{"line_number":384,"context_line":"    def get_volume_stats(self, refresh):"},{"line_number":385,"context_line":"        \"\"\"Pass in CohoData information in volume stats\"\"\""},{"line_number":386,"context_line":"        _stats \u003d super(CohoDriver, self).get_volume_stats(refresh)"},{"line_number":387,"context_line":"        _stats[\"vendor_name\"] \u003d \u0027Coho Data\u0027"},{"line_number":388,"context_line":"        _stats[\"driver_version\"] \u003d VERSION"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_d57a8376","line":385,"in_reply_to":"9a8ffd7b_6b142a4c","updated":"2015-11-30 03:03:36.000000000","message":"Done","commit_id":"c1df5cf89c727777547e60ee7f80522da239d001"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"ca3d5f5879df9cc92007b1f9db5e90f433d3078c","unresolved":false,"context_lines":[{"line_number":191,"context_line":"        if len(header) \u003c 4:"},{"line_number":192,"context_line":"            raise exception.CohoException("},{"line_number":193,"context_line":"                _(\u0027Invalid response header from RPC server\u0027))"},{"line_number":194,"context_line":"        x \u003d long(ord(header[0])) \u003c\u003c 24 | ord(header[1]) \u003c\u003c 16 | \\"},{"line_number":195,"context_line":"            ord(header[2]) \u003c\u003c 8 | ord(header[3])"},{"line_number":196,"context_line":"        last \u003d ((x \u0026 0x80000000) !\u003d 0)"},{"line_number":197,"context_line":"        n \u003d int(x \u0026 0x7fffffff)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a8ffd7b_9bf6b78d","line":194,"updated":"2015-12-02 19:30:26.000000000","message":"Please don\u0027t use \\ for line continuation. Wrap in () if needed.","commit_id":"124f1bcea650e77de5a7aa29f1b4f24bb89d9609"},{"author":{"_account_id":18448,"name":"Bardia Keyoumarsi","email":"bardia.keyoumarsi@cohodata.com","username":"bkeyoumarsi"},"change_message_id":"688adb7eb73c2877e41fc5596dee7e3e8f437875","unresolved":false,"context_lines":[{"line_number":191,"context_line":"        if len(header) \u003c 4:"},{"line_number":192,"context_line":"            raise exception.CohoException("},{"line_number":193,"context_line":"                _(\u0027Invalid response header from RPC server\u0027))"},{"line_number":194,"context_line":"        x \u003d long(ord(header[0])) \u003c\u003c 24 | ord(header[1]) \u003c\u003c 16 | \\"},{"line_number":195,"context_line":"            ord(header[2]) \u003c\u003c 8 | ord(header[3])"},{"line_number":196,"context_line":"        last \u003d ((x \u0026 0x80000000) !\u003d 0)"},{"line_number":197,"context_line":"        n \u003d int(x \u0026 0x7fffffff)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a8ffd7b_b81cd466","line":194,"in_reply_to":"9a8ffd7b_9bf6b78d","updated":"2015-12-02 23:37:30.000000000","message":"Done","commit_id":"124f1bcea650e77de5a7aa29f1b4f24bb89d9609"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"d5f0f55f0964a6c9cc5cc646f87248ba9f50aeeb","unresolved":false,"context_lines":[{"line_number":181,"context_line":"            x \u003d x | 0x80000000"},{"line_number":182,"context_line":"        header \u003d (chr(int(x \u003e\u003e 24 \u0026 0xff)) + chr(int(x \u003e\u003e 16 \u0026 0xff)) +"},{"line_number":183,"context_line":"                  chr(int(x \u003e\u003e 8 \u0026 0xff)) + chr(int(x \u0026 0xff)))"},{"line_number":184,"context_line":"        self.sock.send(header + str(frag))"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"    def _sendrecord(self, record):"},{"line_number":187,"context_line":"        self._sendfrag(1, record)"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a8ffd7b_61c234eb","line":184,"updated":"2015-12-03 03:55:33.000000000","message":"str() -\u003e six.text_type()","commit_id":"d8219c57032953078e3e42e62c0708e671884953"},{"author":{"_account_id":18448,"name":"Bardia Keyoumarsi","email":"bardia.keyoumarsi@cohodata.com","username":"bkeyoumarsi"},"change_message_id":"ca7a2f46f2d25ad5c3f15848035b30c3b6cbc922","unresolved":false,"context_lines":[{"line_number":181,"context_line":"            x \u003d x | 0x80000000"},{"line_number":182,"context_line":"        header \u003d (chr(int(x \u003e\u003e 24 \u0026 0xff)) + chr(int(x \u003e\u003e 16 \u0026 0xff)) +"},{"line_number":183,"context_line":"                  chr(int(x \u003e\u003e 8 \u0026 0xff)) + chr(int(x \u0026 0xff)))"},{"line_number":184,"context_line":"        self.sock.send(header + str(frag))"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"    def _sendrecord(self, record):"},{"line_number":187,"context_line":"        self._sendfrag(1, record)"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a740942_c2220ba3","line":184,"in_reply_to":"9a8ffd7b_61c234eb","updated":"2015-12-08 02:45:37.000000000","message":"Thanks. I used the six library to make the code Python3 compatible.","commit_id":"d8219c57032953078e3e42e62c0708e671884953"}]}
