)]}'
{"nova/tests/virt/vmwareapi/test_vm_util.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"da981174a2b460ae1a6517151edfb7abd8a96c6e","unresolved":false,"context_lines":[{"line_number":640,"context_line":"                return \u0027fake_create_vm_task\u0027"},{"line_number":641,"context_line":"            elif method \u003d\u003d \u0027get_dynamic_property\u0027:"},{"line_number":642,"context_line":"                task_info \u003d mock.Mock(state\u003d\"success\", result\u003d\"fake_vm_ref\")"},{"line_number":643,"context_line":"                return task_info"},{"line_number":644,"context_line":""},{"line_number":645,"context_line":"        fake_call_mock \u003d mock.Mock(side_effect\u003dfake_call_method)"},{"line_number":646,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAXH%2F%2F4wY%3D","line":643,"updated":"2014-04-16 17:38:27.000000000","message":"how about:\n\n else:\n     raise Exception(\u0027Hmm, this should not happen\u0027)\n\nOtherwise an unexpected call could go unnoticed.\n\nHowever, looking at the thing you\u0027re testing, you really should probably just mock out the call to session.wait to simplify things (and be more unit-test-like).","commit_id":"f3c6aa79171cf28c52bbc65487d53ab385bb98d2"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"da981174a2b460ae1a6517151edfb7abd8a96c6e","unresolved":false,"context_lines":[{"line_number":644,"context_line":""},{"line_number":645,"context_line":"        fake_call_mock \u003d mock.Mock(side_effect\u003dfake_call_method)"},{"line_number":646,"context_line":""},{"line_number":647,"context_line":"        stubs.set_stubs(self.stubs)"},{"line_number":648,"context_line":"        session \u003d driver.VMwareAPISession()"},{"line_number":649,"context_line":"        patch_args \u003d (session, \u0027_call_method\u0027, fake_call_mock)"},{"line_number":650,"context_line":"        with mock.patch.object(*patch_args) as _call_method:"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAXH%2F%2F4vI%3D","line":647,"updated":"2014-04-16 17:38:27.000000000","message":"This is generally a really bad way to unit test things. Stubbing out a ton of stuff at the beginning of every test method obscures what is going on. IMHO, you should mock out everything you need right here. If you need the same set of mocks for a bunch of related tests, make them share code here, but don\u0027t just \"stub the world\".","commit_id":"f3c6aa79171cf28c52bbc65487d53ab385bb98d2"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"da981174a2b460ae1a6517151edfb7abd8a96c6e","unresolved":false,"context_lines":[{"line_number":646,"context_line":""},{"line_number":647,"context_line":"        stubs.set_stubs(self.stubs)"},{"line_number":648,"context_line":"        session \u003d driver.VMwareAPISession()"},{"line_number":649,"context_line":"        patch_args \u003d (session, \u0027_call_method\u0027, fake_call_mock)"},{"line_number":650,"context_line":"        with mock.patch.object(*patch_args) as _call_method:"},{"line_number":651,"context_line":"            vm_ref \u003d vm_util.create_vm("},{"line_number":652,"context_line":"                session,"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAXH%2F%2F4uI%3D","line":649,"updated":"2014-04-16 17:38:27.000000000","message":"Instead of doing this, just do this below:\n\n _call_method.side_effect \u003d fake_call_method\n\nand it will accomplish the same thing in less code and look more like the rest of our tests.","commit_id":"f3c6aa79171cf28c52bbc65487d53ab385bb98d2"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"da981174a2b460ae1a6517151edfb7abd8a96c6e","unresolved":false,"context_lines":[{"line_number":655,"context_line":"                \"fake_config_spec\","},{"line_number":656,"context_line":"                \"fake_res_pool_ref\")"},{"line_number":657,"context_line":""},{"line_number":658,"context_line":"            self.assertEqual(vm_ref, \u0027fake_vm_ref\u0027)"},{"line_number":659,"context_line":"            _call_method.assert_any_call(session._get_vim(),"},{"line_number":660,"context_line":"                                         \"CreateVM_Task\", \"fake_vm_folder\","},{"line_number":661,"context_line":"                                         config\u003d\"fake_config_spec\","}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAXH%2F%2F4s0%3D","line":658,"updated":"2014-04-16 17:38:27.000000000","message":"This is backwards. It\u0027s expected, actual.","commit_id":"f3c6aa79171cf28c52bbc65487d53ab385bb98d2"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"da981174a2b460ae1a6517151edfb7abd8a96c6e","unresolved":false,"context_lines":[{"line_number":660,"context_line":"                                         \"CreateVM_Task\", \"fake_vm_folder\","},{"line_number":661,"context_line":"                                         config\u003d\"fake_config_spec\","},{"line_number":662,"context_line":"                                         pool\u003d\"fake_res_pool_ref\")"},{"line_number":663,"context_line":"            _call_method.assert_any_call(vim_util, \"get_dynamic_property\","},{"line_number":664,"context_line":"                                         \"fake_create_vm_task\", \"Task\", \"info\")"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAXH%2F%2F4s8%3D","line":663,"updated":"2014-04-16 17:38:27.000000000","message":"If you\u0027re going to do this, you should also assert that there were only two calls. However, the better way to do it, I think, is to either raise an exception in the helper as I said above or check the exact calls:\n\n self.assertEqual([mock.call(a,b), mock.call(c,d)], _call_method.call_args_list\n\n(the above is just out of my head and not syntactically correct I\u0027m sure).","commit_id":"f3c6aa79171cf28c52bbc65487d53ab385bb98d2"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"bd515144a39df390883607aa40c4379abef4027e","unresolved":false,"context_lines":[{"line_number":26,"context_line":"from nova.openstack.common import units"},{"line_number":27,"context_line":"from nova.openstack.common import uuidutils"},{"line_number":28,"context_line":"from nova import test"},{"line_number":29,"context_line":"from nova.tests.virt.vmwareapi import stubs"},{"line_number":30,"context_line":"from nova.virt.vmwareapi import driver"},{"line_number":31,"context_line":"from nova.virt.vmwareapi import fake"},{"line_number":32,"context_line":"from nova.virt.vmwareapi import vim_util"}],"source_content_type":"text/x-python","patch_set":25,"id":"AAAAXH%2F%2FYK8%3D","line":29,"updated":"2014-04-22 08:10:56.000000000","message":"not used","commit_id":"fbe20d9760e8a9ae5fed1283f256e7355744ac77"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"bd515144a39df390883607aa40c4379abef4027e","unresolved":false,"context_lines":[{"line_number":27,"context_line":"from nova.openstack.common import uuidutils"},{"line_number":28,"context_line":"from nova import test"},{"line_number":29,"context_line":"from nova.tests.virt.vmwareapi import stubs"},{"line_number":30,"context_line":"from nova.virt.vmwareapi import driver"},{"line_number":31,"context_line":"from nova.virt.vmwareapi import fake"},{"line_number":32,"context_line":"from nova.virt.vmwareapi import vim_util"},{"line_number":33,"context_line":"from nova.virt.vmwareapi import vm_util"}],"source_content_type":"text/x-python","patch_set":25,"id":"AAAAXH%2F%2FYK0%3D","line":30,"updated":"2014-04-22 08:10:56.000000000","message":"not used","commit_id":"fbe20d9760e8a9ae5fed1283f256e7355744ac77"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"bd515144a39df390883607aa40c4379abef4027e","unresolved":false,"context_lines":[{"line_number":29,"context_line":"from nova.tests.virt.vmwareapi import stubs"},{"line_number":30,"context_line":"from nova.virt.vmwareapi import driver"},{"line_number":31,"context_line":"from nova.virt.vmwareapi import fake"},{"line_number":32,"context_line":"from nova.virt.vmwareapi import vim_util"},{"line_number":33,"context_line":"from nova.virt.vmwareapi import vm_util"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"AAAAXH%2F%2FYKc%3D","line":32,"updated":"2014-04-22 08:10:56.000000000","message":"not used","commit_id":"fbe20d9760e8a9ae5fed1283f256e7355744ac77"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"aece1511d817de462ce9d4bdfb778d67ab9703be","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        self.ind \u003d (self.ind + 1) % len(self.ret)"},{"line_number":41,"context_line":"        return self.ret[self.ind - 1]"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def _wait_for_task(self):"},{"line_number":44,"context_line":"        pass"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def _get_vim(self):"}],"source_content_type":"text/x-python","patch_set":29,"id":"AAAAXH%2F%2FEzQ%3D","line":43,"updated":"2014-04-24 08:18:16.000000000","message":"this seems to be unused?","commit_id":"7653d56b9a184b78d0bea1deb4cf719c3218c5fc"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"da92e49ad99d424b1b766cae5b840523b089e823","unresolved":false,"context_lines":[{"line_number":649,"context_line":"                task_info \u003d mock.Mock(state\u003d\"success\", result\u003d\"fake_vm_ref\")"},{"line_number":650,"context_line":"                return task_info"},{"line_number":651,"context_line":"            else:"},{"line_number":652,"context_line":"                raise Exception(\u0027Should not get here....\u0027)"},{"line_number":653,"context_line":""},{"line_number":654,"context_line":"        def fake_wait_for_task(self, *args):"},{"line_number":655,"context_line":"            task_info \u003d mock.Mock(state\u003d\"success\", result\u003d\"fake_vm_ref\")"}],"source_content_type":"text/x-python","patch_set":29,"id":"AAAAXH%2F%2FFak%3D","line":652,"updated":"2014-04-24 06:07:30.000000000","message":"you can use self.fail()","commit_id":"7653d56b9a184b78d0bea1deb4cf719c3218c5fc"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"3e89e6a92c7401974629327c5162ad04cacb010a","unresolved":false,"context_lines":[{"line_number":649,"context_line":"                task_info \u003d mock.Mock(state\u003d\"success\", result\u003d\"fake_vm_ref\")"},{"line_number":650,"context_line":"                return task_info"},{"line_number":651,"context_line":"            else:"},{"line_number":652,"context_line":"                raise Exception(\u0027Should not get here....\u0027)"},{"line_number":653,"context_line":""},{"line_number":654,"context_line":"        def fake_wait_for_task(self, *args):"},{"line_number":655,"context_line":"            task_info \u003d mock.Mock(state\u003d\"success\", result\u003d\"fake_vm_ref\")"}],"source_content_type":"text/x-python","patch_set":33,"id":"AAAAXX%2F%2F73M%3D","line":652,"updated":"2014-04-25 07:48:01.000000000","message":"this was self.fail","commit_id":"34341918d31e87d729c5b20a5037c4ca98a30279"},{"author":{"_account_id":7400,"name":"Tracy Jones","email":"tjones@vmware.com","username":"tracyajones"},"change_message_id":"8f098fd53f9ba4dfbf2793e90aa3484d3bb04684","unresolved":false,"context_lines":[{"line_number":650,"context_line":"                return task_info"},{"line_number":651,"context_line":"            else:"},{"line_number":652,"context_line":"                raise Exception(\u0027Should not get here....\u0027)"},{"line_number":653,"context_line":""},{"line_number":654,"context_line":"        def fake_wait_for_task(self, *args):"},{"line_number":655,"context_line":"            task_info \u003d mock.Mock(state\u003d\"success\", result\u003d\"fake_vm_ref\")"},{"line_number":656,"context_line":"            return task_info"}],"source_content_type":"text/x-python","patch_set":33,"id":"AAAAXX%2F%2F43Q%3D","line":653,"updated":"2014-04-25 14:36:13.000000000","message":"yep....","commit_id":"34341918d31e87d729c5b20a5037c4ca98a30279"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"69bf3d689983cd324145b3db90d80d6437ae9457","unresolved":false,"context_lines":[{"line_number":665,"context_line":"            vm_ref \u003d vm_util.create_vm("},{"line_number":666,"context_line":"                session,"},{"line_number":667,"context_line":"                {\u0027name\u0027: \u0027fake_name\u0027, \u0027uuid\u0027: \u0027fake_uuid\u0027},"},{"line_number":668,"context_line":"                mock.Mock(vmFolder\u003d\u0027fake_vm_folder\u0027),"},{"line_number":669,"context_line":"                \"fake_config_spec\","},{"line_number":670,"context_line":"                \"fake_res_pool_ref\")"},{"line_number":671,"context_line":""}],"source_content_type":"text/x-python","patch_set":34,"id":"AAAAXX%2F%2F33Y%3D","line":668,"updated":"2014-04-25 16:23:42.000000000","message":"Is this still right? Now you\u0027re passing vmFolder, so you just need probably a string here or something, right?","commit_id":"3948200598535a31225845034ab61130ac75a625"},{"author":{"_account_id":7400,"name":"Tracy Jones","email":"tjones@vmware.com","username":"tracyajones"},"change_message_id":"97c20974716ed63a196042f4a2296f330a53ba55","unresolved":false,"context_lines":[{"line_number":665,"context_line":"            vm_ref \u003d vm_util.create_vm("},{"line_number":666,"context_line":"                session,"},{"line_number":667,"context_line":"                {\u0027name\u0027: \u0027fake_name\u0027, \u0027uuid\u0027: \u0027fake_uuid\u0027},"},{"line_number":668,"context_line":"                mock.Mock(vmFolder\u003d\u0027fake_vm_folder\u0027),"},{"line_number":669,"context_line":"                \"fake_config_spec\","},{"line_number":670,"context_line":"                \"fake_res_pool_ref\")"},{"line_number":671,"context_line":""}],"source_content_type":"text/x-python","patch_set":34,"id":"AAAAXX%2F%2F3xk%3D","line":668,"in_reply_to":"AAAAXX%2F%2F33Y%3D","updated":"2014-04-25 16:32:53.000000000","message":"ah right - odd that it works...","commit_id":"3948200598535a31225845034ab61130ac75a625"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"69bf3d689983cd324145b3db90d80d6437ae9457","unresolved":false,"context_lines":[{"line_number":669,"context_line":"                \"fake_config_spec\","},{"line_number":670,"context_line":"                \"fake_res_pool_ref\")"},{"line_number":671,"context_line":""},{"line_number":672,"context_line":"            self.assertEqual(\u0027fake_vm_ref\u0027, vm_ref)"},{"line_number":673,"context_line":""},{"line_number":674,"context_line":"    def test_convert_vif_model(self):"},{"line_number":675,"context_line":"        expected \u003d \"VirtualE1000\""}],"source_content_type":"text/x-python","patch_set":34,"id":"AAAAXX%2F%2F32s%3D","line":672,"updated":"2014-04-25 16:23:42.000000000","message":"Don\u0027t you want to assert that the two mocks were called? I guess fake_wait_for_task clearly got called since it returned the vm_ref, but it seems like it might be good to assert that the two calls to call_method were correct.","commit_id":"3948200598535a31225845034ab61130ac75a625"},{"author":{"_account_id":7400,"name":"Tracy Jones","email":"tjones@vmware.com","username":"tracyajones"},"change_message_id":"97c20974716ed63a196042f4a2296f330a53ba55","unresolved":false,"context_lines":[{"line_number":669,"context_line":"                \"fake_config_spec\","},{"line_number":670,"context_line":"                \"fake_res_pool_ref\")"},{"line_number":671,"context_line":""},{"line_number":672,"context_line":"            self.assertEqual(\u0027fake_vm_ref\u0027, vm_ref)"},{"line_number":673,"context_line":""},{"line_number":674,"context_line":"    def test_convert_vif_model(self):"},{"line_number":675,"context_line":"        expected \u003d \"VirtualE1000\""}],"source_content_type":"text/x-python","patch_set":34,"id":"AAAAXX%2F%2F3xg%3D","line":672,"in_reply_to":"AAAAXX%2F%2F32s%3D","updated":"2014-04-25 16:32:53.000000000","message":"will do","commit_id":"3948200598535a31225845034ab61130ac75a625"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"727aea6f5d5f672c5c699dbda274cdfd8239019f","unresolved":false,"context_lines":[{"line_number":673,"context_line":"                \u0027fake_res_pool_ref\u0027)"},{"line_number":674,"context_line":"            self.assertEqual(\u0027fake_vm_ref\u0027, vm_ref)"},{"line_number":675,"context_line":"            call_method.assert_called_once()"},{"line_number":676,"context_line":"            wait_for_task.assert_called_once()"},{"line_number":677,"context_line":""},{"line_number":678,"context_line":"    def test_convert_vif_model(self):"},{"line_number":679,"context_line":"        expected \u003d \"VirtualE1000\""}],"source_content_type":"text/x-python","patch_set":39,"id":"9ad9bd40_25d3ba39","line":676,"range":{"start_line":676,"start_character":26,"end_line":676,"end_character":44},"updated":"2014-04-29 23:48:46.000000000","message":"Unless I\u0027m mistaken, there is no assert_called_once() method to a mock. That means you\u0027re just calling an auto-spec\u0027d mock method here, which is doing nothing. There is assert_called_once_with(), which is probably what you\u0027re thinking of.","commit_id":"b93db2ffe8eb980205ce00212a4439229c02c0a0"}],"nova/tests/virt/vmwareapi/test_vmops.py":[{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"dbed20c91c320eb07beee609ca5087dce7d4cb8a","unresolved":false,"context_lines":[{"line_number":219,"context_line":"            mock.patch.object(self._session, \u0027_call_method\u0027, fake_call_method)"},{"line_number":220,"context_line":"        ) as (_wait_for_task, _call_method):"},{"line_number":221,"context_line":"            vm_ref \u003d self._vmops._execute_create_vm("},{"line_number":222,"context_line":"                self._instance,"},{"line_number":223,"context_line":"                mock.Mock(vmFolder\u003d\u0027fake_vm_folder\u0027),"},{"line_number":224,"context_line":"                \"fake_config_spec\","},{"line_number":225,"context_line":"                \"fake_res_pool_ref\")"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2B%2F%2B8%3D","line":222,"updated":"2014-03-21 02:14:24.000000000","message":"I dislike this one line. Why are you referencing self._instance and what bearing does it have on this test? None? If it has none then why not use a mock?","commit_id":"6bd2ea671fc962a90f9f4c4a5aec91f2686c0253"},{"author":{"_account_id":8302,"name":"Ryan Hsu","email":"hryan@vmware.com","username":"rhsu"},"change_message_id":"a523d57c2c364688695af692167fcc9f044c7574","unresolved":false,"context_lines":[{"line_number":219,"context_line":"            mock.patch.object(self._session, \u0027_call_method\u0027, fake_call_method)"},{"line_number":220,"context_line":"        ) as (_wait_for_task, _call_method):"},{"line_number":221,"context_line":"            vm_ref \u003d self._vmops._execute_create_vm("},{"line_number":222,"context_line":"                self._instance,"},{"line_number":223,"context_line":"                mock.Mock(vmFolder\u003d\u0027fake_vm_folder\u0027),"},{"line_number":224,"context_line":"                \"fake_config_spec\","},{"line_number":225,"context_line":"                \"fake_res_pool_ref\")"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2B%2F64%3D","line":222,"in_reply_to":"AAAAWH%2F%2B%2F%2B8%3D","updated":"2014-03-21 03:00:31.000000000","message":"Agree this can be done with a mock but I didn\u0027t want to break the convention (see test_create_vm_snapshot and test_delete_vm_snapshot). If it\u0027s okay with you, I\u0027ll change it. Also, If I do end up changing it, should I update the other tests in my change set too?","commit_id":"6bd2ea671fc962a90f9f4c4a5aec91f2686c0253"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"dbed20c91c320eb07beee609ca5087dce7d4cb8a","unresolved":false,"context_lines":[{"line_number":224,"context_line":"                \"fake_config_spec\","},{"line_number":225,"context_line":"                \"fake_res_pool_ref\")"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"            self.assertEqual(vm_ref, \u0027fake_vm_ref\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2FAAU%3D","line":227,"updated":"2014-03-21 02:14:24.000000000","message":"a pointer here...\n\nhttp://www.voidspace.org.uk/python/mock/mock.html\n\nYou can write this using the mock.method.assert_called_with method. This means you can assert that the mock method \"_call_method\" is called with the parameters you are expecting. That\u0027s going to give you some real use of the mock framework itself. You don\u0027t need to follow that pattern to make this better but I think you\u0027ll be better served as a developer in the long run if you understand how to use assert_called_with in general (and this is the place to do that.)\n\nBTW: You\u0027ve tested what we call \"the happy path\" normally I\u0027d council to also test a failure path. I would say that because exception handlers are code too. In this case there\u0027s no point in writing exception code because it looks like the whole unit of code just croaks if anything goes wrong.","commit_id":"6bd2ea671fc962a90f9f4c4a5aec91f2686c0253"},{"author":{"_account_id":8302,"name":"Ryan Hsu","email":"hryan@vmware.com","username":"rhsu"},"change_message_id":"f07fd75d7ad9eb4d03d9891dc32ce47c261f3204","unresolved":false,"context_lines":[{"line_number":224,"context_line":"                \"fake_config_spec\","},{"line_number":225,"context_line":"                \"fake_res_pool_ref\")"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"            self.assertEqual(vm_ref, \u0027fake_vm_ref\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2B%2FcU%3D","line":227,"in_reply_to":"AAAAWH%2F%2B%2F4g%3D","updated":"2014-03-21 05:26:17.000000000","message":"Shawn, so I actually created a patch that used \"assert_called_with\" but for some reason the mocked \"_call_method\" method did not have those assert methods and I could not, for the life of me, get the test to work. I now see why Vui opted to use the assertEquals instead.","commit_id":"6bd2ea671fc962a90f9f4c4a5aec91f2686c0253"},{"author":{"_account_id":8302,"name":"Ryan Hsu","email":"hryan@vmware.com","username":"rhsu"},"change_message_id":"6417bbec5a7e5c6fda2db9bb844810b3b36e83fe","unresolved":false,"context_lines":[{"line_number":224,"context_line":"                \"fake_config_spec\","},{"line_number":225,"context_line":"                \"fake_res_pool_ref\")"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"            self.assertEqual(vm_ref, \u0027fake_vm_ref\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2B%2FGc%3D","line":227,"in_reply_to":"AAAAWH%2F%2B%2FcU%3D","updated":"2014-03-21 06:23:58.000000000","message":"Done and Done! The problem was just that I needed to patch using a Mock rather than a straight function.","commit_id":"6bd2ea671fc962a90f9f4c4a5aec91f2686c0253"},{"author":{"_account_id":8302,"name":"Ryan Hsu","email":"hryan@vmware.com","username":"rhsu"},"change_message_id":"a523d57c2c364688695af692167fcc9f044c7574","unresolved":false,"context_lines":[{"line_number":224,"context_line":"                \"fake_config_spec\","},{"line_number":225,"context_line":"                \"fake_res_pool_ref\")"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"            self.assertEqual(vm_ref, \u0027fake_vm_ref\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2B%2F4g%3D","line":227,"in_reply_to":"AAAAWH%2F%2FAAU%3D","updated":"2014-03-21 03:00:31.000000000","message":"Done","commit_id":"6bd2ea671fc962a90f9f4c4a5aec91f2686c0253"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"5baf52814b81ac653cceb134ae06b2b65c556158","unresolved":false,"context_lines":[{"line_number":12,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":13,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":"import mock"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"import contextlib"},{"line_number":18,"context_line":"import mock"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAWH%2F%2BB8M%3D","side":"PARENT","line":15,"updated":"2014-03-31 12:46:55.000000000","message":"this is not related to this patch set. please see https://review.openstack.org/#/c/82732/ that deals with this","commit_id":"1e72f66e4236c0414b7e2ad3f752557f6177641c"}],"nova/virt/vmwareapi/vm_util.py":[{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"453a2353ee58c01c724fc05b53af309f84ad6fcc","unresolved":false,"context_lines":[{"line_number":1373,"context_line":"        config\u003dconfig_spec, pool\u003dres_pool_ref)"},{"line_number":1374,"context_line":"    task_info \u003d session._wait_for_task(vm_create_task)"},{"line_number":1375,"context_line":"    LOG.debug(_(\"Created VM on the ESX host\"), instance\u003dinstance)"},{"line_number":1376,"context_line":"    return task_info.result"},{"line_number":1377,"context_line":""},{"line_number":1378,"context_line":""},{"line_number":1379,"context_line":"def clone_vmref_for_instance(session, instance, vm_ref, host_ref, ds_ref,"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAW3%2F%2FxBU%3D","line":1376,"updated":"2014-04-10 14:39:32.000000000","message":"I guess we want to add the vm reference to our reference cache","commit_id":"dbd20033448975a7384b876eeb829215a6f402f4"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"da92e49ad99d424b1b766cae5b840523b089e823","unresolved":false,"context_lines":[{"line_number":1379,"context_line":"    return vmdk_adapter_type"},{"line_number":1380,"context_line":""},{"line_number":1381,"context_line":""},{"line_number":1382,"context_line":"def create_vm(session, instance, dc_info, config_spec, res_pool_ref):"},{"line_number":1383,"context_line":"    \"\"\"Create VM on ESX host.\"\"\""},{"line_number":1384,"context_line":"    LOG.debug(_(\"Creating VM on the ESX host\"), instance\u003dinstance)"},{"line_number":1385,"context_line":"    vm_create_task \u003d session._call_method("}],"source_content_type":"text/x-python","patch_set":29,"id":"AAAAXH%2F%2FFaw%3D","line":1382,"updated":"2014-04-24 06:07:30.000000000","message":"Sorry, I just saw this - can we pass in the vm_folder instead of the dc_info here?","commit_id":"7653d56b9a184b78d0bea1deb4cf719c3218c5fc"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"3e89e6a92c7401974629327c5162ad04cacb010a","unresolved":false,"context_lines":[{"line_number":1379,"context_line":"    return vmdk_adapter_type"},{"line_number":1380,"context_line":""},{"line_number":1381,"context_line":""},{"line_number":1382,"context_line":"def create_vm(session, instance, dc_info, config_spec, res_pool_ref):"},{"line_number":1383,"context_line":"    \"\"\"Create VM on ESX host.\"\"\""},{"line_number":1384,"context_line":"    LOG.debug(_(\"Creating VM on the ESX host\"), instance\u003dinstance)"},{"line_number":1385,"context_line":"    vm_create_task \u003d session._call_method("}],"source_content_type":"text/x-python","patch_set":33,"id":"AAAAXX%2F%2F73I%3D","line":1382,"updated":"2014-04-25 07:48:01.000000000","message":"why did this go back from vm_folder?","commit_id":"34341918d31e87d729c5b20a5037c4ca98a30279"},{"author":{"_account_id":7400,"name":"Tracy Jones","email":"tjones@vmware.com","username":"tracyajones"},"change_message_id":"8f098fd53f9ba4dfbf2793e90aa3484d3bb04684","unresolved":false,"context_lines":[{"line_number":1380,"context_line":""},{"line_number":1381,"context_line":""},{"line_number":1382,"context_line":"def create_vm(session, instance, dc_info, config_spec, res_pool_ref):"},{"line_number":1383,"context_line":"    \"\"\"Create VM on ESX host.\"\"\""},{"line_number":1384,"context_line":"    LOG.debug(_(\"Creating VM on the ESX host\"), instance\u003dinstance)"},{"line_number":1385,"context_line":"    vm_create_task \u003d session._call_method("},{"line_number":1386,"context_line":"        session._get_vim(),"}],"source_content_type":"text/x-python","patch_set":33,"id":"AAAAXX%2F%2F43c%3D","line":1383,"updated":"2014-04-25 14:36:13.000000000","message":"had some rebase issues and lost the change.  I thought i had caught everything - but not this one.  will add back","commit_id":"34341918d31e87d729c5b20a5037c4ca98a30279"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"69bf3d689983cd324145b3db90d80d6437ae9457","unresolved":false,"context_lines":[{"line_number":1379,"context_line":"    return vmdk_adapter_type"},{"line_number":1380,"context_line":""},{"line_number":1381,"context_line":""},{"line_number":1382,"context_line":"def create_vm(session, instance, vmFolder, config_spec, res_pool_ref):"},{"line_number":1383,"context_line":"    \"\"\"Create VM on ESX host.\"\"\""},{"line_number":1384,"context_line":"    LOG.debug(_(\"Creating VM on the ESX host\"), instance\u003dinstance)"},{"line_number":1385,"context_line":"    vm_create_task \u003d session._call_method("}],"source_content_type":"text/x-python","patch_set":34,"id":"AAAAXX%2F%2F34g%3D","line":1382,"updated":"2014-04-25 16:23:42.000000000","message":"CamelCase here. Even though it\u0027s that way in the dc_info structure, it would be good to keep with the proper style here.","commit_id":"3948200598535a31225845034ab61130ac75a625"},{"author":{"_account_id":7400,"name":"Tracy Jones","email":"tjones@vmware.com","username":"tracyajones"},"change_message_id":"97c20974716ed63a196042f4a2296f330a53ba55","unresolved":false,"context_lines":[{"line_number":1379,"context_line":"    return vmdk_adapter_type"},{"line_number":1380,"context_line":""},{"line_number":1381,"context_line":""},{"line_number":1382,"context_line":"def create_vm(session, instance, vmFolder, config_spec, res_pool_ref):"},{"line_number":1383,"context_line":"    \"\"\"Create VM on ESX host.\"\"\""},{"line_number":1384,"context_line":"    LOG.debug(_(\"Creating VM on the ESX host\"), instance\u003dinstance)"},{"line_number":1385,"context_line":"    vm_create_task \u003d session._call_method("}],"source_content_type":"text/x-python","patch_set":34,"id":"AAAAXX%2F%2F3xU%3D","line":1382,"in_reply_to":"AAAAXX%2F%2F34g%3D","updated":"2014-04-25 16:32:53.000000000","message":"ok will change","commit_id":"3948200598535a31225845034ab61130ac75a625"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d2d441a32aace45f2632468e6326df6b0239b79c","unresolved":false,"context_lines":[{"line_number":1379,"context_line":"    return vmdk_adapter_type"},{"line_number":1380,"context_line":""},{"line_number":1381,"context_line":""},{"line_number":1382,"context_line":"def create_vm(session, instance, vm_folder, config_spec, res_pool_ref):"},{"line_number":1383,"context_line":"    \"\"\"Create VM on ESX host.\"\"\""},{"line_number":1384,"context_line":"    LOG.debug(_(\"Creating VM on the ESX host\"), instance\u003dinstance)"},{"line_number":1385,"context_line":"    vm_create_task \u003d session._call_method("}],"source_content_type":"text/x-python","patch_set":40,"id":"9ad9bd40_2e1d4010","line":1382,"updated":"2014-04-30 18:19:08.000000000","message":"We should actually docstring these parameters since it\u0027s a public utility now.","commit_id":"46c9cebd89ac93736db9307cbd4791925571c8f8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9f69f40f05c2858ca01aa21eae2e79e20307f460","unresolved":false,"context_lines":[{"line_number":1379,"context_line":"    return vmdk_adapter_type"},{"line_number":1380,"context_line":""},{"line_number":1381,"context_line":""},{"line_number":1382,"context_line":"def create_vm(session, instance, vm_folder, config_spec, res_pool_ref):"},{"line_number":1383,"context_line":"    \"\"\"Create VM on ESX host.\"\"\""},{"line_number":1384,"context_line":"    LOG.debug(_(\"Creating VM on the ESX host\"), instance\u003dinstance)"},{"line_number":1385,"context_line":"    vm_create_task \u003d session._call_method("}],"source_content_type":"text/x-python","patch_set":40,"id":"9ad9bd40_ce3bf4e9","line":1382,"in_reply_to":"9ad9bd40_2e1d4010","updated":"2014-04-30 18:38:48.000000000","message":"This could happen later, don\u0027t really need to hold this up since it\u0027s the bottom of a big topic branch.","commit_id":"46c9cebd89ac93736db9307cbd4791925571c8f8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d2d441a32aace45f2632468e6326df6b0239b79c","unresolved":false,"context_lines":[{"line_number":1381,"context_line":""},{"line_number":1382,"context_line":"def create_vm(session, instance, vm_folder, config_spec, res_pool_ref):"},{"line_number":1383,"context_line":"    \"\"\"Create VM on ESX host.\"\"\""},{"line_number":1384,"context_line":"    LOG.debug(_(\"Creating VM on the ESX host\"), instance\u003dinstance)"},{"line_number":1385,"context_line":"    vm_create_task \u003d session._call_method("},{"line_number":1386,"context_line":"        session._get_vim(),"},{"line_number":1387,"context_line":"        \"CreateVM_Task\", vm_folder,"}],"source_content_type":"text/x-python","patch_set":40,"id":"9ad9bd40_ae3150a4","line":1384,"updated":"2014-04-30 18:19:08.000000000","message":"We aren\u0027t supposed to be translating debug calls anymore.","commit_id":"46c9cebd89ac93736db9307cbd4791925571c8f8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9f69f40f05c2858ca01aa21eae2e79e20307f460","unresolved":false,"context_lines":[{"line_number":1381,"context_line":""},{"line_number":1382,"context_line":"def create_vm(session, instance, vm_folder, config_spec, res_pool_ref):"},{"line_number":1383,"context_line":"    \"\"\"Create VM on ESX host.\"\"\""},{"line_number":1384,"context_line":"    LOG.debug(_(\"Creating VM on the ESX host\"), instance\u003dinstance)"},{"line_number":1385,"context_line":"    vm_create_task \u003d session._call_method("},{"line_number":1386,"context_line":"        session._get_vim(),"},{"line_number":1387,"context_line":"        \"CreateVM_Task\", vm_folder,"}],"source_content_type":"text/x-python","patch_set":40,"id":"9ad9bd40_0e25dcc1","line":1384,"in_reply_to":"9ad9bd40_ae3150a4","updated":"2014-04-30 18:38:48.000000000","message":"tjones is going to handle these globally later (unless jogo or garyk beat her to it).","commit_id":"46c9cebd89ac93736db9307cbd4791925571c8f8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d2d441a32aace45f2632468e6326df6b0239b79c","unresolved":false,"context_lines":[{"line_number":1387,"context_line":"        \"CreateVM_Task\", vm_folder,"},{"line_number":1388,"context_line":"        config\u003dconfig_spec, pool\u003dres_pool_ref)"},{"line_number":1389,"context_line":"    task_info \u003d session._wait_for_task(vm_create_task)"},{"line_number":1390,"context_line":"    LOG.debug(_(\"Created VM on the ESX host\"), instance\u003dinstance)"},{"line_number":1391,"context_line":"    return task_info.result"},{"line_number":1392,"context_line":""},{"line_number":1393,"context_line":""}],"source_content_type":"text/x-python","patch_set":40,"id":"9ad9bd40_2ee4600c","line":1390,"updated":"2014-04-30 18:19:08.000000000","message":"Ditto on not translating debug messages.","commit_id":"46c9cebd89ac93736db9307cbd4791925571c8f8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9f69f40f05c2858ca01aa21eae2e79e20307f460","unresolved":false,"context_lines":[{"line_number":1387,"context_line":"        \"CreateVM_Task\", vm_folder,"},{"line_number":1388,"context_line":"        config\u003dconfig_spec, pool\u003dres_pool_ref)"},{"line_number":1389,"context_line":"    task_info \u003d session._wait_for_task(vm_create_task)"},{"line_number":1390,"context_line":"    LOG.debug(_(\"Created VM on the ESX host\"), instance\u003dinstance)"},{"line_number":1391,"context_line":"    return task_info.result"},{"line_number":1392,"context_line":""},{"line_number":1393,"context_line":""}],"source_content_type":"text/x-python","patch_set":40,"id":"9ad9bd40_8e180c86","line":1390,"in_reply_to":"9ad9bd40_2ee4600c","updated":"2014-04-30 18:38:48.000000000","message":"Ditto.","commit_id":"46c9cebd89ac93736db9307cbd4791925571c8f8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d2d441a32aace45f2632468e6326df6b0239b79c","unresolved":false,"context_lines":[{"line_number":1388,"context_line":"        config\u003dconfig_spec, pool\u003dres_pool_ref)"},{"line_number":1389,"context_line":"    task_info \u003d session._wait_for_task(vm_create_task)"},{"line_number":1390,"context_line":"    LOG.debug(_(\"Created VM on the ESX host\"), instance\u003dinstance)"},{"line_number":1391,"context_line":"    return task_info.result"},{"line_number":1392,"context_line":""},{"line_number":1393,"context_line":""},{"line_number":1394,"context_line":"def clone_vmref_for_instance(session, instance, vm_ref, host_ref, ds_ref,"}],"source_content_type":"text/x-python","patch_set":40,"id":"9ad9bd40_8ea1ecab","line":1391,"updated":"2014-04-30 18:19:08.000000000","message":"Is this was returns the vm_ref then?  What about the instance.name !\u003d instance.uuid handling?  Not needed?\n\nOr is this the change to fake.py to set the result as the virtual_machine.obj?  If so, that\u0027s really confusing, at least in a refactor - and the fact that something is called fake which isn\u0027t a fake...","commit_id":"46c9cebd89ac93736db9307cbd4791925571c8f8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9f69f40f05c2858ca01aa21eae2e79e20307f460","unresolved":false,"context_lines":[{"line_number":1388,"context_line":"        config\u003dconfig_spec, pool\u003dres_pool_ref)"},{"line_number":1389,"context_line":"    task_info \u003d session._wait_for_task(vm_create_task)"},{"line_number":1390,"context_line":"    LOG.debug(_(\"Created VM on the ESX host\"), instance\u003dinstance)"},{"line_number":1391,"context_line":"    return task_info.result"},{"line_number":1392,"context_line":""},{"line_number":1393,"context_line":""},{"line_number":1394,"context_line":"def clone_vmref_for_instance(session, instance, vm_ref, host_ref, ds_ref,"}],"source_content_type":"text/x-python","patch_set":40,"id":"9ad9bd40_2e09c031","line":1391,"in_reply_to":"9ad9bd40_8ea1ecab","updated":"2014-04-30 18:38:48.000000000","message":"The instance.name / instance.uuid thing doesn\u0027t matter anymore because we short-circuit that and just get the vm_ref from the task_info result, as described in the spec here:\n\nhttps://www.vmware.com/support/developer/vc-sdk/visdk2xpubs/ReferenceGuide/vim.Folder.html#createVm","commit_id":"46c9cebd89ac93736db9307cbd4791925571c8f8"}],"nova/virt/vmwareapi/vmops.py":[{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"949da50582028de9aab877647eb5222ce4739992","unresolved":false,"context_lines":[{"line_number":654,"context_line":"        self._session._wait_for_task(vm_create_task)"},{"line_number":655,"context_line":""},{"line_number":656,"context_line":"        LOG.debug(_(\"Created VM on the ESX host\"), instance\u003dinstance)"},{"line_number":657,"context_line":""},{"line_number":658,"context_line":"    def _create_config_drive(self, instance, injected_files, admin_password,"},{"line_number":659,"context_line":"                             data_store_name, dc_name, upload_folder, cookies):"},{"line_number":660,"context_line":"        if CONF.config_drive_format !\u003d \u0027iso9660\u0027:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F%2FBss%3D","line":657,"updated":"2014-03-20 20:29:57.000000000","message":"return a value of some kind. The logical return value here is the vm_ref ... if you can figure out how to alter this method to do that you\u0027ll actually be making a subtle but important change to the method\u0027s spawn structure. \n\nIt *won\u0027t* have to do a lookup for the vmref on lines 321 or 324. This is a subtle but very important change.","commit_id":"91870d539d73cd0469eb30381df2d5e8a1eca737"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"d938b11e1f48fda17afffd3435c18ac26d77707e","unresolved":false,"context_lines":[{"line_number":321,"context_line":"            vm_ref \u003d vm_util.get_vm_ref_from_name(self._session,"},{"line_number":322,"context_line":"                                                  instance_name)"},{"line_number":323,"context_line":"        else:"},{"line_number":324,"context_line":"            vm_ref \u003d vm_util.get_vm_ref(self._session, instance)"},{"line_number":325,"context_line":""},{"line_number":326,"context_line":"        # Set the machine.id parameter of the instance to inject"},{"line_number":327,"context_line":"        # the NIC configuration inside the VM"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2FBfk%3D","line":324,"updated":"2014-03-20 21:03:13.000000000","message":"If  self._execute_create_vm returns vm_ref you can eliminate lines 320 to 324 which eats 100% CPU at times and forced us to create a cache system. Instead, now you have a single method with a single return saving several branches in code, fewer total tests, and fewer  trips over the network.","commit_id":"ed806bc0bf7c7f78e96fc7cb75ebc7621cac000c"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"f6da555deea478205b944f6139126d3bf0ddcfac","unresolved":false,"context_lines":[{"line_number":654,"context_line":"        self._session._wait_for_task(vm_create_task)"},{"line_number":655,"context_line":""},{"line_number":656,"context_line":"        LOG.debug(_(\"Created VM on the ESX host\"), instance\u003dinstance)"},{"line_number":657,"context_line":""},{"line_number":658,"context_line":"    def _create_config_drive(self, instance, injected_files, admin_password,"},{"line_number":659,"context_line":"                             data_store_name, dc_name, upload_folder, cookies):"},{"line_number":660,"context_line":"        if CONF.config_drive_format !\u003d \u0027iso9660\u0027:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2FBh8%3D","line":657,"updated":"2014-03-20 20:57:39.000000000","message":"Consider:\n\ntask_info \u003d self._session._wait_for_task(vm_create_task)\n\nreturn task_info.result\n\n(or something close to that should work)","commit_id":"ed806bc0bf7c7f78e96fc7cb75ebc7621cac000c"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"41fb6b368a4d29d1c7445ba7114071234187aed9","unresolved":false,"context_lines":[{"line_number":615,"context_line":"        if power_on:"},{"line_number":616,"context_line":"            _power_on_vm()"},{"line_number":617,"context_line":""},{"line_number":618,"context_line":"    def _execute_create_vm(self, instance, dc_info, config_spec, res_pool_ref):"},{"line_number":619,"context_line":"        \"\"\"Create VM on ESX host.\"\"\""},{"line_number":620,"context_line":"        LOG.debug(_(\"Creating VM on the ESX host\"), instance\u003dinstance)"},{"line_number":621,"context_line":"        # Create the VM on the ESX host"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAWH%2F%2Bljc%3D","line":618,"updated":"2014-03-25 18:00:47.000000000","message":"I\u0027m contemplating asking you to move this to vm_util.py ... because it is a vm operation. If we do that, then all the vm operations are near each other and can be considered in a single unit.\n\nReactions?","commit_id":"2820b5bb4dad8733a231f087f284c71b64e0d4c0"},{"author":{"_account_id":7400,"name":"Tracy Jones","email":"tjones@vmware.com","username":"tracyajones"},"change_message_id":"e1880dd9d3d919f3f6b85841528fe539e6c43581","unresolved":false,"context_lines":[{"line_number":615,"context_line":"        if power_on:"},{"line_number":616,"context_line":"            _power_on_vm()"},{"line_number":617,"context_line":""},{"line_number":618,"context_line":"    def _execute_create_vm(self, instance, dc_info, config_spec, res_pool_ref):"},{"line_number":619,"context_line":"        \"\"\"Create VM on ESX host.\"\"\""},{"line_number":620,"context_line":"        LOG.debug(_(\"Creating VM on the ESX host\"), instance\u003dinstance)"},{"line_number":621,"context_line":"        # Create the VM on the ESX host"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAWH%2F%2Bb38%3D","line":618,"in_reply_to":"AAAAWH%2F%2Bljc%3D","updated":"2014-03-26 19:44:29.000000000","message":"i think this is a good idea and the tactic i am taking in the power_on_vm refactor","commit_id":"2820b5bb4dad8733a231f087f284c71b64e0d4c0"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"453a2353ee58c01c724fc05b53af309f84ad6fcc","unresolved":false,"context_lines":[{"line_number":259,"context_line":"        if not instance_name:"},{"line_number":260,"context_line":"            instance_name \u003d instance[\u0027uuid\u0027]"},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"        # Create the VM"},{"line_number":263,"context_line":"        config_spec \u003d vm_util.get_vm_create_spec("},{"line_number":264,"context_line":"                            client_factory, instance, instance_name,"},{"line_number":265,"context_line":"                            data_store_name, vif_infos, os_type)"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAW3%2F%2FxBM%3D","line":262,"updated":"2014-04-10 14:39:32.000000000","message":"delete this","commit_id":"dbd20033448975a7384b876eeb829215a6f402f4"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"9b1159d20f36839a91ac52d1fc6eac62e874495a","unresolved":false,"context_lines":[{"line_number":265,"context_line":"                            data_store_name, vif_infos, os_type)"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"        vm_ref \u003d vm_util.create_vm(self._session, instance, dc_info,"},{"line_number":268,"context_line":"                                   config_spec, res_pool_ref)"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"        # Set the machine.id parameter of the instance to inject"},{"line_number":271,"context_line":"        # the NIC configuration inside the VM"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAW3%2F%2Faow%3D","line":268,"updated":"2014-04-14 18:18:09.000000000","message":"so, create_vm is returning task_info.result from the call to _wait_for_task with the CreateVM_Task vSphere API call. Is that the same as what is returned from vm_util.get_vm_ref_from_name()?","commit_id":"b3daab61db69f8e6338510399f7848176f386071"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"c5590237a3acf6e2b1b9295d085e196b0409361e","unresolved":false,"context_lines":[{"line_number":265,"context_line":"                            data_store_name, vif_infos, os_type)"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"        vm_ref \u003d vm_util.create_vm(self._session, instance, dc_info,"},{"line_number":268,"context_line":"                                   config_spec, res_pool_ref)"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"        # Set the machine.id parameter of the instance to inject"},{"line_number":271,"context_line":"        # the NIC configuration inside the VM"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAW3%2F%2FYtA%3D","line":268,"in_reply_to":"AAAAW3%2F%2FZMQ%3D","updated":"2014-04-14 23:50:16.000000000","message":"OK, thx for checking this for me, appreciated!","commit_id":"b3daab61db69f8e6338510399f7848176f386071"},{"author":{"_account_id":7400,"name":"Tracy Jones","email":"tjones@vmware.com","username":"tracyajones"},"change_message_id":"6491e353facaa0e79c0790c37d7ddb7d76f5afad","unresolved":false,"context_lines":[{"line_number":265,"context_line":"                            data_store_name, vif_infos, os_type)"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"        vm_ref \u003d vm_util.create_vm(self._session, instance, dc_info,"},{"line_number":268,"context_line":"                                   config_spec, res_pool_ref)"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"        # Set the machine.id parameter of the instance to inject"},{"line_number":271,"context_line":"        # the NIC configuration inside the VM"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAW3%2F%2FZMQ%3D","line":268,"in_reply_to":"AAAAW3%2F%2Faow%3D","updated":"2014-04-14 22:23:53.000000000","message":"yes it is","commit_id":"b3daab61db69f8e6338510399f7848176f386071"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"da981174a2b460ae1a6517151edfb7abd8a96c6e","unresolved":false,"context_lines":[{"line_number":284,"context_line":"            vm_ref \u003d vm_util.get_vm_ref_from_name(self._session,"},{"line_number":285,"context_line":"                                                  instance_name)"},{"line_number":286,"context_line":"        else:"},{"line_number":287,"context_line":"            vm_ref \u003d vm_util.get_vm_ref(self._session, instance)"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":"        # Set the machine.id parameter of the instance to inject"},{"line_number":290,"context_line":"        # the NIC configuration inside the VM"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAXH%2F%2F4pA%3D","side":"PARENT","line":287,"updated":"2014-04-16 17:38:27.000000000","message":"So, this code before was doing a second lookup of the ref, and now it\u0027s just taking the result of the task? That seems like a win, huh? :)","commit_id":"273bb44d66cfab766564e6e516c493e701981113"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"5f94f14f5419b8d234da7a01c75a9baa8987b940","unresolved":false,"context_lines":[{"line_number":284,"context_line":"            vm_ref \u003d vm_util.get_vm_ref_from_name(self._session,"},{"line_number":285,"context_line":"                                                  instance_name)"},{"line_number":286,"context_line":"        else:"},{"line_number":287,"context_line":"            vm_ref \u003d vm_util.get_vm_ref(self._session, instance)"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":"        # Set the machine.id parameter of the instance to inject"},{"line_number":290,"context_line":"        # the NIC configuration inside the VM"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAXH%2F%2FxrE%3D","side":"PARENT","line":287,"in_reply_to":"AAAAXH%2F%2F4pA%3D","updated":"2014-04-17 14:44:51.000000000","message":"Correct - there was also a patch like this which has been in review for months - https://review.openstack.org/#/c/71581/","commit_id":"273bb44d66cfab766564e6e516c493e701981113"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d2d441a32aace45f2632468e6326df6b0239b79c","unresolved":false,"context_lines":[{"line_number":260,"context_line":"        # for example when the spawn of a rescue instance takes place."},{"line_number":261,"context_line":"        if not instance_name:"},{"line_number":262,"context_line":"            instance_name \u003d instance[\u0027uuid\u0027]"},{"line_number":263,"context_line":"        # Get the create vm config spec"},{"line_number":264,"context_line":"        config_spec \u003d vm_util.get_vm_create_spec("},{"line_number":265,"context_line":"                            client_factory, instance, instance_name,"},{"line_number":266,"context_line":"                            data_store_name, vif_infos, os_type)"}],"source_content_type":"text/x-python","patch_set":40,"id":"9ad9bd40_ce0f74e0","side":"PARENT","line":263,"updated":"2014-04-30 18:19:08.000000000","message":"Why did this need to change?","commit_id":"64bfdb6ad4c306a5ae96257121fd4699a422137e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9f69f40f05c2858ca01aa21eae2e79e20307f460","unresolved":false,"context_lines":[{"line_number":260,"context_line":"        # for example when the spawn of a rescue instance takes place."},{"line_number":261,"context_line":"        if not instance_name:"},{"line_number":262,"context_line":"            instance_name \u003d instance[\u0027uuid\u0027]"},{"line_number":263,"context_line":"        # Get the create vm config spec"},{"line_number":264,"context_line":"        config_spec \u003d vm_util.get_vm_create_spec("},{"line_number":265,"context_line":"                            client_factory, instance, instance_name,"},{"line_number":266,"context_line":"                            data_store_name, vif_infos, os_type)"}],"source_content_type":"text/x-python","patch_set":40,"id":"9ad9bd40_4e58c456","side":"PARENT","line":263,"in_reply_to":"9ad9bd40_ce0f74e0","updated":"2014-04-30 18:38:48.000000000","message":"It didn\u0027t, but meh.","commit_id":"64bfdb6ad4c306a5ae96257121fd4699a422137e"}]}
