)]}'
{"nova/tests/unit/virt/libvirt/test_driver.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8fb3cdcfb25a827a50795f41f122c6fd20c6db8f","unresolved":false,"context_lines":[{"line_number":10766,"context_line":"    @mock.patch(\u0027nova.utils.mkfs\u0027)"},{"line_number":10767,"context_line":"    def test_create_swap_default(self, mock_mkfs, mock_create_image):"},{"line_number":10768,"context_line":"        drvr \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), False)"},{"line_number":10769,"context_line":"        drvr._create_swap(\u0027/dev/something\u0027, 1)"},{"line_number":10770,"context_line":""},{"line_number":10771,"context_line":"        mock_create_image.assert_called_once_with(\u0027raw\u0027, \u0027/dev/something\u0027,"},{"line_number":10772,"context_line":"                                                  \u00271M\u0027)"}],"source_content_type":"text/x-python","patch_set":22,"id":"ba5201f7_cb74119e","line":10769,"updated":"2017-01-03 11:00:05.000000000","message":"is_block_dev\u003dFalse would provide a nice contrast with the below function","commit_id":"f5d20b3eef52977520ac44b5cb1164211b1f2b8e"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"2e14516ae304b2195038af7c4dc2588db98de3db","unresolved":false,"context_lines":[{"line_number":2852,"context_line":"    @staticmethod"},{"line_number":2853,"context_line":"    def _create_swap(target, swap_mb, context\u003dNone, is_block_dev\u003dFalse):"},{"line_number":2854,"context_line":"        \"\"\"Create a swap file of specified size.\"\"\""},{"line_number":2855,"context_line":"        if not is_block_dev:"},{"line_number":2856,"context_line":"            libvirt_utils.create_image(\u0027raw\u0027, target, \u0027%dM\u0027 % swap_mb)"},{"line_number":2857,"context_line":""},{"line_number":2858,"context_line":"        # Run as root only for block devices"}],"source_content_type":"text/x-python","patch_set":18,"id":"5a74a57a_4d6142d2","line":2855,"updated":"2016-11-29 15:44:51.000000000","message":"Should we have a test for this?","commit_id":"3ada2ccb8d27888d3998715a47f065630c8900ff"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"632ecf36407643d21d42c7ec22a368c43c09e60a","unresolved":false,"context_lines":[{"line_number":2852,"context_line":"    @staticmethod"},{"line_number":2853,"context_line":"    def _create_swap(target, swap_mb, context\u003dNone, is_block_dev\u003dFalse):"},{"line_number":2854,"context_line":"        \"\"\"Create a swap file of specified size.\"\"\""},{"line_number":2855,"context_line":"        if not is_block_dev:"},{"line_number":2856,"context_line":"            libvirt_utils.create_image(\u0027raw\u0027, target, \u0027%dM\u0027 % swap_mb)"},{"line_number":2857,"context_line":""},{"line_number":2858,"context_line":"        # Run as root only for block devices"}],"source_content_type":"text/x-python","patch_set":18,"id":"3a71b18c_d9cffa53","line":2855,"in_reply_to":"5a74a57a_4d6142d2","updated":"2016-12-06 18:06:22.000000000","message":"Probably :)","commit_id":"3ada2ccb8d27888d3998715a47f065630c8900ff"}],"nova/virt/libvirt/imagebackend.py":[{"author":{"_account_id":16907,"name":"Diana Clarke","email":"diana.joan.clarke@gmail.com","username":"diana-clarke"},"change_message_id":"faf8f3b8bd01a6c8475398f8406afe0ed695ba59","unresolved":false,"context_lines":[{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    SUPPORTS_CLONE \u003d False"},{"line_number":58,"context_line":"    is_block_dev \u003d False"},{"line_number":59,"context_line":"    \u0027\u0027\u0027True if disks created by this backend are presented to the host as"},{"line_number":60,"context_line":"    block devices, False otherwise."},{"line_number":61,"context_line":"    \u0027\u0027\u0027"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def __init__(self, path, source_type, driver_format):"},{"line_number":64,"context_line":"        \"\"\"Image initialization."}],"source_content_type":"text/x-python","patch_set":5,"id":"dada55a8_0667a64d","line":61,"range":{"start_line":59,"start_character":4,"end_line":61,"end_character":7},"updated":"2016-07-20 21:09:47.000000000","message":"Consider changing this comment to something like the following instead. I don\u0027t think I\u0027ve ever seen a comment written with triple single quotes.\n\n    # True if disks created by this backend are presented to the host as\n    # block devices, False otherwise.","commit_id":"cca5e547503376292fda51d1fb38fc1becb3866d"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"cf82089a59713b74d26ced087010e400a49a58e8","unresolved":false,"context_lines":[{"line_number":860,"context_line":"        if self.ceph_conf:"},{"line_number":861,"context_line":"            path +\u003d \u0027:conf\u003d\u0027 + self.ceph_conf"},{"line_number":862,"context_line":""},{"line_number":863,"context_line":"        super(Rbd, self).__init__(path, \"block\", \"rbd\", is_block_dev\u003dFalse)"},{"line_number":864,"context_line":""},{"line_number":865,"context_line":"        self.driver \u003d rbd_utils.RBDDriver("},{"line_number":866,"context_line":"            pool\u003dself.pool,"}],"source_content_type":"text/x-python","patch_set":15,"id":"3ac371cc_60ba4425","side":"PARENT","line":863,"updated":"2016-08-15 16:40:11.000000000","message":"Looks like this was a bug as well...","commit_id":"f67cbfd96d15eb7cfd9fb8083db67ee3eb7f2379"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"25be4c90b03ae86c08a48ad331371dd483448082","unresolved":false,"context_lines":[{"line_number":860,"context_line":"        if self.ceph_conf:"},{"line_number":861,"context_line":"            path +\u003d \u0027:conf\u003d\u0027 + self.ceph_conf"},{"line_number":862,"context_line":""},{"line_number":863,"context_line":"        super(Rbd, self).__init__(path, \"block\", \"rbd\", is_block_dev\u003dFalse)"},{"line_number":864,"context_line":""},{"line_number":865,"context_line":"        self.driver \u003d rbd_utils.RBDDriver("},{"line_number":866,"context_line":"            pool\u003dself.pool,"}],"source_content_type":"text/x-python","patch_set":15,"id":"3ac371cc_3e3e2bda","side":"PARENT","line":863,"in_reply_to":"3ac371cc_60ba4425","updated":"2016-08-17 17:39:45.000000000","message":"This one\u0027s ok, as this is the default value anyway.","commit_id":"f67cbfd96d15eb7cfd9fb8083db67ee3eb7f2379"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"cf82089a59713b74d26ced087010e400a49a58e8","unresolved":false,"context_lines":[{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    SUPPORTS_CLONE \u003d False"},{"line_number":58,"context_line":"    is_block_dev \u003d False"},{"line_number":59,"context_line":"    \u0027\u0027\u0027True if disks created by this backend are presented to the host as"},{"line_number":60,"context_line":"    block devices, False otherwise."},{"line_number":61,"context_line":"    \u0027\u0027\u0027"},{"line_number":62,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"3ac371cc_20b04c43","line":59,"updated":"2016-08-15 16:40:11.000000000","message":"femto-nit: use \"\"\" not \u0027\u0027\u0027 to be consistent with everywhere else in Nova.","commit_id":"73bf1fa32ba4e2305f0544d1c6388eb6aba1db84"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"29626a92947858debc7a7ba438df784c8a7f9276","unresolved":false,"context_lines":[{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    SUPPORTS_CLONE \u003d False"},{"line_number":58,"context_line":"    is_block_dev \u003d False"},{"line_number":59,"context_line":"    \u0027\u0027\u0027True if disks created by this backend are presented to the host as"},{"line_number":60,"context_line":"    block devices, False otherwise."},{"line_number":61,"context_line":"    \u0027\u0027\u0027"},{"line_number":62,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"3ac371cc_133368ac","line":59,"in_reply_to":"3ac371cc_20b04c43","updated":"2016-08-17 17:16:13.000000000","message":"Will update as I\u0027m updating anyway.","commit_id":"73bf1fa32ba4e2305f0544d1c6388eb6aba1db84"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"cf82089a59713b74d26ced087010e400a49a58e8","unresolved":false,"context_lines":[{"line_number":119,"context_line":"        :param context: The current request context."},{"line_number":120,"context_line":"        :param func: A function, taking a path argument, which will write data"},{"line_number":121,"context_line":"                     to the given path. An optional _is_block_dev kwarg"},{"line_number":122,"context_line":"                     indicates that the target path is a block device."},{"line_number":123,"context_line":"        :param cache_name: A name which will be used as a cache key for the"},{"line_number":124,"context_line":"                           output of the given function."},{"line_number":125,"context_line":"        :param size: The size of the disk to create, in bytes."}],"source_content_type":"text/x-python","patch_set":15,"id":"3ac371cc_00ad50e9","line":122,"updated":"2016-08-15 16:40:11.000000000","message":"I don\u0027t believe the above docstring modification is correct...","commit_id":"73bf1fa32ba4e2305f0544d1c6388eb6aba1db84"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"29626a92947858debc7a7ba438df784c8a7f9276","unresolved":false,"context_lines":[{"line_number":119,"context_line":"        :param context: The current request context."},{"line_number":120,"context_line":"        :param func: A function, taking a path argument, which will write data"},{"line_number":121,"context_line":"                     to the given path. An optional _is_block_dev kwarg"},{"line_number":122,"context_line":"                     indicates that the target path is a block device."},{"line_number":123,"context_line":"        :param cache_name: A name which will be used as a cache key for the"},{"line_number":124,"context_line":"                           output of the given function."},{"line_number":125,"context_line":"        :param size: The size of the disk to create, in bytes."}],"source_content_type":"text/x-python","patch_set":15,"id":"3ac371cc_93f8f8c4","line":122,"in_reply_to":"3ac371cc_00ad50e9","updated":"2016-08-17 17:16:13.000000000","message":"Yup, should be \u0027is_block_dev\u0027 kwarg.","commit_id":"73bf1fa32ba4e2305f0544d1c6388eb6aba1db84"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"2e14516ae304b2195038af7c4dc2588db98de3db","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    is_block_dev \u003d False"},{"line_number":59,"context_line":"    \"\"\"True if disks created by this backend are presented to the host as"},{"line_number":60,"context_line":"    block devices, False otherwise."},{"line_number":61,"context_line":"    \"\"\""},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def __init__(self, path, source_type, driver_format):"},{"line_number":64,"context_line":"        \"\"\"Image initialization."}],"source_content_type":"text/x-python","patch_set":18,"id":"5a74a57a_921a9b7b","line":61,"updated":"2016-11-29 15:44:51.000000000","message":"Probably the comment should precedes the declaration","commit_id":"3ada2ccb8d27888d3998715a47f065630c8900ff"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"1e37fedec8dd3c31c8365e122d80382e8c926ef1","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    is_block_dev \u003d False"},{"line_number":59,"context_line":"    \"\"\"True if disks created by this backend are presented to the host as"},{"line_number":60,"context_line":"    block devices, False otherwise."},{"line_number":61,"context_line":"    \"\"\""},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def __init__(self, path, source_type, driver_format):"},{"line_number":64,"context_line":"        \"\"\"Image initialization."}],"source_content_type":"text/x-python","patch_set":18,"id":"3a71b18c_ff0aba1e","line":61,"in_reply_to":"3a71b18c_79fd066d","updated":"2016-12-07 09:49:12.000000000","message":"heh, correct, my fault. But does it mean that it shall be placed below the class constants?","commit_id":"3ada2ccb8d27888d3998715a47f065630c8900ff"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"462b9efb5e83da7c00becf511f8458674cffe6c5","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    is_block_dev \u003d False"},{"line_number":59,"context_line":"    \"\"\"True if disks created by this backend are presented to the host as"},{"line_number":60,"context_line":"    block devices, False otherwise."},{"line_number":61,"context_line":"    \"\"\""},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def __init__(self, path, source_type, driver_format):"},{"line_number":64,"context_line":"        \"\"\"Image initialization."}],"source_content_type":"text/x-python","patch_set":18,"id":"3a71b18c_bf4f6290","line":61,"in_reply_to":"3a71b18c_ff0aba1e","updated":"2016-12-07 10:17:47.000000000","message":"Pretty sure. All other docstrings live below.","commit_id":"3ada2ccb8d27888d3998715a47f065630c8900ff"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"632ecf36407643d21d42c7ec22a368c43c09e60a","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    is_block_dev \u003d False"},{"line_number":59,"context_line":"    \"\"\"True if disks created by this backend are presented to the host as"},{"line_number":60,"context_line":"    block devices, False otherwise."},{"line_number":61,"context_line":"    \"\"\""},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def __init__(self, path, source_type, driver_format):"},{"line_number":64,"context_line":"        \"\"\"Image initialization."}],"source_content_type":"text/x-python","patch_set":18,"id":"3a71b18c_79fd066d","line":61,"in_reply_to":"5a74a57a_921a9b7b","updated":"2016-12-06 18:06:22.000000000","message":"It\u0027s not a comment: it\u0027s a docstring!","commit_id":"3ada2ccb8d27888d3998715a47f065630c8900ff"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"1e37fedec8dd3c31c8365e122d80382e8c926ef1","unresolved":false,"context_lines":[{"line_number":292,"context_line":"        def fetch_func_sync(target, *args, **kwargs):"},{"line_number":293,"context_line":"            # The image may have been fetched while a subsequent"},{"line_number":294,"context_line":"            # call was waiting to obtain the lock."},{"line_number":295,"context_line":"            if not os.path.exists(target):"},{"line_number":296,"context_line":"                fetch_func(target\u003dtarget, *args, **kwargs)"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"        base_dir \u003d os.path.join(CONF.instances_path,"}],"source_content_type":"text/x-python","patch_set":18,"id":"3a71b18c_dff17e02","line":295,"updated":"2016-12-07 09:49:12.000000000","message":"As i tried to explain in the previous patch, this line prevents _create_ephemeral and _create_swap to be called for lvm backend. I think if one of the patch goals is to fix lvm swap, it must be fixed indeed.","commit_id":"3ada2ccb8d27888d3998715a47f065630c8900ff"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"462b9efb5e83da7c00becf511f8458674cffe6c5","unresolved":false,"context_lines":[{"line_number":292,"context_line":"        def fetch_func_sync(target, *args, **kwargs):"},{"line_number":293,"context_line":"            # The image may have been fetched while a subsequent"},{"line_number":294,"context_line":"            # call was waiting to obtain the lock."},{"line_number":295,"context_line":"            if not os.path.exists(target):"},{"line_number":296,"context_line":"                fetch_func(target\u003dtarget, *args, **kwargs)"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"        base_dir \u003d os.path.join(CONF.instances_path,"}],"source_content_type":"text/x-python","patch_set":18,"id":"3a71b18c_02e9ddb6","line":295,"in_reply_to":"3a71b18c_dff17e02","updated":"2016-12-07 10:17:47.000000000","message":"Ah... I see what you mean: because in the ephemeral path we already created the LVM volume, we now won\u0027t execute fetch_func because target already exists. I had missed that before.\n\nSo, by the looks of it this has always been broken for ephemerals. By making swap the same as ephemerals, I\u0027ve made swap and ephemerals broken in the same way.\n\nHowever, given that:\n\n  1. This was already broken.\n  2. It\u0027s absurdly convoluted.\n  3. Attempting to fix it at this point in the series will make all the backends even more convoluted.\n  4. It gets fixed later in the series when we replace the LVM backend.\n\nI think that, on balance, having them both broken in the same way is a win. At least there\u0027s only 1 code path.","commit_id":"3ada2ccb8d27888d3998715a47f065630c8900ff"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"2e14516ae304b2195038af7c4dc2588db98de3db","unresolved":false,"context_lines":[{"line_number":785,"context_line":"            if resize:"},{"line_number":786,"context_line":"                disk.resize2fs(self.path, run_as_root\u003dTrue)"},{"line_number":787,"context_line":""},{"line_number":788,"context_line":"        generated \u003d \u0027ephemeral_size\u0027 in kwargs"},{"line_number":789,"context_line":"        if self.ephemeral_key_uuid is not None:"},{"line_number":790,"context_line":"            if \u0027context\u0027 in kwargs:"},{"line_number":791,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":18,"id":"5a74a57a_cd3f1285","line":788,"updated":"2016-11-29 15:44:51.000000000","message":"Now we can analyze image_id instead, like flat backend does. And as the result - remove ephemeral_size\u003d\u0027dummy\u0027 from L149","commit_id":"3ada2ccb8d27888d3998715a47f065630c8900ff"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"632ecf36407643d21d42c7ec22a368c43c09e60a","unresolved":false,"context_lines":[{"line_number":785,"context_line":"            if resize:"},{"line_number":786,"context_line":"                disk.resize2fs(self.path, run_as_root\u003dTrue)"},{"line_number":787,"context_line":""},{"line_number":788,"context_line":"        generated \u003d \u0027ephemeral_size\u0027 in kwargs"},{"line_number":789,"context_line":"        if self.ephemeral_key_uuid is not None:"},{"line_number":790,"context_line":"            if \u0027context\u0027 in kwargs:"},{"line_number":791,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":18,"id":"3a71b18c_798266c9","line":788,"in_reply_to":"5a74a57a_cd3f1285","updated":"2016-12-06 18:06:22.000000000","message":"Could do, but I\u0027m trying not to change this code yet. That ugliness gets deleted anyway when the shim layer is deleted later in the series.","commit_id":"3ada2ccb8d27888d3998715a47f065630c8900ff"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8fb3cdcfb25a827a50795f41f122c6fd20c6db8f","unresolved":false,"context_lines":[{"line_number":55,"context_line":"class Image(object):"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    SUPPORTS_CLONE \u003d False"},{"line_number":58,"context_line":"    is_block_dev \u003d False"},{"line_number":59,"context_line":"    \"\"\"True if disks created by this backend are presented to the host as"},{"line_number":60,"context_line":"    block devices, False otherwise."},{"line_number":61,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":22,"id":"ba5201f7_8b91299c","line":58,"range":{"start_line":58,"start_character":4,"end_line":58,"end_character":16},"updated":"2017-01-03 11:00:05.000000000","message":"nit: This should probably be \u0027IS_BLOCK_DEV\u0027, seeing as it\u0027s a constant","commit_id":"f5d20b3eef52977520ac44b5cb1164211b1f2b8e"}]}
