)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"d4753b1e8661f0a71ffad55aae4c3668a200c45d","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     root \u003cguoyongxhzhf@163.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-09-17 08:43:48 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Increasing speed of downloading image"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"we download image to esxi rather than vCenter in order to increase speed"},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"5a890539_fa054711","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":10},"updated":"2014-11-23 02:32:26.000000000","message":"the first line should make it clear this is a vmware thing https://wiki.openstack.org/wiki/GitCommitMessages","commit_id":"8a4ff848062d7690ef2ad03757882fb164682b9e"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"9b239c0a35606b588e34522e7e403745d50246be","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     root \u003cguoyongxhzhf@163.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-09-17 08:43:48 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Increasing speed of downloading image"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"we download image to esxi rather than vCenter in order to increase speed"},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"5a890539_65cff87f","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":10},"in_reply_to":"5a890539_fa054711","updated":"2014-11-23 08:47:02.000000000","message":"Agree this should have a prefix \"VMware:\"","commit_id":"8a4ff848062d7690ef2ad03757882fb164682b9e"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"f46f58bc04843559d1330b18caf88826bd5a881c","unresolved":false,"context_lines":[{"line_number":1,"context_line":"Parent:     6c90c96d (Merge \"Raise bad request for missing \u0027label\u0027 in tenant network\")"},{"line_number":2,"context_line":"Author:     root \u003cguoyongxhzhf@163.com\u003e"},{"line_number":3,"context_line":"AuthorDate: 2015-02-08 08:48:30 +0800"},{"line_number":4,"context_line":"Commit:     root \u003cguoyongxhzhf@163.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-02-08 09:38:52 +0800"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":29,"id":"9a80dd14_e054e422","line":2,"updated":"2015-03-05 21:26:16.000000000","message":"please run \u0027--reset-author\u0027 on the commit to provide meaningful user name.","commit_id":"be625695534aa8041032acbfce493431b6f3a733"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"a86f4e7005d218a267688a4c88700342fe35661a","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"VMware driver: Increasing speed of downloading image"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"we download image to esxi rather than vCenter in order to increase speed"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Closes-Bug: 1390111"},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":29,"id":"ba7be1f8_67f593ca","line":9,"updated":"2015-02-27 21:42:08.000000000","message":"how does this help? this is pretty vague.","commit_id":"be625695534aa8041032acbfce493431b6f3a733"},{"author":{"_account_id":11672,"name":"xhzhf","email":"guoyongxhzhf@163.com","username":"xhzhf"},"change_message_id":"5aca4ff179a6b630804326ebea184fd73ee99d9e","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"VMware driver: Increasing speed of downloading image"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"we download image to esxi rather than vCenter in order to increase speed"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Closes-Bug: 1390111"},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":29,"id":"ba7be1f8_98a808dd","line":9,"in_reply_to":"ba7be1f8_67f593ca","updated":"2015-03-02 07:04:32.000000000","message":"For engineers who develope VMware diriver, he know the procee of creating vm--downloading image, etc. and the message is a brief description, so I don\u0027t add more infomation.","commit_id":"be625695534aa8041032acbfce493431b6f3a733"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"f46f58bc04843559d1330b18caf88826bd5a881c","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"VMware driver: Increasing speed of downloading image"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"we download image to esxi rather than vCenter in order to increase speed"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Closes-Bug: 1390111"},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":29,"id":"9a80dd14_6049d48a","line":9,"in_reply_to":"ba7be1f8_98a808dd","updated":"2015-03-05 21:26:16.000000000","message":"more context would be appreciated, given that not all reviewers are going to be vmware experts.","commit_id":"be625695534aa8041032acbfce493431b6f3a733"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"f6a5f65aad29fbbb8215986845ede0e1b7d41d40","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"VMware driver: Increasing speed of downloading image"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When creating a vm, VMware driver download image from glance to vCenter. Then vCenter will forward to esxi. It cost too much time. I download image to esxi directly rather than vCenter in order to increase speed"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Closes-Bug: 1390111"},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":30,"id":"9a80dd14_d871b978","line":9,"updated":"2015-03-11 17:08:26.000000000","message":"Can you wrap this to 80 chars or less per line","commit_id":"f596ce6f9cf67316dfb645fa8efc027a6a93b33d"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"f3d4190c99d52f6958dc64c93e4f9c823f549e1b","unresolved":false,"context_lines":[{"line_number":11,"context_line":"I download image to esxi directly rather than vCenter"},{"line_number":12,"context_line":"in order to increase speed"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Closes-Bug: 1390111"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I9d52d4b992a431e28d841629d0240aa949e9e31f"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":31,"id":"9a80dd14_e033965f","line":14,"updated":"2015-03-15 07:30:48.000000000","message":"Closes-bug: #1390111\n\nThis should have a DocImpact flag - the fact that glance may need direct access to the ESX may require an admin to open firewall ports","commit_id":"cc32ed7dde6537bada86f7f14dfb3bce68c90c3b"}],"nova/tests/unit/virt/vmwareapi/test_vmops.py":[{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"d995aa2fa9f11c37bedb9256bede1480715db18e","unresolved":false,"context_lines":[{"line_number":1229,"context_line":"             (vim_util, \"get_dynamic_property\", mount_host.key,"},{"line_number":1230,"context_line":"              \"HostSystem\", \"name\"),"},{"line_number":1231,"context_line":"             (self._session.vim, \"AcquireGenericServiceTicket\","},{"line_number":1232,"context_line":"              self._session._get_vim().get_service_content().sessionManager,"},{"line_number":1233,"context_line":"              acquire_ticket_spec)]"},{"line_number":1234,"context_line":""},{"line_number":1235,"context_line":"        mount_hosts \u003d mock.Mock(DatastoreHostMount\u003d[mount_host])"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_0e40c3a3","line":1232,"range":{"start_line":1232,"start_character":14,"end_line":1232,"end_character":38},"updated":"2014-12-04 13:48:08.000000000","message":"AttributeError: \u0027VMwareAPISession\u0027 object has no attribute \u0027_get_vim\u0027","commit_id":"f9ed9bfe48c9c11a7354dcae313ba9d1e1715f82"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"cbd88669329cc2d4103b769340d95b20f9b8fdd3","unresolved":false,"context_lines":[{"line_number":1282,"context_line":"             (vim_util, \"get_dynamic_property\", mount_host.key,"},{"line_number":1283,"context_line":"              \"HostSystem\", \"name\"),"},{"line_number":1284,"context_line":"             (self._session.vim, \"AcquireGenericServiceTicket\","},{"line_number":1285,"context_line":"              self._session.vim.get_service_content().sessionManager,"},{"line_number":1286,"context_line":"              acquire_ticket_spec)]"},{"line_number":1287,"context_line":""},{"line_number":1288,"context_line":"        mount_hosts \u003d mock.Mock(DatastoreHostMount\u003d[mount_host])"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_e6f0bbff","line":1285,"range":{"start_line":1285,"start_character":14,"end_line":1285,"end_character":53},"updated":"2015-01-12 14:33:09.000000000","message":"TypeError: \u0027NoneType\u0027 object is not callable","commit_id":"7e44c89cd5e691e845226b84cf589ca50f88d75f"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"cbd88669329cc2d4103b769340d95b20f9b8fdd3","unresolved":false,"context_lines":[{"line_number":1348,"context_line":"                dc_name,"},{"line_number":1349,"context_line":"                self._ds.name,"},{"line_number":1350,"context_line":"                image_ds_loc.rel_path,"},{"line_number":1351,"context_line":"                cookies)"},{"line_number":1352,"context_line":""},{"line_number":1353,"context_line":"    @mock.patch.object(images, \u0027fetch_image\u0027)"},{"line_number":1354,"context_line":"    @mock.patch.object(vmops.VMwareVMOps, \u0027_get_esx_host_and_cookies\u0027)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_263e43ba","line":1351,"updated":"2015-01-12 14:33:09.000000000","message":"AssertionError: \n\n    Expected call: fetch_image(\u003cnova.context.RequestContext object at 0x7ff2f82d3810\u003e, \n        Instance(access_ip_v4\u003dNone, ... , \u003cMock id\u003d\u0027140681507107216\u0027\u003e)    \n\n    Actual call: fetch_image(\u003cnova.context.RequestContext object at 0x7ff2f82d3810\u003e, \n        Instance(access_ip_v4\u003dNone, ... , cookies\u003d\u003cMock id\u003d\u0027140681507107216\u0027\u003e)","commit_id":"7e44c89cd5e691e845226b84cf589ca50f88d75f"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"81425eb68dad6774dcd5715d7c1934ca9627ebbe","unresolved":false,"context_lines":[{"line_number":1273,"context_line":"        file_path \u003d mock.Mock()"},{"line_number":1274,"context_line":"        scheme \u003d \u0027https\u0027"},{"line_number":1275,"context_line":"        mount_host \u003d vmwareapi_fake.DatastoreHostMount()"},{"line_number":1276,"context_line":"        url \u003d mock.Mock()"},{"line_number":1277,"context_line":"        ticket_id \u003d \u0027fake-ticket-id\u0027"},{"line_number":1278,"context_line":""},{"line_number":1279,"context_line":"        args_list \u003d ["}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_cb463fc0","line":1276,"updated":"2015-01-13 14:15:02.000000000","message":"`url` it is a value from ds_obj.DatastoreURL, so you can use just mock `ds_obj.DatastoreURL`","commit_id":"6631f5208c3fd5db0c18f631a7538934f7eda49b"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"81425eb68dad6774dcd5715d7c1934ca9627ebbe","unresolved":false,"context_lines":[{"line_number":1291,"context_line":"            self.assertEqual(expected_args, args)"},{"line_number":1292,"context_line":"            return result_list.pop(0)"},{"line_number":1293,"context_line":""},{"line_number":1294,"context_line":"        with contextlib.nested("},{"line_number":1295,"context_line":"            mock.patch.object(self._session, \u0027_call_method\u0027,"},{"line_number":1296,"context_line":"                              fake_call_method),"},{"line_number":1297,"context_line":"            mock.patch.object(ds_obj, \u0027DatastoreURL\u0027,"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_eb185bcf","line":1294,"updated":"2015-01-13 14:15:02.000000000","message":"I think it can be decorator -\u003e\n    @mock.patch.object(driver.VMwareAPISession, \u0027_call_method\u0027)\n    @mock.patch.object(ds_obj, \u0027DatastoreURL\u0027)\n    def test_get_esx_host_and_cookies(self, fake_new_ds_url, _call_method):\n        ...","commit_id":"6631f5208c3fd5db0c18f631a7538934f7eda49b"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"81425eb68dad6774dcd5715d7c1934ca9627ebbe","unresolved":false,"context_lines":[{"line_number":1306,"context_line":"                                                  dc_name,"},{"line_number":1307,"context_line":"                                                  file_path,"},{"line_number":1308,"context_line":"                                                  scheme)"},{"line_number":1309,"context_line":"            fake_new_ds_url.assert_called_once_with(self._session,"},{"line_number":1310,"context_line":"                                scheme, esx_host_name, file_path,"},{"line_number":1311,"context_line":"                                dc_name, datastore.name)"},{"line_number":1312,"context_line":"            fake_get_transfer_ticket.assert_called_once_with("}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_0b5e8779","line":1309,"updated":"2015-01-13 14:15:02.000000000","message":"ds_obj.DatastoreURL get 5 args but you check `called` with 6 args.\n    ds_obj.DatastoreURL(scheme, esx_host, file_path,\n                        dc_name, ds_name)","commit_id":"6631f5208c3fd5db0c18f631a7538934f7eda49b"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"1f39a0c29afa95713deddc329d9a6f43b4f70eb1","unresolved":false,"context_lines":[{"line_number":1727,"context_line":"        mock_get_esx_host_and_cookies.assert_called_once_with("},{"line_number":1728,"context_line":"                vi.datastore,"},{"line_number":1729,"context_line":"                dc_name,"},{"line_number":1730,"context_line":"                image_ds_loc.rel_path)"},{"line_number":1731,"context_line":"        mock_fetch_image.assert_called_once_with("},{"line_number":1732,"context_line":"                self._context,"},{"line_number":1733,"context_line":"                vi.instance,"}],"source_content_type":"text/x-python","patch_set":33,"id":"9aa53dc9_6297f448","line":1730,"updated":"2015-04-08 13:41:01.000000000","message":"arguments are overindented","commit_id":"838b14ebfebe3437cda7dad08ce1299778ad6ada"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"a1d5c0f230893477a8359e00401f156b9720941c","unresolved":false,"context_lines":[{"line_number":1727,"context_line":"        mock_get_esx_host_and_cookies.assert_called_once_with("},{"line_number":1728,"context_line":"                vi.datastore,"},{"line_number":1729,"context_line":"                dc_name,"},{"line_number":1730,"context_line":"                image_ds_loc.rel_path)"},{"line_number":1731,"context_line":"        mock_fetch_image.assert_called_once_with("},{"line_number":1732,"context_line":"                self._context,"},{"line_number":1733,"context_line":"                vi.instance,"}],"source_content_type":"text/x-python","patch_set":33,"id":"fa32b979_75d32760","line":1730,"in_reply_to":"9aa53dc9_6297f448","updated":"2015-06-22 13:59:31.000000000","message":"We already use this kind of indentation and PEP8 is happy with it, so I prefer to keep it this way","commit_id":"838b14ebfebe3437cda7dad08ce1299778ad6ada"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"1f39a0c29afa95713deddc329d9a6f43b4f70eb1","unresolved":false,"context_lines":[{"line_number":1736,"context_line":"                dc_name,"},{"line_number":1737,"context_line":"                self._ds.name,"},{"line_number":1738,"context_line":"                image_ds_loc.rel_path,"},{"line_number":1739,"context_line":"                cookies\u003dcookies)"},{"line_number":1740,"context_line":""},{"line_number":1741,"context_line":"    @mock.patch.object(images, \u0027fetch_image\u0027)"},{"line_number":1742,"context_line":"    @mock.patch.object(vmops.VMwareVMOps, \u0027_get_esx_host_and_cookies\u0027)"}],"source_content_type":"text/x-python","patch_set":33,"id":"9aa53dc9_82867811","line":1739,"updated":"2015-04-08 13:41:01.000000000","message":"arguments are over-indented","commit_id":"838b14ebfebe3437cda7dad08ce1299778ad6ada"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"1f39a0c29afa95713deddc329d9a6f43b4f70eb1","unresolved":false,"context_lines":[{"line_number":1747,"context_line":"        image_ds_loc \u003d mock.Mock()"},{"line_number":1748,"context_line":"        dc_name \u003d \u0027ha-datacenter\u0027"},{"line_number":1749,"context_line":"        mock_get_esx_host_and_cookies.side_effect \u003d \\"},{"line_number":1750,"context_line":"            exception.HostNotFound(host\u003d\u0027\u0027)"},{"line_number":1751,"context_line":"        self._vmops._fetch_image_as_file(self._context, vi, image_ds_loc)"},{"line_number":1752,"context_line":"        mock_get_esx_host_and_cookies.assert_called_once_with("},{"line_number":1753,"context_line":"                vi.datastore,"}],"source_content_type":"text/x-python","patch_set":33,"id":"9aa53dc9_82e1d800","line":1750,"updated":"2015-04-08 13:41:01.000000000","message":"use intead:\n\n    mock_get_esx_host_and_cookie.side_effect \u003d (\n        exception.HostNotFound(host\u003d\u0027\u0027)\n\ntry to avoid using \\ for multi-line statements. :)","commit_id":"838b14ebfebe3437cda7dad08ce1299778ad6ada"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"1f39a0c29afa95713deddc329d9a6f43b4f70eb1","unresolved":false,"context_lines":[{"line_number":1752,"context_line":"        mock_get_esx_host_and_cookies.assert_called_once_with("},{"line_number":1753,"context_line":"                vi.datastore,"},{"line_number":1754,"context_line":"                dc_name,"},{"line_number":1755,"context_line":"                image_ds_loc.rel_path)"},{"line_number":1756,"context_line":"        mock_fetch_image.assert_called_once_with("},{"line_number":1757,"context_line":"                self._context,"},{"line_number":1758,"context_line":"                vi.instance,"}],"source_content_type":"text/x-python","patch_set":33,"id":"9aa53dc9_02aa6870","line":1755,"updated":"2015-04-08 13:41:01.000000000","message":"arguments are over-indented, but I guess they match indentation with mock_fetch_image below, so I guess it\u0027s Ok this time.","commit_id":"838b14ebfebe3437cda7dad08ce1299778ad6ada"}],"nova/virt/vmwareapi/vm_util.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"7d068b16020367c20ef78befb6f3092fcc0aa546","unresolved":false,"context_lines":[{"line_number":765,"context_line":"    return virtual_machine_config_spec"},{"line_number":766,"context_line":""},{"line_number":767,"context_line":""},{"line_number":768,"context_line":"def get_acquire_ticket_spec(client_factory, url, method\u003d\u0027\u0027):"},{"line_number":769,"context_line":"    \"\"\"Builds the acquire-ticket config spec.\"\"\""},{"line_number":770,"context_line":"    spec \u003d client_factory.create(\u0027ns0:SessionManagerHttpServiceRequestSpec\u0027)"},{"line_number":771,"context_line":"    spec.url \u003d url"}],"source_content_type":"text/x-python","patch_set":18,"id":"3a961159_c1a0ed44","line":768,"updated":"2015-01-13 07:55:32.000000000","message":"please add a unit test for this method","commit_id":"d2d33a7155cfc286d2c40db98e8a94fd935ed673"}],"nova/virt/vmwareapi/vmops.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"9b239c0a35606b588e34522e7e403745d50246be","unresolved":false,"context_lines":[{"line_number":266,"context_line":""},{"line_number":267,"context_line":"    def _get_esx_host_and_cookies(self, data_store,"},{"line_number":268,"context_line":"                                  dc_name, file_path, scheme\u003d\"https\"):"},{"line_number":269,"context_line":"        from nova.virt.vmwareapi import read_write_util"},{"line_number":270,"context_line":"        vim \u003d self._session._get_vim()"},{"line_number":271,"context_line":"        client_factory \u003d vim.client.factory"},{"line_number":272,"context_line":"        service_content \u003d vim.get_service_content()"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a890539_a5c5605d","line":269,"updated":"2014-11-23 08:47:02.000000000","message":"why is this import here and not at the top of the file?","commit_id":"8a4ff848062d7690ef2ad03757882fb164682b9e"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"9b239c0a35606b588e34522e7e403745d50246be","unresolved":false,"context_lines":[{"line_number":284,"context_line":"            def __repr__(self):"},{"line_number":285,"context_line":"                return \u0027Cookie{%s}\u0027 % self.__str__()"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"        def _get_esx_host_of_datastore(ds_ref, ds_name):"},{"line_number":288,"context_line":"            # Find the hosts that are attached to this datastore"},{"line_number":289,"context_line":"            mount_hosts \u003d vim_util.get_dynamic_property(vim,"},{"line_number":290,"context_line":"                                ds_ref, \"Datastore\", \"host\")"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a890539_25a97090","line":287,"updated":"2014-11-23 08:47:02.000000000","message":"this returns the first esx. maybe when under load this will always return the first esx \u003d\u003e that esx will be under load.","commit_id":"8a4ff848062d7690ef2ad03757882fb164682b9e"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"9b239c0a35606b588e34522e7e403745d50246be","unresolved":false,"context_lines":[{"line_number":297,"context_line":"                    # Get the name of the esx host we are going to use"},{"line_number":298,"context_line":"                    usable_esx_hosts.append(mount_host.key)"},{"line_number":299,"context_line":"            if len(usable_esx_hosts) \u003d\u003d 0:"},{"line_number":300,"context_line":"                msg \u003d \u0027mount host of datastore: \u0027 + ds_name"},{"line_number":301,"context_line":"                raise exception.HostNotFound(host\u003dmsg)"},{"line_number":302,"context_line":"            chosen_esx_host \u003d usable_esx_hosts[0]"},{"line_number":303,"context_line":"            esx_host_name \u003d vim_util.get_dynamic_property(vim,"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a890539_e5a208ad","line":300,"updated":"2014-11-23 08:47:02.000000000","message":"missing translation","commit_id":"8a4ff848062d7690ef2ad03757882fb164682b9e"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"9b239c0a35606b588e34522e7e403745d50246be","unresolved":false,"context_lines":[{"line_number":334,"context_line":""},{"line_number":335,"context_line":"        # try to get esx cookie to upload"},{"line_number":336,"context_line":"        try:"},{"line_number":337,"context_line":"            dc_name \u003d \u0027ha-datacenter\u0027"},{"line_number":338,"context_line":"            host, cookies \u003d self._get_esx_host_and_cookies(vi.datastore,"},{"line_number":339,"context_line":"                                                     dc_name,"},{"line_number":340,"context_line":"                                                     image_ds_loc.rel_path)"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a890539_c5998c7a","line":337,"updated":"2014-11-23 08:47:02.000000000","message":"why the hard coded dc name?","commit_id":"8a4ff848062d7690ef2ad03757882fb164682b9e"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"9b239c0a35606b588e34522e7e403745d50246be","unresolved":false,"context_lines":[{"line_number":339,"context_line":"                                                     dc_name,"},{"line_number":340,"context_line":"                                                     image_ds_loc.rel_path)"},{"line_number":341,"context_line":"        except Exception as e:"},{"line_number":342,"context_line":"            LOG.warn(_(\"Get esx cookies failed: %s\") % e)"},{"line_number":343,"context_line":"            dc_name \u003d vi.dc_info.name"},{"line_number":344,"context_line":"            host \u003d self._session._host"},{"line_number":345,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"5a890539_e5892827","line":342,"updated":"2014-11-23 08:47:02.000000000","message":"use, instead of %","commit_id":"8a4ff848062d7690ef2ad03757882fb164682b9e"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"f7b465414ffc928fb65860ff668f075c0679816d","unresolved":false,"context_lines":[{"line_number":266,"context_line":""},{"line_number":267,"context_line":"    def _get_esx_host_and_cookies(self, data_store,"},{"line_number":268,"context_line":"                                  dc_name, file_path, scheme\u003d\"https\"):"},{"line_number":269,"context_line":"        from nova.virt.vmwareapi import read_write_util"},{"line_number":270,"context_line":"        vim \u003d self._session._get_vim()"},{"line_number":271,"context_line":"        client_factory \u003d vim.client.factory"},{"line_number":272,"context_line":"        service_content \u003d vim.get_service_content()"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_f194db8d","line":269,"updated":"2014-11-30 16:05:48.000000000","message":"why is this import here and not at the top of the file?","commit_id":"f9ed9bfe48c9c11a7354dcae313ba9d1e1715f82"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"f7b465414ffc928fb65860ff668f075c0679816d","unresolved":false,"context_lines":[{"line_number":300,"context_line":"                    # Get the name of the esx host we are going to use"},{"line_number":301,"context_line":"                    usable_esx_hosts.append(mount_host.key)"},{"line_number":302,"context_line":"            if len(usable_esx_hosts) \u003d\u003d 0:"},{"line_number":303,"context_line":"                msg \u003d \u0027mount host of datastore: \u0027 + ds_name"},{"line_number":304,"context_line":"                raise exception.HostNotFound(host\u003dmsg)"},{"line_number":305,"context_line":"            chosen_esx_host \u003d usable_esx_hosts[0]"},{"line_number":306,"context_line":"            esx_host_name \u003d self._session._call_method(vim_util,"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_11908795","line":303,"updated":"2014-11-30 16:05:48.000000000","message":"missing translation","commit_id":"f9ed9bfe48c9c11a7354dcae313ba9d1e1715f82"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"f7b465414ffc928fb65860ff668f075c0679816d","unresolved":false,"context_lines":[{"line_number":302,"context_line":"            if len(usable_esx_hosts) \u003d\u003d 0:"},{"line_number":303,"context_line":"                msg \u003d \u0027mount host of datastore: \u0027 + ds_name"},{"line_number":304,"context_line":"                raise exception.HostNotFound(host\u003dmsg)"},{"line_number":305,"context_line":"            chosen_esx_host \u003d usable_esx_hosts[0]"},{"line_number":306,"context_line":"            esx_host_name \u003d self._session._call_method(vim_util,"},{"line_number":307,"context_line":"                                \"get_dynamic_property\","},{"line_number":308,"context_line":"                                chosen_esx_host,"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_91d2b759","line":305,"updated":"2014-11-30 16:05:48.000000000","message":"this will always choose the first esx host - is that what you intend?","commit_id":"f9ed9bfe48c9c11a7354dcae313ba9d1e1715f82"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"f7b465414ffc928fb65860ff668f075c0679816d","unresolved":false,"context_lines":[{"line_number":337,"context_line":""},{"line_number":338,"context_line":"        # try to get esx cookie to upload"},{"line_number":339,"context_line":"        try:"},{"line_number":340,"context_line":"            dc_name \u003d \u0027ha-datacenter\u0027"},{"line_number":341,"context_line":"            host, cookies \u003d self._get_esx_host_and_cookies(vi.datastore,"},{"line_number":342,"context_line":"                                                     dc_name,"},{"line_number":343,"context_line":"                                                     image_ds_loc.rel_path)"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_f1c21b85","line":340,"updated":"2014-11-30 16:05:48.000000000","message":"What is \u0027ha-datacenter\u0027?","commit_id":"f9ed9bfe48c9c11a7354dcae313ba9d1e1715f82"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"d995aa2fa9f11c37bedb9256bede1480715db18e","unresolved":false,"context_lines":[{"line_number":342,"context_line":"                                                     dc_name,"},{"line_number":343,"context_line":"                                                     image_ds_loc.rel_path)"},{"line_number":344,"context_line":"        except Exception as e:"},{"line_number":345,"context_line":"            LOG.warn(_(\"Get esx cookies failed: %s\") % e)"},{"line_number":346,"context_line":"            dc_name \u003d vi.dc_info.name"},{"line_number":347,"context_line":"            host \u003d self._session._host"},{"line_number":348,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_8e7af3ee","line":345,"range":{"start_line":345,"start_character":12,"end_line":345,"end_character":20},"updated":"2014-12-04 13:48:08.000000000","message":"Please use `warning` instead `warn`","commit_id":"f9ed9bfe48c9c11a7354dcae313ba9d1e1715f82"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"f7b465414ffc928fb65860ff668f075c0679816d","unresolved":false,"context_lines":[{"line_number":342,"context_line":"                                                     dc_name,"},{"line_number":343,"context_line":"                                                     image_ds_loc.rel_path)"},{"line_number":344,"context_line":"        except Exception as e:"},{"line_number":345,"context_line":"            LOG.warn(_(\"Get esx cookies failed: %s\") % e)"},{"line_number":346,"context_line":"            dc_name \u003d vi.dc_info.name"},{"line_number":347,"context_line":"            host \u003d self._session._host"},{"line_number":348,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_d1cc3fbe","line":345,"updated":"2014-11-30 16:05:48.000000000","message":"please use a , instead of %","commit_id":"f9ed9bfe48c9c11a7354dcae313ba9d1e1715f82"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"cbd88669329cc2d4103b769340d95b20f9b8fdd3","unresolved":false,"context_lines":[{"line_number":309,"context_line":"                if mountInfo.accessible and mountInfo.mounted:"},{"line_number":310,"context_line":"                    # Get the name of the esx host we are going to use"},{"line_number":311,"context_line":"                    usable_esx_hosts.append(mount_host.key)"},{"line_number":312,"context_line":"            if len(usable_esx_hosts) \u003d\u003d 0:"},{"line_number":313,"context_line":"                msg \u003d _(\"mount host of datastore: %s\") % ds_name"},{"line_number":314,"context_line":"                raise exception.HostNotFound(host\u003dmsg)"},{"line_number":315,"context_line":"            chosen_esx_host \u003d usable_esx_hosts[0]"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_8bec62bd","line":312,"range":{"start_line":312,"start_character":12,"end_line":312,"end_character":42},"updated":"2015-01-12 14:33:09.000000000","message":"Better -\u003e \n\n    if not usable_esx_hosts:\n        ...","commit_id":"7e44c89cd5e691e845226b84cf589ca50f88d75f"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"7d068b16020367c20ef78befb6f3092fcc0aa546","unresolved":false,"context_lines":[{"line_number":320,"context_line":"        esx_host \u003d _get_esx_host_of_datastore(ds_ref, ds_name)"},{"line_number":321,"context_line":"        url \u003d ds_obj.DatastoreURL(scheme, esx_host, file_path,"},{"line_number":322,"context_line":"                                  dc_name, ds_name)"},{"line_number":323,"context_line":"        cookies \u003d url .get_transfer_ticket(self._session, \u0027\u0027)"},{"line_number":324,"context_line":"        return (esx_host, cookies)"},{"line_number":325,"context_line":""},{"line_number":326,"context_line":"    def _fetch_image_as_file(self, context, vi, image_ds_loc):"}],"source_content_type":"text/x-python","patch_set":18,"id":"3a961159_81efc585","line":323,"updated":"2015-01-13 07:55:32.000000000","message":"url .get_transfer_ticket( \u003d\u003e url.get_transfer_ticket(","commit_id":"d2d33a7155cfc286d2c40db98e8a94fd935ed673"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"70f0a9ae93f2a1852469c43f4d832c23be0207d0","unresolved":false,"context_lines":[{"line_number":291,"context_line":"            def __repr__(self):"},{"line_number":292,"context_line":"                return \u0027Cookie{%s}\u0027 % self.__str__()"},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"        def _get_esx_host_of_datastore(ds_ref, ds_name):"},{"line_number":295,"context_line":"            # Find the hosts that are attached to this datastore"},{"line_number":296,"context_line":"            mount_hosts \u003d self._session._call_method(vim_util,"},{"line_number":297,"context_line":"                              \"get_dynamic_property\","}],"source_content_type":"text/x-python","patch_set":23,"id":"3a961159_dfa9f9dd","line":294,"updated":"2015-01-18 16:12:45.000000000","message":"does this need to be nested? that is, it would be testable if it were a class method.","commit_id":"b3a6e2166262d8b81ddfd2e23b0382a38b9fab2d"},{"author":{"_account_id":11672,"name":"xhzhf","email":"guoyongxhzhf@163.com","username":"xhzhf"},"change_message_id":"1cf8aecf4b7de101420e0478b39812a654ccbcb7","unresolved":false,"context_lines":[{"line_number":291,"context_line":"            def __repr__(self):"},{"line_number":292,"context_line":"                return \u0027Cookie{%s}\u0027 % self.__str__()"},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"        def _get_esx_host_of_datastore(ds_ref, ds_name):"},{"line_number":295,"context_line":"            # Find the hosts that are attached to this datastore"},{"line_number":296,"context_line":"            mount_hosts \u003d self._session._call_method(vim_util,"},{"line_number":297,"context_line":"                              \"get_dynamic_property\","}],"source_content_type":"text/x-python","patch_set":23,"id":"3a961159_90e01828","line":294,"in_reply_to":"3a961159_dfa9f9dd","updated":"2015-01-20 06:30:57.000000000","message":"This method is called only in the _get_esx_host_and_cookies. The function of the method is binded closely to the _get_esx_host_and_cookies. so we treat them as a unit.","commit_id":"b3a6e2166262d8b81ddfd2e23b0382a38b9fab2d"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"70f0a9ae93f2a1852469c43f4d832c23be0207d0","unresolved":false,"context_lines":[{"line_number":342,"context_line":"            host, cookies \u003d self._get_esx_host_and_cookies(vi.datastore,"},{"line_number":343,"context_line":"                                                     dc_name,"},{"line_number":344,"context_line":"                                                     image_ds_loc.rel_path)"},{"line_number":345,"context_line":"        except Exception as e:"},{"line_number":346,"context_line":"            LOG.warning(_LW(\"Get esx cookies failed: %s\"), e)"},{"line_number":347,"context_line":"            dc_name \u003d vi.dc_info.name"},{"line_number":348,"context_line":"            host \u003d self._session._host"}],"source_content_type":"text/x-python","patch_set":23,"id":"3a961159_3f82fd51","line":345,"updated":"2015-01-18 16:12:45.000000000","message":"why not catch exception.HostNotFound?","commit_id":"b3a6e2166262d8b81ddfd2e23b0382a38b9fab2d"},{"author":{"_account_id":11672,"name":"xhzhf","email":"guoyongxhzhf@163.com","username":"xhzhf"},"change_message_id":"1cf8aecf4b7de101420e0478b39812a654ccbcb7","unresolved":false,"context_lines":[{"line_number":342,"context_line":"            host, cookies \u003d self._get_esx_host_and_cookies(vi.datastore,"},{"line_number":343,"context_line":"                                                     dc_name,"},{"line_number":344,"context_line":"                                                     image_ds_loc.rel_path)"},{"line_number":345,"context_line":"        except Exception as e:"},{"line_number":346,"context_line":"            LOG.warning(_LW(\"Get esx cookies failed: %s\"), e)"},{"line_number":347,"context_line":"            dc_name \u003d vi.dc_info.name"},{"line_number":348,"context_line":"            host \u003d self._session._host"}],"source_content_type":"text/x-python","patch_set":23,"id":"3a961159_10a7c80c","line":345,"in_reply_to":"3a961159_3f82fd51","updated":"2015-01-20 06:30:57.000000000","message":"In the _get_esx_host_and_cookies, it just throws HostNotFound. But other exception could be thrown in the called function.","commit_id":"b3a6e2166262d8b81ddfd2e23b0382a38b9fab2d"},{"author":{"_account_id":7575,"name":"Sabari","email":"smurugesan@vmware.com","username":"sabari"},"change_message_id":"f283da9d4dc1771aa49809b2f92e6344a58911aa","unresolved":false,"context_lines":[{"line_number":309,"context_line":"            def __repr__(self):"},{"line_number":310,"context_line":"                return \u0027Cookie{%s}\u0027 % self.__str__()"},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"        def _get_esx_host_of_datastore(ds_ref, ds_name):"},{"line_number":313,"context_line":"            # Find the hosts that are attached to this datastore"},{"line_number":314,"context_line":"            mount_hosts \u003d self._session._call_method(vim_util,"},{"line_number":315,"context_line":"                              \"get_dynamic_property\","}],"source_content_type":"text/x-python","patch_set":31,"id":"9a80dd14_a04c3e9f","line":312,"updated":"2015-03-15 07:20:52.000000000","message":"The datastore object in oslo.vmware has a get_connected_hosts [1] method and can be used instead to avoid code dup.  And to get a oslo datastore object, you can use get_datastore_by_ref [2].\n\n[1] https://github.com/openstack/oslo.vmware/blob/master/oslo_vmware/objects/datastore.py#L122\n\n[2] https://github.com/openstack/oslo.vmware/blob/master/oslo_vmware/objects/datastore.py#L31","commit_id":"cc32ed7dde6537bada86f7f14dfb3bce68c90c3b"},{"author":{"_account_id":7575,"name":"Sabari","email":"smurugesan@vmware.com","username":"sabari"},"change_message_id":"f283da9d4dc1771aa49809b2f92e6344a58911aa","unresolved":false,"context_lines":[{"line_number":321,"context_line":"            usable_esx_hosts \u003d []"},{"line_number":322,"context_line":"            for mount_host in mount_hosts:"},{"line_number":323,"context_line":"                mountInfo \u003d mount_host.mountInfo"},{"line_number":324,"context_line":"                if mountInfo.accessible and mountInfo.mounted:"},{"line_number":325,"context_line":"                    # Get the name of the esx host we are going to use"},{"line_number":326,"context_line":"                    usable_esx_hosts.append(mount_host.key)"},{"line_number":327,"context_line":"            if not usable_esx_hosts:"}],"source_content_type":"text/x-python","patch_set":31,"id":"9a80dd14_c0c132e5","line":324,"updated":"2015-03-15 07:20:52.000000000","message":"It would be nice to check  mountInfo.accessMode is rw to filter read-only datastores.","commit_id":"cc32ed7dde6537bada86f7f14dfb3bce68c90c3b"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"1f39a0c29afa95713deddc329d9a6f43b4f70eb1","unresolved":false,"context_lines":[{"line_number":318,"context_line":"                                                        dc_name,"},{"line_number":319,"context_line":"                                                        image_ds_loc.rel_path)"},{"line_number":320,"context_line":"        except Exception as e:"},{"line_number":321,"context_line":"            LOG.warning(_LW(\"Get esx cookies failed: %s\"), e)"},{"line_number":322,"context_line":"            dc_name \u003d vi.dc_info.name"},{"line_number":323,"context_line":"            host \u003d self._session._host"},{"line_number":324,"context_line":"            cookies \u003d session.vim.client.options.transport.cookiejar"}],"source_content_type":"text/x-python","patch_set":33,"id":"9aa53dc9_82455818","line":321,"updated":"2015-04-08 13:41:01.000000000","message":"String freeze.\n\nSo, there are 2 options:\n\n1. wait for Kilo release - freeze ends, then merge on master and then backport to Kilo.\n\n2.I think doing a LOG.warning(\"Get ESX cookie failed: %s\", e) should be fine, even with String freeze (+TODO to add the _LW). Then add the _LW after Kilo release.","commit_id":"838b14ebfebe3437cda7dad08ce1299778ad6ada"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"1bb6e81d8f3036cf26437a2068c0f0fcd1b9de48","unresolved":false,"context_lines":[{"line_number":346,"context_line":""},{"line_number":347,"context_line":"        # try to get esx cookie to upload"},{"line_number":348,"context_line":"        try:"},{"line_number":349,"context_line":"            dc_name \u003d \u0027ha-datacenter\u0027"},{"line_number":350,"context_line":"            host, cookies \u003d self._get_esx_host_and_cookies(vi.datastore,"},{"line_number":351,"context_line":"                                                        dc_name,"},{"line_number":352,"context_line":"                                                        image_ds_loc.rel_path)"}],"source_content_type":"text/x-python","patch_set":34,"id":"1a4dcd0f_7e198087","line":349,"updated":"2015-08-11 17:11:35.000000000","message":"should this be hard coded? if yes, then why not hard code it inside _get_esx_host_and_cookies?\n\nOK, so I think this describes why, to some extent:\nhttp://blogs.vmware.com/vsphere/2010/01/scripting-datastore-access.html\n\nIn which case, this is a Nit, I think this is better as a default parameter in _get_esx_host_and_cookies, but anyways, it makes more sense now.","commit_id":"b0e5fe33b7d7cba3c0a0e0af417aa8128b477011"}]}
