)]}'
{"nova/tests/unit/virt/vmwareapi/test_images.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"cd07a9206d6e5ab50b4ba0d999df82f2bda39986","unresolved":false,"context_lines":[{"line_number":363,"context_line":"            observed \u003d images.get_vsphere_location(context, \u0027image_id\u0027)"},{"line_number":364,"context_line":"            self.assertIsNone(observed)"},{"line_number":365,"context_line":""},{"line_number":366,"context_line":"    def test_get_vsphere_location_no_context(self):"},{"line_number":367,"context_line":"        observed \u003d images.get_vsphere_location(None, \u0027image_id\u0027)"},{"line_number":368,"context_line":"        self.assertIsNone(observed)"}],"source_content_type":"text/x-python","patch_set":10,"id":"da6ed579_fdd1b423","line":366,"updated":"2016-01-15 10:14:34.000000000","message":"How is this possible? including the None image_id?","commit_id":"9c8b0c311b52ca9dfb733f87ed4f1bea6c111cb9"}],"nova/tests/unit/virt/vmwareapi/test_vmops.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"d8c48167f53babb2e2d54e4368da09a7ff77ee29","unresolved":false,"context_lines":[{"line_number":388,"context_line":"    def test_get_datacenter_ref_and_name_with_no_datastore(self):"},{"line_number":389,"context_line":"        self._test_get_datacenter_ref_and_name()"},{"line_number":390,"context_line":""},{"line_number":391,"context_line":"    @mock.patch.object(glance, \u0027get_default_image_service\u0027)"},{"line_number":392,"context_line":"    @mock.patch.object(vm_util, \u0027power_off_instance\u0027)"},{"line_number":393,"context_line":"    @mock.patch.object(ds_util, \u0027disk_copy\u0027)"},{"line_number":394,"context_line":"    @mock.patch.object(vm_util, \u0027get_vm_ref\u0027, return_value\u003d\u0027fake-ref\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a4dcd0f_8be7b03f","line":391,"updated":"2015-08-10 16:38:12.000000000","message":"Please mock out nova.image.API.get, not the (internal implementation detail) nova.image.glance.get_default_image_service method.","commit_id":"9ccd70342b431d92466863624428791e76f2b5e2"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"981901154b6ac55e00dd2bbe5c71960482e6bb81","unresolved":false,"context_lines":[{"line_number":388,"context_line":"    def test_get_datacenter_ref_and_name_with_no_datastore(self):"},{"line_number":389,"context_line":"        self._test_get_datacenter_ref_and_name()"},{"line_number":390,"context_line":""},{"line_number":391,"context_line":"    @mock.patch.object(glance, \u0027get_default_image_service\u0027)"},{"line_number":392,"context_line":"    @mock.patch.object(vm_util, \u0027power_off_instance\u0027)"},{"line_number":393,"context_line":"    @mock.patch.object(ds_util, \u0027disk_copy\u0027)"},{"line_number":394,"context_line":"    @mock.patch.object(vm_util, \u0027get_vm_ref\u0027, return_value\u003d\u0027fake-ref\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_2fe60b44","line":391,"in_reply_to":"1a4dcd0f_8be7b03f","updated":"2015-09-01 10:11:24.000000000","message":"Done","commit_id":"9ccd70342b431d92466863624428791e76f2b5e2"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"cd07a9206d6e5ab50b4ba0d999df82f2bda39986","unresolved":false,"context_lines":[{"line_number":2021,"context_line":"        image_ds_loc \u003d mock.Mock()"},{"line_number":2022,"context_line":"        datacenter_moref \u003d mock.Mock()"},{"line_number":2023,"context_line":"        fake_copy_task \u003d mock.Mock()"},{"line_number":2024,"context_line":"        calls \u003d ["},{"line_number":2025,"context_line":"            mock.call("},{"line_number":2026,"context_line":"                self._session.vim, \u0027FindByInventoryPath\u0027,"},{"line_number":2027,"context_line":"                self._session.vim.service_content.searchIndex,"}],"source_content_type":"text/x-python","patch_set":10,"id":"da6ed579_3dc98cac","line":2024,"updated":"2016-01-15 10:14:34.000000000","message":"Nit: maybe this is expected_calls? I prefer to define this just before doing the assert, so we follow the clear unit test pattern of: setup, execute, assert.","commit_id":"9c8b0c311b52ca9dfb733f87ed4f1bea6c111cb9"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"b50658c96469cf6ec88a5d3ac5e6544d122780ef","unresolved":false,"context_lines":[{"line_number":2021,"context_line":"        image_ds_loc \u003d mock.Mock()"},{"line_number":2022,"context_line":"        datacenter_moref \u003d mock.Mock()"},{"line_number":2023,"context_line":"        fake_copy_task \u003d mock.Mock()"},{"line_number":2024,"context_line":"        calls \u003d ["},{"line_number":2025,"context_line":"            mock.call("},{"line_number":2026,"context_line":"                self._session.vim, \u0027FindByInventoryPath\u0027,"},{"line_number":2027,"context_line":"                self._session.vim.service_content.searchIndex,"}],"source_content_type":"text/x-python","patch_set":10,"id":"da6ed579_3d598c8e","line":2024,"in_reply_to":"da6ed579_3dc98cac","updated":"2016-01-15 13:23:44.000000000","message":"Done","commit_id":"9c8b0c311b52ca9dfb733f87ed4f1bea6c111cb9"}],"nova/virt/vmwareapi/images.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"d8c48167f53babb2e2d54e4368da09a7ff77ee29","unresolved":false,"context_lines":[{"line_number":170,"context_line":"                hw_scsi_model \u003d properties.get(\u0027hw_scsi_model\u0027)"},{"line_number":171,"context_line":"                props[\u0027adapter_type\u0027] \u003d mapping.get(hw_scsi_model)"},{"line_number":172,"context_line":"        if context and image_id:"},{"line_number":173,"context_line":"            metadata \u003d IMAGE_API.get(context, image_id, include_locations\u003dTrue)"},{"line_number":174,"context_line":"            props[\u0027locations\u0027] \u003d metadata.get(\u0027locations\u0027)"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"        props_map \u003d {"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a4dcd0f_4b5e88ea","line":173,"updated":"2015-08-10 16:38:12.000000000","message":"This is what you should be mocking out in the test file :)","commit_id":"9ccd70342b431d92466863624428791e76f2b5e2"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"981901154b6ac55e00dd2bbe5c71960482e6bb81","unresolved":false,"context_lines":[{"line_number":170,"context_line":"                hw_scsi_model \u003d properties.get(\u0027hw_scsi_model\u0027)"},{"line_number":171,"context_line":"                props[\u0027adapter_type\u0027] \u003d mapping.get(hw_scsi_model)"},{"line_number":172,"context_line":"        if context and image_id:"},{"line_number":173,"context_line":"            metadata \u003d IMAGE_API.get(context, image_id, include_locations\u003dTrue)"},{"line_number":174,"context_line":"            props[\u0027locations\u0027] \u003d metadata.get(\u0027locations\u0027)"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"        props_map \u003d {"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_6fe08329","line":173,"in_reply_to":"1a4dcd0f_4b5e88ea","updated":"2015-09-01 10:11:24.000000000","message":"Done","commit_id":"9ccd70342b431d92466863624428791e76f2b5e2"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"3c842b2356d4b24470a339ea605ba594318f70a9","unresolved":false,"context_lines":[{"line_number":114,"context_line":"    def vsphere_location(self):"},{"line_number":115,"context_line":"        for loc in self.locations:"},{"line_number":116,"context_line":"            loc_url \u003d loc.get(\u0027url\u0027)"},{"line_number":117,"context_line":"            if loc_url and loc_url.startswith(\u0027vsphere://\u0027):"},{"line_number":118,"context_line":"                return loc_url"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_a5f642f7","line":117,"updated":"2015-12-17 18:00:28.000000000","message":"This seems really odd, why not just have a single URL field you set when creating this object?","commit_id":"7eaf80e81c3338888a7af178ea6a6c7921150f68"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"4ce04051e448333a69b7dacdfc26bcf4b345d7e3","unresolved":false,"context_lines":[{"line_number":114,"context_line":"    def vsphere_location(self):"},{"line_number":115,"context_line":"        for loc in self.locations:"},{"line_number":116,"context_line":"            loc_url \u003d loc.get(\u0027url\u0027)"},{"line_number":117,"context_line":"            if loc_url and loc_url.startswith(\u0027vsphere://\u0027):"},{"line_number":118,"context_line":"                return loc_url"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a7b0d38_2daa841a","line":117,"in_reply_to":"3a7e1126_a5f642f7","updated":"2015-12-22 20:19:04.000000000","message":"Done (if i understand correctly the comment)","commit_id":"7eaf80e81c3338888a7af178ea6a6c7921150f68"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"3c842b2356d4b24470a339ea605ba594318f70a9","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        for loc in self.locations:"},{"line_number":116,"context_line":"            loc_url \u003d loc.get(\u0027url\u0027)"},{"line_number":117,"context_line":"            if loc_url and loc_url.startswith(\u0027vsphere://\u0027):"},{"line_number":118,"context_line":"                return loc_url"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    @classmethod"},{"line_number":121,"context_line":"    def from_image(cls, context, image_id, image_meta):"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_8541c60d","line":118,"updated":"2015-12-17 18:00:28.000000000","message":"I don\u0027t see any unit tests for this logic. It might be covered by some of the integration-ey unit tests, but it feels like this should be covered more explicitly.","commit_id":"7eaf80e81c3338888a7af178ea6a6c7921150f68"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"4ce04051e448333a69b7dacdfc26bcf4b345d7e3","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        for loc in self.locations:"},{"line_number":116,"context_line":"            loc_url \u003d loc.get(\u0027url\u0027)"},{"line_number":117,"context_line":"            if loc_url and loc_url.startswith(\u0027vsphere://\u0027):"},{"line_number":118,"context_line":"                return loc_url"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    @classmethod"},{"line_number":121,"context_line":"    def from_image(cls, context, image_id, image_meta):"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a7b0d38_8302693d","line":118,"in_reply_to":"3a7e1126_8541c60d","updated":"2015-12-22 20:19:04.000000000","message":"Done","commit_id":"7eaf80e81c3338888a7af178ea6a6c7921150f68"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"3c842b2356d4b24470a339ea605ba594318f70a9","unresolved":false,"context_lines":[{"line_number":170,"context_line":"                props[\u0027adapter_type\u0027] \u003d mapping.get(hw_scsi_model)"},{"line_number":171,"context_line":"        if context and image_id:"},{"line_number":172,"context_line":"            metadata \u003d IMAGE_API.get(context, image_id, include_locations\u003dTrue)"},{"line_number":173,"context_line":"            props[\u0027locations\u0027] \u003d metadata.get(\u0027locations\u0027)"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"        props_map \u003d {"},{"line_number":176,"context_line":"            \u0027os_distro\u0027: \u0027os_type\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_25b57230","line":173,"updated":"2015-12-17 18:00:28.000000000","message":"I think you should just set a location property, if you find a vmware location in this data.","commit_id":"7eaf80e81c3338888a7af178ea6a6c7921150f68"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"4ce04051e448333a69b7dacdfc26bcf4b345d7e3","unresolved":false,"context_lines":[{"line_number":170,"context_line":"                props[\u0027adapter_type\u0027] \u003d mapping.get(hw_scsi_model)"},{"line_number":171,"context_line":"        if context and image_id:"},{"line_number":172,"context_line":"            metadata \u003d IMAGE_API.get(context, image_id, include_locations\u003dTrue)"},{"line_number":173,"context_line":"            props[\u0027locations\u0027] \u003d metadata.get(\u0027locations\u0027)"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"        props_map \u003d {"},{"line_number":176,"context_line":"            \u0027os_distro\u0027: \u0027os_type\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a7b0d38_4da7d04f","line":173,"in_reply_to":"3a7e1126_25b57230","updated":"2015-12-22 20:19:04.000000000","message":"Done","commit_id":"7eaf80e81c3338888a7af178ea6a6c7921150f68"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"3c842b2356d4b24470a339ea605ba594318f70a9","unresolved":false,"context_lines":[{"line_number":171,"context_line":"        if context and image_id:"},{"line_number":172,"context_line":"            metadata \u003d IMAGE_API.get(context, image_id, include_locations\u003dTrue)"},{"line_number":173,"context_line":"            props[\u0027locations\u0027] \u003d metadata.get(\u0027locations\u0027)"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"        props_map \u003d {"},{"line_number":176,"context_line":"            \u0027os_distro\u0027: \u0027os_type\u0027,"},{"line_number":177,"context_line":"            \u0027hw_disk_type\u0027: \u0027disk_type\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_c5ba6ee1","line":174,"updated":"2015-12-17 18:00:28.000000000","message":"I don\u0027t see that above call being tested anywhere?","commit_id":"7eaf80e81c3338888a7af178ea6a6c7921150f68"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"4ce04051e448333a69b7dacdfc26bcf4b345d7e3","unresolved":false,"context_lines":[{"line_number":171,"context_line":"        if context and image_id:"},{"line_number":172,"context_line":"            metadata \u003d IMAGE_API.get(context, image_id, include_locations\u003dTrue)"},{"line_number":173,"context_line":"            props[\u0027locations\u0027] \u003d metadata.get(\u0027locations\u0027)"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"        props_map \u003d {"},{"line_number":176,"context_line":"            \u0027os_distro\u0027: \u0027os_type\u0027,"},{"line_number":177,"context_line":"            \u0027hw_disk_type\u0027: \u0027disk_type\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a7b0d38_d9105eab","line":174,"in_reply_to":"3a7e1126_c5ba6ee1","updated":"2015-12-22 20:19:04.000000000","message":"Done","commit_id":"7eaf80e81c3338888a7af178ea6a6c7921150f68"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"cd07a9206d6e5ab50b4ba0d999df82f2bda39986","unresolved":false,"context_lines":[{"line_number":178,"context_line":""},{"line_number":179,"context_line":"def get_vsphere_location(context, image_id):"},{"line_number":180,"context_line":"    \"\"\"Get image location in vsphere or None.\"\"\""},{"line_number":181,"context_line":"    if context and image_id:"},{"line_number":182,"context_line":"        metadata \u003d IMAGE_API.get(context, image_id, include_locations\u003dTrue)"},{"line_number":183,"context_line":"        locations \u003d metadata.get(\u0027locations\u0027)"},{"line_number":184,"context_line":"        if locations:"}],"source_content_type":"text/x-python","patch_set":10,"id":"da6ed579_6214414c","line":181,"updated":"2016-01-15 10:14:34.000000000","message":"I don\u0027t really understand why this if is here. Surely from_image always gets passed an image_id? Certainly context should always be a real value.","commit_id":"9c8b0c311b52ca9dfb733f87ed4f1bea6c111cb9"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"b50658c96469cf6ec88a5d3ac5e6544d122780ef","unresolved":false,"context_lines":[{"line_number":178,"context_line":""},{"line_number":179,"context_line":"def get_vsphere_location(context, image_id):"},{"line_number":180,"context_line":"    \"\"\"Get image location in vsphere or None.\"\"\""},{"line_number":181,"context_line":"    if context and image_id:"},{"line_number":182,"context_line":"        metadata \u003d IMAGE_API.get(context, image_id, include_locations\u003dTrue)"},{"line_number":183,"context_line":"        locations \u003d metadata.get(\u0027locations\u0027)"},{"line_number":184,"context_line":"        if locations:"}],"source_content_type":"text/x-python","patch_set":10,"id":"da6ed579_c03de4c4","line":181,"in_reply_to":"da6ed579_6214414c","updated":"2016-01-15 13:23:44.000000000","message":"this method is called by from_image which is called by spawn/rescue which provides non-None values for context/image_id","commit_id":"9c8b0c311b52ca9dfb733f87ed4f1bea6c111cb9"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"45abfb54f992d303fe8c29a7ee48f262b5914c96","unresolved":false,"context_lines":[{"line_number":178,"context_line":""},{"line_number":179,"context_line":"def get_vsphere_location(context, image_id):"},{"line_number":180,"context_line":"    \"\"\"Get image location in vsphere or None.\"\"\""},{"line_number":181,"context_line":"    if context and image_id:"},{"line_number":182,"context_line":"        metadata \u003d IMAGE_API.get(context, image_id, include_locations\u003dTrue)"},{"line_number":183,"context_line":"        locations \u003d metadata.get(\u0027locations\u0027)"},{"line_number":184,"context_line":"        if locations:"}],"source_content_type":"text/x-python","patch_set":10,"id":"da6ed579_d8ecd994","line":181,"in_reply_to":"da6ed579_c03de4c4","updated":"2016-01-15 21:45:15.000000000","message":"Now, i know why we need this condition, we can boot a vm on a volume without an image","commit_id":"9c8b0c311b52ca9dfb733f87ed4f1bea6c111cb9"},{"author":{"_account_id":2271,"name":"Michael Still","email":"mikal@stillhq.com","username":"mikalstill"},"change_message_id":"3817f0525b156046d8af76e66ceafc7599a84671","unresolved":false,"context_lines":[{"line_number":188,"context_line":"                loc_url \u003d loc.get(\u0027url\u0027)"},{"line_number":189,"context_line":"                if loc_url and loc_url.startswith(\u0027vsphere://\u0027):"},{"line_number":190,"context_line":"                    return loc_url"},{"line_number":191,"context_line":"    return None"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"def start_transfer(context, read_file_handle, data_size,"}],"source_content_type":"text/x-python","patch_set":14,"id":"1a122d0e_a0cd1332","line":191,"updated":"2016-05-05 01:38:25.000000000","message":"Just noting that you don\u0027t actually need this return, but I actually like being explicit about these.","commit_id":"4404baba47e6d3ec2511785d312a888b31a4e7b4"}],"nova/virt/vmwareapi/vmops.py":[{"author":{"_account_id":7400,"name":"Tracy Jones","email":"tjones@vmware.com","username":"tracyajones"},"change_message_id":"34591e0ca821fe80434fb2351cc978bdc4f9265f","unresolved":false,"context_lines":[{"line_number":322,"context_line":"        \"\"\"Fetch image which is located on a vSphere datastore.\"\"\""},{"line_number":323,"context_line":"        location \u003d vi.ii.vsphere_location"},{"line_number":324,"context_line":"        LOG.debug(\"Using vSphere location: %s\", location)"},{"line_number":325,"context_line":"        location_url \u003d ds_obj.DatastoreURL.urlparse(location)"},{"line_number":326,"context_line":"        service_content \u003d self._session.vim.service_content"},{"line_number":327,"context_line":"        datacenter_path \u003d location_url.datacenter_path"},{"line_number":328,"context_line":"        datastore_name \u003d location_url.datastore_name"}],"source_content_type":"text/x-python","patch_set":2,"id":"5afe65bd_a05aba81","line":325,"updated":"2015-06-02 16:52:15.000000000","message":"could this be local or the method return None?","commit_id":"5b2aab298171a8f143bea7ba002d6a454c34a597"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"a7a280989e76877f60f9b02a34a704c123ee9c3e","unresolved":false,"context_lines":[{"line_number":322,"context_line":"        \"\"\"Fetch image which is located on a vSphere datastore.\"\"\""},{"line_number":323,"context_line":"        location \u003d vi.ii.vsphere_location"},{"line_number":324,"context_line":"        LOG.debug(\"Using vSphere location: %s\", location)"},{"line_number":325,"context_line":"        location_url \u003d ds_obj.DatastoreURL.urlparse(location)"},{"line_number":326,"context_line":"        service_content \u003d self._session.vim.service_content"},{"line_number":327,"context_line":"        datacenter_path \u003d location_url.datacenter_path"},{"line_number":328,"context_line":"        datastore_name \u003d location_url.datastore_name"}],"source_content_type":"text/x-python","patch_set":2,"id":"3afb71cf_5182d153","line":325,"in_reply_to":"5afe65bd_a05aba81","updated":"2015-06-05 12:20:38.000000000","message":"We assume that locations returned from Glance are valid URLs, I don\u0027t think we should make additional checks","commit_id":"5b2aab298171a8f143bea7ba002d6a454c34a597"},{"author":{"_account_id":7400,"name":"Tracy Jones","email":"tjones@vmware.com","username":"tracyajones"},"change_message_id":"34591e0ca821fe80434fb2351cc978bdc4f9265f","unresolved":false,"context_lines":[{"line_number":326,"context_line":"        service_content \u003d self._session.vim.service_content"},{"line_number":327,"context_line":"        datacenter_path \u003d location_url.datacenter_path"},{"line_number":328,"context_line":"        datastore_name \u003d location_url.datastore_name"},{"line_number":329,"context_line":"        src_path \u003d ds_obj.DatastorePath(datastore_name, location_url.path)"},{"line_number":330,"context_line":""},{"line_number":331,"context_line":"        LOG.debug(\"Copying image file data %(image_id)s to \""},{"line_number":332,"context_line":"                  \"%(file_path)s on the data store \""}],"source_content_type":"text/x-python","patch_set":2,"id":"5afe65bd_6055e24e","line":329,"updated":"2015-06-02 16:52:15.000000000","message":"if it could, then this will fail.  should we check it?","commit_id":"5b2aab298171a8f143bea7ba002d6a454c34a597"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"40ad00b8dc298cbbb5a192fa7ffd3ba65911e669","unresolved":false,"context_lines":[{"line_number":318,"context_line":"            extra_specs.storage_policy \u003d storage_policy"},{"line_number":319,"context_line":"        return extra_specs"},{"line_number":320,"context_line":""},{"line_number":321,"context_line":"    def _fetch_vsphere_image(self, context, vi, image_ds_loc):"},{"line_number":322,"context_line":"        \"\"\"Fetch image which is located on a vSphere datastore.\"\"\""},{"line_number":323,"context_line":"        location \u003d vi.ii.vsphere_location"},{"line_number":324,"context_line":"        LOG.debug(\"Using vSphere location: %s\", location)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a4dcd0f_0109412c","line":321,"updated":"2015-08-10 17:05:37.000000000","message":"Where is any of this unit tested?","commit_id":"9ccd70342b431d92466863624428791e76f2b5e2"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"981901154b6ac55e00dd2bbe5c71960482e6bb81","unresolved":false,"context_lines":[{"line_number":318,"context_line":"            extra_specs.storage_policy \u003d storage_policy"},{"line_number":319,"context_line":"        return extra_specs"},{"line_number":320,"context_line":""},{"line_number":321,"context_line":"    def _fetch_vsphere_image(self, context, vi, image_ds_loc):"},{"line_number":322,"context_line":"        \"\"\"Fetch image which is located on a vSphere datastore.\"\"\""},{"line_number":323,"context_line":"        location \u003d vi.ii.vsphere_location"},{"line_number":324,"context_line":"        LOG.debug(\"Using vSphere location: %s\", location)"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_4fc25f54","line":321,"in_reply_to":"1a4dcd0f_0109412c","updated":"2015-09-01 10:11:24.000000000","message":"will be done in PS5","commit_id":"9ccd70342b431d92466863624428791e76f2b5e2"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"d45bf5aba03733a4b1cc7015450fae860995048c","unresolved":false,"context_lines":[{"line_number":318,"context_line":"            extra_specs.storage_policy \u003d storage_policy"},{"line_number":319,"context_line":"        return extra_specs"},{"line_number":320,"context_line":""},{"line_number":321,"context_line":"    def _fetch_vsphere_image(self, context, vi, image_ds_loc):"},{"line_number":322,"context_line":"        \"\"\"Fetch image which is located on a vSphere datastore.\"\"\""},{"line_number":323,"context_line":"        location \u003d vi.ii.vsphere_location"},{"line_number":324,"context_line":"        LOG.debug(\"Using vSphere location: %s\", location)"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_87937b5a","line":321,"in_reply_to":"da20952f_4fc25f54","updated":"2015-09-01 11:52:57.000000000","message":"Done","commit_id":"9ccd70342b431d92466863624428791e76f2b5e2"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"cc563e233bd6a788bdb08c7b68642e43ab72a1ad","unresolved":false,"context_lines":[{"line_number":378,"context_line":"            destinationName\u003dstr(image_ds_loc),"},{"line_number":379,"context_line":"            destinationDatacenter\u003dvi.dc_info.ref)"},{"line_number":380,"context_line":"        self._session._wait_for_task(copy_task)"},{"line_number":381,"context_line":""},{"line_number":382,"context_line":"    def _fetch_image_as_file(self, context, vi, image_ds_loc):"},{"line_number":383,"context_line":"        \"\"\"Download image as an individual file to host via HTTP PUT.\"\"\""},{"line_number":384,"context_line":"        session \u003d self._session"}],"source_content_type":"text/x-python","patch_set":5,"id":"da20952f_67574758","line":381,"updated":"2015-09-01 11:58:09.000000000","message":"may be worthwhile having a debug message that the copy is complete","commit_id":"fad3a901707edc93665e58aa8191a5ce012d6006"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"da8e9bcd28b0bf4422f7a9ca045767eacb9b1d40","unresolved":false,"context_lines":[{"line_number":378,"context_line":"            destinationName\u003dstr(image_ds_loc),"},{"line_number":379,"context_line":"            destinationDatacenter\u003dvi.dc_info.ref)"},{"line_number":380,"context_line":"        self._session._wait_for_task(copy_task)"},{"line_number":381,"context_line":""},{"line_number":382,"context_line":"    def _fetch_image_as_file(self, context, vi, image_ds_loc):"},{"line_number":383,"context_line":"        \"\"\"Download image as an individual file to host via HTTP PUT.\"\"\""},{"line_number":384,"context_line":"        session \u003d self._session"}],"source_content_type":"text/x-python","patch_set":5,"id":"da20952f_3a8ac664","line":381,"in_reply_to":"da20952f_67574758","updated":"2015-09-01 12:03:52.000000000","message":"Done","commit_id":"fad3a901707edc93665e58aa8191a5ce012d6006"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"3c842b2356d4b24470a339ea605ba594318f70a9","unresolved":false,"context_lines":[{"line_number":351,"context_line":"        service_content \u003d self._session.vim.service_content"},{"line_number":352,"context_line":"        datacenter_path \u003d location_url.datacenter_path"},{"line_number":353,"context_line":"        datastore_name \u003d location_url.datastore_name"},{"line_number":354,"context_line":"        src_path \u003d ds_obj.DatastorePath(datastore_name, location_url.path)"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"        LOG.debug(\"Copying image file data %(image_id)s to \""},{"line_number":357,"context_line":"                  \"%(file_path)s on the data store \""}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_e529aa8a","line":354,"updated":"2015-12-17 18:00:28.000000000","message":"Nit: I find this block of variable hard to understand. I think its easier if they were all declared nearer to where they are fist used.","commit_id":"7eaf80e81c3338888a7af178ea6a6c7921150f68"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"795826b713730bcb54df1ce216801e4dafb674b6","unresolved":false,"context_lines":[{"line_number":351,"context_line":"        service_content \u003d self._session.vim.service_content"},{"line_number":352,"context_line":"        datacenter_path \u003d location_url.datacenter_path"},{"line_number":353,"context_line":"        datastore_name \u003d location_url.datastore_name"},{"line_number":354,"context_line":"        src_path \u003d ds_obj.DatastorePath(datastore_name, location_url.path)"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"        LOG.debug(\"Copying image file data %(image_id)s to \""},{"line_number":357,"context_line":"                  \"%(file_path)s on the data store \""}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_370e7de5","line":354,"in_reply_to":"3a7e1126_e529aa8a","updated":"2015-12-22 12:32:55.000000000","message":"Done","commit_id":"7eaf80e81c3338888a7af178ea6a6c7921150f68"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"3c842b2356d4b24470a339ea605ba594318f70a9","unresolved":false,"context_lines":[{"line_number":364,"context_line":"            self._session.vim,"},{"line_number":365,"context_line":"            \"FindByInventoryPath\","},{"line_number":366,"context_line":"            service_content.searchIndex,"},{"line_number":367,"context_line":"            inventoryPath\u003ddatacenter_path)"},{"line_number":368,"context_line":""},{"line_number":369,"context_line":"        copy_task \u003d self._session._call_method("},{"line_number":370,"context_line":"            self._session.vim,"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_25ffb2ab","line":367,"updated":"2015-12-17 18:00:28.000000000","message":"it takes a long time to notice the key data being passed here is the datacenter_path, which is actually from the location.url.\n\nIf you add a new dsutils method for this, where you pass in the session and \" location_url.datacenter_path\" and you have location_url as the variable at the top thats clearly a parsed version of the arguments passed in, I think we are in a much better state.","commit_id":"7eaf80e81c3338888a7af178ea6a6c7921150f68"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"795826b713730bcb54df1ce216801e4dafb674b6","unresolved":false,"context_lines":[{"line_number":364,"context_line":"            self._session.vim,"},{"line_number":365,"context_line":"            \"FindByInventoryPath\","},{"line_number":366,"context_line":"            service_content.searchIndex,"},{"line_number":367,"context_line":"            inventoryPath\u003ddatacenter_path)"},{"line_number":368,"context_line":""},{"line_number":369,"context_line":"        copy_task \u003d self._session._call_method("},{"line_number":370,"context_line":"            self._session.vim,"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_9b973e39","line":367,"in_reply_to":"3a7e1126_25ffb2ab","updated":"2015-12-22 12:32:55.000000000","message":"Done","commit_id":"7eaf80e81c3338888a7af178ea6a6c7921150f68"},{"author":{"_account_id":10210,"name":"Chinmaya Bharadwaj","email":"chinmaya-bharadwaj.a@hpe.com","username":"chinmay"},"change_message_id":"4c2dcd596fee51d3a8a17a3aed3a615cdcd13dbb","unresolved":false,"context_lines":[{"line_number":373,"context_line":"            sourceName\u003dstr(src_path),"},{"line_number":374,"context_line":"            sourceDatacenter\u003ddatacenter_moref,"},{"line_number":375,"context_line":"            destinationName\u003dstr(image_ds_loc),"},{"line_number":376,"context_line":"            destinationDatacenter\u003dvi.dc_info.ref)"},{"line_number":377,"context_line":"        self._session._wait_for_task(copy_task)"},{"line_number":378,"context_line":""},{"line_number":379,"context_line":"        LOG.debug(\"Copied image file data %(image_id)s to \""}],"source_content_type":"text/x-python","patch_set":9,"id":"9a8ffd7b_284bda2b","line":376,"updated":"2015-11-26 11:53:51.000000000","message":"We can reuse this method : \nhttps://github.com/openstack/nova/blob/master/nova/virt/vmwareapi/ds_util.py#L220","commit_id":"7eaf80e81c3338888a7af178ea6a6c7921150f68"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"795826b713730bcb54df1ce216801e4dafb674b6","unresolved":false,"context_lines":[{"line_number":373,"context_line":"            sourceName\u003dstr(src_path),"},{"line_number":374,"context_line":"            sourceDatacenter\u003ddatacenter_moref,"},{"line_number":375,"context_line":"            destinationName\u003dstr(image_ds_loc),"},{"line_number":376,"context_line":"            destinationDatacenter\u003dvi.dc_info.ref)"},{"line_number":377,"context_line":"        self._session._wait_for_task(copy_task)"},{"line_number":378,"context_line":""},{"line_number":379,"context_line":"        LOG.debug(\"Copied image file data %(image_id)s to \""}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_b0e35bd8","line":376,"in_reply_to":"3a7e1126_0ac5e53a","updated":"2015-12-22 12:32:55.000000000","message":"Done","commit_id":"7eaf80e81c3338888a7af178ea6a6c7921150f68"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"3c842b2356d4b24470a339ea605ba594318f70a9","unresolved":false,"context_lines":[{"line_number":373,"context_line":"            sourceName\u003dstr(src_path),"},{"line_number":374,"context_line":"            sourceDatacenter\u003ddatacenter_moref,"},{"line_number":375,"context_line":"            destinationName\u003dstr(image_ds_loc),"},{"line_number":376,"context_line":"            destinationDatacenter\u003dvi.dc_info.ref)"},{"line_number":377,"context_line":"        self._session._wait_for_task(copy_task)"},{"line_number":378,"context_line":""},{"line_number":379,"context_line":"        LOG.debug(\"Copied image file data %(image_id)s to \""}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_0ac5e53a","line":376,"in_reply_to":"9a8ffd7b_284bda2b","updated":"2015-12-17 18:00:28.000000000","message":"+1\n\nI think using the dsutils will make this more readable.","commit_id":"7eaf80e81c3338888a7af178ea6a6c7921150f68"},{"author":{"_account_id":19374,"name":"Teruhisa Yuki","email":"hiro.tsuyusaki@linux.com","username":"tyuki"},"change_message_id":"ae1868f8dd590781d527f0611b59865d970804c2","unresolved":false,"context_lines":[{"line_number":523,"context_line":"        self._update_image_size(vi)"},{"line_number":524,"context_line":""},{"line_number":525,"context_line":"    def _cache_flat_image(self, vi, tmp_image_ds_loc):"},{"line_number":526,"context_line":"        self._move_to_cache(vi.dc_info.ref,"},{"line_number":527,"context_line":"                            tmp_image_ds_loc.parent,"},{"line_number":528,"context_line":"                            vi.cache_image_folder)"},{"line_number":529,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"ba63e191_535151d7","line":526,"updated":"2016-01-20 02:52:50.000000000","message":"Why don\u0027t you copy an image directly here like this?\n\n    if not vi.ii.is_ova and vi.ii.vsphere_location:\n        self._copy_from_vshere()\n    else:\n        self._move_to_cache()\n\nI think that it would be more effective for a boot from a big image.","commit_id":"56e2b9e0a979cd2c057c6e16a8847ec3d76eab55"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"74845fc3b231ed48090c02e1ddbd76384d2b6d24","unresolved":false,"context_lines":[{"line_number":523,"context_line":"        self._update_image_size(vi)"},{"line_number":524,"context_line":""},{"line_number":525,"context_line":"    def _cache_flat_image(self, vi, tmp_image_ds_loc):"},{"line_number":526,"context_line":"        self._move_to_cache(vi.dc_info.ref,"},{"line_number":527,"context_line":"                            tmp_image_ds_loc.parent,"},{"line_number":528,"context_line":"                            vi.cache_image_folder)"},{"line_number":529,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"ba63e191_c6649a23","line":526,"in_reply_to":"ba63e191_535151d7","updated":"2016-01-20 07:44:45.000000000","message":"The image is copied to a temporary location first and then moved to the cache. This is to prevent race conditions when multiple nova-computes are caching the same image.","commit_id":"56e2b9e0a979cd2c057c6e16a8847ec3d76eab55"},{"author":{"_account_id":19374,"name":"Teruhisa Yuki","email":"hiro.tsuyusaki@linux.com","username":"tyuki"},"change_message_id":"acc0e86f898c5d838e2c825d02c238971979cec1","unresolved":false,"context_lines":[{"line_number":523,"context_line":"        self._update_image_size(vi)"},{"line_number":524,"context_line":""},{"line_number":525,"context_line":"    def _cache_flat_image(self, vi, tmp_image_ds_loc):"},{"line_number":526,"context_line":"        self._move_to_cache(vi.dc_info.ref,"},{"line_number":527,"context_line":"                            tmp_image_ds_loc.parent,"},{"line_number":528,"context_line":"                            vi.cache_image_folder)"},{"line_number":529,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"9a68dd71_5072027e","line":526,"in_reply_to":"ba63e191_c6649a23","updated":"2016-01-20 17:33:49.000000000","message":"@Radoslav, Thank you for your explanation. I got the point.","commit_id":"56e2b9e0a979cd2c057c6e16a8847ec3d76eab55"},{"author":{"_account_id":2271,"name":"Michael Still","email":"mikal@stillhq.com","username":"mikalstill"},"change_message_id":"3817f0525b156046d8af76e66ceafc7599a84671","unresolved":false,"context_lines":[{"line_number":373,"context_line":"    def _fetch_vsphere_image(self, context, vi, image_ds_loc):"},{"line_number":374,"context_line":"        \"\"\"Fetch image which is located on a vSphere datastore.\"\"\""},{"line_number":375,"context_line":"        location \u003d vi.ii.vsphere_location"},{"line_number":376,"context_line":"        LOG.debug(\"Using vSphere location: %s\", location)"},{"line_number":377,"context_line":""},{"line_number":378,"context_line":"        LOG.debug(\"Copying image file data %(image_id)s to \""},{"line_number":379,"context_line":"                  \"%(file_path)s on the data store \""}],"source_content_type":"text/x-python","patch_set":14,"id":"1a122d0e_20e2a3a0","line":376,"updated":"2016-05-05 01:38:25.000000000","message":"Why no instance\u003d on this debug log message?","commit_id":"4404baba47e6d3ec2511785d312a888b31a4e7b4"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"2267b72ef36960fe15fe694b1d2e846a1df39ba6","unresolved":false,"context_lines":[{"line_number":381,"context_line":"                  {\u0027image_id\u0027: vi.ii.image_id,"},{"line_number":382,"context_line":"                   \u0027file_path\u0027: image_ds_loc,"},{"line_number":383,"context_line":"                   \u0027datastore_name\u0027: vi.datastore.name},"},{"line_number":384,"context_line":"                  instance\u003dvi.instance)"},{"line_number":385,"context_line":""},{"line_number":386,"context_line":"        location_url \u003d ds_obj.DatastoreURL.urlparse(location)"},{"line_number":387,"context_line":"        datacenter_path \u003d location_url.datacenter_path"}],"source_content_type":"text/x-python","patch_set":14,"id":"1a122d0e_296d5032","line":384,"updated":"2016-05-05 15:37:15.000000000","message":"Agreed with Mikal. One debug log line should be fine here...","commit_id":"4404baba47e6d3ec2511785d312a888b31a4e7b4"},{"author":{"_account_id":2271,"name":"Michael Still","email":"mikal@stillhq.com","username":"mikalstill"},"change_message_id":"3817f0525b156046d8af76e66ceafc7599a84671","unresolved":false,"context_lines":[{"line_number":381,"context_line":"                  {\u0027image_id\u0027: vi.ii.image_id,"},{"line_number":382,"context_line":"                   \u0027file_path\u0027: image_ds_loc,"},{"line_number":383,"context_line":"                   \u0027datastore_name\u0027: vi.datastore.name},"},{"line_number":384,"context_line":"                  instance\u003dvi.instance)"},{"line_number":385,"context_line":""},{"line_number":386,"context_line":"        location_url \u003d ds_obj.DatastoreURL.urlparse(location)"},{"line_number":387,"context_line":"        datacenter_path \u003d location_url.datacenter_path"}],"source_content_type":"text/x-python","patch_set":14,"id":"1a122d0e_20f9034f","line":384,"updated":"2016-05-05 01:38:25.000000000","message":"And why two log lines straight after each other? Couldn\u0027t these be combined into one?","commit_id":"4404baba47e6d3ec2511785d312a888b31a4e7b4"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"2267b72ef36960fe15fe694b1d2e846a1df39ba6","unresolved":false,"context_lines":[{"line_number":394,"context_line":"            self._session, str(src_path), datacenter_moref,"},{"line_number":395,"context_line":"            str(image_ds_loc), vi.dc_info.ref)"},{"line_number":396,"context_line":""},{"line_number":397,"context_line":"        LOG.debug(\"Copied image file data %(image_id)s to \""},{"line_number":398,"context_line":"                  \"%(file_path)s on the data store \""},{"line_number":399,"context_line":"                  \"%(datastore_name)s\","},{"line_number":400,"context_line":"                  {\u0027image_id\u0027: vi.ii.image_id,"}],"source_content_type":"text/x-python","patch_set":14,"id":"1a122d0e_096a141a","line":397,"updated":"2016-05-05 15:37:15.000000000","message":"nit: for completed actions, we generally use INFO, not DEBUG level.","commit_id":"4404baba47e6d3ec2511785d312a888b31a4e7b4"}]}
