)]}'
{"nova/tests/unit/virt/libvirt/test_driver.py":[{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"5f1bb786e88d22d4d7df9f8121aeb51474eabbb8","unresolved":false,"context_lines":[{"line_number":8212,"context_line":""},{"line_number":8213,"context_line":"        # Stop \u0027libvirt_driver._create_image\u0027 touching filesystem"},{"line_number":8214,"context_line":"        self.stubs.Set(nova.virt.libvirt.imagebackend.Backend, \"image\","},{"line_number":8215,"context_line":"                       fake_image)"},{"line_number":8216,"context_line":""},{"line_number":8217,"context_line":"        instance_ref \u003d self.test_instance"},{"line_number":8218,"context_line":"        instance_ref[\u0027image_ref\u0027] \u003d 1"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba15a1d1_50db144f","line":8215,"updated":"2015-09-24 09:25:01.000000000","message":"Can you use @mock.patch.object annotations for this too","commit_id":"4f33dced2de763561a4b3fcb59b94349c3984f9d"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"5f1bb786e88d22d4d7df9f8121aeb51474eabbb8","unresolved":false,"context_lines":[{"line_number":8224,"context_line":"        driver \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), False)"},{"line_number":8225,"context_line":"        self.stubs.Set(driver, \u0027_get_guest_xml\u0027, fake_none)"},{"line_number":8226,"context_line":"        self.stubs.Set(driver, \u0027_create_domain_and_network\u0027, fake_none)"},{"line_number":8227,"context_line":"        self.stubs.Set(driver, \u0027get_info\u0027, fake_get_info)"},{"line_number":8228,"context_line":""},{"line_number":8229,"context_line":"        image_meta \u003d objects.ImageMeta.from_dict(self.test_image_meta)"},{"line_number":8230,"context_line":"        disk_info \u003d blockinfo.get_disk_info(CONF.libvirt.virt_type,"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba15a1d1_d0ef24e7","line":8227,"updated":"2015-09-24 09:25:01.000000000","message":"And mock for these 3 too.","commit_id":"4f33dced2de763561a4b3fcb59b94349c3984f9d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e95b9891b7b2a6e444f99bb91c8f28831291b2c7","unresolved":false,"context_lines":[{"line_number":8226,"context_line":"        KERNEL \u003d \u0027vmlinuz.\u0027 + self._EPHEMERAL_20_DEFAULT"},{"line_number":8227,"context_line":""},{"line_number":8228,"context_line":"        mock_imagecache.get_cache_fname.side_effect \u003d \\"},{"line_number":8229,"context_line":"                [INITRD,"},{"line_number":8230,"context_line":"                 KERNEL,"},{"line_number":8231,"context_line":"                 self._EPHEMERAL_20_DEFAULT + \u0027.img\u0027]"},{"line_number":8232,"context_line":"        filename \u003d self._EPHEMERAL_20_DEFAULT"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a2ca52d_9f095f98","line":8229,"updated":"2015-10-13 20:29:32.000000000","message":"These are in the wrong order, it goes kernel/ramdisk/image in the calls in the driver.  Since the calls to mock_imagecache.get_cache_fname are not asserted by order I guess it doesn\u0027t really matter, but should probably be corrected.","commit_id":"05c771510025330e6e9d1fd988396f03e50ac8d4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e95b9891b7b2a6e444f99bb91c8f28831291b2c7","unresolved":false,"context_lines":[{"line_number":8269,"context_line":"        instance_ref[\u0027kernel_id\u0027] \u003d 2"},{"line_number":8270,"context_line":"        instance_ref[\u0027ramdisk_id\u0027] \u003d 3"},{"line_number":8271,"context_line":"        instance \u003d objects.Instance(**instance_ref)"},{"line_number":8272,"context_line":"        instance[\u0027os_type\u0027] \u003d \u0027test\u0027"},{"line_number":8273,"context_line":""},{"line_number":8274,"context_line":"        driver \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), False)"},{"line_number":8275,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5a2ca52d_3f5a8b84","line":8272,"updated":"2015-10-13 20:29:32.000000000","message":"We should avoid treating instance objects like dictionaries because we want to eventually get rid of that, so use attribute syntax.  Alternatively set it on instance_ref before converting that to an instance object.","commit_id":"05c771510025330e6e9d1fd988396f03e50ac8d4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e95b9891b7b2a6e444f99bb91c8f28831291b2c7","unresolved":false,"context_lines":[{"line_number":8273,"context_line":""},{"line_number":8274,"context_line":"        driver \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), False)"},{"line_number":8275,"context_line":""},{"line_number":8276,"context_line":"        with contextlib.nested("},{"line_number":8277,"context_line":"            mock.patch.object(nova.virt.libvirt.imagebackend.Backend,"},{"line_number":8278,"context_line":"              \"image\", fake_image),"},{"line_number":8279,"context_line":"            mock.patch.object(driver, \u0027_get_guest_xml\u0027),"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a2ca52d_7f2b23ec","line":8276,"updated":"2015-10-13 20:29:32.000000000","message":"I think we\u0027re supposed to be avoiding the usage of contextlib.nested because it\u0027s not in python 3.4.  There are other ways to do this, like creating an internal method and doing the mock decorators on that, like:\n\n@mock.patch.object(..)\n@mock.patch.object(..)\ndef test(...)\n    # do my test thing\n\ntest()","commit_id":"05c771510025330e6e9d1fd988396f03e50ac8d4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e95b9891b7b2a6e444f99bb91c8f28831291b2c7","unresolved":false,"context_lines":[{"line_number":8297,"context_line":"            {\u0027filename\u0027: filename,"},{"line_number":8298,"context_line":"             \u0027size\u0027: 20 * units.Gi},"},{"line_number":8299,"context_line":"            ]"},{"line_number":8300,"context_line":"        self.assertEqual(gotFiles, wantFiles)"},{"line_number":8301,"context_line":""},{"line_number":8302,"context_line":"    def _create_image_helper(self, callback, suffix\u003d\u0027\u0027):"},{"line_number":8303,"context_line":"        gotFiles \u003d []"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a2ca52d_1f522f68","line":8300,"updated":"2015-10-13 20:29:32.000000000","message":"Args order here is (expected, observed) so swap these, it impacts the output when we have a MismatchError.","commit_id":"05c771510025330e6e9d1fd988396f03e50ac8d4"}],"nova/tests/unit/virt/libvirt/test_utils.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e95b9891b7b2a6e444f99bb91c8f28831291b2c7","unresolved":false,"context_lines":[{"line_number":567,"context_line":""},{"line_number":568,"context_line":"    @mock.patch(\u0027nova.virt.images.fetch\u0027)"},{"line_number":569,"context_line":"    def test_fetch_initrd_image(self, mock_images):"},{"line_number":570,"context_line":"        context \u003d \u0027opaque context\u0027"},{"line_number":571,"context_line":"        target \u003d \u0027/tmp/targetfile\u0027"},{"line_number":572,"context_line":"        image_id \u003d \u00274\u0027"},{"line_number":573,"context_line":"        user_id \u003d \u0027fake\u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a2ca52d_ff20934b","line":570,"updated":"2015-10-13 20:29:32.000000000","message":"The context is a RequestContext object, not a string, so this is not actually accurate, even if just a copy of the test above.","commit_id":"05c771510025330e6e9d1fd988396f03e50ac8d4"}],"nova/virt/libvirt/utils.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"695ff88edec5c10563f08a6969d80f9b300239ca","unresolved":false,"context_lines":[{"line_number":392,"context_line":"def fetch_initrd(context, target, image_id, user_id, project_id, max_size\u003d0):"},{"line_number":393,"context_line":"    \"\"\"Grab initrd or kernel image, do not attempt raw conversion.\"\"\""},{"line_number":394,"context_line":"    images.fetch(context, image_id, target, user_id, project_id,"},{"line_number":395,"context_line":"                        max_size\u003dmax_size)"},{"line_number":396,"context_line":""},{"line_number":397,"context_line":""},{"line_number":398,"context_line":"def get_instance_path(instance, forceold\u003dFalse, relative\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba15a1d1_17cba054","line":395,"updated":"2015-09-22 18:41:03.000000000","message":"Please align this with context above.","commit_id":"dd842129bf767f5f587ed410a62672ba286130e3"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"bbae1ed42788f5174d5cbdd50dd0e46717125f84","unresolved":false,"context_lines":[{"line_number":389,"context_line":"                        max_size\u003dmax_size)"},{"line_number":390,"context_line":""},{"line_number":391,"context_line":""},{"line_number":392,"context_line":"def fetch_initrd(context, target, image_id, user_id, project_id, max_size\u003d0):"},{"line_number":393,"context_line":"    \"\"\"Grab initrd or kernel image, do not attempt raw conversion.\"\"\""},{"line_number":394,"context_line":"    images.fetch(context, image_id, target, user_id, project_id,"},{"line_number":395,"context_line":"                        max_size\u003dmax_size)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a1a9d01_0f0ca739","line":392,"updated":"2015-09-29 21:36:43.000000000","message":"the name is confusing, maybe fetch_raw\nand rename the above to fetch_qemu ?","commit_id":"a27f677e4aff71932956cf0e56d88e6e3db411dc"},{"author":{"_account_id":18247,"name":"Mark Doffman","email":"mdoffman@linux.vnet.ibm.com","username":"doffm"},"change_message_id":"59cab12730e743732f09f6055f179d3ead4e8e44","unresolved":false,"context_lines":[{"line_number":389,"context_line":"                        max_size\u003dmax_size)"},{"line_number":390,"context_line":""},{"line_number":391,"context_line":""},{"line_number":392,"context_line":"def fetch_initrd(context, target, image_id, user_id, project_id, max_size\u003d0):"},{"line_number":393,"context_line":"    \"\"\"Grab initrd or kernel image, do not attempt raw conversion.\"\"\""},{"line_number":394,"context_line":"    images.fetch(context, image_id, target, user_id, project_id,"},{"line_number":395,"context_line":"                        max_size\u003dmax_size)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a1a9d01_fe70de0c","line":392,"in_reply_to":"9a1a9d01_0f0ca739","updated":"2015-09-30 16:32:01.000000000","message":"The name is a little confusing, since we also use it to fetch kernel images. All the naming here is confusing, the fetch_to_raw function doesn\u0027t always fetch_to_raw and sometimes resizes.\n\nHmmm, I see where you are going with the fetch_qemu, because it uses qemu-img to determine a type, but thats a little misleading too.\n\nHow about fetch_image and fetch_initrd_or_kernel.... at least thats very descriptive of where they are used.\n\nOtherwise fetch_image_convert and fetch_image_raw. Which is naming them after roughly what they do.","commit_id":"a27f677e4aff71932956cf0e56d88e6e3db411dc"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e95b9891b7b2a6e444f99bb91c8f28831291b2c7","unresolved":false,"context_lines":[{"line_number":392,"context_line":"def fetch_raw_image(context, target, image_id, user_id, project_id,"},{"line_number":393,"context_line":"                    max_size\u003d0):"},{"line_number":394,"context_line":"    \"\"\"Grab initrd or kernel image, do not attempt raw conversion."},{"line_number":395,"context_line":"    as these will already be in raw format."},{"line_number":396,"context_line":"    \"\"\""},{"line_number":397,"context_line":"    images.fetch(context, image_id, target, user_id, project_id,"},{"line_number":398,"context_line":"                        max_size\u003dmax_size)"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a2ca52d_5ff8a7e5","line":395,"updated":"2015-10-13 20:29:32.000000000","message":"nit: your docstring title should be one line, then a space and a body for a description if you need one.\n\nRegardless of that, you have a period in the middle of your sentence so that should be fixed either way.","commit_id":"05c771510025330e6e9d1fd988396f03e50ac8d4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e95b9891b7b2a6e444f99bb91c8f28831291b2c7","unresolved":false,"context_lines":[{"line_number":395,"context_line":"    as these will already be in raw format."},{"line_number":396,"context_line":"    \"\"\""},{"line_number":397,"context_line":"    images.fetch(context, image_id, target, user_id, project_id,"},{"line_number":398,"context_line":"                        max_size\u003dmax_size)"},{"line_number":399,"context_line":""},{"line_number":400,"context_line":""},{"line_number":401,"context_line":"def get_instance_path(instance, forceold\u003dFalse, relative\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a2ca52d_fc0c2144","line":398,"updated":"2015-10-13 20:29:32.000000000","message":"nit: alignment here is off, should be lined up with context parameter above.","commit_id":"05c771510025330e6e9d1fd988396f03e50ac8d4"}]}
