)]}'
{"nova/tests/unit/virt/libvirt/test_imagebackend.py":[{"author":{"_account_id":21813,"name":"Andrey Volkov","email":"m@amadev.ru","username":"avolkov"},"change_message_id":"cfd454f8bf7e77809eb23f9590c012d26299b0a3","unresolved":false,"context_lines":[{"line_number":1422,"context_line":"                mock.patch.object(rbd_utils.RBDDriver, \u0027clone\u0027),"},{"line_number":1423,"context_line":"                mock.patch.object(rbd_utils.RBDDriver, \u0027flatten\u0027),"},{"line_number":1424,"context_line":"                mock.patch.object(rbd_utils.RBDDriver, \u0027is_cloneable\u0027),"},{"line_number":1425,"context_line":"        ) as (mock_get, mock_clone, mock_flatten, mock_cloneable):"},{"line_number":1426,"context_line":"            mock_get.return_value \u003d {\u0027locations\u0027: [{\u0027url\u0027: rbd_uri}],"},{"line_number":1427,"context_line":"                                     \u0027disk_format\u0027: \u0027raw\u0027}"},{"line_number":1428,"context_line":"            mock_cloneable.return_value \u003d True"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_6131cfec","line":1425,"updated":"2017-07-21 13:47:00.000000000","message":"test.nested can also be flatten, something like:\n\n    @mock.patch.object(rbd_utils, \u0027RBDDriver\u0027)\n    @mock.patch.object(imagebackend.IMAGE_API, \u0027get\u0027)\n    def test_clone_image(self, mock_get, rbd):\n        # Tests that if linked_clone, the instance root disk just do a\n        # fast clone from an image, instance will depend on the image.\n        image \u003d self.image_class(self.INSTANCE, self.NAME)\n        rbd_uri \u003d \u0027rbd://remote-cluster/remote-pool/fake-image/fake-snap\u0027\n        mock_get.return_value \u003d {\u0027locations\u0027: [{\u0027url\u0027: rbd_uri}],\n                                 \u0027disk_format\u0027: \u0027raw\u0027}\n        image.clone(self.CONTEXT, \u0027fake-image\u0027, linked_clone\u003dTrue)\n        rbd.return_value.clone.assert_called_with({\u0027url\u0027: rbd_uri}, mock.ANY)","commit_id":"049be069ed80522003568b68de94b779c4e92b9d"},{"author":{"_account_id":21813,"name":"Andrey Volkov","email":"m@amadev.ru","username":"avolkov"},"change_message_id":"cfd454f8bf7e77809eb23f9590c012d26299b0a3","unresolved":false,"context_lines":[{"line_number":1428,"context_line":"            mock_cloneable.return_value \u003d True"},{"line_number":1429,"context_line":"            image.clone(self.CONTEXT, \u0027fake-image\u0027, linked_clone\u003dTrue)"},{"line_number":1430,"context_line":""},{"line_number":1431,"context_line":"            mock_clone.assert_called_with({\u0027url\u0027: rbd_uri}, mock.ANY)"},{"line_number":1432,"context_line":""},{"line_number":1433,"context_line":"    def test_clone_image_with_not_linked(self):"},{"line_number":1434,"context_line":"        # Tests that if not linked_clone, the instance root disk clone"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_4127f3b7","line":1431,"updated":"2017-07-21 13:47:00.000000000","message":"a check proving that the flatten method is not called would be good here","commit_id":"049be069ed80522003568b68de94b779c4e92b9d"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":21813,"name":"Andrey Volkov","email":"m@amadev.ru","username":"avolkov"},"change_message_id":"cfd454f8bf7e77809eb23f9590c012d26299b0a3","unresolved":false,"context_lines":[{"line_number":3251,"context_line":"            if backend.SUPPORTS_CLONE:"},{"line_number":3252,"context_line":"                def clone_fallback_to_fetch(*args, **kwargs):"},{"line_number":3253,"context_line":"                    props \u003d instance.image_meta.properties"},{"line_number":3254,"context_line":"                    linked_clone \u003d props.get(\u0027img_linked_clone\u0027)"},{"line_number":3255,"context_line":"                    if linked_clone is None:"},{"line_number":3256,"context_line":"                        linked_clone \u003d True"},{"line_number":3257,"context_line":"                    try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_abffc632","line":3254,"updated":"2017-07-21 13:47:00.000000000","message":"linked_clone \u003d props.get(\u0027img_linked_clone\u0027, True)\nprobably get a more clean code","commit_id":"049be069ed80522003568b68de94b779c4e92b9d"}],"nova/virt/libvirt/imagebackend.py":[{"author":{"_account_id":24849,"name":"yao ning","email":"zay11022@163.com","username":"mslovy"},"change_message_id":"d4841fa76ca7248803f45ce8b33ec62c29c7c702","unresolved":false,"context_lines":[{"line_number":904,"context_line":"            if self.driver.is_cloneable(location, image_meta):"},{"line_number":905,"context_line":"                LOG.debug(\u0027Selected location: %(loc)s\u0027, {\u0027loc\u0027: location})"},{"line_number":906,"context_line":"                self.driver.clone(location, self.rbd_name)"},{"line_number":907,"context_line":"                if not linked_clone:"},{"line_number":908,"context_line":"                    self.driver.flatten(self.rbd_name, self.pool)"},{"line_number":909,"context_line":"                return"},{"line_number":910,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5f201791_8036f7e5","line":907,"range":{"start_line":907,"start_character":16,"end_line":907,"end_character":36},"updated":"2017-06-23 10:06:35.000000000","message":"linked_clone \u003d props.get(\u0027img_linked_clone\u0027)  will get None if we do not define \u0027img_linked_clone\u0027.  So the default action is to do flatten which is not reasonable.","commit_id":"33a26dbc8485e718a9f8299f1da66f76baab1fff"}]}
