)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"0439fbb9950df3e369883ca079bba46ebba98983","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"virt: convert disk mount API to use nova.virt.image.model"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Conver the nova.virt.disk.mount classes to use the"},{"line_number":10,"context_line":"nova.virt.image.model classes instead of manually"},{"line_number":11,"context_line":"passing a filename and image format as parameters."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"3a961159_39df7d0e","line":9,"updated":"2014-12-24 09:53:31.000000000","message":"Conver \u003d\u003e Convert","commit_id":"2241a021b82a77ae9eb9058b36cd044b624f0814"}],"nova/exception.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"0439fbb9950df3e369883ca079bba46ebba98983","unresolved":false,"context_lines":[{"line_number":1829,"context_line":""},{"line_number":1830,"context_line":""},{"line_number":1831,"context_line":"class UnsupportedImageModel(Invalid):"},{"line_number":1832,"context_line":"    msg_fmt \u003d _(\"Image model %(image)s is not supported\")"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a961159_99e871b4","line":1832,"updated":"2014-12-24 09:53:31.000000000","message":"Consider \u0027%(image)s\u0027 to be consistent with the exception above","commit_id":"2241a021b82a77ae9eb9058b36cd044b624f0814"}],"nova/tests/unit/virt/disk/mount/test_loop.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"6f16f9df56d97dba93d983c493c03d3921ed9ba2","unresolved":false,"context_lines":[{"line_number":36,"context_line":"class LoopTestCase(test.NoDBTestCase):"},{"line_number":37,"context_line":"    def test_get_dev(self):"},{"line_number":38,"context_line":"        tempdir \u003d self.useFixture(fixtures.TempDir()).path"},{"line_number":39,"context_line":"        l \u003d loop.LoopMount(imgmodel.LocalFileImage(\"/some/file.qcow2\","},{"line_number":40,"context_line":"                                                   imgmodel.FORMAT_QCOW2),"},{"line_number":41,"context_line":"                           tempdir)"},{"line_number":42,"context_line":"        self.useFixture(fixtures.MonkeyPatch(\u0027nova.utils.trycmd\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a890539_7461e2d2","line":39,"updated":"2014-11-19 12:39:45.000000000","message":"Could you move this common line to the setUp of the test case calls?","commit_id":"2bd71670aa7996eb240d78bf30bfee5846d919b0"},{"author":{"_account_id":9420,"name":"Matthew Gilliard","email":"matthew.gilliard@hp.com","username":"gilliard"},"change_message_id":"46952d1da3a8d79b464ccb8dd81d09c9f2646733","unresolved":false,"context_lines":[{"line_number":38,"context_line":"        super(LoopTestCase, self).setUp()"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"        self.file \u003d imgmodel.LocalFileImage(\"/some/file.qcow2\","},{"line_number":41,"context_line":"                                            imgmodel.FORMAT_QCOW2)"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def test_get_dev(self):"},{"line_number":44,"context_line":"        tempdir \u003d self.useFixture(fixtures.TempDir()).path"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_253427de","line":41,"updated":"2014-12-02 13:04:28.000000000","message":"nit: I realise it\u0027s not used, but loop mount would not be used for FORMAT_QCOW2 in real life, would it?","commit_id":"6ff320922b69c4e93b9cf959ef207f3b92fa827e"}],"nova/tests/unit/virt/disk/mount/test_nbd.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"6f16f9df56d97dba93d983c493c03d3921ed9ba2","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        tempdir \u003d self.useFixture(fixtures.TempDir()).path"},{"line_number":74,"context_line":"        self.stubs.Set(nbd.NbdMount, \u0027_detect_nbd_devices\u0027,"},{"line_number":75,"context_line":"                       _fake_detect_nbd_devices_none)"},{"line_number":76,"context_line":"        n \u003d nbd.NbdMount(imgmodel.LocalFileImage(\"/some/file.qcow2\","},{"line_number":77,"context_line":"                                                 imgmodel.FORMAT_QCOW2),"},{"line_number":78,"context_line":"                         tempdir)"},{"line_number":79,"context_line":"        self.assertIsNone(n._allocate_nbd())"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a890539_34959a88","line":76,"updated":"2014-11-19 12:39:45.000000000","message":"Could you move this common line to the setUp fo the class?","commit_id":"2bd71670aa7996eb240d78bf30bfee5846d919b0"}],"nova/tests/unit/virt/disk/test_api.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"0439fbb9950df3e369883ca079bba46ebba98983","unresolved":false,"context_lines":[{"line_number":22,"context_line":"from nova import utils"},{"line_number":23,"context_line":"from nova.virt.disk import api"},{"line_number":24,"context_line":"from nova.virt.disk.mount import api as mount"},{"line_number":25,"context_line":"from nova.virt.image import model as imgmodel"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"class FakeMount(object):"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a961159_39069d86","line":25,"updated":"2014-12-24 09:53:31.000000000","message":"why do we not just use model? or image_model?","commit_id":"2241a021b82a77ae9eb9058b36cd044b624f0814"}],"nova/virt/disk/api.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"0439fbb9950df3e369883ca079bba46ebba98983","unresolved":false,"context_lines":[{"line_number":153,"context_line":""},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"def extend(image, size, use_cow\u003dFalse):"},{"line_number":156,"context_line":"    \"\"\"Increase image to size."},{"line_number":157,"context_line":"    :param image: path to disk image file"},{"line_number":158,"context_line":"    :param size: image size in bytes"},{"line_number":159,"context_line":"    :param use_cow: whether the disk is a qcow2 file"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a961159_d9f4b988","line":156,"updated":"2014-12-24 09:53:31.000000000","message":"missing new line","commit_id":"2241a021b82a77ae9eb9058b36cd044b624f0814"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"0439fbb9950df3e369883ca079bba46ebba98983","unresolved":false,"context_lines":[{"line_number":244,"context_line":"    tmp_prefix \u003d \u0027openstack-disk-mount-tmp\u0027"},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"    def __init__(self, image, partition\u003dNone, use_cow\u003dFalse, mount_dir\u003dNone):"},{"line_number":247,"context_line":"        \"\"\"Create a new _DiskImage object instance"},{"line_number":248,"context_line":"        :param image: the path to the disk image file"},{"line_number":249,"context_line":"        :param partition: the partition number within the image"},{"line_number":250,"context_line":"        :param use_cow: whether the disk is in qcow2 format"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a961159_392dbdfe","line":247,"updated":"2014-12-24 09:53:31.000000000","message":"Missing new line","commit_id":"2241a021b82a77ae9eb9058b36cd044b624f0814"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"0439fbb9950df3e369883ca079bba46ebba98983","unresolved":false,"context_lines":[{"line_number":286,"context_line":""},{"line_number":287,"context_line":"    def _reset(self, device):"},{"line_number":288,"context_line":"        \"\"\"Reset internal state for a previously mounted directory.\"\"\""},{"line_number":289,"context_line":"        self._mounter \u003d mount.Mount.instance_for_device("},{"line_number":290,"context_line":"            self.image,"},{"line_number":291,"context_line":"            self.mount_dir,"},{"line_number":292,"context_line":"            self.partition,"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a961159_597e09e5","line":289,"updated":"2014-12-24 09:53:31.000000000","message":"do we need this change?","commit_id":"2241a021b82a77ae9eb9058b36cd044b624f0814"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"92babd224859e3d645fbe2fb399bed609060c806","unresolved":false,"context_lines":[{"line_number":172,"context_line":"    return images.qemu_img_info(path).virtual_size"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"def extend(image, size, use_cow\u003dFalse):"},{"line_number":176,"context_line":"    \"\"\"Increase image to size.\"\"\""},{"line_number":177,"context_line":"    if not can_resize_image(image, size):"},{"line_number":178,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":22,"id":"3acd31a7_53e757e4","side":"PARENT","line":175,"updated":"2015-04-30 13:14:10.000000000","message":"Actually i think this method should be removed but that mean to update every drivers. That said we should probably move all of that code in virt.models.Image.\n\nWe can have a classmethod to return an instance of the kind virt.models.Image according some parameters then a method \u0027extend\u0027 which will do that job.\n\nI think of something like:\n\n  def extend(image, size, use_cow\u003dFalse):\n    format \u003d use_cow and imgmodel.FORMA_QCOW2 or imgmodel.FORMA_RAW\n\n    # TODO(danpb): This call should be done in the driver layer.\n    image_ref \u003d virt.image.Image.create(path\u003dimage, size\u003dsize, format\u003dformat)\n\n    try:\n      image.extend()\n    except ...:\n      ...\n\nSo according to the kind of the image extend with have different behavior, basically we need to move code and split it.","commit_id":"c0b1955f5542467bd0e72a226cc1b3700c419406"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"4cef160012360dfa04fdf232c23686ba515cbcfe","unresolved":false,"context_lines":[{"line_number":172,"context_line":"    return images.qemu_img_info(path).virtual_size"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"def extend(image, size, use_cow\u003dFalse):"},{"line_number":176,"context_line":"    \"\"\"Increase image to size.\"\"\""},{"line_number":177,"context_line":"    if not can_resize_image(image, size):"},{"line_number":178,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":22,"id":"3acd31a7_736813f6","side":"PARENT","line":175,"in_reply_to":"3acd31a7_53e757e4","updated":"2015-04-30 13:15:32.000000000","message":"Sorry i made mistake on the example:\n\n def extend(image, size, use_cow\u003dFalse):\n    format \u003d use_cow and imgmodel.FORMA_QCOW2 or imgmodel.FORMA_RAW\n    # TODO(danpb): This call should be done in the driver layer.\n    image_ref \u003d virt.image.Image.create(path\u003dimage, format\u003dformat)\n    try:\n      image.extend(size\u003dsize)\n    except ...:\n      ...\n\nShould be better like that","commit_id":"c0b1955f5542467bd0e72a226cc1b3700c419406"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"a92c7916395041bc3f86b94ef1278ea0ff9a6075","unresolved":false,"context_lines":[{"line_number":172,"context_line":"    return images.qemu_img_info(path).virtual_size"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"def extend(image, size, use_cow\u003dFalse):"},{"line_number":176,"context_line":"    \"\"\"Increase image to size.\"\"\""},{"line_number":177,"context_line":"    if not can_resize_image(image, size):"},{"line_number":178,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":22,"id":"3acd31a7_a9907eed","side":"PARENT","line":175,"in_reply_to":"3acd31a7_736813f6","updated":"2015-04-30 14:02:49.000000000","message":"This commit is really just about minimal change to replace use of filename + use_cow with use of a virt.image.Image object. I don\u0027t really want this to get more involved in refactoring the logic in this api.py file.","commit_id":"c0b1955f5542467bd0e72a226cc1b3700c419406"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"9d82adf268ba8920398ab37e3feb4848195e7a5b","unresolved":false,"context_lines":[{"line_number":172,"context_line":"    return images.qemu_img_info(path).virtual_size"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"def extend(image, size, use_cow\u003dFalse):"},{"line_number":176,"context_line":"    \"\"\"Increase image to size.\"\"\""},{"line_number":177,"context_line":"    if not can_resize_image(image, size):"},{"line_number":178,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":22,"id":"3acd31a7_109d4e65","side":"PARENT","line":175,"in_reply_to":"3acd31a7_a9907eed","updated":"2015-04-30 15:10:28.000000000","message":"Yes let\u0027s do it incrementally","commit_id":"c0b1955f5542467bd0e72a226cc1b3700c419406"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"92babd224859e3d645fbe2fb399bed609060c806","unresolved":false,"context_lines":[{"line_number":289,"context_line":"        self.mount_dir \u003d mount_dir"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"        if use_cow:"},{"line_number":292,"context_line":"            self.image \u003d imgmodel.LocalFileImage(image,"},{"line_number":293,"context_line":"                                                 imgmodel.FORMAT_QCOW2)"},{"line_number":294,"context_line":"        else:"},{"line_number":295,"context_line":"            self.image \u003d imgmodel.LocalFileImage(image,"}],"source_content_type":"text/x-python","patch_set":22,"id":"3acd31a7_b346abbd","line":292,"updated":"2015-04-30 13:14:10.000000000","message":"We need a staticmethod able to do that condition, probably in the class LocalFileImage and which returns the image.","commit_id":"91bfba4ca2fba7eac438c8cbc18e82827c7cbb4d"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"9d82adf268ba8920398ab37e3feb4848195e7a5b","unresolved":false,"context_lines":[{"line_number":289,"context_line":"        self.mount_dir \u003d mount_dir"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"        if use_cow:"},{"line_number":292,"context_line":"            self.image \u003d imgmodel.LocalFileImage(image,"},{"line_number":293,"context_line":"                                                 imgmodel.FORMAT_QCOW2)"},{"line_number":294,"context_line":"        else:"},{"line_number":295,"context_line":"            self.image \u003d imgmodel.LocalFileImage(image,"}],"source_content_type":"text/x-python","patch_set":22,"id":"3acd31a7_30ae0a86","line":292,"in_reply_to":"3acd31a7_49444a73","updated":"2015-04-30 15:10:28.000000000","message":"Done","commit_id":"91bfba4ca2fba7eac438c8cbc18e82827c7cbb4d"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"a92c7916395041bc3f86b94ef1278ea0ff9a6075","unresolved":false,"context_lines":[{"line_number":289,"context_line":"        self.mount_dir \u003d mount_dir"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"        if use_cow:"},{"line_number":292,"context_line":"            self.image \u003d imgmodel.LocalFileImage(image,"},{"line_number":293,"context_line":"                                                 imgmodel.FORMAT_QCOW2)"},{"line_number":294,"context_line":"        else:"},{"line_number":295,"context_line":"            self.image \u003d imgmodel.LocalFileImage(image,"}],"source_content_type":"text/x-python","patch_set":22,"id":"3acd31a7_49444a73","line":292,"in_reply_to":"3acd31a7_b346abbd","updated":"2015-04-30 14:02:49.000000000","message":"I don\u0027t think that\u0027s needed. The goal is that we eventually remove the use of \u0027image + use_cow\u0027 from all the methods in this file, so the virt driver will just pass in a virt.image.Image instance directly. So this particular piece of code is just a temporary step in the ultimate conversion","commit_id":"91bfba4ca2fba7eac438c8cbc18e82827c7cbb4d"}],"nova/virt/disk/mount/api.py":[{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"1ad57f4228f7ba30a9d3286b3a639f4827764742","unresolved":false,"context_lines":[{"line_number":62,"context_line":"                return importutils.import_object("},{"line_number":63,"context_line":"                    \"nova.virt.disk.mount.nbd.NbdMount\","},{"line_number":64,"context_line":"                    image, mountdir, partition)"},{"line_number":65,"context_line":"        else:"},{"line_number":66,"context_line":"            # TODO(berrange) we could mount images of"},{"line_number":67,"context_line":"            # type LocalBlockImage directly without"},{"line_number":68,"context_line":"            # involving loop or nbd devices"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a8c0949_ab0e9332","line":65,"updated":"2014-10-30 15:16:25.000000000","message":"supernit: We could remove the \u0027else\u0027 here.","commit_id":"0be61a3f32880dd46c0092372ccb8a352434cda3"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"97bd5ca8b90ad8937e6d1b26fd7135dd105a09ad","unresolved":false,"context_lines":[{"line_number":70,"context_line":"            # We could also mount RBDImage directly"},{"line_number":71,"context_line":"            # using kernel RBD block dev support."},{"line_number":72,"context_line":"            raise exception.UnsupportedImageModel("},{"line_number":73,"context_line":"                image.__class__.__name__)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    @staticmethod"},{"line_number":76,"context_line":"    def instance_for_device(image, mountdir, partition, device):"}],"source_content_type":"text/x-python","patch_set":24,"id":"7a016987_e745d842","line":73,"updated":"2015-05-21 16:41:47.000000000","message":"As commented on the following patch - not amazing :/","commit_id":"030ff32c9008f1379b52053af807a6bdd9c66c71"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"f693d5052717ecd4795b623c8dd8831fd599b8f2","unresolved":false,"context_lines":[{"line_number":70,"context_line":"            # We could also mount RBDImage directly"},{"line_number":71,"context_line":"            # using kernel RBD block dev support."},{"line_number":72,"context_line":"            raise exception.UnsupportedImageModel("},{"line_number":73,"context_line":"                image.__class__.__name__)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    @staticmethod"},{"line_number":76,"context_line":"    def instance_for_device(image, mountdir, partition, device):"}],"source_content_type":"text/x-python","patch_set":24,"id":"7a016987_e74f1832","line":73,"in_reply_to":"7a016987_e745d842","updated":"2015-05-21 16:51:47.000000000","message":"No worse than the current behaviour before this patch though - it already crashes \u0026 burns horribly if you use RBD because we have no way to pass through rbd host info, so it tries to mount the rbd volume name as if it were a local file.","commit_id":"030ff32c9008f1379b52053af807a6bdd9c66c71"}]}
